From 3112addebda7c2454ba46dcd7f26a0e01b334d6a Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Mon, 17 Aug 2015 13:46:41 -1000 Subject: [PATCH] Started Tweaks in MP1 DataSpec --- DataSpec/CMakeLists.txt | 8 ++++++-- DataSpec/DNAMP1/CMakeLists.txt | 4 +++- DataSpec/DNAMP1/Tweaks/CMakeLists.txt | 0 DataSpec/DNAMP1/Tweaks/CTweakParticle.hpp | 0 Runtime/Common/CAi.hpp | 4 ++++ Runtime/Common/CElementGen.cpp | 0 Runtime/Common/CElementGen.hpp | 16 ++++++++++++++++ Runtime/Common/CInGameTweakManager.cpp | 0 Runtime/Common/CInGameTweakManager.hpp | 16 ++++++++++++++++ Runtime/Common/CMakeLists.txt | 3 ++- Runtime/Common/Character/CAnimData.cpp | 0 Runtime/Common/Character/CAnimData.hpp | 0 Runtime/Common/{ => Character}/CAssetFactory.cpp | 0 Runtime/Common/{ => Character}/CAssetFactory.hpp | 4 ++++ Runtime/Common/Character/CCharacterFactory.cpp | 0 Runtime/Common/Character/CCharacterFactory.hpp | 8 ++++++++ Runtime/Common/Character/CMakeLists.txt | 4 ++++ Runtime/MP1/CMakeLists.txt | 1 + Runtime/MP1/main.cpp | 9 +++++++++ hecl | 2 +- 20 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 DataSpec/DNAMP1/Tweaks/CMakeLists.txt create mode 100644 DataSpec/DNAMP1/Tweaks/CTweakParticle.hpp create mode 100644 Runtime/Common/CElementGen.cpp create mode 100644 Runtime/Common/CElementGen.hpp create mode 100644 Runtime/Common/CInGameTweakManager.cpp create mode 100644 Runtime/Common/CInGameTweakManager.hpp create mode 100644 Runtime/Common/Character/CAnimData.cpp create mode 100644 Runtime/Common/Character/CAnimData.hpp rename Runtime/Common/{ => Character}/CAssetFactory.cpp (100%) rename Runtime/Common/{ => Character}/CAssetFactory.hpp (80%) create mode 100644 Runtime/Common/Character/CCharacterFactory.cpp create mode 100644 Runtime/Common/Character/CCharacterFactory.hpp diff --git a/DataSpec/CMakeLists.txt b/DataSpec/CMakeLists.txt index 494151e4f..c8cb5d56f 100644 --- a/DataSpec/CMakeLists.txt +++ b/DataSpec/CMakeLists.txt @@ -7,8 +7,12 @@ find_package(atdna REQUIRED) # Assembles a source/header pair list for use in a DNA library macro(make_dnalist outlist) foreach(type ${ARGN}) - atdna(atdna_${type}.cpp ${type}.hpp) - list(APPEND ${outlist} atdna_${type}.cpp ${type}.hpp) + get_filename_component(dir ${type} DIRECTORY) + get_filename_component(name ${type} NAME) + atdna(${dir}/atdna_${name}.cpp ${dir}/${name}.hpp) + list(APPEND ${outlist} + ${CMAKE_CURRENT_BINARY_DIR}/${dir}/atdna_${name}.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${name}.hpp) endforeach() endmacro() diff --git a/DataSpec/DNAMP1/CMakeLists.txt b/DataSpec/DNAMP1/CMakeLists.txt index 04a0d9a7b..52851b8be 100644 --- a/DataSpec/DNAMP1/CMakeLists.txt +++ b/DataSpec/DNAMP1/CMakeLists.txt @@ -1,3 +1,4 @@ +add_subdirectory(Tweaks) make_dnalist(liblist PAK MLVL @@ -8,7 +9,8 @@ make_dnalist(liblist EVNT MAPA CMDLMaterials - MREA) + MREA + Tweaks/CTweakParticle) add_library(DNAMP1 DNAMP1.hpp DNAMP1.cpp ${liblist} diff --git a/DataSpec/DNAMP1/Tweaks/CMakeLists.txt b/DataSpec/DNAMP1/Tweaks/CMakeLists.txt new file mode 100644 index 000000000..e69de29bb diff --git a/DataSpec/DNAMP1/Tweaks/CTweakParticle.hpp b/DataSpec/DNAMP1/Tweaks/CTweakParticle.hpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Common/CAi.hpp b/Runtime/Common/CAi.hpp index c11290410..8c9cf7e7e 100644 --- a/Runtime/Common/CAi.hpp +++ b/Runtime/Common/CAi.hpp @@ -6,6 +6,10 @@ namespace Retro namespace Common { +class CAiFuncMap +{ +}; + } } diff --git a/Runtime/Common/CElementGen.cpp b/Runtime/Common/CElementGen.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Common/CElementGen.hpp b/Runtime/Common/CElementGen.hpp new file mode 100644 index 000000000..0af51067b --- /dev/null +++ b/Runtime/Common/CElementGen.hpp @@ -0,0 +1,16 @@ +#ifndef __RETRO_CELEMENTGEN_HPP__ +#define __RETRO_CELEMENTGEN_HPP__ + +namespace Retro +{ +namespace Common +{ + +class CElementGen +{ +}; + +} +} + +#endif // __RETRO_CELEMENTGEN_HPP__ diff --git a/Runtime/Common/CInGameTweakManager.cpp b/Runtime/Common/CInGameTweakManager.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Common/CInGameTweakManager.hpp b/Runtime/Common/CInGameTweakManager.hpp new file mode 100644 index 000000000..de9b8cbe7 --- /dev/null +++ b/Runtime/Common/CInGameTweakManager.hpp @@ -0,0 +1,16 @@ +#ifndef __RETRO_CINGAMETWEAKMANAGER_HPP__ +#define __RETRO_CINGAMETWEAKMANAGER_HPP__ + +namespace Retro +{ +namespace Common +{ + +class CInGameTweakManager +{ +}; + +} +} + +#endif // __RETRO_CINGAMETWEAKMANAGER_HPP__ diff --git a/Runtime/Common/CMakeLists.txt b/Runtime/Common/CMakeLists.txt index 09cabdde7..fa6d6fed0 100644 --- a/Runtime/Common/CMakeLists.txt +++ b/Runtime/Common/CMakeLists.txt @@ -11,6 +11,7 @@ add_library(RuntimeCommon CGameAllocator.hpp CGameAllocator.cpp CBasics.hpp CBasicsPC.cpp CTweaks.hpp CTweaks.cpp + CInGameTweakManager.hpp CInGameTweakManager.cpp CTweakParticle.hpp CTweakParticle.cpp CStateManager.hpp CStateManager.cpp CGameState.hpp CGameState.cpp @@ -21,10 +22,10 @@ add_library(RuntimeCommon CRandom16.hpp CRandom16.cpp CResFactory.hpp CResFactory.cpp CSimplePool.hpp CSimplePool.cpp - CAssetFactory.hpp CAssetFactory.cpp CAi.hpp CAi.cpp CGameOptions.hpp CGameOptions.cpp CStaticInterference.hpp CStaticInterference.cpp + CElementGen.hpp CElementGen.cpp CCRC32.hpp CCRC32.cpp RetroTemplates.hpp GCNTypes.hpp) diff --git a/Runtime/Common/Character/CAnimData.cpp b/Runtime/Common/Character/CAnimData.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Common/Character/CAnimData.hpp b/Runtime/Common/Character/CAnimData.hpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Common/CAssetFactory.cpp b/Runtime/Common/Character/CAssetFactory.cpp similarity index 100% rename from Runtime/Common/CAssetFactory.cpp rename to Runtime/Common/Character/CAssetFactory.cpp diff --git a/Runtime/Common/CAssetFactory.hpp b/Runtime/Common/Character/CAssetFactory.hpp similarity index 80% rename from Runtime/Common/CAssetFactory.hpp rename to Runtime/Common/Character/CAssetFactory.hpp index d401fea0e..f12641e91 100644 --- a/Runtime/Common/CAssetFactory.hpp +++ b/Runtime/Common/Character/CAssetFactory.hpp @@ -6,6 +6,10 @@ namespace Retro namespace Common { +class CCharacterFactoryBuilder +{ +}; + } } diff --git a/Runtime/Common/Character/CCharacterFactory.cpp b/Runtime/Common/Character/CCharacterFactory.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Common/Character/CCharacterFactory.hpp b/Runtime/Common/Character/CCharacterFactory.hpp new file mode 100644 index 000000000..9c89fac65 --- /dev/null +++ b/Runtime/Common/Character/CCharacterFactory.hpp @@ -0,0 +1,8 @@ +#ifndef __RETRO_CCHARACTERFACTORY_HPP__ +#define __RETRO_CCHARACTERFACTORY_HPP__ + +class CCharacterFactory +{ +}; + +#endif // __RETRO_CCHARACTERFACTORY_HPP__ diff --git a/Runtime/Common/Character/CMakeLists.txt b/Runtime/Common/Character/CMakeLists.txt index e69de29bb..009f83a1d 100644 --- a/Runtime/Common/Character/CMakeLists.txt +++ b/Runtime/Common/Character/CMakeLists.txt @@ -0,0 +1,4 @@ +add_library(RuntimeCommonCharacter + CAssetFactory.hpp CAssetFactory.cpp + CCharacterFactory.hpp CCharacterFactory.cpp + CAnimData.hpp CAnimData.cpp) diff --git a/Runtime/MP1/CMakeLists.txt b/Runtime/MP1/CMakeLists.txt index 81ebabcc6..cb4a0afd8 100644 --- a/Runtime/MP1/CMakeLists.txt +++ b/Runtime/MP1/CMakeLists.txt @@ -2,4 +2,5 @@ include_directories(. ../Common) add_executable(mp1 main.cpp) target_link_libraries(mp1 + RuntimeCommonCharacter RuntimeCommon) diff --git a/Runtime/MP1/main.cpp b/Runtime/MP1/main.cpp index 5e7a35878..6da1c3f9c 100644 --- a/Runtime/MP1/main.cpp +++ b/Runtime/MP1/main.cpp @@ -6,6 +6,10 @@ #include "CMemoryCardSys.hpp" #include "CResFactory.hpp" #include "CSimplePool.hpp" +#include "Character/CAssetFactory.hpp" +#include "CAi.hpp" +#include "CGameState.hpp" +#include "CInGameTweakManager.hpp" namespace Retro { @@ -17,6 +21,11 @@ class CGameGlobalObjects : public Common::TOneStatic Common::CMemoryCardSys m_memoryCardSys; Common::CResFactory m_resFactory; Common::CSimplePool m_simplePool; + Common::CCharacterFactoryBuilder m_charFactoryBuilder; + Common::CAiFuncMap m_aiFuncMap; + Common::CGameState m_gameState; + Common::CInGameTweakManager m_tweakManager; + public: void PostInitialize(Common::COsContext& osctx, Common::CMemorySys& memSys) { diff --git a/hecl b/hecl index 9b3a0413b..b96d1e8d9 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 9b3a0413b0132334cc56fa4bb973e1563c5f0183 +Subproject commit b96d1e8d9a7912674b91f3c3878f524c25901ef8