More unused stuff removal (#49)

* More unused stuff removal

delete:
- giant 'metaheaders' (JA2 All.h, Laptop All.h, etc), preferring to add #includes directly where needed
- unused ExceptionHandling and DbMan translation units
- unused WizShare.h, Bitmap.h, trle.h, video_private.h headers

* remove mentions from vc proj files too

* remove preprocessor conditionals for unused definitions

find . -iname '*.h' -o -iname '*.cpp' -exec unifdef.exe -m -UPRECOMPILED_HEADERS -UJA2_PRECOMPILED_HEADERS -UWIZ8_PRECOMPILED_HEADERS -UPRECOMPILEDHEADERS {} ';'

then manually fixed a couple files the tool errored out on

* yes, the comments too

as title
This commit is contained in:
majcosta
2023-01-03 15:51:48 +02:00
committed by GitHub
parent 6024ed62b0
commit 24425a82b1
563 changed files with 45 additions and 6564 deletions
-4
View File
@@ -1,6 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "types.h"
#include "Animated ProgressBar.h"
#include "MemMan.h"
@@ -17,7 +14,6 @@
#include "WordWrap.h"
#include "Message.h"
#include "Text.h"
#endif
double rStart, rEnd;
double rActual;
-5
View File
@@ -1,7 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "interface items.h"
#else
#include "builddefines.h"
#include <wchar.h>
#include "sgp.h"
@@ -18,7 +14,6 @@
#include "Sound Control.h"
// HEADROCK HAM B2.6: included this here to allow toggling the CTH bars.
#include "GameSettings.h"
#endif
//aim
extern UINT8 gubShowActionPointsInRed;
-4
View File
@@ -1,10 +1,6 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "types.h"
#include "Debug Control.h"
#include "stdio.h"
#endif
#include "sgp_logger.h"
-4
View File
@@ -1,10 +1,6 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "Encrypted File.h"
#include "FileMan.h"
#include "Debug.h"
#endif
#include "Language Defines.h"
// anv: for selecting random line
-4
View File
@@ -1,6 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include <stdio.h>
#include <time.h>
#include "sgp.h"
@@ -8,7 +5,6 @@
#include "wcheck.h"
#include "Event Manager.h"
#include "Timer Control.h"
#endif
HLIST hEventQueue = NULL;
HLIST hDelayEventQueue = NULL;
-4
View File
@@ -1,6 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include <stdio.h>
#include <time.h>
#include "sgp.h"
@@ -14,7 +11,6 @@
#include "Animation Control.h"
#include "opplist.h"
#include "Tactical Save.h"
#endif
#ifdef NETWORKED
#include "Networking.h"
-5
View File
@@ -1,7 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "winfont.h"
#else
#include <stdio.h>
#include <time.h>
#include "sgp.h"
@@ -9,7 +5,6 @@
#include "vsurface.h"
#include "wcheck.h"
#include "Font Control.h"
#endif
INT32 giCurWinFont = 0;
//BOOLEAN gfUseWinFonts = FALSE;
-4
View File
@@ -1,9 +1,5 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "KeyMap.h"
#include <windows.h>
#endif
#include "text.h"
static Str8EnumLookupType gKeyTable[] =
-4
View File
@@ -1,8 +1,4 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "sgp.h"
#endif
#ifdef JA2EDITOR
#include "Screens.h"
-4
View File
@@ -1,6 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "MercTextBox.h"
#include "WCheck.h"
#include "renderworld.h"
@@ -9,7 +6,6 @@
#include "WordWrap.h"
#include "vobject_blitters.h"
#include "Message.h"
#endif
#define TEXT_POPUP_WINDOW_TEXT_OFFSET_X 8
-4
View File
@@ -1,12 +1,8 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "builddefines.h"
#include "stdio.h"
#include "Windows.h"
#include "Types.h"
#include "Multi Language Graphic Utils.h"
#endif
#include "Language Defines.h"
//SB
-4
View File
@@ -1,6 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "types.h"
#include "Music Control.h"
#include "soundman.h"
@@ -9,7 +6,6 @@
#include "overhead.h"
#include "timer control.h"
#include "strategicmap.h"
#endif
#include "Overhead Types.h"
//extern int iScreenMode;
-4
View File
@@ -1,9 +1,5 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "PopUpBox.h"
#include "sysutil.h"
#endif
#define BORDER_WIDTH 16
-4
View File
@@ -1,6 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "builddefines.h"
#include <stdio.h>
#include <stdlib.h>
@@ -14,7 +11,6 @@
#include "pcx.h"
#include "impTGA.h"
#include "wcheck.h"
#endif
//CONVERT_TO_16_BIT
BOOLEAN ConvertToETRLE( UINT8 ** ppDest, UINT32 * puiDestLen, UINT8 ** ppSubImageBuffer, UINT16 * pusNumberOfSubImages, UINT8 * p8BPPBuffer, UINT16 usWidth, UINT16 usHeight, UINT32 fFlags );
-4
View File
@@ -1,6 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "Types.h"
#include "WordWrap.h"
#include "Render Dirty.h"
@@ -9,7 +6,6 @@
#include "Slider.h"
#include "SysUtil.h"
#include "Line.h"
#endif
-4
View File
@@ -1,8 +1,5 @@
// MODULE FOR SOUND SYSTEM
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "sgp.h"
#include "Sound Control.h"
#include "soundman.h"
@@ -11,7 +8,6 @@
#include "renderworld.h"
#include "GameSettings.h"
#include "math.h"
#endif
#define SOUND_FAR_VOLUME_MOD 25
-4
View File
@@ -1,6 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "builddefines.h"
#include <math.h>
#include <stdio.h>
@@ -18,7 +15,6 @@
#include "vobject_blitters.h"
#include "Font Control.h"
#include "Sound Control.h"
#endif
STR16 szClipboard;
-4
View File
@@ -1,13 +1,9 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "text.h"
#include "Fileman.h"
#include "GameSettings.h"
// sevenfm
#include <codecvt>
#include <string>
#endif
BOOLEAN LoadItemInfo(UINT16 ubIndex, STR16 pNameString, STR16 pInfoString )
{
-5
View File
@@ -1,7 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "interface control.h"
#else
#include <windows.h>
#include <mmsystem.h>
#include <string.h>
@@ -14,7 +10,6 @@
#include "renderworld.h"
#include "interface control.h"
#include "keymap.h"
#endif
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
-4
View File
@@ -1,6 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "types.h"
#include <stdio.h>
#include <Windows.h>
@@ -14,7 +11,6 @@
#include "overhead types.h"
#include "wcheck.h"
#include "sys globals.h"
#endif
extern BOOLEAN GetCDromDriveLetter( STR8 pString );
-4
View File
@@ -507,10 +507,6 @@
RelativePath=".\Utilities.h"
>
</File>
<File
RelativePath=".\Utils All.h"
>
</File>
<File
RelativePath=".\Win Util.h"
>
-4
View File
@@ -509,10 +509,6 @@
RelativePath="Utilities.h"
>
</File>
<File
RelativePath="Utils All.h"
>
</File>
<File
RelativePath="Win Util.h"
>
-1
View File
@@ -58,7 +58,6 @@
<ClInclude Include="Text.h" />
<ClInclude Include="Timer Control.h" />
<ClInclude Include="Utilities.h" />
<ClInclude Include="Utils All.h" />
<ClInclude Include="Win Util.h" />
<ClInclude Include="WordWrap.h" />
<ClInclude Include="XMLWriter.h" />
-1
View File
@@ -117,7 +117,6 @@
<ClInclude Include="Utilities.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utils All.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Win Util.h">
-1
View File
@@ -58,7 +58,6 @@
<ClInclude Include="Text.h" />
<ClInclude Include="Timer Control.h" />
<ClInclude Include="Utilities.h" />
<ClInclude Include="Utils All.h" />
<ClInclude Include="Win Util.h" />
<ClInclude Include="WordWrap.h" />
<ClInclude Include="XMLWriter.h" />
-1
View File
@@ -117,7 +117,6 @@
<ClInclude Include="Utilities.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Utils All.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Win Util.h">
-1
View File
@@ -58,7 +58,6 @@
<ClInclude Include="Text.h" />
<ClInclude Include="Timer Control.h" />
<ClInclude Include="Utilities.h" />
<ClInclude Include="Utils All.h" />
<ClInclude Include="Win Util.h" />
<ClInclude Include="WordWrap.h" />
<ClInclude Include="XMLWriter.h" />
-1
View File
@@ -78,7 +78,6 @@
<ClInclude Include="Text.h" />
<ClInclude Include="Timer Control.h" />
<ClInclude Include="Utilities.h" />
<ClInclude Include="Utils All.h" />
<ClInclude Include="Win Util.h" />
<ClInclude Include="WordWrap.h" />
<ClInclude Include="XMLWriter.h" />
+1 -6
View File
@@ -1,14 +1,9 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "winfont.h"
#else
#include "WordWrap.h"
 #include "WordWrap.h"
#include "sgp.h"
#include "Render Dirty.h"
#include "Font Control.h"
#include "Stdio.h"
#include "WinFont.h"
#endif
#define SINGLE_CHARACTER_WORD_FOR_WORDWRAP
-4
View File
@@ -1,6 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
#include "sgp.h"
#include "overhead types.h"
#include "Soldier Control.h"
@@ -36,7 +33,6 @@
#include "XML.h"
#include "utilities.h"
#include "store inventory.h"
#endif
// Flugente: in order not to loop over MAXITEMS items if we only have a few thousand, remember the actual number of items in the xml
UINT32 gMAXITEMS_READ = 0;
-6
View File
@@ -1,8 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#include "Editor All.h"
#include "LuaInitNPCs.h"
#else
#include "sgp.h"
#include "Debug Control.h"
#include "expat.h"
@@ -16,7 +11,6 @@
#include "Encrypted File.h"
#include "GameSettings.h"
#include "Text.h"
#endif
#include "XML_Language.h"
-4
View File
@@ -1,13 +1,9 @@
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
#include "sgp.h"
#include "Debug Control.h"
#include "expat.h"
#include "XML.h"
#include "Interface.h"
#include "Text.h"
#endif
struct
{
+1 -5
View File
@@ -1,9 +1,6 @@
// WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build!
//#pragma setlocale("CHINESE")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "Language Defines.h"
#if defined( CHINESE )
#include "text.h"
@@ -12,7 +9,6 @@
#include "EditorMercs.h"
#include "Item Statistics.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_ChineseText_public_symbol(void){;}
@@ -12153,4 +12149,4 @@ STR16 ChineseSpecString10 = L"%s [%d%(%d%)]\n%s %d% (%d/%d)\n%s %d%\
STR16 ChineseSpecString11 = L"%s (%s) [%d%(%d%)]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s"; // added by Flugente
STR16 ChineseSpecString12 = L"%s (%s) [%d%]\n%s %d\n%s %d\n%s %d (%d)\n%s (%d) %s\n%s %1.1f %s\n%s %.2f%%"; // added by Flugente
#endif //CHINESE
#endif //CHINESE
-4
View File
@@ -1,9 +1,6 @@
// WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build!
//#pragma setlocale("DUTCH")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "Language Defines.h"
#if defined( DUTCH )
#include "text.h"
@@ -12,7 +9,6 @@
#include "EditorMercs.h"
#include "Item Statistics.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_DutchText_public_symbol(void){;}
-4
View File
@@ -1,9 +1,6 @@
// WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build!
//#pragma setlocale("ENGLISH")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "Language Defines.h"
#if defined( ENGLISH )
#include "text.h"
@@ -12,7 +9,6 @@
#include "EditorMercs.h"
#include "Item Statistics.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_EnglishText_public_symbol(void);
-4
View File
@@ -1,9 +1,6 @@
// WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build!
//#pragma setlocale("FRENCH")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "Language Defines.h"
#ifdef FRENCH
#include "text.h"
@@ -12,7 +9,6 @@
#include "EditorMercs.h"
#include "Item Statistics.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_FrenchText_public_symbol(void){;}
-4
View File
@@ -1,9 +1,6 @@
// WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build!
//#pragma setlocale("GERMAN")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "Language Defines.h"
#ifdef GERMAN
#include "text.h"
@@ -12,7 +9,6 @@
#include "EditorMercs.h"
#include "Item Statistics.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_GermanText_public_symbol(void){;}
-4
View File
@@ -1,9 +1,6 @@
// WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build!
//#pragma setlocale("ITALIAN")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "Language Defines.h"
#if defined( ITALIAN )
#include "text.h"
@@ -12,7 +9,6 @@
#include "EditorMercs.h"
#include "Item Statistics.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_ItalianText_public_symbol(void){;}
-5
View File
@@ -1,16 +1,11 @@
// WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build!
//#pragma setlocale("CHINESE")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "_Ja25Englishtext.h"
#else
#include "Language Defines.h"
#ifdef CHINESE
#include "text.h"
#include "Fileman.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_Ja25ChineseText_public_symbol(void){;}
-5
View File
@@ -1,16 +1,11 @@
// WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build!
//#pragma setlocale("DUTCH")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "_Ja25Dutchtext.h"
#else
#include "Language Defines.h"
#ifdef DUTCH
#include "text.h"
#include "Fileman.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_Ja25DutchText_public_symbol(void){;}
-5
View File
@@ -1,16 +1,11 @@
// WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build!
//#pragma setlocale("ENGLISH")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "_Ja25Englishtext.h"
#else
#include "Language Defines.h"
#ifdef ENGLISH
#include "text.h"
#include "Fileman.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_Ja25EnglishText_public_symbol(void);
-5
View File
@@ -1,16 +1,11 @@
// WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build!
//#pragma setlocale("FRENCH")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "_Ja25Frenchtext.h"
#else
#include "Language Defines.h"
#ifdef FRENCH
#include "text.h"
#include "Fileman.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_Ja25FrenchText_public_symbol(void){;}
-5
View File
@@ -1,16 +1,11 @@
// WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build!
//#pragma setlocale("GERMAN")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "_Ja25GermanText.h"
#else
#include "Language Defines.h"
#ifdef GERMAN
#include "text.h"
#include "Fileman.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_Ja25GermanText_public_symbol(void){;}
-5
View File
@@ -1,16 +1,11 @@
// WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build!
//#pragma setlocale("ITALIAN")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "_Ja25Italiantext.h"
#else
#include "Language Defines.h"
#ifdef ITALIAN
#include "text.h"
#include "Fileman.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_Ja25ItalianText_public_symbol(void){;}
-5
View File
@@ -2,16 +2,11 @@
// WANNE: Yes we need this here exclusivly in Polish version, because we do not have a codepage in the code like for other versions.
//#pragma setlocale("POLISH")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "_Ja25Polishtext.h"
#else
#include "Language Defines.h"
#ifdef POLISH
#include "text.h"
#include "Fileman.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_Ja25PolishText_public_symbol(void){;}
-5
View File
@@ -1,16 +1,11 @@
// WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build!
//#pragma setlocale("RUSSIAN")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "_Ja25RussianText.h"
#else
#include "Language Defines.h"
#ifdef RUSSIAN
#include "text.h"
#include "Fileman.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_Ja25RussianText_public_symbol(void){;}
-4
View File
@@ -2,9 +2,6 @@
// WANNE: Yes we need this here exclusivly in Polish version, because we do not have a codepage in the code like for other versions.
//#pragma setlocale("POLISH")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "Language Defines.h"
#if defined( POLISH )
#include "text.h"
@@ -13,7 +10,6 @@
#include "EditorMercs.h"
#include "Item Statistics.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_PolishText_public_symbol(void){;}
-4
View File
@@ -1,9 +1,6 @@
// WANNE: Yes, this should be disabled, otherwise we get weird behavior when running the game with a VS 2005 build!
//#pragma setlocale("RUSSIAN")
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "Language Defines.h"
#if defined( RUSSIAN )
#include "text.h"
@@ -12,7 +9,6 @@
#include "EditorMercs.h"
#include "Item Statistics.h"
#endif
#endif
//suppress : warning LNK4221: no public symbols found; archive member will be inaccessible
void this_is_the_RussianText_public_symbol(void){;}
-7
View File
@@ -1,17 +1,10 @@
// THIS MODULE IS TEMPORARY - USED FOR OUR SOUND SYSTEM INTIL IT IS IMPLEMENTED FOR THE SGP
// TAKEN FROM MS SAMPLES FOR DirectSound
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include <windows.h>
#include <mmsystem.h>
#include <dsound.h>
#else
#include "types.h"
#include <windows.h>
#include <mmsystem.h>
#include <dsound.h>
#endif
#define WIN32_LEAN_AND_MEAN
-5
View File
@@ -1,7 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "Game Clock.h"
#else
#include "sgp.h"
#include "font.h"
#include "types.h"
@@ -24,7 +20,6 @@
#include "Game Clock.h"
#include "GameSettings.h"
#include "sgp_logger.h"
#endif
typedef struct
{