2016-04-24 04:03:30 +00:00
|
|
|
macro(runtime_add_list rel_path a_list)
|
2021-06-07 19:29:18 +00:00
|
|
|
unset(tmp_list)
|
|
|
|
foreach (path IN LISTS ${a_list})
|
|
|
|
if (IS_ABSOLUTE ${path})
|
|
|
|
list(APPEND tmp_list "${path}")
|
|
|
|
else ()
|
|
|
|
list(APPEND tmp_list "${rel_path}/${path}")
|
|
|
|
endif ()
|
|
|
|
endforeach (path)
|
|
|
|
set(${a_list} "${tmp_list}" PARENT_SCOPE)
|
2016-04-24 04:03:30 +00:00
|
|
|
endmacro(runtime_add_list)
|
|
|
|
|
2015-08-18 22:51:54 +00:00
|
|
|
add_subdirectory(Audio)
|
|
|
|
add_subdirectory(Character)
|
|
|
|
add_subdirectory(Graphics)
|
2016-04-17 22:38:05 +00:00
|
|
|
add_subdirectory(Collision)
|
2016-04-16 21:49:47 +00:00
|
|
|
add_subdirectory(Camera)
|
2016-04-16 23:48:29 +00:00
|
|
|
add_subdirectory(World)
|
2016-11-22 20:43:16 +00:00
|
|
|
add_subdirectory(Weapon)
|
2016-04-16 23:48:29 +00:00
|
|
|
add_subdirectory(AutoMapper)
|
2015-08-18 22:51:54 +00:00
|
|
|
add_subdirectory(GuiSys)
|
|
|
|
add_subdirectory(Input)
|
|
|
|
add_subdirectory(Particle)
|
|
|
|
|
2021-06-07 19:29:18 +00:00
|
|
|
if (WIN32)
|
|
|
|
list(APPEND PLAT_SRCS CMemoryCardSysWin.cpp)
|
|
|
|
else ()
|
|
|
|
list(APPEND PLAT_SRCS CMemoryCardSysNix.cpp)
|
|
|
|
endif ()
|
2015-08-23 06:42:29 +00:00
|
|
|
|
2017-01-15 03:07:01 +00:00
|
|
|
add_custom_command(OUTPUT TCastTo.hpp TCastTo.cpp DEPENDS MkCastTo.py
|
2021-06-07 19:29:18 +00:00
|
|
|
COMMAND python ARGS ${CMAKE_CURRENT_SOURCE_DIR}/MkCastTo.py
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
COMMENT "Generating cast functions")
|
2017-01-15 03:07:01 +00:00
|
|
|
|
2016-04-24 04:03:30 +00:00
|
|
|
add_subdirectory(MP1)
|
|
|
|
add_subdirectory(MP2)
|
|
|
|
add_subdirectory(MP3)
|
|
|
|
|
2021-05-24 22:53:49 +00:00
|
|
|
set(CAST_TO_SOURCES
|
2021-06-07 19:29:18 +00:00
|
|
|
MkCastTo.py
|
|
|
|
TCastTo.hpp TCastTo.cpp)
|
2021-05-24 22:53:49 +00:00
|
|
|
|
|
|
|
set(RUNTIME_SOURCES_A
|
2021-06-07 19:29:18 +00:00
|
|
|
RetroTypes.hpp RetroTypes.cpp
|
|
|
|
${CAST_TO_SOURCES}
|
|
|
|
${MP1_SOURCES}
|
|
|
|
${AUDIO_SOURCES}
|
|
|
|
${AUTOMAPPER_SOURCES}
|
|
|
|
${CAMERA_SOURCES}
|
|
|
|
${CHARACTER_SOURCES}
|
|
|
|
${COLLISION_SOURCES}
|
|
|
|
${GRAPHICS_SOURCES})
|
2019-02-07 04:10:07 +00:00
|
|
|
|
|
|
|
set(RUNTIME_SOURCES_B
|
2021-06-07 19:29:18 +00:00
|
|
|
${CAST_TO_SOURCES}
|
|
|
|
${GUISYS_SOURCES}
|
|
|
|
${INPUT_SOURCES}
|
|
|
|
${PARTICLE_SOURCES}
|
|
|
|
${WORLD_SOURCES}
|
|
|
|
${WEAPON_SOURCES}
|
2022-03-04 09:46:33 +00:00
|
|
|
CInfiniteLoopDetector.hpp CInfiniteLoopDetector.cpp
|
2022-02-21 02:28:07 +00:00
|
|
|
ConsoleVariables/FileStoreManager.hpp ConsoleVariables/FileStoreManager.cpp
|
|
|
|
ConsoleVariables/CVar.hpp ConsoleVariables/CVar.cpp
|
|
|
|
ConsoleVariables/CVarManager.hpp ConsoleVariables/CVarManager.cpp
|
|
|
|
ConsoleVariables/CVarCommons.hpp ConsoleVariables/CVarCommons.cpp
|
2022-02-19 13:04:45 +00:00
|
|
|
Tweaks/ITweak.hpp
|
|
|
|
Tweaks/ITweakAutoMapper.hpp
|
|
|
|
Tweaks/ITweakBall.hpp
|
|
|
|
Tweaks/ITweakGame.hpp
|
|
|
|
Tweaks/ITweakGui.hpp
|
|
|
|
Tweaks/ITweakGuiColors.hpp
|
|
|
|
Tweaks/ITweakGunRes.hpp
|
|
|
|
Tweaks/ITweakParticle.hpp
|
|
|
|
Tweaks/ITweakPlayer.hpp
|
|
|
|
Tweaks/ITweakPlayerControl.hpp
|
|
|
|
Tweaks/ITweakPlayerGun.hpp Tweaks/ITweakPlayerGun.cpp
|
|
|
|
Tweaks/ITweakPlayerRes.hpp
|
|
|
|
Tweaks/ITweakSlideShow.hpp
|
|
|
|
Tweaks/ITweakTargeting.hpp
|
2021-06-07 19:29:18 +00:00
|
|
|
IMain.hpp
|
2022-02-26 16:42:42 +00:00
|
|
|
CStopwatch.hpp CStopwatch.cpp
|
2022-02-19 13:04:45 +00:00
|
|
|
Streams/IOStreams.hpp Streams/IOStreams.cpp
|
|
|
|
Streams/CMemoryStreamOut.hpp Streams/CMemoryStreamOut.cpp
|
|
|
|
Streams/CInputStream.hpp Streams/CInputStream.cpp
|
|
|
|
Streams/COutputStream.hpp Streams/COutputStream.cpp
|
|
|
|
Streams/CMemoryInStream.hpp
|
|
|
|
Streams/CZipInputStream.hpp Streams/CZipInputStream.cpp
|
|
|
|
Streams/ContainerReaders.hpp
|
2022-02-28 01:11:10 +00:00
|
|
|
Streams/CTextInStream.hpp Streams/CTextInStream.cpp
|
|
|
|
Streams/CTextOutStream.hpp Streams/CTextOutStream.cpp
|
2021-06-07 19:29:18 +00:00
|
|
|
CGameAllocator.hpp CGameAllocator.cpp
|
|
|
|
CMemoryCardSys.hpp CMemoryCardSys.cpp
|
|
|
|
CScannableObjectInfo.hpp CScannableObjectInfo.cpp
|
2021-06-05 05:27:52 +00:00
|
|
|
CWorldSaveGameInfo.hpp CWorldSaveGameInfo.cpp
|
2021-06-07 19:29:18 +00:00
|
|
|
CDependencyGroup.hpp CDependencyGroup.cpp
|
|
|
|
CBasics.hpp CBasicsPC.cpp
|
|
|
|
CIOWin.hpp
|
|
|
|
CIOWinManager.hpp CIOWinManager.cpp
|
|
|
|
CStateManager.hpp CStateManager.cpp
|
|
|
|
CGameState.hpp CGameState.cpp
|
2021-06-03 21:39:49 +00:00
|
|
|
CScriptMailbox.hpp CScriptMailbox.cpp
|
2021-06-07 19:29:18 +00:00
|
|
|
CPlayerState.hpp CPlayerState.cpp
|
|
|
|
CRandom16.hpp CRandom16.cpp
|
|
|
|
CResFactory.hpp CResFactory.cpp
|
|
|
|
CResLoader.hpp CResLoader.cpp
|
|
|
|
CDvdRequest.hpp
|
|
|
|
CDvdFile.hpp CDvdFile.cpp
|
|
|
|
IObjectStore.hpp
|
|
|
|
CSimplePool.hpp CSimplePool.cpp
|
|
|
|
CGameOptions.hpp CGameOptions.cpp
|
|
|
|
CStaticInterference.hpp CStaticInterference.cpp
|
|
|
|
CCRC32.hpp CCRC32.cpp
|
|
|
|
IFactory.hpp
|
|
|
|
IObjFactory.hpp
|
|
|
|
CObjectList.hpp CObjectList.cpp
|
|
|
|
GameObjectLists.hpp GameObjectLists.cpp
|
|
|
|
CSortedLists.hpp CSortedLists.cpp
|
|
|
|
CArchitectureMessage.hpp
|
|
|
|
CArchitectureQueue.hpp
|
|
|
|
IObj.hpp
|
|
|
|
IVParamObj.hpp
|
|
|
|
CTimeProvider.hpp CTimeProvider.cpp
|
|
|
|
CToken.hpp CToken.cpp
|
|
|
|
CFactoryMgr.hpp CFactoryMgr.cpp
|
|
|
|
CPakFile.hpp CPakFile.cpp
|
2022-02-18 07:37:54 +00:00
|
|
|
CStringExtras.hpp CStringExtras.cpp
|
2021-06-07 19:29:18 +00:00
|
|
|
CMainFlowBase.hpp CMainFlowBase.cpp
|
|
|
|
CMFGameBase.hpp
|
|
|
|
CInGameTweakManagerBase.hpp
|
|
|
|
CGameDebug.hpp
|
|
|
|
CGameHintInfo.hpp CGameHintInfo.cpp
|
|
|
|
rstl.hpp
|
|
|
|
GameGlobalObjects.hpp GameGlobalObjects.cpp
|
|
|
|
GCNTypes.hpp
|
|
|
|
CTextureCache.hpp CTextureCache.cpp
|
|
|
|
CMayaSpline.hpp CMayaSpline.cpp
|
2022-02-28 03:33:48 +00:00
|
|
|
ImGuiPlayerLoadouts.hpp ImGuiPlayerLoadouts.cpp
|
2021-06-07 19:29:18 +00:00
|
|
|
${PLAT_SRCS})
|
2019-02-07 04:10:07 +00:00
|
|
|
|
|
|
|
function(add_runtime_common_library name)
|
2021-06-07 19:29:18 +00:00
|
|
|
add_library(${name} ${ARGN})
|
2022-02-18 07:37:54 +00:00
|
|
|
target_compile_definitions(${name} PUBLIC "-DMETAFORCE_TARGET_BYTE_ORDER=__BYTE_ORDER__")
|
2021-06-07 19:29:18 +00:00
|
|
|
if (WINDOWS_STORE)
|
|
|
|
set_property(TARGET ${name} PROPERTY VS_WINRT_COMPONENT TRUE)
|
|
|
|
endif ()
|
2019-02-07 04:10:07 +00:00
|
|
|
endfunction()
|
|
|
|
|
2022-02-21 09:04:16 +00:00
|
|
|
set(RUNTIME_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
|
2022-03-09 05:06:26 +00:00
|
|
|
set(RUNTIME_LIBRARIES amuse zeus nod NESEmulator libjpeg-turbo jbus kabufuda discord-rpc logvisor OptickCore imgui aurora SDL2-static
|
|
|
|
boo # TODO move audiodev
|
|
|
|
)
|
2019-06-12 02:05:17 +00:00
|
|
|
|
2021-05-24 05:06:51 +00:00
|
|
|
add_runtime_common_library(RuntimeCommon ${RUNTIME_SOURCES_A})
|
|
|
|
target_include_directories(RuntimeCommon PUBLIC ${RUNTIME_INCLUDES})
|
2021-05-27 19:10:21 +00:00
|
|
|
target_link_libraries(RuntimeCommon PUBLIC ${RUNTIME_LIBRARIES})
|
2021-05-27 21:04:47 +00:00
|
|
|
|
2021-05-24 05:06:51 +00:00
|
|
|
add_runtime_common_library(RuntimeCommonB ${RUNTIME_SOURCES_B})
|
2021-05-27 19:10:21 +00:00
|
|
|
target_include_directories(RuntimeCommonB PUBLIC ${RUNTIME_INCLUDES})
|
2021-05-24 05:06:51 +00:00
|
|
|
target_link_libraries(RuntimeCommonB PUBLIC ${RUNTIME_LIBRARIES})
|
|
|
|
|
2021-06-07 19:29:18 +00:00
|
|
|
if (WIN32)
|
|
|
|
configure_file(platforms/win/metaforce.rc.in "${CMAKE_CURRENT_SOURCE_DIR}/platforms/win/metaforce.rc" @ONLY)
|
|
|
|
set(PLAT_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/platforms/win/metaforce.rc" platforms/win/metaforce.manifest)
|
|
|
|
if (WINDOWS_STORE)
|
|
|
|
set(UWP_ASSETS
|
|
|
|
platforms/win/Assets/LargeTile.scale-100.png
|
|
|
|
platforms/win/Assets/LargeTile.scale-125.png
|
|
|
|
platforms/win/Assets/LargeTile.scale-150.png
|
|
|
|
platforms/win/Assets/LargeTile.scale-200.png
|
|
|
|
platforms/win/Assets/LargeTile.scale-400.png
|
|
|
|
platforms/win/Assets/SmallTile.scale-100.png
|
|
|
|
platforms/win/Assets/SmallTile.scale-125.png
|
|
|
|
platforms/win/Assets/SmallTile.scale-150.png
|
|
|
|
platforms/win/Assets/SmallTile.scale-200.png
|
|
|
|
platforms/win/Assets/SmallTile.scale-400.png
|
|
|
|
platforms/win/Assets/SplashScreen.scale-100.png
|
|
|
|
platforms/win/Assets/SplashScreen.scale-125.png
|
|
|
|
platforms/win/Assets/SplashScreen.scale-150.png
|
|
|
|
platforms/win/Assets/SplashScreen.scale-200.png
|
|
|
|
platforms/win/Assets/SplashScreen.scale-400.png
|
|
|
|
platforms/win/Assets/Square44x44Logo.scale-100.png
|
|
|
|
platforms/win/Assets/Square44x44Logo.scale-125.png
|
|
|
|
platforms/win/Assets/Square44x44Logo.scale-150.png
|
|
|
|
platforms/win/Assets/Square44x44Logo.scale-200.png
|
|
|
|
platforms/win/Assets/Square44x44Logo.scale-400.png
|
|
|
|
platforms/win/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
|
|
|
|
platforms/win/Assets/Square44x44Logo.altform-unplated_targetsize-24.png
|
|
|
|
platforms/win/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
|
|
|
|
platforms/win/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
|
|
|
|
platforms/win/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
|
|
|
|
platforms/win/Assets/Square150x150Logo.scale-100.png
|
|
|
|
platforms/win/Assets/Square150x150Logo.scale-125.png
|
|
|
|
platforms/win/Assets/Square150x150Logo.scale-150.png
|
|
|
|
platforms/win/Assets/Square150x150Logo.scale-200.png
|
|
|
|
platforms/win/Assets/Square150x150Logo.scale-400.png
|
|
|
|
platforms/win/Assets/metaforce.scale-100.png
|
|
|
|
platforms/win/Assets/metaforce.scale-125.png
|
|
|
|
platforms/win/Assets/metaforce.scale-150.png
|
|
|
|
platforms/win/Assets/metaforce.scale-200.png
|
|
|
|
platforms/win/Assets/metaforce.scale-400.png
|
|
|
|
platforms/win/Assets/WideTile.scale-100.png
|
|
|
|
platforms/win/Assets/WideTile.scale-125.png
|
|
|
|
platforms/win/Assets/WideTile.scale-150.png
|
|
|
|
platforms/win/Assets/WideTile.scale-200.png
|
|
|
|
platforms/win/Assets/WideTile.scale-400.png)
|
|
|
|
set_property(SOURCE platforms/win/Package.appxmanifest PROPERTY VS_DEPLOYMENT_CONTENT 1)
|
|
|
|
set_property(SOURCE ${UWP_ASSETS} PROPERTY VS_DEPLOYMENT_CONTENT 1)
|
|
|
|
set_property(SOURCE ${UWP_ASSETS} PROPERTY VS_DEPLOYMENT_LOCATION "Assets")
|
|
|
|
list(APPEND PLAT_SRCS ${UWP_ASSETS} platforms/win/Package.appxmanifest)
|
|
|
|
endif ()
|
|
|
|
elseif (APPLE)
|
|
|
|
# nothing
|
|
|
|
elseif (UNIX)
|
|
|
|
set(PLAT_LIBS rt)
|
|
|
|
endif ()
|
2021-05-24 05:06:51 +00:00
|
|
|
|
2022-02-23 05:28:21 +00:00
|
|
|
add_executable(metaforce CMain.cpp ${PLAT_SRCS}
|
|
|
|
ImGuiConsole.hpp ImGuiConsole.cpp
|
|
|
|
ImGuiEntitySupport.hpp ImGuiEntitySupport.cpp)
|
2021-05-27 21:04:47 +00:00
|
|
|
# RUNTIME_LIBRARIES repeated here for link ordering
|
|
|
|
target_link_libraries(metaforce PUBLIC RuntimeCommon RuntimeCommonB ${RUNTIME_LIBRARIES} ${PLAT_LIBS})
|
2022-02-23 05:28:21 +00:00
|
|
|
if (TARGET nativefiledialog)
|
|
|
|
target_link_libraries(metaforce PRIVATE nativefiledialog)
|
|
|
|
endif()
|
2022-02-18 07:37:54 +00:00
|
|
|
target_compile_definitions(metaforce PUBLIC "-DMETAFORCE_TARGET_BYTE_ORDER=__BYTE_ORDER__")
|
2021-05-24 05:06:51 +00:00
|
|
|
|
2022-03-09 05:06:26 +00:00
|
|
|
if (WINDOWS_STORE)
|
2021-06-07 19:29:18 +00:00
|
|
|
set_property(TARGET metaforce PROPERTY VS_WINRT_COMPONENT TRUE)
|
|
|
|
# This should match the Package.appxmanifest
|
|
|
|
set_property(TARGET metaforce PROPERTY VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION "10.0.14393.0")
|
|
|
|
endif ()
|