From c33182d6defe7299a055c2113c4c9e59991c91c7 Mon Sep 17 00:00:00 2001 From: Jmgr Date: Sat, 24 Apr 2021 23:56:50 +0100 Subject: [PATCH] Modernize deprecated headers --- Source/DiabloUI/diabloui.h | 2 +- Source/DiabloUI/fonts.h | 2 +- Source/DiabloUI/scrollbar.h | 2 +- Source/DiabloUI/ttf_render_wrapped.h | 2 +- Source/automap.h | 2 +- Source/control.h | 2 +- Source/controls/axis_direction.h | 2 +- Source/controls/controller_buttons.h | 2 +- Source/controls/game_controls.h | 1 - Source/controls/menu_controls.h | 2 +- Source/controls/plrctrls.h | 2 +- Source/cursor.h | 2 +- Source/dead.h | 2 +- Source/diablo.h | 2 +- Source/dvlnet/packet.h | 2 +- Source/effects.h | 2 +- Source/encrypt.h | 2 +- Source/engine.h | 2 +- Source/error.h | 2 +- Source/gendung.h | 2 +- Source/gmenu.h | 2 +- Source/interfac.cpp | 2 +- Source/interfac.h | 2 +- Source/inv.h | 2 +- Source/itemdat.h | 4 ++-- Source/items.h | 2 +- Source/miniwin/miniwin.h | 18 +++++++++--------- Source/misdat.h | 2 +- Source/missiles.h | 2 +- Source/monstdat.h | 2 +- Source/monster.h | 2 +- Source/mpqapi.h | 2 +- Source/msg.h | 2 +- Source/multi.h | 2 +- Source/objdat.h | 2 +- Source/objects.h | 2 +- Source/options.h | 2 +- Source/pack.h | 2 +- Source/platform/ctr/keyboard.cpp | 4 ++-- Source/platform/ctr/system.cpp | 4 ++-- Source/platform/switch/keyboard.cpp | 4 +--- Source/platform/switch/network.cpp | 2 +- Source/platform/vita/keyboard.cpp | 3 +-- Source/player.cpp | 2 +- Source/player.h | 2 +- Source/plrmsg.h | 2 +- Source/quests.h | 2 +- Source/scrollrt.h | 2 +- Source/sha.h | 2 +- Source/sound.h | 2 +- Source/spelldat.h | 2 +- Source/storm/storm.h | 2 +- Source/sync.h | 2 +- Source/themes.h | 2 +- Source/tmsg.h | 2 +- Source/towners.h | 2 +- Source/utils/sdl2_to_1_2_backports.h | 6 +++--- Source/utils/stubs.h | 6 +++--- test/pack_test.cpp | 2 +- test/writehero_test.cpp | 2 +- 60 files changed, 74 insertions(+), 78 deletions(-) diff --git a/Source/DiabloUI/diabloui.h b/Source/DiabloUI/diabloui.h index abe16ccf1..1c76a7195 100644 --- a/Source/DiabloUI/diabloui.h +++ b/Source/DiabloUI/diabloui.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/Source/DiabloUI/fonts.h b/Source/DiabloUI/fonts.h index b070597c5..3ae8bc556 100644 --- a/Source/DiabloUI/fonts.h +++ b/Source/DiabloUI/fonts.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include "DiabloUI/art.h" diff --git a/Source/DiabloUI/scrollbar.h b/Source/DiabloUI/scrollbar.h index 01086f40e..d657993bd 100644 --- a/Source/DiabloUI/scrollbar.h +++ b/Source/DiabloUI/scrollbar.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "DiabloUI/art.h" #include "DiabloUI/ui_item.h" diff --git a/Source/DiabloUI/ttf_render_wrapped.h b/Source/DiabloUI/ttf_render_wrapped.h index 1a35381a3..71f2a36a1 100644 --- a/Source/DiabloUI/ttf_render_wrapped.h +++ b/Source/DiabloUI/ttf_render_wrapped.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include namespace devilution { diff --git a/Source/automap.h b/Source/automap.h index c2aa271b0..1bc11cacb 100644 --- a/Source/automap.h +++ b/Source/automap.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "engine.h" #include "gendung.h" diff --git a/Source/control.h b/Source/control.h index 9b50d0afe..20ebb39bc 100644 --- a/Source/control.h +++ b/Source/control.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "engine.h" #include "spelldat.h" diff --git a/Source/controls/axis_direction.h b/Source/controls/axis_direction.h index 322aa2470..f73f64d32 100644 --- a/Source/controls/axis_direction.h +++ b/Source/controls/axis_direction.h @@ -1,6 +1,6 @@ #pragma once -#include +#include namespace devilution { diff --git a/Source/controls/controller_buttons.h b/Source/controls/controller_buttons.h index 7376471d2..32cf84ec6 100644 --- a/Source/controls/controller_buttons.h +++ b/Source/controls/controller_buttons.h @@ -1,7 +1,7 @@ #pragma once // Unifies joystick, gamepad, and keyboard controller APIs. -#include +#include namespace devilution { diff --git a/Source/controls/game_controls.h b/Source/controls/game_controls.h index 2d3475df6..cf9d3d8f1 100644 --- a/Source/controls/game_controls.h +++ b/Source/controls/game_controls.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include diff --git a/Source/controls/menu_controls.h b/Source/controls/menu_controls.h index 5919499d7..d091e5f4f 100644 --- a/Source/controls/menu_controls.h +++ b/Source/controls/menu_controls.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include namespace devilution { diff --git a/Source/controls/plrctrls.h b/Source/controls/plrctrls.h index 9f8cf7973..bffa92265 100644 --- a/Source/controls/plrctrls.h +++ b/Source/controls/plrctrls.h @@ -1,7 +1,7 @@ #pragma once // Controller actions implementation -#include +#include namespace devilution { diff --git a/Source/cursor.h b/Source/cursor.h index 74224ed02..4a766aedf 100644 --- a/Source/cursor.h +++ b/Source/cursor.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "miniwin/miniwin.h" diff --git a/Source/dead.h b/Source/dead.h index 4bdfbe6fa..d01f3b20d 100644 --- a/Source/dead.h +++ b/Source/dead.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "engine.h" diff --git a/Source/diablo.h b/Source/diablo.h index 70242b52d..4d0cdb58b 100644 --- a/Source/diablo.h +++ b/Source/diablo.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #ifdef _DEBUG #include "monstdat.h" diff --git a/Source/dvlnet/packet.h b/Source/dvlnet/packet.h index 89f456546..ea6339591 100644 --- a/Source/dvlnet/packet.h +++ b/Source/dvlnet/packet.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/Source/effects.h b/Source/effects.h index be41de0e7..c3c25d046 100644 --- a/Source/effects.h +++ b/Source/effects.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "sound.h" diff --git a/Source/encrypt.h b/Source/encrypt.h index f90f51662..ba384eed2 100644 --- a/Source/encrypt.h +++ b/Source/encrypt.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "miniwin/miniwin.h" diff --git a/Source/engine.h b/Source/engine.h index 73ddc27f8..1a66062b9 100644 --- a/Source/engine.h +++ b/Source/engine.h @@ -16,7 +16,7 @@ #include #include #include -#include +#include #ifdef USE_SDL1 #include "utils/sdl2_to_1_2_backports.h" diff --git a/Source/error.h b/Source/error.h index 3c267ca9c..d6b395fc6 100644 --- a/Source/error.h +++ b/Source/error.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "engine.h" diff --git a/Source/gendung.h b/Source/gendung.h index e9ab79055..8423ab981 100644 --- a/Source/gendung.h +++ b/Source/gendung.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "engine.h" #include "scrollrt.h" diff --git a/Source/gmenu.h b/Source/gmenu.h index 32bef3d32..10daf2684 100644 --- a/Source/gmenu.h +++ b/Source/gmenu.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "engine.h" diff --git a/Source/interfac.cpp b/Source/interfac.cpp index f0e0e07a4..0925a3990 100644 --- a/Source/interfac.cpp +++ b/Source/interfac.cpp @@ -4,7 +4,7 @@ * Implementation of load screens. */ -#include +#include #include "control.h" #include "DiabloUI/art_draw.h" diff --git a/Source/interfac.h b/Source/interfac.h index a4851d143..5a9919394 100644 --- a/Source/interfac.h +++ b/Source/interfac.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "utils/ui_fwd.h" diff --git a/Source/inv.h b/Source/inv.h index 764ec33fa..fae44a5b7 100644 --- a/Source/inv.h +++ b/Source/inv.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "items.h" #include "palette.h" diff --git a/Source/itemdat.h b/Source/itemdat.h index 30fe52cef..e94d4bd35 100644 --- a/Source/itemdat.h +++ b/Source/itemdat.h @@ -5,8 +5,8 @@ */ #pragma once -#include -#include + +#include #include "objdat.h" #include "spelldat.h" diff --git a/Source/items.h b/Source/items.h index 20a1b067c..2a14b5337 100644 --- a/Source/items.h +++ b/Source/items.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "engine.h" #include "itemdat.h" diff --git a/Source/miniwin/miniwin.h b/Source/miniwin/miniwin.h index bf823aea0..096d460d8 100644 --- a/Source/miniwin/miniwin.h +++ b/Source/miniwin/miniwin.h @@ -1,14 +1,14 @@ #pragma once -#include - -#include -#include -#include -#include -#include -#include -#include +#include + +#include +#include +#include +#include +#include +#include +#include namespace devilution { diff --git a/Source/misdat.h b/Source/misdat.h index f51b2b697..2a549823a 100644 --- a/Source/misdat.h +++ b/Source/misdat.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "effects.h" diff --git a/Source/missiles.h b/Source/missiles.h index 40963f04c..a5c26bab5 100644 --- a/Source/missiles.h +++ b/Source/missiles.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "miniwin/miniwin.h" #include "engine.h" diff --git a/Source/monstdat.h b/Source/monstdat.h index bdad2e17a..f4ba61777 100644 --- a/Source/monstdat.h +++ b/Source/monstdat.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include namespace devilution { diff --git a/Source/monster.h b/Source/monster.h index 71839fd6b..019b38787 100644 --- a/Source/monster.h +++ b/Source/monster.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "engine.h" #include "miniwin/miniwin.h" diff --git a/Source/mpqapi.h b/Source/mpqapi.h index 429578562..d756ca098 100644 --- a/Source/mpqapi.h +++ b/Source/mpqapi.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "miniwin/miniwin.h" diff --git a/Source/msg.h b/Source/msg.h index 33f384d39..116ffc520 100644 --- a/Source/msg.h +++ b/Source/msg.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "quests.h" #include "objects.h" diff --git a/Source/multi.h b/Source/multi.h index 5c217f215..ef3789693 100644 --- a/Source/multi.h +++ b/Source/multi.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "msg.h" diff --git a/Source/objdat.h b/Source/objdat.h index d992e8e7c..a8cf03a1a 100644 --- a/Source/objdat.h +++ b/Source/objdat.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "gendung.h" diff --git a/Source/objects.h b/Source/objects.h index 7861f019d..2988e7818 100644 --- a/Source/objects.h +++ b/Source/objects.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "objdat.h" #include "textdat.h" diff --git a/Source/options.h b/Source/options.h index 35c68bfde..fd546f6c5 100644 --- a/Source/options.h +++ b/Source/options.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include "pack.h" diff --git a/Source/pack.h b/Source/pack.h index f4095912b..ac5abbe4c 100644 --- a/Source/pack.h +++ b/Source/pack.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "player.h" #include "inv.h" diff --git a/Source/platform/ctr/keyboard.cpp b/Source/platform/ctr/keyboard.cpp index f64f1e68e..f3004b517 100644 --- a/Source/platform/ctr/keyboard.cpp +++ b/Source/platform/ctr/keyboard.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "platform/ctr/keyboard.h" diff --git a/Source/platform/ctr/system.cpp b/Source/platform/ctr/system.cpp index 794767ea7..853cdb8d2 100644 --- a/Source/platform/ctr/system.cpp +++ b/Source/platform/ctr/system.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include <3ds.h> #include "platform/ctr/system.h" diff --git a/Source/platform/switch/keyboard.cpp b/Source/platform/switch/keyboard.cpp index f08d1089c..93d4cd936 100644 --- a/Source/platform/switch/keyboard.cpp +++ b/Source/platform/switch/keyboard.cpp @@ -1,6 +1,4 @@ -#include -#include - +#include #include #include #include "platform/switch/keyboard.h" diff --git a/Source/platform/switch/network.cpp b/Source/platform/switch/network.cpp index e9520014b..4526f1a61 100644 --- a/Source/platform/switch/network.cpp +++ b/Source/platform/switch/network.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include "platform/switch/network.h" diff --git a/Source/platform/vita/keyboard.cpp b/Source/platform/vita/keyboard.cpp index 82bfeba4c..c766a4049 100644 --- a/Source/platform/vita/keyboard.cpp +++ b/Source/platform/vita/keyboard.cpp @@ -1,5 +1,4 @@ -#include -#include +#include #include #include diff --git a/Source/player.cpp b/Source/player.cpp index 1e5255091..3a4acd862 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -4,7 +4,7 @@ * Implementation of player functionality, leveling, actions, creation, loading, etc. */ #include -#include +#include #include "control.h" #include "cursor.h" diff --git a/Source/player.h b/Source/player.h index 00d7247e3..d962be96d 100644 --- a/Source/player.h +++ b/Source/player.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "diablo.h" #include "engine.h" diff --git a/Source/plrmsg.h b/Source/plrmsg.h index 4bbdb24f5..b8963aab7 100644 --- a/Source/plrmsg.h +++ b/Source/plrmsg.h @@ -6,7 +6,7 @@ #pragma once #include "SDL.h" -#include +#include #include "engine.h" diff --git a/Source/quests.h b/Source/quests.h index 1d43cab11..f41f2ff78 100644 --- a/Source/quests.h +++ b/Source/quests.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "engine.h" #include "gendung.h" diff --git a/Source/scrollrt.h b/Source/scrollrt.h index 84f8688bf..edad1e6bf 100644 --- a/Source/scrollrt.h +++ b/Source/scrollrt.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "engine.h" #include "miniwin/miniwin.h" diff --git a/Source/sha.h b/Source/sha.h index 933447527..e1fa4fb0c 100644 --- a/Source/sha.h +++ b/Source/sha.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include namespace devilution { diff --git a/Source/sound.h b/Source/sound.h index f6a9faba1..efd4c7013 100644 --- a/Source/sound.h +++ b/Source/sound.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "miniwin/miniwin.h" #include "utils/soundsample.h" diff --git a/Source/spelldat.h b/Source/spelldat.h index 50dc17db5..52cbce67d 100644 --- a/Source/spelldat.h +++ b/Source/spelldat.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "effects.h" diff --git a/Source/storm/storm.h b/Source/storm/storm.h index c539d01dc..866ecfb90 100644 --- a/Source/storm/storm.h +++ b/Source/storm/storm.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include "appfat.h" #include "multi.h" diff --git a/Source/sync.h b/Source/sync.h index 80b6501f7..675457585 100644 --- a/Source/sync.h +++ b/Source/sync.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "miniwin/miniwin.h" diff --git a/Source/themes.h b/Source/themes.h index da7977f88..735dc5e45 100644 --- a/Source/themes.h +++ b/Source/themes.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "gendung.h" #include "objdat.h" diff --git a/Source/tmsg.h b/Source/tmsg.h index 133ae8a28..323df47b3 100644 --- a/Source/tmsg.h +++ b/Source/tmsg.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "miniwin/miniwin.h" diff --git a/Source/towners.h b/Source/towners.h index 51d872fdd..26dca26d3 100644 --- a/Source/towners.h +++ b/Source/towners.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include #include "items.h" #include "player.h" diff --git a/Source/utils/sdl2_to_1_2_backports.h b/Source/utils/sdl2_to_1_2_backports.h index 2d2fbe319..dc3344247 100644 --- a/Source/utils/sdl2_to_1_2_backports.h +++ b/Source/utils/sdl2_to_1_2_backports.h @@ -2,11 +2,11 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include "utils/console.h" diff --git a/Source/utils/stubs.h b/Source/utils/stubs.h index dc8dc6516..b0ec5780b 100644 --- a/Source/utils/stubs.h +++ b/Source/utils/stubs.h @@ -1,8 +1,8 @@ #pragma once -#include -#include -#include +#include +#include +#include #define UNIMPLEMENTED() \ do { \ diff --git a/test/pack_test.cpp b/test/pack_test.cpp index e20a49c73..f56ec9a1a 100644 --- a/test/pack_test.cpp +++ b/test/pack_test.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "pack.h" diff --git a/test/writehero_test.cpp b/test/writehero_test.cpp index 07411a863..d99c72d2b 100644 --- a/test/writehero_test.cpp +++ b/test/writehero_test.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include "loadsave.h" #include "pack.h"