Skip to content

Commit

Permalink
More unused stuff removal (#49)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
majcosta authored Jan 3, 2023
1 parent 6024ed6 commit 24425a8
Show file tree
Hide file tree
Showing 563 changed files with 45 additions and 6,564 deletions.
7 changes: 0 additions & 7 deletions Credits.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "JA2 All.h"
#include "Credits.h"
#include "Encrypted File.h"
#include "Language Defines.h"
#else
#include "Types.h"
#include "Credits.h"
#include "Language Defines.h"
Expand All @@ -26,7 +20,6 @@
#include "english.h"
#include "encrypted file.h"
#include "Random.h"
#endif

//externals
extern HVSURFACE ghFrameBuffer;
Expand Down
6 changes: 0 additions & 6 deletions Editor/Cursor Modes.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#ifdef PRECOMPILEDHEADERS
#include "Editor All.h"
#else
#include "builddefines.h"
#endif

#ifdef JA2EDITOR

#ifndef PRECOMPILEDHEADERS
#include "types.h"
#include "Cursor Modes.h"
#include "renderworld.h"
Expand All @@ -22,7 +17,6 @@
#include "Overhead.h"
#include "EditorMercs.h"
#include "EditorBuildings.h"
#endif

#include "Text.h"

Expand Down
127 changes: 0 additions & 127 deletions Editor/Editor All.h

This file was deleted.

6 changes: 0 additions & 6 deletions Editor/Editor Callbacks.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#ifdef PRECOMPILEDHEADERS
#include "Editor All.h"
#else
#include "builddefines.h"
#endif

#ifdef JA2EDITOR

#ifndef PRECOMPILEDHEADERS
#include "types.h"
#include "Button System.h"
#include "EditorDefines.h"
Expand All @@ -31,7 +26,6 @@
#include "input.h"
#include "Map Information.h"
#include "EditorMapInfo.h"
#endif

#include "LoadScreen.h"
#include "Text Input.h"
Expand Down
6 changes: 0 additions & 6 deletions Editor/Editor Modes.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
#ifdef PRECOMPILEDHEADERS
#include "Editor All.h"
#else
#include "builddefines.h"
#endif


#ifdef JA2EDITOR

#ifndef PRECOMPILEDHEADERS
#include "types.h"
#include "Editor Modes.h"
#include "Editor Taskbar Utils.h"
Expand All @@ -23,7 +18,6 @@
#include "worlddef.h"
#include "Exit Grids.h"
#include "Worldman.h"
#endif

BOOLEAN gfShowExitGrids = FALSE;

Expand Down
6 changes: 0 additions & 6 deletions Editor/Editor Taskbar Creation.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#ifdef PRECOMPILEDHEADERS
#include "Editor All.h"
#else
#include "builddefines.h"
#endif

#ifdef JA2EDITOR

#ifndef PRECOMPILEDHEADERS
//sgp
#include "Button System.h"
#include "Font Control.h"
Expand All @@ -22,7 +17,6 @@
#include "overhead types.h"
#include "local.h"
#include "Text.h"
#endif

//Category tabs of the editor buttons
void InitEditorTerrainToolbar();
Expand Down
6 changes: 0 additions & 6 deletions Editor/Editor Taskbar Utils.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#ifdef PRECOMPILEDHEADERS
#include "Editor All.h"
#else
#include "builddefines.h"
#endif

#ifdef JA2EDITOR

#ifndef PRECOMPILEDHEADERS
#include <stdio.h>
#include "types.h"
#include "mousesystem.h"
Expand Down Expand Up @@ -47,7 +42,6 @@
#include "Keys.h"
#include "InterfaceItemImages.h"
#include "renderworld.h"//dnl ch78 271113
#endif

void RenderEditorInfo();

Expand Down
6 changes: 0 additions & 6 deletions Editor/Editor Undo.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#ifdef PRECOMPILEDHEADERS
#include "Editor All.h"
#else
#include "builddefines.h"
#endif

#ifdef JA2EDITOR

#ifndef PRECOMPILEDHEADERS
#include "worlddef.h"
#include "worldman.h"
#include "smooth.h"
Expand All @@ -23,7 +18,6 @@
#include "keys.h"
#include "EditorItems.h"
#include "EditorMapInfo.h"
#endif

/*
Kris -- Notes on how the undo code works:
Expand Down
6 changes: 0 additions & 6 deletions Editor/EditorBuildings.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#ifdef PRECOMPILEDHEADERS
#include "Editor All.h"
#else
#include "builddefines.h"
#endif

#ifdef JA2EDITOR

#ifndef PRECOMPILEDHEADERS
#include "tiledef.h"
#include "edit_sys.h"
#include "sysutil.h"
Expand Down Expand Up @@ -34,7 +29,6 @@
#include "editscreen.h"
#include "EditorItems.h"
#include "EditorMapInfo.h"
#endif

BOOLEAN fBuildingShowRoofs, fBuildingShowWalls, fBuildingShowRoomInfo;
UINT16 usCurrentMode;
Expand Down
6 changes: 0 additions & 6 deletions Editor/EditorItems.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#ifdef PRECOMPILEDHEADERS
#include "Editor All.h"
#else
#include "builddefines.h"
#endif

#ifdef JA2EDITOR

#ifndef PRECOMPILEDHEADERS
#include <windows.h>
#include "tiledef.h"
#include "edit_sys.h"
Expand Down Expand Up @@ -44,7 +39,6 @@
#include "keys.h"
#include "InterfaceItemImages.h"
#include "Editor Undo.h"//dnl ch86 220214
#endif

#include <vfs/Tools/vfs_log.h>

Expand Down
6 changes: 0 additions & 6 deletions Editor/EditorMapInfo.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#ifdef PRECOMPILEDHEADERS
#include "Editor All.h"
#else
#include "builddefines.h"
#endif

#ifdef JA2EDITOR

#ifndef PRECOMPILEDHEADERS
#include <windows.h>
#include "tiledef.h"
#include "edit_sys.h"
Expand Down Expand Up @@ -57,7 +52,6 @@
#include "environment.h"
#include "Simple Render Utils.h"
#include "Text.h"
#endif

//forward declarations of common classes to eliminate includes
class OBJECTTYPE;
Expand Down
6 changes: 0 additions & 6 deletions Editor/EditorMercs.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#ifdef PRECOMPILEDHEADERS
#include "Editor All.h"
#else
#include "builddefines.h"
#endif

#ifdef JA2EDITOR

#ifndef PRECOMPILEDHEADERS
#include <windows.h>
#include "tiledef.h"
#include "edit_sys.h"
Expand Down Expand Up @@ -64,7 +59,6 @@
#include "message.h"
#include "InterfaceItemImages.h"
#include "english.h"
#endif
//forward declarations of common classes to eliminate includes
class OBJECTTYPE;
class SOLDIERTYPE;
Expand Down
6 changes: 0 additions & 6 deletions Editor/EditorTerrain.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#ifdef PRECOMPILEDHEADERS
#include "Editor All.h"
#else
#include "builddefines.h"
#endif

#ifdef JA2EDITOR

#ifndef PRECOMPILEDHEADERS
#include <windows.h>
#include "tiledef.h"
#include "edit_sys.h"
Expand All @@ -32,7 +27,6 @@
#include "Editor Taskbar Utils.h"
#include "Cursor Modes.h"
#include "english.h"
#endif

BOOLEAN gfShowTerrainTileButtons;
UINT8 ubTerrainTileButtonWeight[NUM_TERRAIN_TILE_REGIONS];
Expand Down
4 changes: 0 additions & 4 deletions Editor/Editor_VS2005.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,6 @@
RelativePath=".\edit_sys.h"
>
</File>
<File
RelativePath=".\Editor All.h"
>
</File>
<File
RelativePath=".\Editor Callback Prototypes.h"
>
Expand Down
4 changes: 0 additions & 4 deletions Editor/Editor_VS2008.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,6 @@
RelativePath="edit_sys.h"
>
</File>
<File
RelativePath="Editor All.h"
>
</File>
<File
RelativePath="Editor Callback Prototypes.h"
>
Expand Down
Loading

0 comments on commit 24425a8

Please sign in to comment.