diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a36e848..0abbf961 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 "Standard Gaming Platform" Res Lua Laptop Multiplayer "Multiplayer/raknet" Editor Console) +include_directories(${CMAKE_SOURCE_DIR} "ext/VFS/include" Utils TileEngine TacticalAI ModularizedTacticalAI Tactical Strategic sgp Res Lua Laptop Multiplayer "Multiplayer/raknet" Editor Console) # external libraries add_subdirectory("ext/libpng") @@ -42,29 +42,21 @@ add_subdirectory(Lua) # static libraries whose source files, header files or header files included # by header files rely on Application and Language preprocessor definitions, and # therefore need to be compiled multiple times. Very Bad. -add_subdirectory(TileEngine) -add_subdirectory(TacticalAI) -add_subdirectory(Utils) -add_subdirectory(Strategic) -add_subdirectory("Standard Gaming Platform") -add_subdirectory(Laptop) -add_subdirectory(Editor) -add_subdirectory(Console) -add_subdirectory(Tactical) -add_subdirectory(ModularizedTacticalAI) -# TODO: Rename 'Standard Gaming Platform' directory to 'SGP' so this can be refactored away set(Ja2_Libs TileEngine TacticalAI Utils Strategic -SGP +sgp Laptop Editor Console Tactical ModularizedTacticalAI ) +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 @@ -160,7 +152,7 @@ foreach(lang IN LISTS LangTargets) set(isUb $) set(isUbEditor $) - # static library for an app/lang combination, e.g. JA2_ENGLISH_SGP.lib + # static library for an app/lang combination, e.g. JA2_ENGLISH_sgp.lib add_library(${VeryBadLib}) target_sources(${VeryBadLib} PRIVATE ${${lib}Src}) @@ -174,9 +166,9 @@ foreach(lang IN LISTS LangTargets) target_link_libraries(${Executable} PUBLIC ${VeryBadLib}) endforeach() - # for SGP only - target_link_libraries(${Executable}_SGP PRIVATE "ddraw.lib" "${PROJECT_SOURCE_DIR}/fmodvc.lib") - target_link_libraries(${Executable}_SGP PUBLIC libpng) - target_compile_definitions(${Executable}_SGP PRIVATE NO_ZLIB_COMPRESSION) + # for sgp only + target_link_libraries(${Executable}_sgp PRIVATE "ddraw.lib" "${PROJECT_SOURCE_DIR}/fmodvc.lib") + target_link_libraries(${Executable}_sgp PUBLIC libpng) + target_compile_definitions(${Executable}_sgp PRIVATE NO_ZLIB_COMPRESSION) endforeach() endforeach() diff --git a/Standard Gaming Platform/Button Sound Control.cpp b/sgp/Button Sound Control.cpp similarity index 100% rename from Standard Gaming Platform/Button Sound Control.cpp rename to sgp/Button Sound Control.cpp diff --git a/Standard Gaming Platform/Button Sound Control.h b/sgp/Button Sound Control.h similarity index 100% rename from Standard Gaming Platform/Button Sound Control.h rename to sgp/Button Sound Control.h diff --git a/Standard Gaming Platform/Button System.cpp b/sgp/Button System.cpp similarity index 100% rename from Standard Gaming Platform/Button System.cpp rename to sgp/Button System.cpp diff --git a/Standard Gaming Platform/Button System.h b/sgp/Button System.h similarity index 100% rename from Standard Gaming Platform/Button System.h rename to sgp/Button System.h diff --git a/Standard Gaming Platform/CMakeLists.txt b/sgp/CMakeLists.txt similarity index 99% rename from Standard Gaming Platform/CMakeLists.txt rename to sgp/CMakeLists.txt index f4f43c3f..ddf04225 100644 --- a/Standard Gaming Platform/CMakeLists.txt +++ b/sgp/CMakeLists.txt @@ -1,4 +1,4 @@ -set(SGPSrc +set(sgpSrc "${CMAKE_CURRENT_SOURCE_DIR}/Button Sound Control.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/Button System.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/Compression.cpp" diff --git a/Standard Gaming Platform/Compression.cpp b/sgp/Compression.cpp similarity index 100% rename from Standard Gaming Platform/Compression.cpp rename to sgp/Compression.cpp diff --git a/Standard Gaming Platform/Compression.h b/sgp/Compression.h similarity index 100% rename from Standard Gaming Platform/Compression.h rename to sgp/Compression.h diff --git a/Standard Gaming Platform/Cursor Control.cpp b/sgp/Cursor Control.cpp similarity index 100% rename from Standard Gaming Platform/Cursor Control.cpp rename to sgp/Cursor Control.cpp diff --git a/Standard Gaming Platform/Cursor Control.h b/sgp/Cursor Control.h similarity index 100% rename from Standard Gaming Platform/Cursor Control.h rename to sgp/Cursor Control.h diff --git a/Standard Gaming Platform/DEBUG.H b/sgp/DEBUG.H similarity index 100% rename from Standard Gaming Platform/DEBUG.H rename to sgp/DEBUG.H diff --git a/Standard Gaming Platform/DEBUG.cpp b/sgp/DEBUG.cpp similarity index 100% rename from Standard Gaming Platform/DEBUG.cpp rename to sgp/DEBUG.cpp diff --git a/Standard Gaming Platform/DirectDraw Calls.cpp b/sgp/DirectDraw Calls.cpp similarity index 100% rename from Standard Gaming Platform/DirectDraw Calls.cpp rename to sgp/DirectDraw Calls.cpp diff --git a/Standard Gaming Platform/DirectDraw Calls.h b/sgp/DirectDraw Calls.h similarity index 100% rename from Standard Gaming Platform/DirectDraw Calls.h rename to sgp/DirectDraw Calls.h diff --git a/Standard Gaming Platform/DirectX Common.cpp b/sgp/DirectX Common.cpp similarity index 100% rename from Standard Gaming Platform/DirectX Common.cpp rename to sgp/DirectX Common.cpp diff --git a/Standard Gaming Platform/DirectX Common.h b/sgp/DirectX Common.h similarity index 100% rename from Standard Gaming Platform/DirectX Common.h rename to sgp/DirectX Common.h diff --git a/Standard Gaming Platform/English.cpp b/sgp/English.cpp similarity index 100% rename from Standard Gaming Platform/English.cpp rename to sgp/English.cpp diff --git a/Standard Gaming Platform/FileMan.cpp b/sgp/FileMan.cpp similarity index 100% rename from Standard Gaming Platform/FileMan.cpp rename to sgp/FileMan.cpp diff --git a/Standard Gaming Platform/FileMan.h b/sgp/FileMan.h similarity index 100% rename from Standard Gaming Platform/FileMan.h rename to sgp/FileMan.h diff --git a/Standard Gaming Platform/Font.cpp b/sgp/Font.cpp similarity index 100% rename from Standard Gaming Platform/Font.cpp rename to sgp/Font.cpp diff --git a/Standard Gaming Platform/Font.h b/sgp/Font.h similarity index 100% rename from Standard Gaming Platform/Font.h rename to sgp/Font.h diff --git a/Standard Gaming Platform/Ja2 Libs.cpp b/sgp/Ja2 Libs.cpp similarity index 100% rename from Standard Gaming Platform/Ja2 Libs.cpp rename to sgp/Ja2 Libs.cpp diff --git a/Standard Gaming Platform/Ja2 Libs.h b/sgp/Ja2 Libs.h similarity index 100% rename from Standard Gaming Platform/Ja2 Libs.h rename to sgp/Ja2 Libs.h diff --git a/Standard Gaming Platform/LibraryDataBase.cpp b/sgp/LibraryDataBase.cpp similarity index 100% rename from Standard Gaming Platform/LibraryDataBase.cpp rename to sgp/LibraryDataBase.cpp diff --git a/Standard Gaming Platform/LibraryDataBase.h b/sgp/LibraryDataBase.h similarity index 100% rename from Standard Gaming Platform/LibraryDataBase.h rename to sgp/LibraryDataBase.h diff --git a/Standard Gaming Platform/MemMan.cpp b/sgp/MemMan.cpp similarity index 100% rename from Standard Gaming Platform/MemMan.cpp rename to sgp/MemMan.cpp diff --git a/Standard Gaming Platform/MemMan.h b/sgp/MemMan.h similarity index 100% rename from Standard Gaming Platform/MemMan.h rename to sgp/MemMan.h diff --git a/Standard Gaming Platform/Mss-old.h b/sgp/Mss-old.h similarity index 100% rename from Standard Gaming Platform/Mss-old.h rename to sgp/Mss-old.h diff --git a/Standard Gaming Platform/Mss.h b/sgp/Mss.h similarity index 100% rename from Standard Gaming Platform/Mss.h rename to sgp/Mss.h diff --git a/Standard Gaming Platform/PCX.cpp b/sgp/PCX.cpp similarity index 100% rename from Standard Gaming Platform/PCX.cpp rename to sgp/PCX.cpp diff --git a/Standard Gaming Platform/PngLoader.cpp b/sgp/PngLoader.cpp similarity index 100% rename from Standard Gaming Platform/PngLoader.cpp rename to sgp/PngLoader.cpp diff --git a/Standard Gaming Platform/PngLoader.h b/sgp/PngLoader.h similarity index 100% rename from Standard Gaming Platform/PngLoader.h rename to sgp/PngLoader.h diff --git a/Standard Gaming Platform/RAD.H b/sgp/RAD.H similarity index 100% rename from Standard Gaming Platform/RAD.H rename to sgp/RAD.H diff --git a/Standard Gaming Platform/Random.cpp b/sgp/Random.cpp similarity index 100% rename from Standard Gaming Platform/Random.cpp rename to sgp/Random.cpp diff --git a/Standard Gaming Platform/SMACK.H b/sgp/SMACK.H similarity index 100% rename from Standard Gaming Platform/SMACK.H rename to sgp/SMACK.H diff --git a/Standard Gaming Platform/STCI.cpp b/sgp/STCI.cpp similarity index 100% rename from Standard Gaming Platform/STCI.cpp rename to sgp/STCI.cpp diff --git a/Standard Gaming Platform/STCI.h b/sgp/STCI.h similarity index 100% rename from Standard Gaming Platform/STCI.h rename to sgp/STCI.h diff --git a/Standard Gaming Platform/TopicIDs.h b/sgp/TopicIDs.h similarity index 100% rename from Standard Gaming Platform/TopicIDs.h rename to sgp/TopicIDs.h diff --git a/Standard Gaming Platform/TopicOps.h b/sgp/TopicOps.h similarity index 100% rename from Standard Gaming Platform/TopicOps.h rename to sgp/TopicOps.h diff --git a/Standard Gaming Platform/Types.h b/sgp/Types.h similarity index 100% rename from Standard Gaming Platform/Types.h rename to sgp/Types.h diff --git a/Standard Gaming Platform/WCheck.h b/sgp/WCheck.h similarity index 100% rename from Standard Gaming Platform/WCheck.h rename to sgp/WCheck.h diff --git a/Standard Gaming Platform/WinFont.cpp b/sgp/WinFont.cpp similarity index 100% rename from Standard Gaming Platform/WinFont.cpp rename to sgp/WinFont.cpp diff --git a/Standard Gaming Platform/WinFont.h b/sgp/WinFont.h similarity index 100% rename from Standard Gaming Platform/WinFont.h rename to sgp/WinFont.h diff --git a/Standard Gaming Platform/ZCONF.H b/sgp/ZCONF.H similarity index 100% rename from Standard Gaming Platform/ZCONF.H rename to sgp/ZCONF.H diff --git a/Standard Gaming Platform/ZLIB.H b/sgp/ZLIB.H similarity index 100% rename from Standard Gaming Platform/ZLIB.H rename to sgp/ZLIB.H diff --git a/Standard Gaming Platform/ddraw.h b/sgp/ddraw.h similarity index 100% rename from Standard Gaming Platform/ddraw.h rename to sgp/ddraw.h diff --git a/Standard Gaming Platform/ddraw.lib b/sgp/ddraw.lib similarity index 100% rename from Standard Gaming Platform/ddraw.lib rename to sgp/ddraw.lib diff --git a/Standard Gaming Platform/debug_util.cpp b/sgp/debug_util.cpp similarity index 100% rename from Standard Gaming Platform/debug_util.cpp rename to sgp/debug_util.cpp diff --git a/Standard Gaming Platform/debug_util.h b/sgp/debug_util.h similarity index 100% rename from Standard Gaming Platform/debug_util.h rename to sgp/debug_util.h diff --git a/Standard Gaming Platform/debug_win_util.cpp b/sgp/debug_win_util.cpp similarity index 100% rename from Standard Gaming Platform/debug_win_util.cpp rename to sgp/debug_win_util.cpp diff --git a/Standard Gaming Platform/dsound.h b/sgp/dsound.h similarity index 100% rename from Standard Gaming Platform/dsound.h rename to sgp/dsound.h diff --git a/Standard Gaming Platform/english.h b/sgp/english.h similarity index 100% rename from Standard Gaming Platform/english.h rename to sgp/english.h diff --git a/Standard Gaming Platform/expat.h b/sgp/expat.h similarity index 100% rename from Standard Gaming Platform/expat.h rename to sgp/expat.h diff --git a/Standard Gaming Platform/fmod.h b/sgp/fmod.h similarity index 100% rename from Standard Gaming Platform/fmod.h rename to sgp/fmod.h diff --git a/Standard Gaming Platform/fmod_errors.h b/sgp/fmod_errors.h similarity index 100% rename from Standard Gaming Platform/fmod_errors.h rename to sgp/fmod_errors.h diff --git a/Standard Gaming Platform/himage.cpp b/sgp/himage.cpp similarity index 100% rename from Standard Gaming Platform/himage.cpp rename to sgp/himage.cpp diff --git a/Standard Gaming Platform/himage.h b/sgp/himage.h similarity index 100% rename from Standard Gaming Platform/himage.h rename to sgp/himage.h diff --git a/Standard Gaming Platform/imgfmt.h b/sgp/imgfmt.h similarity index 100% rename from Standard Gaming Platform/imgfmt.h rename to sgp/imgfmt.h diff --git a/Standard Gaming Platform/impTGA.cpp b/sgp/impTGA.cpp similarity index 100% rename from Standard Gaming Platform/impTGA.cpp rename to sgp/impTGA.cpp diff --git a/Standard Gaming Platform/impTGA.h b/sgp/impTGA.h similarity index 100% rename from Standard Gaming Platform/impTGA.h rename to sgp/impTGA.h diff --git a/Standard Gaming Platform/input.cpp b/sgp/input.cpp similarity index 100% rename from Standard Gaming Platform/input.cpp rename to sgp/input.cpp diff --git a/Standard Gaming Platform/input.h b/sgp/input.h similarity index 100% rename from Standard Gaming Platform/input.h rename to sgp/input.h diff --git a/Standard Gaming Platform/line.cpp b/sgp/line.cpp similarity index 100% rename from Standard Gaming Platform/line.cpp rename to sgp/line.cpp diff --git a/Standard Gaming Platform/line.h b/sgp/line.h similarity index 100% rename from Standard Gaming Platform/line.h rename to sgp/line.h diff --git a/Standard Gaming Platform/mousesystem.cpp b/sgp/mousesystem.cpp similarity index 100% rename from Standard Gaming Platform/mousesystem.cpp rename to sgp/mousesystem.cpp diff --git a/Standard Gaming Platform/mousesystem.h b/sgp/mousesystem.h similarity index 100% rename from Standard Gaming Platform/mousesystem.h rename to sgp/mousesystem.h diff --git a/Standard Gaming Platform/mousesystem_macros.h b/sgp/mousesystem_macros.h similarity index 100% rename from Standard Gaming Platform/mousesystem_macros.h rename to sgp/mousesystem_macros.h diff --git a/Standard Gaming Platform/pcx.h b/sgp/pcx.h similarity index 100% rename from Standard Gaming Platform/pcx.h rename to sgp/pcx.h diff --git a/Standard Gaming Platform/radbase.h b/sgp/radbase.h similarity index 100% rename from Standard Gaming Platform/radbase.h rename to sgp/radbase.h diff --git a/Standard Gaming Platform/random.h b/sgp/random.h similarity index 100% rename from Standard Gaming Platform/random.h rename to sgp/random.h diff --git a/Standard Gaming Platform/sgp.cpp b/sgp/sgp.cpp similarity index 100% rename from Standard Gaming Platform/sgp.cpp rename to sgp/sgp.cpp diff --git a/Standard Gaming Platform/sgp.h b/sgp/sgp.h similarity index 100% rename from Standard Gaming Platform/sgp.h rename to sgp/sgp.h diff --git a/Standard Gaming Platform/sgp_auto_memory.h b/sgp/sgp_auto_memory.h similarity index 100% rename from Standard Gaming Platform/sgp_auto_memory.h rename to sgp/sgp_auto_memory.h diff --git a/Standard Gaming Platform/sgp_logger.cpp b/sgp/sgp_logger.cpp similarity index 100% rename from Standard Gaming Platform/sgp_logger.cpp rename to sgp/sgp_logger.cpp diff --git a/Standard Gaming Platform/sgp_logger.h b/sgp/sgp_logger.h similarity index 100% rename from Standard Gaming Platform/sgp_logger.h rename to sgp/sgp_logger.h diff --git a/Standard Gaming Platform/shading.cpp b/sgp/shading.cpp similarity index 100% rename from Standard Gaming Platform/shading.cpp rename to sgp/shading.cpp diff --git a/Standard Gaming Platform/shading.h b/sgp/shading.h similarity index 100% rename from Standard Gaming Platform/shading.h rename to sgp/shading.h diff --git a/Standard Gaming Platform/soundman.cpp b/sgp/soundman.cpp similarity index 100% rename from Standard Gaming Platform/soundman.cpp rename to sgp/soundman.cpp diff --git a/Standard Gaming Platform/soundman.h b/sgp/soundman.h similarity index 100% rename from Standard Gaming Platform/soundman.h rename to sgp/soundman.h diff --git a/Standard Gaming Platform/stringicmp.cpp b/sgp/stringicmp.cpp similarity index 100% rename from Standard Gaming Platform/stringicmp.cpp rename to sgp/stringicmp.cpp diff --git a/Standard Gaming Platform/stringicmp.h b/sgp/stringicmp.h similarity index 100% rename from Standard Gaming Platform/stringicmp.h rename to sgp/stringicmp.h diff --git a/Standard Gaming Platform/timer.cpp b/sgp/timer.cpp similarity index 100% rename from Standard Gaming Platform/timer.cpp rename to sgp/timer.cpp diff --git a/Standard Gaming Platform/timer.h b/sgp/timer.h similarity index 100% rename from Standard Gaming Platform/timer.h rename to sgp/timer.h diff --git a/Standard Gaming Platform/video.cpp b/sgp/video.cpp similarity index 100% rename from Standard Gaming Platform/video.cpp rename to sgp/video.cpp diff --git a/Standard Gaming Platform/video.h b/sgp/video.h similarity index 100% rename from Standard Gaming Platform/video.h rename to sgp/video.h diff --git a/Standard Gaming Platform/vobject.cpp b/sgp/vobject.cpp similarity index 100% rename from Standard Gaming Platform/vobject.cpp rename to sgp/vobject.cpp diff --git a/Standard Gaming Platform/vobject.h b/sgp/vobject.h similarity index 100% rename from Standard Gaming Platform/vobject.h rename to sgp/vobject.h diff --git a/Standard Gaming Platform/vobject_blitters.cpp b/sgp/vobject_blitters.cpp similarity index 100% rename from Standard Gaming Platform/vobject_blitters.cpp rename to sgp/vobject_blitters.cpp diff --git a/Standard Gaming Platform/vobject_blitters.h b/sgp/vobject_blitters.h similarity index 100% rename from Standard Gaming Platform/vobject_blitters.h rename to sgp/vobject_blitters.h diff --git a/Standard Gaming Platform/vsurface.cpp b/sgp/vsurface.cpp similarity index 100% rename from Standard Gaming Platform/vsurface.cpp rename to sgp/vsurface.cpp diff --git a/Standard Gaming Platform/vsurface.h b/sgp/vsurface.h similarity index 100% rename from Standard Gaming Platform/vsurface.h rename to sgp/vsurface.h diff --git a/Standard Gaming Platform/vsurface_private.h b/sgp/vsurface_private.h similarity index 100% rename from Standard Gaming Platform/vsurface_private.h rename to sgp/vsurface_private.h