From 8c9eca18584471a7545b7ef02361707d8867fcd0 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Thu, 3 Mar 2016 19:28:20 -1000 Subject: [PATCH] remove 'mp1' target in favor of library entry --- DataSpec/DNACommon/CMDL.cpp | 7 +++++++ Runtime/MP1/CMainFlow.cpp | 2 +- Runtime/MP1/CMakeLists.txt | 29 ++++++++--------------------- Runtime/MP1/{main.cpp => MP1.cpp} | 21 +-------------------- Runtime/MP1/{CMain.hpp => MP1.hpp} | 8 ++++---- 5 files changed, 21 insertions(+), 46 deletions(-) rename Runtime/MP1/{main.cpp => MP1.cpp} (94%) rename Runtime/MP1/{CMain.hpp => MP1.hpp} (94%) diff --git a/DataSpec/DNACommon/CMDL.cpp b/DataSpec/DNACommon/CMDL.cpp index 81137275b..f3a441730 100644 --- a/DataSpec/DNACommon/CMDL.cpp +++ b/DataSpec/DNACommon/CMDL.cpp @@ -123,6 +123,13 @@ void ReadMaterialSetToBlender_3(HECL::BlenderConnection::PyOutStream& os, } } +template void ReadMaterialSetToBlender_3, DNAMP3::MaterialSet> +(HECL::BlenderConnection::PyOutStream& os, + const DNAMP3::MaterialSet& matSet, + const PAKRouter& pakRouter, + const typename PAKRouter::EntryType& entry, + unsigned setIdx); + class DLReader { public: diff --git a/Runtime/MP1/CMainFlow.cpp b/Runtime/MP1/CMainFlow.cpp index 9ae1b3a9b..472477039 100644 --- a/Runtime/MP1/CMainFlow.cpp +++ b/Runtime/MP1/CMainFlow.cpp @@ -1,7 +1,7 @@ #include "CMainFlow.hpp" +#include "MP1.hpp" #include "CArchitectureQueue.hpp" #include "CMFGame.hpp" -#include "CMain.hpp" #include "CPlayMovie.hpp" #include "CResFactory.hpp" #include "CFrontEndUI.hpp" diff --git a/Runtime/MP1/CMakeLists.txt b/Runtime/MP1/CMakeLists.txt index 55e8d6057..c222308a7 100644 --- a/Runtime/MP1/CMakeLists.txt +++ b/Runtime/MP1/CMakeLists.txt @@ -1,22 +1,9 @@ include_directories(. ..) -add_executable(mp1 - CTweaks.hpp CTweaks.cpp - CInGameTweakManager.hpp CInGameTweakManager.cpp - CMainFlow.hpp CMainFlow.cpp - CMFGame.hpp CMFGame.cpp - CPlayMovie.hpp CPlayMovie.cpp - CFrontEndUI.hpp CFrontEndUI.cpp - CMain.hpp - main.cpp) -target_link_libraries(mp1 - RuntimeCommonCharacter - RuntimeCommonInput - RuntimeCommonParticle - RuntimeCommonGraphics - RuntimeCommon - DNAMP1 - DNACommon - HECLDatabase HECLBlender HECLCommon AthenaCore NOD - LogVisor AthenaLibYaml Boo ${PNG_LIB} squish xxhash Math - ${ZLIB_LIBRARIES} ${LZO_LIB} - ${BOO_SYS_LIBS}) +add_library(RuntimeMP1 + CTweaks.hpp CTweaks.cpp + CInGameTweakManager.hpp CInGameTweakManager.cpp + CMainFlow.hpp CMainFlow.cpp + CMFGame.hpp CMFGame.cpp + CPlayMovie.hpp CPlayMovie.cpp + CFrontEndUI.hpp CFrontEndUI.cpp + MP1.hpp MP1.cpp) diff --git a/Runtime/MP1/main.cpp b/Runtime/MP1/MP1.cpp similarity index 94% rename from Runtime/MP1/main.cpp rename to Runtime/MP1/MP1.cpp index c3e675458..458033fcd 100644 --- a/Runtime/MP1/main.cpp +++ b/Runtime/MP1/MP1.cpp @@ -31,7 +31,7 @@ #include "Audio/CAudioStateWin.hpp" #include "GameGlobalObjects.hpp" #include "CArchitectureQueue.hpp" -#include "CMain.hpp" +#include "MP1.hpp" #include "CTimeProvider.hpp" #include "DataSpec/DNAMP1/Tweaks/CTweakPlayer.hpp" @@ -265,22 +265,3 @@ int CMain::appMain(boo::IApplication* app) } } - -#ifdef _WIN32 -int wmain(int argc, const wchar_t* argv[]) -#else -int main(int argc, const char* argv[]) -#endif -{ -#if _WIN32 - CoInitializeEx(nullptr, COINIT_MULTITHREADED); -#else - std::setlocale(LC_ALL, "en-US.UTF-8"); -#endif - - LogVisor::RegisterConsoleLogger(); - pshag::TOneStatic main; - int ret = boo::ApplicationRun(boo::IApplication::EPlatformType::Auto, *main, - _S("mp1"), _S("MP1"), argc, argv); - return ret; -} diff --git a/Runtime/MP1/CMain.hpp b/Runtime/MP1/MP1.hpp similarity index 94% rename from Runtime/MP1/CMain.hpp rename to Runtime/MP1/MP1.hpp index e77009869..a8751a3f4 100644 --- a/Runtime/MP1/CMain.hpp +++ b/Runtime/MP1/MP1.hpp @@ -1,5 +1,5 @@ -#ifndef __PSHAG_CMAIN_HPP__ -#define __PSHAG_CMAIN_HPP__ +#ifndef __PSHAG_MP1_HPP__ +#define __PSHAG_MP1_HPP__ #include #include "CMemory.hpp" @@ -27,7 +27,7 @@ class WindowCallback : public boo::IWindowCallback }; class CMain : public boo::IApplicationCallback -{ +{ boo::IWindow* mainWindow; int appMain(boo::IApplication* app); void appQuitting(boo::IApplication*) @@ -69,4 +69,4 @@ extern CMain* g_main; } } -#endif // __PSHAG_CMAIN_HPP__ +#endif // __PSHAG_MP1_HPP__