From 5bf0b8bc96630fcc11e3813e6c5555b6466659e5 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Wed, 10 May 2023 14:26:45 +0100 Subject: [PATCH] Add more missing includes https://github.com/diasurgical/devilutionX/pull/6095 only added includes for `uint32_t`, this PR also adds the includes for the remaining integral types. --- Source/DiabloUI/credits.cpp | 1 + Source/DiabloUI/dialogs.cpp | 1 + Source/automap.cpp | 2 ++ Source/controls/modifier_hints.cpp | 1 + Source/controls/touch/renderers.h | 2 ++ Source/cursor.cpp | 2 ++ Source/dead.cpp | 2 ++ Source/dvlnet/packet.cpp | 9 +++++---- Source/effects.cpp | 2 ++ Source/engine/actor_position.cpp | 1 + Source/engine/actor_position.hpp | 2 ++ Source/engine/animationinfo.cpp | 3 +++ Source/engine/demomode.h | 2 ++ Source/engine/events.cpp | 2 ++ Source/engine/load_cel.cpp | 3 +++ Source/engine/load_cl2.cpp | 1 + Source/engine/load_clx.cpp | 2 ++ Source/engine/load_pcx.cpp | 1 + Source/engine/render/automap_render.cpp | 2 ++ Source/engine/render/automap_render.hpp | 2 ++ Source/engine/render/clx_render.cpp | 1 + Source/engine/surface.cpp | 1 + Source/engine/trn.cpp | 7 +++++-- Source/engine/trn.hpp | 2 ++ Source/engine/world_tile.hpp | 2 ++ Source/hwcursor.hpp | 4 ++++ Source/init.cpp | 8 ++++++-- Source/levels/crypt.cpp | 2 ++ Source/levels/setmaps.cpp | 2 ++ Source/levels/themes.cpp | 2 ++ Source/levels/town.cpp | 2 ++ Source/levels/trigs.cpp | 2 ++ Source/lighting.cpp | 1 + Source/lighting.h | 1 + Source/misdat.cpp | 2 ++ Source/missiles.cpp | 1 + Source/monstdat.cpp | 4 +++- Source/movie.cpp | 2 ++ Source/panels/charpanel.cpp | 1 + Source/panels/mainpanel.cpp | 2 ++ Source/panels/spell_book.cpp | 2 ++ Source/panels/spell_icons.cpp | 2 ++ Source/panels/spell_icons.hpp | 2 ++ Source/panels/spell_list.cpp | 2 ++ Source/panels/ui_panels.hpp | 2 ++ Source/platform/locale.cpp | 2 ++ Source/platform/switch/docking.cpp | 2 ++ Source/platform/vita/keyboard.cpp | 1 + Source/qol/monhealthbar.cpp | 3 +++ Source/qol/stash.cpp | 1 + Source/qol/xpbar.cpp | 1 + Source/spells.h | 2 ++ Source/stores.h | 2 ++ Source/textdat.h | 2 ++ Source/towners.cpp | 2 ++ Source/utils/push_aulib_decoder.cpp | 1 + Source/utils/sdl_bilinear_scale.hpp | 5 +++-- Source/utils/soundsample.cpp | 1 + 58 files changed, 116 insertions(+), 11 deletions(-) diff --git a/Source/DiabloUI/credits.cpp b/Source/DiabloUI/credits.cpp index 4d40abf6b..ebe04178c 100644 --- a/Source/DiabloUI/credits.cpp +++ b/Source/DiabloUI/credits.cpp @@ -1,4 +1,5 @@ #include +#include #include #include diff --git a/Source/DiabloUI/dialogs.cpp b/Source/DiabloUI/dialogs.cpp index efbb68b20..b351aafd2 100644 --- a/Source/DiabloUI/dialogs.cpp +++ b/Source/DiabloUI/dialogs.cpp @@ -1,5 +1,6 @@ #include "DiabloUI/dialogs.h" +#include #include #include "DiabloUI/button.h" diff --git a/Source/automap.cpp b/Source/automap.cpp index 37fb38d22..50b38ebe6 100644 --- a/Source/automap.cpp +++ b/Source/automap.cpp @@ -5,6 +5,8 @@ */ #include "automap.h" +#include + #include #include "control.h" diff --git a/Source/controls/modifier_hints.cpp b/Source/controls/modifier_hints.cpp index 637392d8a..9c702dc07 100644 --- a/Source/controls/modifier_hints.cpp +++ b/Source/controls/modifier_hints.cpp @@ -1,6 +1,7 @@ #include "controls/modifier_hints.h" #include +#include #include "DiabloUI/ui_flags.hpp" #include "control.h" diff --git a/Source/controls/touch/renderers.h b/Source/controls/touch/renderers.h index e7da4afcc..a449f9519 100644 --- a/Source/controls/touch/renderers.h +++ b/Source/controls/touch/renderers.h @@ -1,5 +1,7 @@ #pragma once +#include + #include #include "controls/plrctrls.h" diff --git a/Source/cursor.cpp b/Source/cursor.cpp index 7600b44b2..c5af4f927 100644 --- a/Source/cursor.cpp +++ b/Source/cursor.cpp @@ -5,6 +5,8 @@ */ #include "cursor.h" +#include + #include #include "DiabloUI/diabloui.h" diff --git a/Source/dead.cpp b/Source/dead.cpp index 33518e702..92d9bdf40 100644 --- a/Source/dead.cpp +++ b/Source/dead.cpp @@ -5,6 +5,8 @@ */ #include "dead.h" +#include + #include "diablo.h" #include "levels/gendung.h" #include "lighting.h" diff --git a/Source/dvlnet/packet.cpp b/Source/dvlnet/packet.cpp index a7d53d3a5..08771561a 100644 --- a/Source/dvlnet/packet.cpp +++ b/Source/dvlnet/packet.cpp @@ -1,3 +1,8 @@ +#include "dvlnet/packet.h" + +#include +#include + #ifdef PACKET_ENCRYPTION #include #else @@ -5,10 +10,6 @@ #include #endif -#include - -#include "dvlnet/packet.h" - namespace devilution { namespace net { diff --git a/Source/effects.cpp b/Source/effects.cpp index 7d2f7bf32..5bca71ed4 100644 --- a/Source/effects.cpp +++ b/Source/effects.cpp @@ -5,6 +5,8 @@ */ #include "effects.h" +#include + #include "engine/random.hpp" #include "engine/sound.h" #include "engine/sound_defs.hpp" diff --git a/Source/engine/actor_position.cpp b/Source/engine/actor_position.cpp index 78d7c0cdd..d24284b4e 100644 --- a/Source/engine/actor_position.cpp +++ b/Source/engine/actor_position.cpp @@ -1,6 +1,7 @@ #include "actor_position.hpp" #include +#include namespace devilution { diff --git a/Source/engine/actor_position.hpp b/Source/engine/actor_position.hpp index 1dce0aaa0..91a10f26a 100644 --- a/Source/engine/actor_position.hpp +++ b/Source/engine/actor_position.hpp @@ -1,5 +1,7 @@ #pragma once +#include + #include "engine/animationinfo.h" #include "engine/point.hpp" #include "engine/world_tile.hpp" diff --git a/Source/engine/animationinfo.cpp b/Source/engine/animationinfo.cpp index 3af43ce0a..488e3b888 100644 --- a/Source/engine/animationinfo.cpp +++ b/Source/engine/animationinfo.cpp @@ -5,6 +5,9 @@ */ #include "animationinfo.h" + +#include + #include "appfat.h" #include "nthread.h" #include "utils/log.hpp" diff --git a/Source/engine/demomode.h b/Source/engine/demomode.h index 9ad61ff49..a18040635 100644 --- a/Source/engine/demomode.h +++ b/Source/engine/demomode.h @@ -5,6 +5,8 @@ */ #pragma once +#include + #include namespace devilution { diff --git a/Source/engine/events.cpp b/Source/engine/events.cpp index 0e66934e5..b6fac7f50 100644 --- a/Source/engine/events.cpp +++ b/Source/engine/events.cpp @@ -1,5 +1,7 @@ #include "engine/events.hpp" +#include + #include "controls/input.h" #include "engine.h" #include "engine/demomode.h" diff --git a/Source/engine/load_cel.cpp b/Source/engine/load_cel.cpp index 717a67851..c9879c40b 100644 --- a/Source/engine/load_cel.cpp +++ b/Source/engine/load_cel.cpp @@ -1,5 +1,8 @@ #include "engine/load_cel.hpp" +#include +#include + #ifdef DEBUG_CEL_TO_CL2_SIZE #include #endif diff --git a/Source/engine/load_cl2.cpp b/Source/engine/load_cl2.cpp index daf7f8469..a8deb6991 100644 --- a/Source/engine/load_cl2.cpp +++ b/Source/engine/load_cl2.cpp @@ -1,5 +1,6 @@ #include "engine/load_cl2.hpp" +#include #include #include diff --git a/Source/engine/load_clx.cpp b/Source/engine/load_clx.cpp index 0383bb8aa..6326a04ae 100644 --- a/Source/engine/load_clx.cpp +++ b/Source/engine/load_clx.cpp @@ -1,5 +1,7 @@ #include "engine/load_clx.hpp" +#include + #include #ifdef USE_SDL1 diff --git a/Source/engine/load_pcx.cpp b/Source/engine/load_pcx.cpp index 741c99616..48b23a8b9 100644 --- a/Source/engine/load_pcx.cpp +++ b/Source/engine/load_pcx.cpp @@ -1,6 +1,7 @@ #include "engine/load_pcx.hpp" #include +#include #include #include #include diff --git a/Source/engine/render/automap_render.cpp b/Source/engine/render/automap_render.cpp index 4c959ec9f..9dc5de048 100644 --- a/Source/engine/render/automap_render.cpp +++ b/Source/engine/render/automap_render.cpp @@ -5,6 +5,8 @@ */ #include "engine/render/automap_render.hpp" +#include + namespace devilution { namespace { diff --git a/Source/engine/render/automap_render.hpp b/Source/engine/render/automap_render.hpp index 8cbf87098..df342eac7 100644 --- a/Source/engine/render/automap_render.hpp +++ b/Source/engine/render/automap_render.hpp @@ -10,6 +10,8 @@ */ #pragma once +#include + #include "engine.h" #include "engine/point.hpp" diff --git a/Source/engine/render/clx_render.cpp b/Source/engine/render/clx_render.cpp index b6995af64..c438015b0 100644 --- a/Source/engine/render/clx_render.cpp +++ b/Source/engine/render/clx_render.cpp @@ -6,6 +6,7 @@ #include "clx_render.hpp" #include +#include #include "engine/render/blit_impl.hpp" #include "engine/render/scrollrt.h" diff --git a/Source/engine/surface.cpp b/Source/engine/surface.cpp index 5e023efee..95fc8c3a3 100644 --- a/Source/engine/surface.cpp +++ b/Source/engine/surface.cpp @@ -1,5 +1,6 @@ #include "engine/surface.hpp" +#include #include namespace devilution { diff --git a/Source/engine/trn.cpp b/Source/engine/trn.cpp index 5dd38cc24..051353672 100644 --- a/Source/engine/trn.cpp +++ b/Source/engine/trn.cpp @@ -1,11 +1,14 @@ -#include +#include "engine/trn.hpp" + +#include #include +#include + #ifdef _DEBUG #include "debug.h" #endif #include "engine/load_file.hpp" -#include "engine/trn.hpp" #include "lighting.h" namespace devilution { diff --git a/Source/engine/trn.hpp b/Source/engine/trn.hpp index 6b507bcb5..394bb5bc1 100644 --- a/Source/engine/trn.hpp +++ b/Source/engine/trn.hpp @@ -5,6 +5,8 @@ */ #pragma once +#include + #include "player.h" #include "utils/stdcompat/optional.hpp" diff --git a/Source/engine/world_tile.hpp b/Source/engine/world_tile.hpp index fcce9173c..740d9ec6a 100644 --- a/Source/engine/world_tile.hpp +++ b/Source/engine/world_tile.hpp @@ -1,5 +1,7 @@ #pragma once +#include + #include "engine/point.hpp" #include "engine/rectangle.hpp" #include "engine/size.hpp" diff --git a/Source/hwcursor.hpp b/Source/hwcursor.hpp index 9a3c747db..998259044 100644 --- a/Source/hwcursor.hpp +++ b/Source/hwcursor.hpp @@ -3,6 +3,10 @@ * * Hardware cursor (SDL2 only). */ +#pragma once + +#include + #include #include "options.h" diff --git a/Source/init.cpp b/Source/init.cpp index f70f6ee41..62a08b4cc 100644 --- a/Source/init.cpp +++ b/Source/init.cpp @@ -3,11 +3,15 @@ * * Implementation of routines for initializing the environment, disable screen saver, load MPQ. */ -#include -#include +#include "init.h" + +#include #include #include +#include +#include + #if (defined(_WIN64) || defined(_WIN32)) && !defined(__UWP__) && !defined(NXDK) #include #endif diff --git a/Source/levels/crypt.cpp b/Source/levels/crypt.cpp index e2b160466..136dbd1fd 100644 --- a/Source/levels/crypt.cpp +++ b/Source/levels/crypt.cpp @@ -1,5 +1,7 @@ #include "levels/crypt.h" +#include + #include "engine/load_file.hpp" #include "engine/point.hpp" #include "items.h" diff --git a/Source/levels/setmaps.cpp b/Source/levels/setmaps.cpp index 431820069..dce103dcd 100644 --- a/Source/levels/setmaps.cpp +++ b/Source/levels/setmaps.cpp @@ -1,5 +1,7 @@ #include "levels/setmaps.h" +#include + #ifdef _DEBUG #include "debug.h" #endif diff --git a/Source/levels/themes.cpp b/Source/levels/themes.cpp index f4cc16c15..afaf0b910 100644 --- a/Source/levels/themes.cpp +++ b/Source/levels/themes.cpp @@ -5,6 +5,8 @@ */ #include "levels/themes.h" +#include + #include #include "engine/path.h" diff --git a/Source/levels/town.cpp b/Source/levels/town.cpp index 45ebf2342..ab6b44cfb 100644 --- a/Source/levels/town.cpp +++ b/Source/levels/town.cpp @@ -1,5 +1,7 @@ #include "levels/town.h" +#include + #include "engine/load_file.hpp" #include "engine/random.hpp" #include "init.h" diff --git a/Source/levels/trigs.cpp b/Source/levels/trigs.cpp index 222b2d241..2da21e190 100644 --- a/Source/levels/trigs.cpp +++ b/Source/levels/trigs.cpp @@ -5,6 +5,8 @@ */ #include "levels/trigs.h" +#include + #include #include "control.h" diff --git a/Source/lighting.cpp b/Source/lighting.cpp index bd790f6f6..777c7010d 100644 --- a/Source/lighting.cpp +++ b/Source/lighting.cpp @@ -6,6 +6,7 @@ #include "lighting.h" #include +#include #include #include "automap.h" diff --git a/Source/lighting.h b/Source/lighting.h index 279cb1db0..3c6387237 100644 --- a/Source/lighting.h +++ b/Source/lighting.h @@ -6,6 +6,7 @@ #pragma once #include +#include #include #include diff --git a/Source/misdat.cpp b/Source/misdat.cpp index 4523ea64e..ef92bcd83 100644 --- a/Source/misdat.cpp +++ b/Source/misdat.cpp @@ -5,6 +5,8 @@ */ #include "misdat.h" +#include + #include "engine/load_cl2.hpp" #include "engine/load_clx.hpp" #include "missiles.h" diff --git a/Source/missiles.cpp b/Source/missiles.cpp index 34eb35821..690890d7f 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -6,6 +6,7 @@ #include "missiles.h" #include +#include #include "control.h" #include "controls/plrctrls.h" diff --git a/Source/monstdat.cpp b/Source/monstdat.cpp index 96320c38e..74d89344d 100644 --- a/Source/monstdat.cpp +++ b/Source/monstdat.cpp @@ -4,8 +4,10 @@ * Implementation of all monster data. */ #include "monstdat.h" -#include "items.h" +#include + +#include "items.h" #include "monster.h" #include "textdat.h" #include "utils/language.h" diff --git a/Source/movie.cpp b/Source/movie.cpp index 944a68b11..e74def06a 100644 --- a/Source/movie.cpp +++ b/Source/movie.cpp @@ -4,6 +4,8 @@ * Implementation of video playback. */ +#include + #include "controls/plrctrls.h" #include "diablo.h" #include "effects.h" diff --git a/Source/panels/charpanel.cpp b/Source/panels/charpanel.cpp index 10097e31d..85bc44f56 100644 --- a/Source/panels/charpanel.cpp +++ b/Source/panels/charpanel.cpp @@ -1,5 +1,6 @@ #include "panels/charpanel.hpp" +#include #include #include diff --git a/Source/panels/mainpanel.cpp b/Source/panels/mainpanel.cpp index e3f96236f..b3867117e 100644 --- a/Source/panels/mainpanel.cpp +++ b/Source/panels/mainpanel.cpp @@ -1,5 +1,7 @@ #include "panels/mainpanel.hpp" +#include + #include "control.h" #include "engine/clx_sprite.hpp" #include "engine/load_clx.hpp" diff --git a/Source/panels/spell_book.cpp b/Source/panels/spell_book.cpp index e73b26acb..417436684 100644 --- a/Source/panels/spell_book.cpp +++ b/Source/panels/spell_book.cpp @@ -1,5 +1,7 @@ #include "panels/spell_book.hpp" +#include + #include #include "control.h" diff --git a/Source/panels/spell_icons.cpp b/Source/panels/spell_icons.cpp index d92adc94b..6d65a063e 100644 --- a/Source/panels/spell_icons.cpp +++ b/Source/panels/spell_icons.cpp @@ -1,5 +1,7 @@ #include "panels/spell_icons.hpp" +#include + #include "engine.h" #include "engine/load_cel.hpp" #include "engine/load_clx.hpp" diff --git a/Source/panels/spell_icons.hpp b/Source/panels/spell_icons.hpp index dabcc42c6..d7d154150 100644 --- a/Source/panels/spell_icons.hpp +++ b/Source/panels/spell_icons.hpp @@ -1,5 +1,7 @@ #pragma once +#include + #include "engine/clx_sprite.hpp" #include "engine/point.hpp" #include "engine/surface.hpp" diff --git a/Source/panels/spell_list.cpp b/Source/panels/spell_list.cpp index 2c4a06a59..162d4dcd4 100644 --- a/Source/panels/spell_list.cpp +++ b/Source/panels/spell_list.cpp @@ -1,5 +1,7 @@ #include "panels/spell_list.hpp" +#include + #include #include "control.h" diff --git a/Source/panels/ui_panels.hpp b/Source/panels/ui_panels.hpp index 13e9b1538..7054eb79e 100644 --- a/Source/panels/ui_panels.hpp +++ b/Source/panels/ui_panels.hpp @@ -1,5 +1,7 @@ #pragma once +#include + namespace devilution { enum class UiPanels : uint8_t { diff --git a/Source/platform/locale.cpp b/Source/platform/locale.cpp index 45845f691..c00790e56 100644 --- a/Source/platform/locale.cpp +++ b/Source/platform/locale.cpp @@ -1,5 +1,7 @@ #include "locale.hpp" +#include + #ifdef __ANDROID__ #include "SDL.h" #include diff --git a/Source/platform/switch/docking.cpp b/Source/platform/switch/docking.cpp index f4a02a045..17e612cb8 100644 --- a/Source/platform/switch/docking.cpp +++ b/Source/platform/switch/docking.cpp @@ -1,5 +1,7 @@ #include "platform/switch/docking.h" +#include + #include #include diff --git a/Source/platform/vita/keyboard.cpp b/Source/platform/vita/keyboard.cpp index 35b636819..325ed5b3c 100644 --- a/Source/platform/vita/keyboard.cpp +++ b/Source/platform/vita/keyboard.cpp @@ -1,5 +1,6 @@ #include "platform/vita/keyboard.h" +#include #include #include diff --git a/Source/qol/monhealthbar.cpp b/Source/qol/monhealthbar.cpp index 29723e6ee..7537c54f1 100644 --- a/Source/qol/monhealthbar.cpp +++ b/Source/qol/monhealthbar.cpp @@ -3,6 +3,9 @@ * * Adds monster health bar QoL feature */ +#include "monhealthbar.h" + +#include #include diff --git a/Source/qol/stash.cpp b/Source/qol/stash.cpp index a1a693f2a..14e5105e3 100644 --- a/Source/qol/stash.cpp +++ b/Source/qol/stash.cpp @@ -1,5 +1,6 @@ #include "qol/stash.h" +#include #include #include diff --git a/Source/qol/xpbar.cpp b/Source/qol/xpbar.cpp index 12cea561d..647610603 100644 --- a/Source/qol/xpbar.cpp +++ b/Source/qol/xpbar.cpp @@ -6,6 +6,7 @@ #include "xpbar.h" #include +#include #include diff --git a/Source/spells.h b/Source/spells.h index b1354e3a4..671410046 100644 --- a/Source/spells.h +++ b/Source/spells.h @@ -5,6 +5,8 @@ */ #pragma once +#include + #include "player.h" namespace devilution { diff --git a/Source/stores.h b/Source/stores.h index 50ac05d7e..30d8baebc 100644 --- a/Source/stores.h +++ b/Source/stores.h @@ -5,6 +5,8 @@ */ #pragma once +#include + #include "DiabloUI/ui_flags.hpp" #include "control.h" #include "engine.h" diff --git a/Source/textdat.h b/Source/textdat.h index edfa444f1..a3faf9ad0 100644 --- a/Source/textdat.h +++ b/Source/textdat.h @@ -5,6 +5,8 @@ */ #pragma once +#include + #include "effects.h" namespace devilution { diff --git a/Source/towners.cpp b/Source/towners.cpp index 68caa21ea..dea662e26 100644 --- a/Source/towners.cpp +++ b/Source/towners.cpp @@ -1,5 +1,7 @@ #include "towners.h" +#include + #include "cursor.h" #include "engine/clx_sprite.hpp" #include "engine/load_cel.hpp" diff --git a/Source/utils/push_aulib_decoder.cpp b/Source/utils/push_aulib_decoder.cpp index cea18553b..575394061 100644 --- a/Source/utils/push_aulib_decoder.cpp +++ b/Source/utils/push_aulib_decoder.cpp @@ -1,6 +1,7 @@ #include "push_aulib_decoder.h" #include +#include #include #include #include diff --git a/Source/utils/sdl_bilinear_scale.hpp b/Source/utils/sdl_bilinear_scale.hpp index 156b154ab..220d9ddcb 100644 --- a/Source/utils/sdl_bilinear_scale.hpp +++ b/Source/utils/sdl_bilinear_scale.hpp @@ -1,5 +1,8 @@ #pragma once +#include +#include + #include #if SDL_VERSION_ATLEAST(2, 0, 0) @@ -8,8 +11,6 @@ #include #endif -#include - namespace devilution { /** diff --git a/Source/utils/soundsample.cpp b/Source/utils/soundsample.cpp index 1474b61b8..5ff865b6c 100644 --- a/Source/utils/soundsample.cpp +++ b/Source/utils/soundsample.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include