diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a06ada73..e70ac4814 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ set(usingMsBuild $) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") add_compile_definitions(CINTERFACE XML_STATIC VFS_STATIC VFS_WITH_SLF VFS_WITH_7ZIP _CRT_SECURE_NO_DEPRECATE) -include_directories(${CMAKE_SOURCE_DIR} "ext/VFS/include" Utils TileEngine TacticalAI ModularizedTacticalAI Tactical Strategic sgp Res Lua Laptop Multiplayer Editor Console) +include_directories(Ja2 "ext/VFS/include" Utils TileEngine TacticalAI "ModularizedTacticalAI/include" Tactical Strategic sgp "Ja2/Res" Lua Laptop Multiplayer Editor Console) # external libraries add_subdirectory("ext/libpng") @@ -59,59 +59,7 @@ foreach(lib IN LISTS Ja2_Libs) add_subdirectory(${lib}) endforeach() -# TODO: Move these units into their own directory to declutter the root dir and CMakeLists.txt file -set(Ja2Src -"aniviewscreen.cpp" -"Credits.cpp" -"Fade Screen.cpp" -"FeaturesScreen.cpp" -"GameInitOptionsScreen.cpp" -"gameloop.cpp" -"gamescreen.cpp" -"GameSettings.cpp" -"GameVersion.cpp" -"HelpScreen.cpp" -"Init.cpp" -"Intro.cpp" -"JA2 Splash.cpp" -"Ja25Update.cpp" -"jascreens.cpp" -"Language Defines.cpp" -"Loading Screen.cpp" -"MainMenuScreen.cpp" -"MessageBoxScreen.cpp" -"MPChatScreen.cpp" -"MPConnectScreen.cpp" -"MPHostScreen.cpp" -"MPJoinScreen.cpp" -"MPScoreScreen.cpp" -"MPXmlTeams.cpp" -"Options Screen.cpp" -"profiler.cpp" -"SaveLoadGame.cpp" -"SaveLoadScreen.cpp" -"SCREENS.cpp" -"Sys Globals.cpp" -"ub_config.cpp" -"XML_DifficultySettings.cpp" -"XML_IntroFiles.cpp" -"XML_Layout_MainMenu.cpp" -Res/ja2.rc -) - -set(Ja2_Libraries -"${PROJECT_SOURCE_DIR}/libexpatMT.lib" -"Dbghelp.lib" -Lua -"${PROJECT_SOURCE_DIR}/lua51.lib" -"${PROJECT_SOURCE_DIR}/lua51.vc9.lib" -"Winmm.lib" -"${PROJECT_SOURCE_DIR}/SMACKW32.LIB" -"${PROJECT_SOURCE_DIR}/binkw32.lib" -bfVFS -"ws2_32.lib" -Multiplayer -) +add_subdirectory(Ja2) # simple function to validate Languages and Application choices include(cmake/ValidateOptions.cmake) diff --git a/Ja2/CMakeLists.txt b/Ja2/CMakeLists.txt new file mode 100644 index 000000000..aeafd6800 --- /dev/null +++ b/Ja2/CMakeLists.txt @@ -0,0 +1,52 @@ +set(Ja2Src +"${CMAKE_CURRENT_SOURCE_DIR}/aniviewscreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Credits.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Fade Screen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/FeaturesScreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/GameInitOptionsScreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/gameloop.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/gamescreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/GameSettings.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/GameVersion.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/HelpScreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Init.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Intro.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/JA2 Splash.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Ja25Update.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/jascreens.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Language Defines.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Loading Screen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MainMenuScreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MessageBoxScreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MPChatScreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MPConnectScreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MPHostScreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MPJoinScreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MPScoreScreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/MPXmlTeams.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Options Screen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/profiler.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SaveLoadGame.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SaveLoadScreen.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/SCREENS.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/Sys Globals.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/ub_config.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_DifficultySettings.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_IntroFiles.cpp" +"${CMAKE_CURRENT_SOURCE_DIR}/XML_Layout_MainMenu.cpp" +${CMAKE_CURRENT_SOURCE_DIR}/Res/ja2.rc +PARENT_SCOPE) + +set(Ja2_Libraries +"${CMAKE_SOURCE_DIR}/libexpatMT.lib" +"Dbghelp.lib" +Lua +"${CMAKE_SOURCE_DIR}/lua51.lib" +"${CMAKE_SOURCE_DIR}/lua51.vc9.lib" +"Winmm.lib" +"${CMAKE_SOURCE_DIR}/SMACKW32.LIB" +"${CMAKE_SOURCE_DIR}/binkw32.lib" +bfVFS +"ws2_32.lib" +Multiplayer +PARENT_SCOPE) diff --git a/Cheats.h b/Ja2/Cheats.h similarity index 100% rename from Cheats.h rename to Ja2/Cheats.h diff --git a/Credits.cpp b/Ja2/Credits.cpp similarity index 100% rename from Credits.cpp rename to Ja2/Credits.cpp diff --git a/Credits.h b/Ja2/Credits.h similarity index 100% rename from Credits.h rename to Ja2/Credits.h diff --git a/Fade Screen.cpp b/Ja2/Fade Screen.cpp similarity index 100% rename from Fade Screen.cpp rename to Ja2/Fade Screen.cpp diff --git a/Fade Screen.h b/Ja2/Fade Screen.h similarity index 100% rename from Fade Screen.h rename to Ja2/Fade Screen.h diff --git a/FeaturesScreen.cpp b/Ja2/FeaturesScreen.cpp similarity index 100% rename from FeaturesScreen.cpp rename to Ja2/FeaturesScreen.cpp diff --git a/FeaturesScreen.h b/Ja2/FeaturesScreen.h similarity index 100% rename from FeaturesScreen.h rename to Ja2/FeaturesScreen.h diff --git a/GameInitOptionsScreen.cpp b/Ja2/GameInitOptionsScreen.cpp similarity index 100% rename from GameInitOptionsScreen.cpp rename to Ja2/GameInitOptionsScreen.cpp diff --git a/GameInitOptionsScreen.h b/Ja2/GameInitOptionsScreen.h similarity index 100% rename from GameInitOptionsScreen.h rename to Ja2/GameInitOptionsScreen.h diff --git a/GameSettings.cpp b/Ja2/GameSettings.cpp similarity index 100% rename from GameSettings.cpp rename to Ja2/GameSettings.cpp diff --git a/GameSettings.h b/Ja2/GameSettings.h similarity index 100% rename from GameSettings.h rename to Ja2/GameSettings.h diff --git a/GameVersion.cpp b/Ja2/GameVersion.cpp similarity index 100% rename from GameVersion.cpp rename to Ja2/GameVersion.cpp diff --git a/GameVersion.h b/Ja2/GameVersion.h similarity index 100% rename from GameVersion.h rename to Ja2/GameVersion.h diff --git a/HelpScreen.cpp b/Ja2/HelpScreen.cpp similarity index 100% rename from HelpScreen.cpp rename to Ja2/HelpScreen.cpp diff --git a/HelpScreen.h b/Ja2/HelpScreen.h similarity index 100% rename from HelpScreen.h rename to Ja2/HelpScreen.h diff --git a/HelpScreenText.h b/Ja2/HelpScreenText.h similarity index 100% rename from HelpScreenText.h rename to Ja2/HelpScreenText.h diff --git a/Init.cpp b/Ja2/Init.cpp similarity index 100% rename from Init.cpp rename to Ja2/Init.cpp diff --git a/Init.h b/Ja2/Init.h similarity index 100% rename from Init.h rename to Ja2/Init.h diff --git a/Intro.cpp b/Ja2/Intro.cpp similarity index 100% rename from Intro.cpp rename to Ja2/Intro.cpp diff --git a/Intro.h b/Ja2/Intro.h similarity index 100% rename from Intro.h rename to Ja2/Intro.h diff --git a/JA2 Splash.cpp b/Ja2/JA2 Splash.cpp similarity index 100% rename from JA2 Splash.cpp rename to Ja2/JA2 Splash.cpp diff --git a/JA2 Splash.h b/Ja2/JA2 Splash.h similarity index 100% rename from JA2 Splash.h rename to Ja2/JA2 Splash.h diff --git a/Ja25Update.cpp b/Ja2/Ja25Update.cpp similarity index 100% rename from Ja25Update.cpp rename to Ja2/Ja25Update.cpp diff --git a/Ja25Update.h b/Ja2/Ja25Update.h similarity index 100% rename from Ja25Update.h rename to Ja2/Ja25Update.h diff --git a/Language Defines.cpp b/Ja2/Language Defines.cpp similarity index 100% rename from Language Defines.cpp rename to Ja2/Language Defines.cpp diff --git a/Language Defines.h b/Ja2/Language Defines.h similarity index 100% rename from Language Defines.h rename to Ja2/Language Defines.h diff --git a/Loading Screen.cpp b/Ja2/Loading Screen.cpp similarity index 100% rename from Loading Screen.cpp rename to Ja2/Loading Screen.cpp diff --git a/Loading Screen.h b/Ja2/Loading Screen.h similarity index 100% rename from Loading Screen.h rename to Ja2/Loading Screen.h diff --git a/MPChatScreen.cpp b/Ja2/MPChatScreen.cpp similarity index 100% rename from MPChatScreen.cpp rename to Ja2/MPChatScreen.cpp diff --git a/MPChatScreen.h b/Ja2/MPChatScreen.h similarity index 100% rename from MPChatScreen.h rename to Ja2/MPChatScreen.h diff --git a/MPConnectScreen.cpp b/Ja2/MPConnectScreen.cpp similarity index 100% rename from MPConnectScreen.cpp rename to Ja2/MPConnectScreen.cpp diff --git a/MPConnectScreen.h b/Ja2/MPConnectScreen.h similarity index 100% rename from MPConnectScreen.h rename to Ja2/MPConnectScreen.h diff --git a/MPHostScreen.cpp b/Ja2/MPHostScreen.cpp similarity index 100% rename from MPHostScreen.cpp rename to Ja2/MPHostScreen.cpp diff --git a/MPHostScreen.h b/Ja2/MPHostScreen.h similarity index 100% rename from MPHostScreen.h rename to Ja2/MPHostScreen.h diff --git a/MPJoinScreen.cpp b/Ja2/MPJoinScreen.cpp similarity index 100% rename from MPJoinScreen.cpp rename to Ja2/MPJoinScreen.cpp diff --git a/MPJoinScreen.h b/Ja2/MPJoinScreen.h similarity index 100% rename from MPJoinScreen.h rename to Ja2/MPJoinScreen.h diff --git a/MPScoreScreen.cpp b/Ja2/MPScoreScreen.cpp similarity index 100% rename from MPScoreScreen.cpp rename to Ja2/MPScoreScreen.cpp diff --git a/MPScoreScreen.h b/Ja2/MPScoreScreen.h similarity index 100% rename from MPScoreScreen.h rename to Ja2/MPScoreScreen.h diff --git a/MPXmlTeams.cpp b/Ja2/MPXmlTeams.cpp similarity index 100% rename from MPXmlTeams.cpp rename to Ja2/MPXmlTeams.cpp diff --git a/MPXmlTeams.hpp b/Ja2/MPXmlTeams.hpp similarity index 100% rename from MPXmlTeams.hpp rename to Ja2/MPXmlTeams.hpp diff --git a/MainMenuScreen.cpp b/Ja2/MainMenuScreen.cpp similarity index 100% rename from MainMenuScreen.cpp rename to Ja2/MainMenuScreen.cpp diff --git a/MessageBoxScreen.cpp b/Ja2/MessageBoxScreen.cpp similarity index 100% rename from MessageBoxScreen.cpp rename to Ja2/MessageBoxScreen.cpp diff --git a/MessageBoxScreen.h b/Ja2/MessageBoxScreen.h similarity index 100% rename from MessageBoxScreen.h rename to Ja2/MessageBoxScreen.h diff --git a/Options Screen.cpp b/Ja2/Options Screen.cpp similarity index 100% rename from Options Screen.cpp rename to Ja2/Options Screen.cpp diff --git a/Options Screen.h b/Ja2/Options Screen.h similarity index 100% rename from Options Screen.h rename to Ja2/Options Screen.h diff --git a/Res/ja2.aps b/Ja2/Res/ja2.aps similarity index 100% rename from Res/ja2.aps rename to Ja2/Res/ja2.aps diff --git a/Res/ja2.rc b/Ja2/Res/ja2.rc similarity index 100% rename from Res/ja2.rc rename to Ja2/Res/ja2.rc diff --git a/Res/jagged3.ico b/Ja2/Res/jagged3.ico similarity index 100% rename from Res/jagged3.ico rename to Ja2/Res/jagged3.ico diff --git a/Res/resource.h b/Ja2/Res/resource.h similarity index 100% rename from Res/resource.h rename to Ja2/Res/resource.h diff --git a/SaveLoadGame.cpp b/Ja2/SaveLoadGame.cpp similarity index 100% rename from SaveLoadGame.cpp rename to Ja2/SaveLoadGame.cpp diff --git a/SaveLoadGame.h b/Ja2/SaveLoadGame.h similarity index 100% rename from SaveLoadGame.h rename to Ja2/SaveLoadGame.h diff --git a/SaveLoadScreen.cpp b/Ja2/SaveLoadScreen.cpp similarity index 100% rename from SaveLoadScreen.cpp rename to Ja2/SaveLoadScreen.cpp diff --git a/SaveLoadScreen.h b/Ja2/SaveLoadScreen.h similarity index 100% rename from SaveLoadScreen.h rename to Ja2/SaveLoadScreen.h diff --git a/Screens.cpp b/Ja2/Screens.cpp similarity index 100% rename from Screens.cpp rename to Ja2/Screens.cpp diff --git a/Screens.h b/Ja2/Screens.h similarity index 100% rename from Screens.h rename to Ja2/Screens.h diff --git a/Sys Globals.cpp b/Ja2/Sys Globals.cpp similarity index 100% rename from Sys Globals.cpp rename to Ja2/Sys Globals.cpp diff --git a/Sys Globals.h b/Ja2/Sys Globals.h similarity index 100% rename from Sys Globals.h rename to Ja2/Sys Globals.h diff --git a/VtuneApi.h b/Ja2/VtuneApi.h similarity index 100% rename from VtuneApi.h rename to Ja2/VtuneApi.h diff --git a/XML_DifficultySettings.cpp b/Ja2/XML_DifficultySettings.cpp similarity index 100% rename from XML_DifficultySettings.cpp rename to Ja2/XML_DifficultySettings.cpp diff --git a/XML_IntroFiles.cpp b/Ja2/XML_IntroFiles.cpp similarity index 100% rename from XML_IntroFiles.cpp rename to Ja2/XML_IntroFiles.cpp diff --git a/XML_Layout_MainMenu.cpp b/Ja2/XML_Layout_MainMenu.cpp similarity index 100% rename from XML_Layout_MainMenu.cpp rename to Ja2/XML_Layout_MainMenu.cpp diff --git a/aniviewscreen.cpp b/Ja2/aniviewscreen.cpp similarity index 100% rename from aniviewscreen.cpp rename to Ja2/aniviewscreen.cpp diff --git a/builddefines.h b/Ja2/builddefines.h similarity index 100% rename from builddefines.h rename to Ja2/builddefines.h diff --git a/gameloop.cpp b/Ja2/gameloop.cpp similarity index 100% rename from gameloop.cpp rename to Ja2/gameloop.cpp diff --git a/gameloop.h b/Ja2/gameloop.h similarity index 100% rename from gameloop.h rename to Ja2/gameloop.h diff --git a/gamescreen.cpp b/Ja2/gamescreen.cpp similarity index 100% rename from gamescreen.cpp rename to Ja2/gamescreen.cpp diff --git a/gamescreen.h b/Ja2/gamescreen.h similarity index 100% rename from gamescreen.h rename to Ja2/gamescreen.h diff --git a/ja2.h b/Ja2/ja2.h similarity index 100% rename from ja2.h rename to Ja2/ja2.h diff --git a/jascreens.cpp b/Ja2/jascreens.cpp similarity index 100% rename from jascreens.cpp rename to Ja2/jascreens.cpp diff --git a/jascreens.h b/Ja2/jascreens.h similarity index 100% rename from jascreens.h rename to Ja2/jascreens.h diff --git a/legion cfg.cpp b/Ja2/legion cfg.cpp similarity index 100% rename from legion cfg.cpp rename to Ja2/legion cfg.cpp diff --git a/legion cfg.h b/Ja2/legion cfg.h similarity index 100% rename from legion cfg.h rename to Ja2/legion cfg.h diff --git a/local.h b/Ja2/local.h similarity index 100% rename from local.h rename to Ja2/local.h diff --git a/mainmenuscreen.h b/Ja2/mainmenuscreen.h similarity index 100% rename from mainmenuscreen.h rename to Ja2/mainmenuscreen.h diff --git a/profiler.cpp b/Ja2/profiler.cpp similarity index 100% rename from profiler.cpp rename to Ja2/profiler.cpp diff --git a/profiler.h b/Ja2/profiler.h similarity index 100% rename from profiler.h rename to Ja2/profiler.h diff --git a/screenids.h b/Ja2/screenids.h similarity index 100% rename from screenids.h rename to Ja2/screenids.h diff --git a/ub_config.cpp b/Ja2/ub_config.cpp similarity index 100% rename from ub_config.cpp rename to Ja2/ub_config.cpp diff --git a/ub_config.h b/Ja2/ub_config.h similarity index 100% rename from ub_config.h rename to Ja2/ub_config.h diff --git a/Laptop/Encyclopedia_Data_new.cpp b/Laptop/Encyclopedia_Data_new.cpp index 5de9ac67b..2dff5b827 100644 --- a/Laptop/Encyclopedia_Data_new.cpp +++ b/Laptop/Encyclopedia_Data_new.cpp @@ -21,7 +21,7 @@ #include "QuestText.h" //quest: name #include "laptop.h" //ui positions #include "Utilities.h" - #include "Utils/Cursors.h" + #include "Cursors.h" #include "sysutil.h" //extra Buffer for scaling image #include "vsurface.h" //fill extra buffer with black color #include "Text.h" diff --git a/Laptop/Encyclopedia_new.cpp b/Laptop/Encyclopedia_new.cpp index e1c5ac39b..08596e8c5 100644 --- a/Laptop/Encyclopedia_new.cpp +++ b/Laptop/Encyclopedia_new.cpp @@ -36,7 +36,7 @@ #include "laptop.h"//UI dimensions, mouse regions #include "Utilities.h"//file names #include "vobject.h"//video objects - #include "Utils/Cursors.h" + #include "Cursors.h" #include "Text.h"//button text #include "Button System.h" #include "Encyclopedia_new.h" diff --git a/TacticalAI/AIMain.cpp b/TacticalAI/AIMain.cpp index f60ab7557..0aab1c326 100644 --- a/TacticalAI/AIMain.cpp +++ b/TacticalAI/AIMain.cpp @@ -52,9 +52,9 @@ #include "connect.h" // needed to use the modularized tactical AI: -#include "ModularizedTacticalAI/include/Plan.h" -#include "ModularizedTacticalAI/include/PlanFactoryLibrary.h" -#include "ModularizedTacticalAI/include/AbstractPlanFactory.h" +#include "Plan.h" +#include "PlanFactoryLibrary.h" +#include "AbstractPlanFactory.h" #ifdef JA2UB #include "Ja25_Tactical.h" diff --git a/TacticalAI/Realtime.cpp b/TacticalAI/Realtime.cpp index aba2b524c..0ec6254fe 100644 --- a/TacticalAI/Realtime.cpp +++ b/TacticalAI/Realtime.cpp @@ -13,9 +13,9 @@ #include "Quests.h" #include "GameSettings.h" // needed to use the modularized tactical AI: -#include "ModularizedTacticalAI/include/Plan.h" -#include "ModularizedTacticalAI/include/PlanFactoryLibrary.h" -#include "ModularizedTacticalAI/include/AbstractPlanFactory.h" +#include "Plan.h" +#include "PlanFactoryLibrary.h" +#include "AbstractPlanFactory.h" UINT16 RealtimeDelay( SOLDIERTYPE * pSoldier ) diff --git a/Utils/WordWrap.h b/Utils/WordWrap.h index 7efa90c7d..50e2a4740 100644 --- a/Utils/WordWrap.h +++ b/Utils/WordWrap.h @@ -2,8 +2,8 @@ #define __WORDWRAP_H_ #include "types.h" -#include "LAPTOP\files.h" -#include "LAPTOP\email.h" +#include "files.h" +#include "email.h" //Flags for DrawTextToScreen() diff --git a/lua/lua_function.cpp b/lua/lua_function.cpp index 935675fc5..01acc8489 100644 --- a/lua/lua_function.cpp +++ b/lua/lua_function.cpp @@ -1,5 +1,5 @@ #include "DEBUG.H" -#include "lua/lua_function.h" +#include "lua_function.h" template<> LuaFunction& LuaFunction::Param(std::string const& par) diff --git a/lua/lua_state.cpp b/lua/lua_state.cpp index 5b11019c8..2b11e1b78 100644 --- a/lua/lua_state.cpp +++ b/lua/lua_state.cpp @@ -1,4 +1,4 @@ -#include "lua/lua_state.h" +#include "lua_state.h" #include #include "sgp_logger.h" diff --git a/lua/lua_table.cpp b/lua/lua_table.cpp index fcdc2a70f..1bb1da8d8 100644 --- a/lua/lua_table.cpp +++ b/lua/lua_table.cpp @@ -1,4 +1,4 @@ -#include "lua/lua_table.h" +#include "lua_table.h" /* * Table constructors diff --git a/lua/lua_table.h b/lua/lua_table.h index b7df48bb2..7814fb94f 100644 --- a/lua/lua_table.h +++ b/lua/lua_table.h @@ -1,7 +1,7 @@ #ifndef _LUA_TABLE_H_ #define _LUA_TABLE_H_ -#include "lua/lua_state.h" +#include "lua_state.h" class LuaTable {