Browse Source

🧹 performance-unnecessary-value-param

pull/1638/head
Anders Jenbo 5 years ago
parent
commit
d024f79b0e
  1. 2
      Source/DiabloUI/art_draw.cpp
  2. 2
      Source/DiabloUI/art_draw.h
  3. 6
      Source/DiabloUI/diabloui.cpp
  4. 6
      Source/DiabloUI/diabloui.h
  5. 10
      Source/DiabloUI/dialogs.cpp
  6. 2
      Source/DiabloUI/dialogs.h
  7. 8
      Source/controls/modifier_hints.cpp
  8. 2
      Source/controls/modifier_hints.h
  9. 2
      Source/doom.cpp
  10. 2
      Source/doom.h
  11. 25
      Source/dvlnet/tcp_server.cpp
  12. 22
      Source/dvlnet/tcp_server.h
  13. 24
      Source/engine.cpp
  14. 24
      Source/engine.h
  15. 2
      Source/error.cpp
  16. 2
      Source/error.h
  17. 8
      Source/gmenu.cpp
  18. 4
      Source/gmenu.h
  19. 4
      Source/help.cpp
  20. 2
      Source/help.h
  21. 4
      Source/inv.cpp
  22. 4
      Source/inv.h
  23. 6
      Source/items.cpp
  24. 2
      Source/items.h
  25. 4
      Source/minitext.cpp
  26. 4
      Source/minitext.h
  27. 4
      Source/plrmsg.cpp
  28. 2
      Source/plrmsg.h
  29. 2
      Source/qol.cpp
  30. 2
      Source/qol.h
  31. 4
      Source/quests.cpp
  32. 2
      Source/quests.h
  33. 40
      Source/scrollrt.cpp
  34. 2
      Source/scrollrt.h
  35. 8
      Source/stores.cpp
  36. 4
      Source/stores.h
  37. 3
      Source/storm/storm_net.cpp

2
Source/DiabloUI/art_draw.cpp

@ -37,7 +37,7 @@ void DrawArt(Sint16 screenX, Sint16 screenY, Art *art, int nFrame, Uint16 srcW,
ErrSdl();
}
void DrawArt(CelOutputBuffer out, Sint16 screenX, Sint16 screenY, Art *art, int nFrame, Uint16 srcW, Uint16 srcH)
void DrawArt(const CelOutputBuffer &out, Sint16 screenX, Sint16 screenY, Art *art, int nFrame, Uint16 srcW, Uint16 srcH)
{
if (screenY >= gnScreenHeight || screenX >= gnScreenWidth || art->surface == nullptr)
return;

2
Source/DiabloUI/art_draw.h

@ -6,7 +6,7 @@ namespace devilution {
void DrawArt(Sint16 screenX, Sint16 screenY, Art *art, int nFrame = 0, Uint16 srcW = 0, Uint16 srcH = 0);
void DrawArt(CelOutputBuffer out, Sint16 screenX, Sint16 screenY, Art *art, int nFrame = 0, Uint16 srcW = 0, Uint16 srcH = 0);
void DrawArt(const CelOutputBuffer &out, Sint16 screenX, Sint16 screenY, Art *art, int nFrame = 0, Uint16 srcW = 0, Uint16 srcH = 0);
void DrawAnimatedArt(Art *art, int screenX, int screenY);

6
Source/DiabloUI/diabloui.cpp

@ -74,7 +74,7 @@ struct scrollBarState {
} // namespace
void UiInitList(int count, void (*fnFocus)(int value), void (*fnSelect)(int value), void (*fnEsc)(), std::vector<UiItemBase *> items, bool itemsWraps, bool (*fnYesNo)())
void UiInitList(int count, void (*fnFocus)(int value), void (*fnSelect)(int value), void (*fnEsc)(), const std::vector<UiItemBase *> &items, bool itemsWraps, bool (*fnYesNo)())
{
SelectedItem = 0;
SelectedItemMax = std::max(count - 1, 0);
@ -916,13 +916,13 @@ void LoadPalInMem(const SDL_Color *pPal)
}
}
void UiRenderItems(std::vector<UiItemBase *> items)
void UiRenderItems(const std::vector<UiItemBase *> &items)
{
for (auto &item : items)
RenderItem(item);
}
bool UiItemMouseEvents(SDL_Event *event, std::vector<UiItemBase *> items)
bool UiItemMouseEvents(SDL_Event *event, const std::vector<UiItemBase *> &items)
{
if (items.size() == 0) {
return false;

6
Source/DiabloUI/diabloui.h

@ -119,7 +119,7 @@ int UiSelectProvider(GameData *gameData);
void UiSetupPlayerInfo(char *infostr, _uiheroinfo *pInfo, Uint32 type);
void UiFadeIn();
void UiHandleEvents(SDL_Event *event);
bool UiItemMouseEvents(SDL_Event *event, std::vector<UiItemBase *> items);
bool UiItemMouseEvents(SDL_Event *event, const std::vector<UiItemBase *> &items);
Sint16 GetCenterOffset(Sint16 w, Sint16 bw = 0);
void LoadPalInMem(const SDL_Color *pPal);
void DrawMouse();
@ -129,11 +129,11 @@ void UiAddLogo(std::vector<UiItemBase *> *vecDialog, int size = LOGO_MED, int y
void UiFocusNavigationSelect();
void UiFocusNavigationEsc();
void UiFocusNavigationYesNo();
void UiInitList(int count, void (*fnFocus)(int value), void (*fnSelect)(int value), void (*fnEsc)(), std::vector<UiItemBase *> items, bool wraps = false, bool (*fnYesNo)() = NULL);
void UiInitList(int count, void (*fnFocus)(int value), void (*fnSelect)(int value), void (*fnEsc)(), const std::vector<UiItemBase *> &items, bool wraps = false, bool (*fnYesNo)() = NULL);
void UiInitScrollBar(UiScrollBar *ui_sb, std::size_t viewport_size, const std::size_t *current_offset);
void UiClearScreen();
void UiPollAndRender();
void UiRenderItems(std::vector<UiItemBase *> items);
void UiRenderItems(const std::vector<UiItemBase *> &items);
void UiInitList_clear();
void mainmenu_restart_repintro();

10
Source/DiabloUI/dialogs.cpp

@ -1,5 +1,7 @@
#include "DiabloUI/dialogs.h"
#include <utility>
#include "DiabloUI/button.h"
#include "DiabloUI/diabloui.h"
#include "DiabloUI/errorart.h"
@ -216,7 +218,7 @@ void Deinit()
vecOkDialog.clear();
}
void DialogLoop(std::vector<UiItemBase *> items, std::vector<UiItemBase *> renderBehind)
void DialogLoop(const std::vector<UiItemBase *> &items, const std::vector<UiItemBase *> &renderBehind)
{
SDL_Event event;
dialogEnd = false;
@ -254,7 +256,7 @@ void DialogLoop(std::vector<UiItemBase *> items, std::vector<UiItemBase *> rende
} // namespace
void UiOkDialog(const char *text, const char *caption, bool error, std::vector<UiItemBase *> renderBehind)
void UiOkDialog(const char *text, const char *caption, bool error, const std::vector<UiItemBase *> &renderBehind)
{
static bool inDialog = false;
@ -283,7 +285,7 @@ void UiOkDialog(const char *text, const char *caption, bool error, std::vector<U
void UiErrorOkDialog(const char *text, const char *caption, std::vector<UiItemBase *> renderBehind)
{
UiOkDialog(text, caption, /*error=*/true, renderBehind);
UiOkDialog(text, caption, /*error=*/true, std::move(renderBehind));
}
void UiErrorOkDialog(const char *text, const char *caption, bool error)
@ -293,7 +295,7 @@ void UiErrorOkDialog(const char *text, const char *caption, bool error)
void UiErrorOkDialog(const char *text, std::vector<UiItemBase *> renderBehind)
{
UiErrorOkDialog(text, nullptr, renderBehind);
UiErrorOkDialog(text, nullptr, std::move(renderBehind));
}
} // namespace devilution

2
Source/DiabloUI/dialogs.h

@ -8,6 +8,6 @@ namespace devilution {
void UiErrorOkDialog(const char *text, std::vector<UiItemBase *> renderBehind);
void UiErrorOkDialog(const char *text, const char *caption, std::vector<UiItemBase *> renderBehind);
void UiOkDialog(const char *text, const char *caption, bool error, std::vector<UiItemBase *> renderBehind);
void UiOkDialog(const char *text, const char *caption, bool error, const std::vector<UiItemBase *> &renderBehind);
} // namespace devilution

8
Source/controls/modifier_hints.cpp

@ -93,7 +93,7 @@ text_color CircleMenuHintTextColor(bool active)
return active ? COL_BLUE : COL_GOLD;
}
void DrawCircleMenuHint(CelOutputBuffer out, const CircleMenuHint &hint, int x, int y)
void DrawCircleMenuHint(const CelOutputBuffer &out, const CircleMenuHint &hint, int x, int y)
{
const int kLineHeight = 25;
PrintGameStr(out, x + hint.x_mid - hint.top_w / 2, y, hint.top, CircleMenuHintTextColor(IsTopActive(hint)));
@ -109,7 +109,7 @@ void DrawCircleMenuHint(CelOutputBuffer out, const CircleMenuHint &hint, int x,
const int kCircleMarginX = 16;
const int kCirclesTop = 76;
void DrawStartModifierMenu(CelOutputBuffer out)
void DrawStartModifierMenu(const CelOutputBuffer &out)
{
if (!start_modifier_active)
return;
@ -119,7 +119,7 @@ void DrawStartModifierMenu(CelOutputBuffer out)
DrawCircleMenuHint(out, kButtons, PANEL_LEFT + PANEL_WIDTH - kButtons.width() - kCircleMarginX, PANEL_TOP - kCirclesTop);
}
void DrawSelectModifierMenu(CelOutputBuffer out)
void DrawSelectModifierMenu(const CelOutputBuffer &out)
{
if (!select_modifier_active)
return;
@ -133,7 +133,7 @@ void DrawSelectModifierMenu(CelOutputBuffer out)
} // namespace
void DrawControllerModifierHints(CelOutputBuffer out)
void DrawControllerModifierHints(const CelOutputBuffer &out)
{
DrawStartModifierMenu(out);
DrawSelectModifierMenu(out);

2
Source/controls/modifier_hints.h

@ -4,6 +4,6 @@
namespace devilution {
void DrawControllerModifierHints(CelOutputBuffer out);
void DrawControllerModifierHints(const CelOutputBuffer &out);
} // namespace devilution

2
Source/doom.cpp

@ -88,7 +88,7 @@ void doom_close()
doom_cleanup();
}
void doom_draw(CelOutputBuffer out)
void doom_draw(const CelOutputBuffer &out)
{
if (!doomflag) {
return;

2
Source/doom.h

@ -15,6 +15,6 @@ extern int DoomQuestState;
int doom_get_frame_from_time();
void doom_init();
void doom_close();
void doom_draw(CelOutputBuffer out);
void doom_draw(const CelOutputBuffer &out);
} // namespace devilution

25
Source/dvlnet/tcp_server.cpp

@ -3,15 +3,16 @@
#include <chrono>
#include <functional>
#include <memory>
#include <utility>
#include "dvlnet/base.h"
namespace devilution::net {
tcp_server::tcp_server(asio::io_context &ioc, std::string bindaddr,
tcp_server::tcp_server(asio::io_context &ioc, const std::string &bindaddr,
unsigned short port, std::string pw)
: ioc(ioc)
, pktfty(pw)
, pktfty(std::move(pw))
{
auto addr = asio::ip::address::from_string(bindaddr);
auto ep = asio::ip::tcp::endpoint(addr, port);
@ -54,7 +55,7 @@ bool tcp_server::empty()
return true;
}
void tcp_server::start_recv(scc con)
void tcp_server::start_recv(const scc &con)
{
con->socket.async_receive(asio::buffer(con->recv_buffer),
std::bind(&tcp_server::handle_recv, this, con,
@ -62,7 +63,7 @@ void tcp_server::start_recv(scc con)
std::placeholders::_2));
}
void tcp_server::handle_recv(scc con, const asio::error_code &ec,
void tcp_server::handle_recv(const scc &con, const asio::error_code &ec,
size_t bytes_read)
{
if (ec || bytes_read == 0) {
@ -90,14 +91,14 @@ void tcp_server::handle_recv(scc con, const asio::error_code &ec,
start_recv(con);
}
void tcp_server::send_connect(scc con)
void tcp_server::send_connect(const scc &con)
{
auto pkt = pktfty.make_packet<PT_CONNECT>(PLR_MASTER, PLR_BROADCAST,
con->plr);
send_packet(*pkt);
}
void tcp_server::handle_recv_newplr(scc con, packet &pkt)
void tcp_server::handle_recv_newplr(const scc &con, packet &pkt)
{
auto newplr = next_free();
if (newplr == PLR_BROADCAST)
@ -133,7 +134,7 @@ void tcp_server::send_packet(packet &pkt)
}
}
void tcp_server::start_send(scc con, packet &pkt)
void tcp_server::start_send(const scc &con, packet &pkt)
{
const auto *frame = new buffer_t(frame_queue::make_frame(pkt.data()));
auto buf = asio::buffer(*frame);
@ -144,7 +145,7 @@ void tcp_server::start_send(scc con, packet &pkt)
});
}
void tcp_server::handle_send(scc con, const asio::error_code &ec,
void tcp_server::handle_send(const scc &con, const asio::error_code &ec,
size_t bytes_sent)
{
// empty for now
@ -159,7 +160,7 @@ void tcp_server::start_accept()
std::placeholders::_1));
}
void tcp_server::handle_accept(scc con, const asio::error_code &ec)
void tcp_server::handle_accept(const scc &con, const asio::error_code &ec)
{
if (ec)
return;
@ -175,14 +176,14 @@ void tcp_server::handle_accept(scc con, const asio::error_code &ec)
start_accept();
}
void tcp_server::start_timeout(scc con)
void tcp_server::start_timeout(const scc &con)
{
con->timer.expires_after(std::chrono::seconds(1));
con->timer.async_wait(std::bind(&tcp_server::handle_timeout, this, con,
std::placeholders::_1));
}
void tcp_server::handle_timeout(scc con, const asio::error_code &ec)
void tcp_server::handle_timeout(const scc &con, const asio::error_code &ec)
{
if (ec) {
drop_connection(con);
@ -199,7 +200,7 @@ void tcp_server::handle_timeout(scc con, const asio::error_code &ec)
start_timeout(con);
}
void tcp_server::drop_connection(scc con)
void tcp_server::drop_connection(const scc &con)
{
if (con->plr != PLR_BROADCAST) {
auto pkt = pktfty.make_packet<PT_DISCONNECT>(PLR_MASTER, PLR_BROADCAST,

22
Source/dvlnet/tcp_server.h

@ -25,7 +25,7 @@ public:
class tcp_server {
public:
tcp_server(asio::io_context &ioc, std::string bindaddr,
tcp_server(asio::io_context &ioc, const std::string &bindaddr,
unsigned short port, std::string pw);
std::string localhost_self();
void close();
@ -61,18 +61,18 @@ private:
plr_t next_free();
bool empty();
void start_accept();
void handle_accept(scc con, const asio::error_code &ec);
void start_recv(scc con);
void handle_recv(scc con, const asio::error_code &ec, size_t bytes_read);
void handle_recv_newplr(scc con, packet &pkt);
void handle_accept(const scc &con, const asio::error_code &ec);
void start_recv(const scc &con);
void handle_recv(const scc &con, const asio::error_code &ec, size_t bytes_read);
void handle_recv_newplr(const scc &con, packet &pkt);
void handle_recv_packet(packet &pkt);
void send_connect(scc con);
void send_connect(const scc &con);
void send_packet(packet &pkt);
void start_send(scc con, packet &pkt);
void handle_send(scc con, const asio::error_code &ec, size_t bytes_sent);
void start_timeout(scc con);
void handle_timeout(scc con, const asio::error_code &ec);
void drop_connection(scc con);
void start_send(const scc &con, packet &pkt);
void handle_send(const scc &con, const asio::error_code &ec, size_t bytes_sent);
void start_timeout(const scc &con);
void handle_timeout(const scc &con, const asio::error_code &ec);
void drop_connection(const scc &con);
};
} //namespace net

24
Source/engine.cpp

@ -33,7 +33,7 @@ const Uint32 RndInc = 1;
*/
const Uint32 RndMult = 0x015A4E35;
void CelDrawTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
void CelDrawTo(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
{
int nDataSize;
BYTE *pRLEBytes;
@ -43,7 +43,7 @@ void CelDrawTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, in
CelBlitSafeTo(out, sx, sy, pRLEBytes, nDataSize, nWidth);
}
void CelClippedDrawTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
void CelClippedDrawTo(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
{
BYTE *pRLEBytes;
int nDataSize;
@ -55,7 +55,7 @@ void CelClippedDrawTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int n
CelBlitSafeTo(out, sx, sy, pRLEBytes, nDataSize, nWidth);
}
void CelDrawLightTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, BYTE *tbl)
void CelDrawLightTo(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, BYTE *tbl)
{
int nDataSize;
BYTE *pRLEBytes;
@ -70,7 +70,7 @@ void CelDrawLightTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCe
CelBlitSafeTo(out, sx, sy, pRLEBytes, nDataSize, nWidth);
}
void CelClippedDrawLightTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
void CelClippedDrawLightTo(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
{
int nDataSize;
BYTE *pRLEBytes;
@ -158,7 +158,7 @@ void CelBlitSafeTo(CelOutputBuffer out, int sx, int sy, BYTE *pRLEBytes, int nDa
}
}
void CelClippedDrawSafeTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
void CelClippedDrawSafeTo(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
{
BYTE *pRLEBytes;
int nDataSize;
@ -365,7 +365,7 @@ static void CelBlitLightBlendedSafeTo(CelOutputBuffer out, int sx, int sy, BYTE
}
}
void CelClippedBlitLightTransTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
void CelClippedBlitLightTransTo(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
{
int nDataSize;
BYTE *pRLEBytes;
@ -516,14 +516,14 @@ void CelBlitOutlineTo(CelOutputBuffer out, BYTE col, int sx, int sy, BYTE *pCelB
}
}
void SetPixel(CelOutputBuffer out, int sx, int sy, BYTE col)
void SetPixel(const CelOutputBuffer &out, int sx, int sy, BYTE col)
{
if (!out.in_bounds(sx, sy))
return;
*out.at(sx, sy) = col;
}
void DrawLineTo(CelOutputBuffer out, int x0, int y0, int x1, int y1, BYTE color_index)
void DrawLineTo(const CelOutputBuffer &out, int x0, int y0, int x1, int y1, BYTE color_index)
{
int i, dx, dy, steps;
float ix, iy, sx, sy;
@ -566,7 +566,7 @@ static void DrawHalfTransparentStippledRectTo(CelOutputBuffer out, int sx, int s
}
}
void DrawHalfTransparentRectTo(CelOutputBuffer out, int sx, int sy, int width, int height)
void DrawHalfTransparentRectTo(const CelOutputBuffer &out, int sx, int sy, int width, int height)
{
if (sgOptions.Graphics.bBlendedTransparancy) {
DrawHalfTransparentBlendedRectTo(out, sx, sy, width, height);
@ -1009,7 +1009,7 @@ static void Cl2BlitLightSafe(CelOutputBuffer out, int sx, int sy, BYTE *pRLEByte
}
}
void Cl2Draw(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
void Cl2Draw(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
{
BYTE *pRLEBytes;
int nDataSize;
@ -1036,7 +1036,7 @@ void Cl2DrawOutline(CelOutputBuffer out, BYTE col, int sx, int sy, BYTE *pCelBuf
Cl2BlitOutlineSafe(out, sx, sy, pRLEBytes, nDataSize, nWidth, col);
}
void Cl2DrawLightTbl(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, char light)
void Cl2DrawLightTbl(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, char light)
{
int nDataSize, idx;
BYTE *pRLEBytes;
@ -1055,7 +1055,7 @@ void Cl2DrawLightTbl(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nC
Cl2BlitLightSafe(out, sx, sy, pRLEBytes, nDataSize, nWidth, &pLightTbl[idx]);
}
void Cl2DrawLight(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
void Cl2DrawLight(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
{
int nDataSize;
BYTE *pRLEBytes;

24
Source/engine.h

@ -223,7 +223,7 @@ struct CelOutputBuffer {
* @param nCel CEL frame number
* @param nWidth Width of sprite
*/
void CelDrawTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
void CelDrawTo(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
/**
* @briefBlit CEL sprite to the given buffer, does not perform bounds-checking.
@ -245,7 +245,7 @@ void CelDrawUnsafeTo(CelOutputBuffer out, int x, int y, BYTE *pCelBuff, int nCel
* @param nCel CEL frame number
* @param nWidth Width of sprite
*/
void CelClippedDrawTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
void CelClippedDrawTo(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
/**
* @brief Blit CEL sprite, and apply lighting, to the back buffer at the given coordinates
@ -256,7 +256,7 @@ void CelClippedDrawTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int n
* @param nCel CEL frame number
* @param nWidth Width of sprite
*/
void CelDrawLightTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, BYTE *tbl);
void CelDrawLightTo(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, BYTE *tbl);
/**
* @brief Same as CelDrawLightTo but with the option to skip parts of the top and bottom of the sprite
@ -267,7 +267,7 @@ void CelDrawLightTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCe
* @param nCel CEL frame number
* @param nWidth Width of sprite
*/
void CelClippedDrawLightTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
void CelClippedDrawLightTo(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
/**
* @brief Same as CelBlitLightTransSafeTo
@ -278,7 +278,7 @@ void CelClippedDrawLightTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff,
* @param nCel CEL frame number
* @param nWidth Width of sprite
*/
void CelClippedBlitLightTransTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
void CelClippedBlitLightTransTo(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
/**
* @brief Blit CEL sprite, and apply lighting, to the back buffer at the given coordinates, translated to a red hue
@ -312,7 +312,7 @@ void CelBlitSafeTo(CelOutputBuffer out, int sx, int sy, BYTE *pRLEBytes, int nDa
* @param nCel CEL frame number
* @param nWidth Width of sprite
*/
void CelClippedDrawSafeTo(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
void CelClippedDrawSafeTo(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
/**
* @brief Blit CEL sprite, and apply lighting, to the given buffer, checks for drawing outside the buffer
@ -369,7 +369,7 @@ void CelBlitOutlineTo(CelOutputBuffer out, BYTE col, int sx, int sy, BYTE *pCelB
* @param sy Target buffer coordinate
* @param col Color index from current palette
*/
void SetPixel(CelOutputBuffer out, int sx, int sy, BYTE col);
void SetPixel(const CelOutputBuffer &out, int sx, int sy, BYTE col);
/**
* @brief Blit CL2 sprite, to the back buffer at the given coordianates
@ -380,7 +380,7 @@ void SetPixel(CelOutputBuffer out, int sx, int sy, BYTE col);
* @param nCel CL2 frame number
* @param nWidth Width of sprite
*/
void Cl2Draw(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
void Cl2Draw(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
/**
* @brief Blit a solid colder shape one pixel larger then the given sprite shape, to the given buffer at the given coordianates
@ -404,7 +404,7 @@ void Cl2DrawOutline(CelOutputBuffer out, BYTE col, int sx, int sy, BYTE *pCelBuf
* @param nWidth Width of sprite
* @param light Light shade to use
*/
void Cl2DrawLightTbl(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, char light);
void Cl2DrawLightTbl(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, char light);
/**
* @brief Blit CL2 sprite, and apply lighting, to the given buffer at the given coordinates
@ -415,7 +415,7 @@ void Cl2DrawLightTbl(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nC
* @param nCel CL2 frame number
* @param nWidth Width of sprite
*/
void Cl2DrawLight(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
void Cl2DrawLight(const CelOutputBuffer &out, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
/**
* @brief Draw a line in the target buffer
@ -426,7 +426,7 @@ void Cl2DrawLight(CelOutputBuffer out, int sx, int sy, BYTE *pCelBuff, int nCel,
* @param y1 Back buffer coordinate
* @param color_index Color index from current palette
*/
void DrawLineTo(CelOutputBuffer out, int x0, int y0, int x1, int y1, BYTE color_index);
void DrawLineTo(const CelOutputBuffer &out, int x0, int y0, int x1, int y1, BYTE color_index);
/**
* Draws a half-transparent rectangle by blacking out odd pixels on odd lines,
@ -439,7 +439,7 @@ void DrawLineTo(CelOutputBuffer out, int x0, int y0, int x1, int y1, BYTE color_
* @param width Rectangle width
* @param height Rectangle height
*/
void DrawHalfTransparentRectTo(CelOutputBuffer out, int sx, int sy, int width, int height);
void DrawHalfTransparentRectTo(const CelOutputBuffer &out, int sx, int sy, int width, int height);
/**
* @brief Calculate the best fit direction between two points

2
Source/error.cpp

@ -104,7 +104,7 @@ void ClrDiabloMsg()
#define DIALOG_Y ((gnScreenHeight - PANEL_HEIGHT) / 2 - 18)
void DrawDiabloMsg(CelOutputBuffer out)
void DrawDiabloMsg(const CelOutputBuffer &out)
{
int i, len, width, sx, sy;
BYTE c;

2
Source/error.h

@ -74,6 +74,6 @@ extern diablo_message msgflag;
void InitDiabloMsg(diablo_message e);
void ClrDiabloMsg();
void DrawDiabloMsg(CelOutputBuffer out);
void DrawDiabloMsg(const CelOutputBuffer &out);
} // namespace devilution

8
Source/gmenu.cpp

@ -54,7 +54,7 @@ const BYTE lfontkern[] = {
11, 10, 12, 11, 21, 23
};
static void gmenu_print_text(CelOutputBuffer out, int x, int y, const char *pszStr)
static void gmenu_print_text(const CelOutputBuffer &out, int x, int y, const char *pszStr)
{
BYTE c;
@ -67,7 +67,7 @@ static void gmenu_print_text(CelOutputBuffer out, int x, int y, const char *pszS
}
}
void gmenu_draw_pause(CelOutputBuffer out)
void gmenu_draw_pause(const CelOutputBuffer &out)
{
if (currlevel != 0)
RedBack(out);
@ -211,7 +211,7 @@ static int gmenu_get_lfont(TMenuItem *pItem)
return i - 2;
}
static void gmenu_draw_menu_item(CelOutputBuffer out, TMenuItem *pItem, int y)
static void gmenu_draw_menu_item(const CelOutputBuffer &out, TMenuItem *pItem, int y)
{
DWORD w, x, nSteps, step, pos;
w = gmenu_get_lfont(pItem);
@ -245,7 +245,7 @@ static void GameMenuMove()
gmenu_up_down(move_dir.y == AxisDirectionY_DOWN);
}
void gmenu_draw(CelOutputBuffer out)
void gmenu_draw(const CelOutputBuffer &out)
{
int y;
TMenuItem *i;

4
Source/gmenu.h

@ -20,12 +20,12 @@ struct TMenuItem {
extern TMenuItem *sgpCurrentMenu;
void gmenu_draw_pause(CelOutputBuffer out);
void gmenu_draw_pause(const CelOutputBuffer &out);
void FreeGMenu();
void gmenu_init_menu();
bool gmenu_is_active();
void gmenu_set_items(TMenuItem *pItem, void (*gmFunc)(TMenuItem *));
void gmenu_draw(CelOutputBuffer out);
void gmenu_draw(const CelOutputBuffer &out);
bool gmenu_presskeys(int vkey);
bool gmenu_on_mouse_move();
bool gmenu_left_mouse(bool isDown);

4
Source/help.cpp

@ -457,7 +457,7 @@ void InitHelp()
helpflag = false;
}
static void DrawHelpLine(CelOutputBuffer out, int x, int y, char *text, text_color color)
static void DrawHelpLine(const CelOutputBuffer &out, int x, int y, char *text, text_color color)
{
int sx, sy, width;
BYTE c;
@ -478,7 +478,7 @@ static void DrawHelpLine(CelOutputBuffer out, int x, int y, char *text, text_col
}
}
void DrawHelp(CelOutputBuffer out)
void DrawHelp(const CelOutputBuffer &out)
{
int i, c, w;
const char *s;

2
Source/help.h

@ -12,7 +12,7 @@ namespace devilution {
extern bool helpflag;
void InitHelp();
void DrawHelp(CelOutputBuffer out);
void DrawHelp(const CelOutputBuffer &out);
void DisplayHelp();
void HelpScrollUp();
void HelpScrollDown();

4
Source/inv.cpp

@ -168,7 +168,7 @@ static void InvDrawSlotBack(CelOutputBuffer out, int X, int Y, int W, int H)
}
}
void DrawInv(CelOutputBuffer out)
void DrawInv(const CelOutputBuffer &out)
{
int frame, frame_width, i, j, ii;
BYTE *cels;
@ -300,7 +300,7 @@ void DrawInv(CelOutputBuffer out)
}
}
void DrawInvBelt(CelOutputBuffer out)
void DrawInvBelt(const CelOutputBuffer &out)
{
int i, frame, frame_width;
BYTE fi, ff;

4
Source/inv.h

@ -84,9 +84,9 @@ void InitInv();
/**
* @brief Render the inventory panel to the given buffer.
*/
void DrawInv(CelOutputBuffer out);
void DrawInv(const CelOutputBuffer &out);
void DrawInvBelt(CelOutputBuffer out);
void DrawInvBelt(const CelOutputBuffer &out);
bool AutoEquipEnabled(const PlayerStruct &player, const ItemStruct &item);
bool AutoEquip(int playerNumber, const ItemStruct &item, bool persistItem = true);
bool AutoPlaceItemInInventory(int playerNumber, const ItemStruct &item, bool persistItem = false);

6
Source/items.cpp

@ -3823,13 +3823,13 @@ void PrintItemPower(char plidx, ItemStruct *x)
}
}
static void DrawUTextBack(CelOutputBuffer out)
static void DrawUTextBack(const CelOutputBuffer &out)
{
CelDrawTo(out, RIGHT_PANEL_X - SPANEL_WIDTH + 24, 327, pSTextBoxCels, 1, 271);
DrawHalfTransparentRectTo(out, RIGHT_PANEL_X - SPANEL_WIDTH + 27, 28, 265, 297);
}
void PrintUString(CelOutputBuffer out, int x, int y, bool cjustflag, const char *str, text_color col)
void PrintUString(const CelOutputBuffer &out, int x, int y, bool cjustflag, const char *str, text_color col)
{
int len, width, sx, sy, i, k;
BYTE c;
@ -3866,7 +3866,7 @@ static void DrawULine(CelOutputBuffer out, int y)
memcpy(dst, src, 267); // BUGFIX: should be 267 (fixed)
}
void DrawUniqueInfo(CelOutputBuffer out)
void DrawUniqueInfo(const CelOutputBuffer &out)
{
int uid, y;

2
Source/items.h

@ -420,7 +420,7 @@ void DoRepair(int pnum, int cii);
void DoRecharge(int pnum, int cii);
void DoOil(int pnum, int cii);
void PrintItemPower(char plidx, ItemStruct *x);
void DrawUniqueInfo(CelOutputBuffer out);
void DrawUniqueInfo(const CelOutputBuffer &out);
void PrintItemDetails(ItemStruct *x);
void PrintItemDur(ItemStruct *x);
void UseItem(int p, item_misc_id Mid, spell_id spl);

4
Source/minitext.cpp

@ -250,13 +250,13 @@ void InitQTextMsg(int m)
PlaySFX(alltext[m].sfxnr);
}
void DrawQTextBack(CelOutputBuffer out)
void DrawQTextBack(const CelOutputBuffer &out)
{
CelDrawTo(out, PANEL_X + 24, 327 + UI_OFFSET_Y, pTextBoxCels, 1, 591);
DrawHalfTransparentRectTo(out, PANEL_X + 27, UI_OFFSET_Y + 28, 585, 297);
}
void DrawQText(CelOutputBuffer out)
void DrawQText(const CelOutputBuffer &out)
{
DrawQTextBack(out);
DrawQTextContent();

4
Source/minitext.h

@ -18,11 +18,11 @@ void InitQTextMsg(int m);
/**
* @brief Draw the quest dialog window decoration and background.
*/
void DrawQTextBack(CelOutputBuffer out);
void DrawQTextBack(const CelOutputBuffer &out);
/**
* @brief Draw the quest dialog window text.
*/
void DrawQText(CelOutputBuffer out);
void DrawQText(const CelOutputBuffer &out);
} // namespace devilution

4
Source/plrmsg.cpp

@ -89,7 +89,7 @@ void InitPlrMsg()
plr_msg_slot = 0;
}
static void PrintPlrMsg(CelOutputBuffer out, DWORD x, DWORD y, DWORD width, const char *str, text_color col)
static void PrintPlrMsg(const CelOutputBuffer &out, DWORD x, DWORD y, DWORD width, const char *str, text_color col)
{
int line = 0;
@ -130,7 +130,7 @@ static void PrintPlrMsg(CelOutputBuffer out, DWORD x, DWORD y, DWORD width, cons
}
}
void DrawPlrMsg(CelOutputBuffer out)
void DrawPlrMsg(const CelOutputBuffer &out)
{
int i;
DWORD x = 10;

2
Source/plrmsg.h

@ -21,6 +21,6 @@ size_t EventPlrMsg(const char *pszFmt, ...);
void SendPlrMsg(int pnum, const char *pszStr);
void ClearPlrMsg();
void InitPlrMsg();
void DrawPlrMsg(CelOutputBuffer out);
void DrawPlrMsg(const CelOutputBuffer &out);
} // namespace devilution

2
Source/qol.cpp

@ -68,7 +68,7 @@ void InitQol()
InitXPBar();
}
void DrawMonsterHealthBar(CelOutputBuffer out)
void DrawMonsterHealthBar(const CelOutputBuffer &out)
{
if (!sgOptions.Gameplay.bEnemyHealthBar)
return;

2
Source/qol.h

@ -11,7 +11,7 @@ namespace devilution {
void FreeQol();
void InitQol();
void DrawMonsterHealthBar(CelOutputBuffer out);
void DrawMonsterHealthBar(const CelOutputBuffer &out);
void AutoGoldPickup(int pnum);
} // namespace devilution

4
Source/quests.cpp

@ -728,7 +728,7 @@ void ResyncQuests()
}
}
static void PrintQLString(CelOutputBuffer out, int x, int y, bool cjustflag, const char *str, text_color col)
static void PrintQLString(const CelOutputBuffer &out, int x, int y, bool cjustflag, const char *str, text_color col)
{
int len, width, i, k, sx, sy;
BYTE c;
@ -761,7 +761,7 @@ static void PrintQLString(CelOutputBuffer out, int x, int y, bool cjustflag, con
}
}
void DrawQuestLog(CelOutputBuffer out)
void DrawQuestLog(const CelOutputBuffer &out)
{
int y, i;

2
Source/quests.h

@ -85,7 +85,7 @@ void GetReturnLvlPos();
void LoadPWaterPalette();
void ResyncMPQuests();
void ResyncQuests();
void DrawQuestLog(CelOutputBuffer out);
void DrawQuestLog(const CelOutputBuffer &out);
void StartQuestlog();
void QuestlogUp();
void QuestlogDown();

40
Source/scrollrt.cpp

@ -248,7 +248,7 @@ static void scrollrt_draw_cursor_item(CelOutputBuffer out)
* @param sy Output buffer coordinate
* @param pre Is the sprite in the background
*/
void DrawMissilePrivate(CelOutputBuffer out, MissileStruct *m, int sx, int sy, bool pre)
void DrawMissilePrivate(const CelOutputBuffer &out, MissileStruct *m, int sx, int sy, bool pre)
{
if (m->_miPreFlag != pre || !m->_miDrawFlag)
return;
@ -283,7 +283,7 @@ void DrawMissilePrivate(CelOutputBuffer out, MissileStruct *m, int sx, int sy, b
* @param sy Output buffer coordinate
* @param pre Is the sprite in the background
*/
void DrawMissile(CelOutputBuffer out, int x, int y, int sx, int sy, bool pre)
void DrawMissile(const CelOutputBuffer &out, int x, int y, int sx, int sy, bool pre)
{
int i;
MissileStruct *m;
@ -315,7 +315,7 @@ void DrawMissile(CelOutputBuffer out, int x, int y, int sx, int sy, bool pre)
* @param my Output buffer coordinate
* @param m Id of monster
*/
static void DrawMonster(CelOutputBuffer out, int x, int y, int mx, int my, int m)
static void DrawMonster(const CelOutputBuffer &out, int x, int y, int mx, int my, int m)
{
if (m < 0 || m >= MAXMONSTERS) {
SDL_Log("Draw Monster: tried to draw illegal monster %d", m);
@ -370,7 +370,7 @@ static void DrawMonster(CelOutputBuffer out, int x, int y, int mx, int my, int m
* @param sy Output buffer coordinate
* @param lighting Should lighting be applied
*/
static void DrawManaShield(CelOutputBuffer out, int pnum, int x, int y, bool lighting)
static void DrawManaShield(const CelOutputBuffer &out, int pnum, int x, int y, bool lighting)
{
if (!plr[pnum].pManaShield)
return;
@ -405,7 +405,7 @@ static void DrawManaShield(CelOutputBuffer out, int pnum, int x, int y, bool lig
* @param nCel frame
* @param nWidth width
*/
static void DrawPlayer(CelOutputBuffer out, int pnum, int x, int y, int px, int py)
static void DrawPlayer(const CelOutputBuffer &out, int pnum, int x, int y, int px, int py)
{
if ((dFlags[x][y] & BFLAG_LIT) == 0 && !plr[myplr]._pInfraFlag && leveltype != DTYPE_TOWN) {
return;
@ -473,7 +473,7 @@ static void DrawPlayer(CelOutputBuffer out, int pnum, int x, int y, int px, int
* @param sx Output buffer coordinate
* @param sy Output buffer coordinate
*/
void DrawDeadPlayer(CelOutputBuffer out, int x, int y, int sx, int sy)
void DrawDeadPlayer(const CelOutputBuffer &out, int x, int y, int sx, int sy)
{
int i, px, py;
PlayerStruct *p;
@ -500,7 +500,7 @@ void DrawDeadPlayer(CelOutputBuffer out, int x, int y, int sx, int sy)
* @param oy Output buffer coordinate
* @param pre Is the sprite in the background
*/
static void DrawObject(CelOutputBuffer out, int x, int y, int ox, int oy, bool pre)
static void DrawObject(const CelOutputBuffer &out, int x, int y, int ox, int oy, bool pre)
{
if (dObject[x][y] == 0 || light_table_index >= lightmax)
return;
@ -547,7 +547,7 @@ static void DrawObject(CelOutputBuffer out, int x, int y, int ox, int oy, bool p
}
}
static void scrollrt_draw_dungeon(CelOutputBuffer, int, int, int, int);
static void scrollrt_draw_dungeon(const CelOutputBuffer &, int, int, int, int);
/**
* @brief Render a cell
@ -557,7 +557,7 @@ static void scrollrt_draw_dungeon(CelOutputBuffer, int, int, int, int);
* @param sx Target buffer coordinate
* @param sy Target buffer coordinate
*/
static void drawCell(CelOutputBuffer out, int x, int y, int sx, int sy)
static void drawCell(const CelOutputBuffer &out, int x, int y, int sx, int sy)
{
MICROS *pMap = &dpiece_defs_map_2[x][y];
level_piece_id = dPiece[x][y];
@ -587,7 +587,7 @@ static void drawCell(CelOutputBuffer out, int x, int y, int sx, int sy)
* @param sx Target buffer coordinate
* @param sy Target buffer coordinate
*/
static void drawFloor(CelOutputBuffer out, int x, int y, int sx, int sy)
static void drawFloor(const CelOutputBuffer &out, int x, int y, int sx, int sy)
{
cel_transparency_active = 0;
light_table_index = dLight[x][y];
@ -613,7 +613,7 @@ static void drawFloor(CelOutputBuffer out, int x, int y, int sx, int sy)
* @param sy Output buffer coordinate
* @param pre Is the sprite in the background
*/
static void DrawItem(CelOutputBuffer out, int x, int y, int sx, int sy, bool pre)
static void DrawItem(const CelOutputBuffer &out, int x, int y, int sx, int sy, bool pre)
{
int8_t bItem = dItem[x][y];
@ -653,7 +653,7 @@ static void DrawItem(CelOutputBuffer out, int x, int y, int sx, int sy, bool pre
* @param sx Output buffer coordinate
* @param sy Output buffer coordinate
*/
static void DrawMonsterHelper(CelOutputBuffer out, int x, int y, int oy, int sx, int sy)
static void DrawMonsterHelper(const CelOutputBuffer &out, int x, int y, int oy, int sx, int sy)
{
int mi, px, py;
MonsterStruct *pMonster;
@ -705,7 +705,7 @@ static void DrawMonsterHelper(CelOutputBuffer out, int x, int y, int oy, int sx,
* @param sx Output buffer coordinate
* @param sy Output buffer coordinate
*/
static void DrawPlayerHelper(CelOutputBuffer out, int x, int y, int sx, int sy)
static void DrawPlayerHelper(const CelOutputBuffer &out, int x, int y, int sx, int sy)
{
int p = dPlayer[x][y];
p = p > 0 ? p - 1 : -(p + 1);
@ -730,7 +730,7 @@ static void DrawPlayerHelper(CelOutputBuffer out, int x, int y, int sx, int sy)
* @param dx Target buffer coordinate
* @param dy Target buffer coordinate
*/
static void scrollrt_draw_dungeon(CelOutputBuffer out, int sx, int sy, int dx, int dy)
static void scrollrt_draw_dungeon(const CelOutputBuffer &out, int sx, int sy, int dx, int dy)
{
assert((DWORD)sx < MAXDUNX);
assert((DWORD)sy < MAXDUNY);
@ -844,7 +844,7 @@ static void scrollrt_draw_dungeon(CelOutputBuffer out, int sx, int sy, int dx, i
* @param rows Number of rows
* @param columns Tile in a row
*/
static void scrollrt_drawFloor(CelOutputBuffer out, int x, int y, int sx, int sy, int rows, int columns)
static void scrollrt_drawFloor(const CelOutputBuffer &out, int x, int y, int sx, int sy, int rows, int columns)
{
for (int i = 0; i < rows; i++) {
for (int j = 0; j < columns; j++) {
@ -893,7 +893,7 @@ static void scrollrt_drawFloor(CelOutputBuffer out, int x, int y, int sx, int sy
* @param rows Number of rows
* @param columns Tile in a row
*/
static void scrollrt_draw(CelOutputBuffer out, int x, int y, int sx, int sy, int rows, int columns)
static void scrollrt_draw(const CelOutputBuffer &out, int x, int y, int sx, int sy, int rows, int columns)
{
// Keep evaluating until MicroTiles can't affect screen
rows += MicroTileLen;
@ -1137,7 +1137,7 @@ void CalcViewportGeometry()
* @param x Center of view in dPiece coordinate
* @param y Center of view in dPiece coordinate
*/
static void DrawGame(CelOutputBuffer full_out, int x, int y)
static void DrawGame(const CelOutputBuffer &full_out, int x, int y)
{
int sx, sy, columns, rows;
@ -1237,9 +1237,9 @@ static void DrawGame(CelOutputBuffer full_out, int x, int y)
}
// DevilutionX extension.
extern void DrawControllerModifierHints(CelOutputBuffer out);
extern void DrawControllerModifierHints(const CelOutputBuffer &out);
void DrawView(CelOutputBuffer out, int StartX, int StartY)
void DrawView(const CelOutputBuffer &out, int StartX, int StartY)
{
DrawGame(out, StartX, StartY);
if (automapflag) {
@ -1416,7 +1416,7 @@ void EnableFrameCount()
/**
* @brief Display the current average FPS over 1 sec
*/
static void DrawFPS(CelOutputBuffer out)
static void DrawFPS(const CelOutputBuffer &out)
{
DWORD tc, frames;
char String[12];

2
Source/scrollrt.h

@ -51,7 +51,7 @@ void CalcViewportGeometry();
* @param StartX Center of view in dPiece coordinate
* @param StartY Center of view in dPiece coordinate
*/
void DrawView(CelOutputBuffer out, int StartX, int StartY);
void DrawView(const CelOutputBuffer &out, int StartX, int StartY);
void ClearScreenBuffer();
#ifdef _DEBUG

8
Source/stores.cpp

@ -79,13 +79,13 @@ text_color GetItemTextColor(ItemStruct &item)
return text_color::COL_WHITE;
}
void DrawSTextBack(CelOutputBuffer out)
void DrawSTextBack(const CelOutputBuffer &out)
{
CelDrawTo(out, PANEL_X + 344, 327 + UI_OFFSET_Y, pSTextBoxCels, 1, 271);
DrawHalfTransparentRectTo(out, PANEL_X + 347, UI_OFFSET_Y + 28, 265, 297);
}
void DrawSSlider(CelOutputBuffer out, int y1, int y2)
void DrawSSlider(const CelOutputBuffer &out, int y1, int y2)
{
int yd1, yd2, yd3;
@ -2160,7 +2160,7 @@ void FreeStoreMem()
MemFreeDbg(pSTextSlidCels);
}
void PrintSString(CelOutputBuffer out, int x, int y, bool cjustflag, const char *str, text_color col, int val)
void PrintSString(const CelOutputBuffer &out, int x, int y, bool cjustflag, const char *str, text_color col, int val)
{
int len, width, sx, sy, i, k, s;
int xx, yy;
@ -2357,7 +2357,7 @@ void StartStore(talk_id s)
stextflag = s;
}
void DrawSText(CelOutputBuffer out)
void DrawSText(const CelOutputBuffer &out)
{
int i;

4
Source/stores.h

@ -98,12 +98,12 @@ void InitStores();
int PentSpn2Spin();
void SetupTownStores();
void FreeStoreMem();
void PrintSString(CelOutputBuffer out, int x, int y, bool cjustflag, const char *str, text_color col, int val);
void PrintSString(const CelOutputBuffer &out, int x, int y, bool cjustflag, const char *str, text_color col, int val);
void DrawSLine(CelOutputBuffer out, int y);
void DrawSTextHelp();
void ClearSText(int s, int e);
void StartStore(talk_id s);
void DrawSText(CelOutputBuffer out);
void DrawSText(const CelOutputBuffer &out);
void STextESC();
void STextUp();
void STextDown();

3
Source/storm/storm_net.cpp

@ -2,6 +2,7 @@
#ifndef NONET
#include <mutex>
#include <thread>
#include <utility>
#endif
#include "dvlnet/abstract_net.h"
@ -239,7 +240,7 @@ std::vector<std::string> DvlNet_GetGamelist()
void DvlNet_SetPassword(std::string pw)
{
dvlnet_inst->setup_password(pw);
dvlnet_inst->setup_password(std::move(pw));
}
} // namespace devilution

Loading…
Cancel
Save