diff --git a/Source/DiabloUI/settingsmenu.cpp b/Source/DiabloUI/settingsmenu.cpp index 3164d33ce..57492ea58 100644 --- a/Source/DiabloUI/settingsmenu.cpp +++ b/Source/DiabloUI/settingsmenu.cpp @@ -5,6 +5,7 @@ #include "control.h" #include "engine/render/text_render.hpp" #include "hwcursor.hpp" +#include "miniwin/miniwin.h" #include "options.h" #include "utils/language.h" #include "utils/utf8.hpp" diff --git a/Source/capture.cpp b/Source/capture.cpp index 6ea215a6b..56fb6a603 100644 --- a/Source/capture.cpp +++ b/Source/capture.cpp @@ -54,7 +54,7 @@ bool CaptureHdr(int16_t width, int16_t height, std::ofstream *out) */ bool CapturePal(SDL_Color *palette, std::ofstream *out) { - BYTE pcxPalette[1 + 256 * 3]; + uint8_t pcxPalette[1 + 256 * 3]; pcxPalette[0] = 12; for (int i = 0; i < 256; i++) { @@ -75,12 +75,12 @@ bool CapturePal(SDL_Color *palette, std::ofstream *out) * @return Output buffer */ -BYTE *CaptureEnc(BYTE *src, BYTE *dst, int width) +uint8_t *CaptureEnc(uint8_t *src, uint8_t *dst, int width) { int rleLength; do { - BYTE rlePixel = *src; + uint8_t rlePixel = *src; src++; rleLength = 1; @@ -119,10 +119,10 @@ BYTE *CaptureEnc(BYTE *src, BYTE *dst, int width) bool CapturePix(const Surface &buf, std::ofstream *out) { int width = buf.w(); - std::unique_ptr pBuffer { new BYTE[2 * width] }; - BYTE *pixels = buf.begin(); + std::unique_ptr pBuffer { new uint8_t[2 * width] }; + uint8_t *pixels = buf.begin(); for (int height = buf.h(); height > 0; height--) { - const BYTE *pBufferEnd = CaptureEnc(pixels, pBuffer.get(), width); + const uint8_t *pBufferEnd = CaptureEnc(pixels, pBuffer.get(), width); pixels += buf.pitch(); out->write(reinterpret_cast(pBuffer.get()), pBufferEnd - pBuffer.get()); if (out->fail()) diff --git a/Source/control.cpp b/Source/control.cpp index eabf0be4b..493ac8e0d 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -31,6 +31,7 @@ #include "levels/trigs.h" #include "lighting.h" #include "minitext.h" +#include "miniwin/miniwin.h" #include "missiles.h" #include "options.h" #include "panels/charpanel.hpp" diff --git a/Source/controls/game_controls.cpp b/Source/controls/game_controls.cpp index e5a1bf4dd..139f7386e 100644 --- a/Source/controls/game_controls.cpp +++ b/Source/controls/game_controls.cpp @@ -4,6 +4,7 @@ #include "controls/controller.h" #include "controls/controller_motion.h" +#include "miniwin/miniwin.h" #ifndef USE_SDL1 #include "controls/devices/game_controller.h" #endif diff --git a/Source/controls/plrctrls.cpp b/Source/controls/plrctrls.cpp index 70bdbb85c..dd44371ae 100644 --- a/Source/controls/plrctrls.cpp +++ b/Source/controls/plrctrls.cpp @@ -11,6 +11,7 @@ #include "automap.h" #include "control.h" #include "controls/controller_motion.h" +#include "miniwin/miniwin.h" #ifndef USE_SDL1 #include "controls/devices/game_controller.h" #endif diff --git a/Source/cursor.h b/Source/cursor.h index 6b810d8a6..ced3b06b1 100644 --- a/Source/cursor.h +++ b/Source/cursor.h @@ -10,7 +10,6 @@ #include "engine.h" #include "engine/cel_sprite.hpp" -#include "miniwin/miniwin.h" #include "utils/attributes.h" #include "utils/stdcompat/optional.hpp" diff --git a/Source/debug.cpp b/Source/debug.cpp index f418c55d1..39dbe278a 100644 --- a/Source/debug.cpp +++ b/Source/debug.cpp @@ -20,6 +20,7 @@ #include "inv.h" #include "levels/setmaps.h" #include "lighting.h" +#include "miniwin/miniwin.h" #include "monstdat.h" #include "monster.h" #include "plrmsg.h" diff --git a/Source/diablo.cpp b/Source/diablo.cpp index fbacf18bc..fa5fb6f1c 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -14,6 +14,7 @@ #include "capture.h" #include "cursor.h" #include "dead.h" +#include "miniwin/miniwin.h" #ifdef _DEBUG #include "debug.h" #endif diff --git a/Source/effects.cpp b/Source/effects.cpp index fceed143a..fba51f28f 100644 --- a/Source/effects.cpp +++ b/Source/effects.cpp @@ -9,6 +9,7 @@ #include "engine/sound.h" #include "engine/sound_defs.hpp" #include "init.h" +#include "miniwin/miniwin.h" #include "player.h" #include "utils/stdcompat/algorithm.hpp" #include "utils/str_cat.hpp" @@ -1161,7 +1162,7 @@ _sfx_id RndSFX(_sfx_id psfx) return static_cast<_sfx_id>(psfx + GenerateRnd(nRand)); } -void PrivSoundInit(BYTE bLoadMask) +void PrivSoundInit(uint8_t bLoadMask) { if (!gbSndInited) { return; diff --git a/Source/engine.cpp b/Source/engine.cpp index c3245a4e3..18aeef4f3 100644 --- a/Source/engine.cpp +++ b/Source/engine.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include "engine/render/common_impl.h" #include "lighting.h" diff --git a/Source/engine/render/dun_render.cpp b/Source/engine/render/dun_render.cpp index 8c953495f..1541f0157 100644 --- a/Source/engine/render/dun_render.cpp +++ b/Source/engine/render/dun_render.cpp @@ -10,6 +10,7 @@ #include #include "lighting.h" +#include "miniwin/miniwin.h" #include "options.h" #include "utils/attributes.h" diff --git a/Source/engine/render/scrollrt.cpp b/Source/engine/render/scrollrt.cpp index 57cd99f6f..76e982141 100644 --- a/Source/engine/render/scrollrt.cpp +++ b/Source/engine/render/scrollrt.cpp @@ -26,6 +26,7 @@ #include "inv.h" #include "lighting.h" #include "minitext.h" +#include "miniwin/miniwin.h" #include "missiles.h" #include "nthread.h" #include "options.h" @@ -201,7 +202,7 @@ int sgdwCursXOld; int sgdwCursYOld; uint32_t sgdwCursWdt; -BYTE sgSaveBack[8192]; +uint8_t sgSaveBack[8192]; uint32_t sgdwCursHgtOld; /** @@ -226,7 +227,7 @@ const char *const PlayerModeNames[] = { "quitting" }; -void BlitCursor(BYTE *dst, std::uint32_t dstPitch, BYTE *src, std::uint32_t srcPitch) +void BlitCursor(uint8_t *dst, std::uint32_t dstPitch, uint8_t *src, std::uint32_t srcPitch) { for (std::uint32_t i = 0; i < sgdwCursHgt; ++i, src += srcPitch, dst += dstPitch) { memcpy(dst, src, sgdwCursWdt); @@ -1024,8 +1025,8 @@ void Zoom(const Surface &out) const int srcHeight = (out.h() + 1) / 2; const int doubleableHeight = out.h() / 2; - BYTE *src = out.at(srcWidth - 1, srcHeight - 1); - BYTE *dst = out.at(viewportOffsetX + viewportWidth - 1, out.h() - 1); + uint8_t *src = out.at(srcWidth - 1, srcHeight - 1); + uint8_t *dst = out.at(viewportOffsetX + viewportWidth - 1, out.h() - 1); const bool oddViewportWidth = (viewportWidth % 2) == 1; for (int hgt = 0; hgt < doubleableHeight; hgt++) { diff --git a/Source/engine/sound.h b/Source/engine/sound.h index f4a862cb4..17c0cdda8 100644 --- a/Source/engine/sound.h +++ b/Source/engine/sound.h @@ -10,7 +10,6 @@ #include #include "levels/gendung.h" -#include "miniwin/miniwin.h" #ifndef NOSOUND #include "utils/soundsample.h" diff --git a/Source/gmenu.cpp b/Source/gmenu.cpp index d2c11cf22..70f1ce681 100644 --- a/Source/gmenu.cpp +++ b/Source/gmenu.cpp @@ -14,6 +14,7 @@ #include "engine/load_cel.hpp" #include "engine/render/cel_render.hpp" #include "engine/render/text_render.hpp" +#include "miniwin/miniwin.h" #include "options.h" #include "stores.h" #include "utils/language.h" @@ -31,7 +32,7 @@ OptionalOwnedCelSprite sgpLogo; bool mouseNavigation; TMenuItem *sgpCurrItem; int LogoAnim_tick; -BYTE LogoAnim_frame; +uint8_t LogoAnim_frame; void (*gmenu_current_option)(); int sgCurrentMenuIdx; diff --git a/Source/init.cpp b/Source/init.cpp index 818cf5d60..a785e248c 100644 --- a/Source/init.cpp +++ b/Source/init.cpp @@ -15,6 +15,7 @@ #include "DiabloUI/diabloui.h" #include "engine/assets.hpp" #include "engine/dx.h" +#include "miniwin/miniwin.h" #include "mpq/mpq_reader.hpp" #include "options.h" #include "pfile.h" diff --git a/Source/init.h b/Source/init.h index 908380344..aec33d9e1 100644 --- a/Source/init.h +++ b/Source/init.h @@ -5,12 +5,13 @@ */ #pragma once -#include "miniwin/miniwin.h" #include "mpq/mpq_reader.hpp" #include "utils/attributes.h" namespace devilution { +typedef void (*WNDPROC)(uint32_t, int32_t, int32_t); + extern bool gbActive; extern std::optional hellfire_mpq; extern WNDPROC CurrentProc; diff --git a/Source/interfac.cpp b/Source/interfac.cpp index 62faf1607..f6c9cbe70 100644 --- a/Source/interfac.cpp +++ b/Source/interfac.cpp @@ -21,6 +21,7 @@ #include "hwcursor.hpp" #include "init.h" #include "loadsave.h" +#include "miniwin/miniwin.h" #include "pfile.h" #include "plrmsg.h" #include "utils/sdl_geometry.h" @@ -37,7 +38,7 @@ uint32_t sgdwProgress; int progress_id; /** The color used for the progress bar as an index into the palette. */ -const BYTE BarColor[3] = { 138, 43, 254 }; +const uint8_t BarColor[3] = { 138, 43, 254 }; /** The screen position of the top left corner of the progress bar. */ const int BarPos[3][2] = { { 53, 37 }, { 53, 421 }, { 53, 37 } }; diff --git a/Source/inv.cpp b/Source/inv.cpp index 97e24d378..b0b68aca6 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -20,6 +20,7 @@ #include "inv_iterators.hpp" #include "levels/town.h" #include "minitext.h" +#include "miniwin/miniwin.h" #include "options.h" #include "panels/ui_panels.hpp" #include "plrmsg.h" diff --git a/Source/items.cpp b/Source/items.cpp index 477eb134a..4301711ad 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -2271,7 +2271,7 @@ bool IsItemAvailable(int i) *sgOptions.Gameplay.testBard && IsAnyOf(i, IDI_BARDSWORD, IDI_BARDDAGGER)); } -BYTE GetOutlineColor(const Item &item, bool checkReq) +uint8_t GetOutlineColor(const Item &item, bool checkReq) { if (checkReq && !item._iStatFlag) return ICOL_RED; diff --git a/Source/items.h b/Source/items.h index c1afa6e80..ba06256d4 100644 --- a/Source/items.h +++ b/Source/items.h @@ -449,7 +449,7 @@ extern bool ShowUniqueItemInfoBox; extern CornerStoneStruct CornerStone; extern bool UniqueItemFlags[128]; -BYTE GetOutlineColor(const Item &item, bool checkReq); +uint8_t GetOutlineColor(const Item &item, bool checkReq); bool IsItemAvailable(int i); bool IsUniqueAvailable(int i); void InitItemGFX(); diff --git a/Source/levels/drlg_l2.cpp b/Source/levels/drlg_l2.cpp index b7b9f308e..6e7bfcade 100644 --- a/Source/levels/drlg_l2.cpp +++ b/Source/levels/drlg_l2.cpp @@ -13,6 +13,7 @@ #include "engine/size.hpp" #include "levels/gendung.h" #include "levels/setmaps.h" +#include "miniwin/miniwin.h" #include "player.h" #include "quests.h" #include "utils/stdcompat/algorithm.hpp" diff --git a/Source/levels/drlg_l3.cpp b/Source/levels/drlg_l3.cpp index 234105a5e..0a893e554 100644 --- a/Source/levels/drlg_l3.cpp +++ b/Source/levels/drlg_l3.cpp @@ -6,6 +6,7 @@ #include "levels/gendung.h" #include "levels/setmaps.h" #include "lighting.h" +#include "miniwin/miniwin.h" #include "monster.h" #include "objdat.h" #include "objects.h" diff --git a/Source/levels/drlg_l4.cpp b/Source/levels/drlg_l4.cpp index 30104147b..c799f6b97 100644 --- a/Source/levels/drlg_l4.cpp +++ b/Source/levels/drlg_l4.cpp @@ -5,6 +5,7 @@ */ #include "levels/drlg_l4.h" +#include "miniwin/miniwin.h" #include "engine/load_file.hpp" #include "engine/random.hpp" #include "levels/gendung.h" diff --git a/Source/lighting.cpp b/Source/lighting.cpp index 91f9591a0..bfcbd5ff1 100644 --- a/Source/lighting.cpp +++ b/Source/lighting.cpp @@ -63,7 +63,7 @@ bool dovision; uint8_t lightblock[64][16][16]; /** RadiusAdj maps from VisionCrawlTable index to lighting vision radius adjustment. */ -const BYTE RadiusAdj[23] = { 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 4, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0 }; +const uint8_t RadiusAdj[23] = { 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 4, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0 }; void RotateRadius(int *x, int *y, int *dx, int *dy, int *lx, int *ly, int *bx, int *by) { @@ -428,7 +428,7 @@ void MakeLightTable() } if (leveltype == DTYPE_HELL) { - BYTE blood[16]; + uint8_t blood[16]; tbl = LightTables.data(); for (int i = 0; i < lights; i++) { int l1 = lights - i; @@ -520,7 +520,7 @@ void MakeLightTable() lightradius[j][i] = 15; } else { double fs = (double)15 * i / ((double)8 * (j + 1)); - lightradius[j][i] = (BYTE)(fs + 0.5); + lightradius[j][i] = static_cast(fs + 0.5); } } } @@ -530,10 +530,10 @@ void MakeLightTable() double fa = (sqrt((double)(16 - j))) / 128; fa *= fa; for (int i = 0; i < 128; i++) { - lightradius[15 - j][i] = 15 - (BYTE)(fa * (double)((128 - i) * (128 - i))); + lightradius[15 - j][i] = 15 - static_cast(fa * (double)((128 - i) * (128 - i))); if (lightradius[15 - j][i] > 15) lightradius[15 - j][i] = 0; - lightradius[15 - j][i] = lightradius[15 - j][i] - (BYTE)((15 - j) / 2); + lightradius[15 - j][i] = lightradius[15 - j][i] - static_cast((15 - j) / 2); if (lightradius[15 - j][i] > 15) lightradius[15 - j][i] = 0; } diff --git a/Source/lighting.h b/Source/lighting.h index cc805e67c..7f38286a1 100644 --- a/Source/lighting.h +++ b/Source/lighting.h @@ -13,7 +13,6 @@ #include "automap.h" #include "engine.h" #include "engine/point.hpp" -#include "miniwin/miniwin.h" #include "utils/attributes.h" #include "utils/stdcompat/invoke_result_t.hpp" #include "utils/stdcompat/optional.hpp" diff --git a/Source/loadsave.cpp b/Source/loadsave.cpp index dc28364e7..d9dab3f42 100644 --- a/Source/loadsave.cpp +++ b/Source/loadsave.cpp @@ -26,6 +26,7 @@ #include "inv.h" #include "lighting.h" #include "menu.h" +#include "miniwin/miniwin.h" #include "missiles.h" #include "mpq/mpq_writer.hpp" #include "pfile.h" diff --git a/Source/miniwin/miniwin.h b/Source/miniwin/miniwin.h index 7cb6f52a2..6ea88996c 100644 --- a/Source/miniwin/miniwin.h +++ b/Source/miniwin/miniwin.h @@ -24,8 +24,6 @@ namespace devilution { typedef uint32_t DWORD; typedef unsigned char BYTE; -typedef void (*WNDPROC)(uint32_t, int32_t, int32_t); - struct tagMSG { uint32_t message; int32_t wParam; diff --git a/Source/missiles.cpp b/Source/missiles.cpp index ff9ada978..f6fc738bd 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -849,7 +849,7 @@ bool MonsterTrapHit(int monsterId, int mindam, int maxdam, int dist, missile_id return false; int hit = GenerateRnd(100); - int hper = 90 - (BYTE)monster.armorClass - dist; + int hper = 90 - monster.armorClass - dist; hper = clamp(hper, 5, 95); if (monster.tryLiftGargoyle()) return true; diff --git a/Source/missiles.h b/Source/missiles.h index 6a2f9c0aa..b89b47667 100644 --- a/Source/missiles.h +++ b/Source/missiles.h @@ -10,7 +10,6 @@ #include "engine.h" #include "engine/point.hpp" -#include "miniwin/miniwin.h" #include "misdat.h" #include "monster.h" #include "player.h" diff --git a/Source/movie.cpp b/Source/movie.cpp index f0a44d3d9..46c478557 100644 --- a/Source/movie.cpp +++ b/Source/movie.cpp @@ -10,6 +10,7 @@ #include "engine/demomode.h" #include "engine/sound.h" #include "hwcursor.hpp" +#include "miniwin/miniwin.h" #include "storm/storm_svid.h" #include "utils/display.h" diff --git a/Source/mpq/mpq_writer.cpp b/Source/mpq/mpq_writer.cpp index 7bfb9ac42..133a54c1a 100644 --- a/Source/mpq/mpq_writer.cpp +++ b/Source/mpq/mpq_writer.cpp @@ -11,6 +11,7 @@ #include "appfat.h" #include "encrypt.h" #include "engine.h" +#include "miniwin/miniwin.h" #include "utils/endian.hpp" #include "utils/file_util.h" #include "utils/language.h" diff --git a/Source/msg.cpp b/Source/msg.cpp index a7f381a0d..a0c2c298e 100644 --- a/Source/msg.cpp +++ b/Source/msg.cpp @@ -24,6 +24,7 @@ #include "levels/town.h" #include "levels/trigs.h" #include "lighting.h" +#include "miniwin/miniwin.h" #include "missiles.h" #include "nthread.h" #include "objects.h" diff --git a/Source/multi.cpp b/Source/multi.cpp index 291434200..7c48a6964 100644 --- a/Source/multi.cpp +++ b/Source/multi.cpp @@ -16,6 +16,7 @@ #include "engine/random.hpp" #include "engine/world_tile.hpp" #include "menu.h" +#include "miniwin/miniwin.h" #include "nthread.h" #include "options.h" #include "pfile.h" @@ -39,7 +40,7 @@ uint16_t sgwPackPlrOffsetTbl[MAX_PLRS]; bool sgbPlayerTurnBitTbl[MAX_PLRS]; bool sgbPlayerLeftGameTbl[MAX_PLRS]; bool gbShouldValidatePackage; -BYTE gbActivePlayers; +uint8_t gbActivePlayers; bool gbGameDestroyed; bool sgbSendDeltaTbl[MAX_PLRS]; GameData sgGameInitInfo; @@ -56,7 +57,7 @@ bool gbIsMultiplayer; bool sgbTimeout; char szPlayerName[128]; bool PublicGame; -BYTE gbDeltaSender; +uint8_t gbDeltaSender; bool sgbNetInited; uint32_t player_state[MAX_PLRS]; Uint32 playerInfoTimers[MAX_PLRS]; diff --git a/Source/multi.h b/Source/multi.h index 39fabb6d3..a4858db0e 100644 --- a/Source/multi.h +++ b/Source/multi.h @@ -43,14 +43,14 @@ struct GameInfo { extern bool gbSomebodyWonGameKludge; extern char szPlayerDescript[128]; extern uint16_t sgwPackPlrOffsetTbl[MAX_PLRS]; -extern BYTE gbActivePlayers; +extern uint8_t gbActivePlayers; extern bool gbGameDestroyed; extern GameData sgGameInitInfo; extern bool gbSelectProvider; extern DVL_API_FOR_TEST bool gbIsMultiplayer; extern char szPlayerName[128]; extern bool PublicGame; -extern BYTE gbDeltaSender; +extern uint8_t gbDeltaSender; extern uint32_t player_state[MAX_PLRS]; void InitGameInfo(); diff --git a/Source/nthread.cpp b/Source/nthread.cpp index c85aa0a33..99461a5d8 100644 --- a/Source/nthread.cpp +++ b/Source/nthread.cpp @@ -17,7 +17,7 @@ namespace devilution { -BYTE sgbNetUpdateRate; +uint8_t sgbNetUpdateRate; size_t gdwMsgLenTbl[MAX_PLRS]; uint32_t gdwTurnsInTransit; uintptr_t glpMsgTbl[MAX_PLRS]; diff --git a/Source/nthread.h b/Source/nthread.h index e443e3c6e..b8f13201c 100644 --- a/Source/nthread.h +++ b/Source/nthread.h @@ -10,7 +10,7 @@ namespace devilution { -extern BYTE sgbNetUpdateRate; +extern uint8_t sgbNetUpdateRate; extern size_t gdwMsgLenTbl[MAX_PLRS]; extern uint32_t gdwTurnsInTransit; extern uintptr_t glpMsgTbl[MAX_PLRS]; diff --git a/Source/options.h b/Source/options.h index 95c6d9fd9..dcd29966b 100644 --- a/Source/options.h +++ b/Source/options.h @@ -7,6 +7,7 @@ #include #include "engine/sound_defs.hpp" +#include "miniwin/miniwin.h" #include "pack.h" #include "utils/enum_traits.h" #include "utils/stdcompat/optional.hpp" diff --git a/Source/panels/spell_list.cpp b/Source/panels/spell_list.cpp index 7e5ba6c22..b6e905e75 100644 --- a/Source/panels/spell_list.cpp +++ b/Source/panels/spell_list.cpp @@ -7,6 +7,7 @@ #include "engine/palette.h" #include "engine/render/text_render.hpp" #include "inv_iterators.hpp" +#include "miniwin/miniwin.h" #include "options.h" #include "panels/spell_icons.hpp" #include "player.h" diff --git a/Source/pfile.cpp b/Source/pfile.cpp index 9569ae891..13eb608ac 100644 --- a/Source/pfile.cpp +++ b/Source/pfile.cpp @@ -14,6 +14,7 @@ #include "init.h" #include "loadsave.h" #include "menu.h" +#include "miniwin/miniwin.h" #include "mpq/mpq_reader.hpp" #include "pack.h" #include "qol/stash.h" diff --git a/Source/player.cpp b/Source/player.cpp index a9775e7fd..d23e8049c 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -12,6 +12,7 @@ #include "controls/plrctrls.h" #include "cursor.h" #include "dead.h" +#include "miniwin/miniwin.h" #ifdef _DEBUG #include "debug.h" #endif diff --git a/Source/qol/stash.cpp b/Source/qol/stash.cpp index 28dec9e58..7f1dea7be 100644 --- a/Source/qol/stash.cpp +++ b/Source/qol/stash.cpp @@ -15,6 +15,7 @@ #include "engine/size.hpp" #include "hwcursor.hpp" #include "minitext.h" +#include "miniwin/miniwin.h" #include "stores.h" #include "utils/format_int.hpp" #include "utils/language.h" diff --git a/Source/spells.cpp b/Source/spells.cpp index 99b253319..c5f8cac36 100644 --- a/Source/spells.cpp +++ b/Source/spells.cpp @@ -7,6 +7,7 @@ #include "control.h" #include "cursor.h" +#include "miniwin/miniwin.h" #ifdef _DEBUG #include "debug.h" #endif diff --git a/Source/stores.cpp b/Source/stores.cpp index 891499a56..bb9efe231 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -2293,8 +2293,8 @@ void DrawSLine(const Surface &out, int sy) width -= SidePanelSize.width; } - BYTE *src = out.at(uiPosition.x + sx, uiPosition.y + 25); - BYTE *dst = out.at(uiPosition.x + sx, sy); + uint8_t *src = out.at(uiPosition.x + sx, uiPosition.y + 25); + uint8_t *dst = out.at(uiPosition.x + sx, sy); for (int i = 0; i < 3; i++, src += out.pitch(), dst += out.pitch()) memcpy(dst, src, width);