From 3f1025abb3fde43a21656a1b6651eb7ee491b22e Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Mon, 24 Aug 2015 21:04:50 -1000 Subject: [PATCH] link fix --- DataSpec/DNAMP1/STRG.cpp | 3 +-- DataSpec/DNAMP2/STRG.cpp | 3 +-- NODLib | 2 +- Runtime/CDvdFile.hpp | 40 ++++++++++++++--------------- Runtime/CMemory.cpp | 20 ++++++++++----- Runtime/CPakFile.hpp | 14 +++++----- Runtime/CSimplePool.hpp | 9 +++++++ Runtime/Character/CAssetFactory.hpp | 6 +++++ Runtime/MP1/CMakeLists.txt | 3 ++- hecl | 2 +- libBoo | 2 +- 11 files changed, 63 insertions(+), 41 deletions(-) diff --git a/DataSpec/DNAMP1/STRG.cpp b/DataSpec/DNAMP1/STRG.cpp index c9d5b957d..ddfb3b547 100644 --- a/DataSpec/DNAMP1/STRG.cpp +++ b/DataSpec/DNAMP1/STRG.cpp @@ -111,7 +111,6 @@ void STRG::write(Athena::io::IStreamWriter& writer) const void STRG::fromYAML(Athena::io::YAMLDocReader& reader) { - std::wstring_convert> wconv; const Athena::io::YAMLNode* root = reader.getRootNode(); /* Validate Pass */ @@ -151,7 +150,7 @@ void STRG::fromYAML(Athena::io::YAMLDocReader& reader) { std::vector strs; for (const auto& str : lang.second->m_seqChildren) - strs.emplace_back(wconv.from_bytes(str->m_scalarString)); + strs.emplace_back(HECL::UTF8ToWide(str->m_scalarString)); langs.emplace_back(FourCC(lang.first.c_str()), strs); } diff --git a/DataSpec/DNAMP2/STRG.cpp b/DataSpec/DNAMP2/STRG.cpp index 75bf6f62b..e2723b90c 100644 --- a/DataSpec/DNAMP2/STRG.cpp +++ b/DataSpec/DNAMP2/STRG.cpp @@ -139,7 +139,6 @@ void STRG::write(Athena::io::IStreamWriter& writer) const void STRG::fromYAML(Athena::io::YAMLDocReader& reader) { - std::wstring_convert> wconv; const Athena::io::YAMLNode* root = reader.getRootNode(); /* Validate Pass */ @@ -181,7 +180,7 @@ void STRG::fromYAML(Athena::io::YAMLDocReader& reader) { std::vector strs; for (const auto& str : lang.second->m_seqChildren) - strs.emplace_back(wconv.from_bytes(str->m_scalarString)); + strs.emplace_back(HECL::UTF8ToWide(str->m_scalarString)); langs.emplace_back(FourCC(lang.first.c_str()), strs); } diff --git a/NODLib b/NODLib index 28ed4ba6a..83b96b1bc 160000 --- a/NODLib +++ b/NODLib @@ -1 +1 @@ -Subproject commit 28ed4ba6afe64b1e529799bfb8d87c35fe868e4c +Subproject commit 83b96b1bc2fd524916a32e5060b637fed0296e31 diff --git a/Runtime/CDvdFile.hpp b/Runtime/CDvdFile.hpp index ed5e73d9f..77da5f6a4 100644 --- a/Runtime/CDvdFile.hpp +++ b/Runtime/CDvdFile.hpp @@ -23,26 +23,26 @@ class CDvdFile friend class CResLoader; std::string x18_name; public: - CDvdFile(const char*); - void UpdateFilePos(int); - void CalcFileOffset(int, ESeekOrigin); - static void internalCallback(s32, DVDFileInfo*); - static bool FileExists(const char*); - void CloseFile(); - CDvdRequest* AsyncSeekRead(void*, u32, ESeekOrigin, int); - void SyncSeekRead(void*, u32, ESeekOrigin, int); - CDvdRequest* AsyncRead(void*, u32); - void SyncRead(void*, u32); - void StallForARAMFile(); - void StartARAMFileLoad(); - void PopARAMFileLoad(); - void PushARAMFileLoad(); - void TryARAMFile(); - void PingARAMTransfer(); - void HandleDVDInterrupt(); - void HandleARAMInterrupt(); - static void ARAMARAMXferCallback(u32); - static void DVDARAMXferCallback(s32, DVDFileInfo*); + CDvdFile(const char*) {} + void UpdateFilePos(int) {} + void CalcFileOffset(int, ESeekOrigin) {} + static void internalCallback(s32, DVDFileInfo*) {} + static bool FileExists(const char*) {} + void CloseFile() {} + CDvdRequest* AsyncSeekRead(void*, u32, ESeekOrigin, int) {} + void SyncSeekRead(void*, u32, ESeekOrigin, int) {} + CDvdRequest* AsyncRead(void*, u32) {} + void SyncRead(void*, u32) {} + void StallForARAMFile() {} + void StartARAMFileLoad() {} + void PopARAMFileLoad() {} + void PushARAMFileLoad() {} + void TryARAMFile() {} + void PingARAMTransfer() {} + void HandleDVDInterrupt() {} + void HandleARAMInterrupt() {} + static void ARAMARAMXferCallback(u32) {} + static void DVDARAMXferCallback(s32, DVDFileInfo*) {} }; } diff --git a/Runtime/CMemory.cpp b/Runtime/CMemory.cpp index 6e9ca3b3f..817e052bc 100644 --- a/Runtime/CMemory.cpp +++ b/Runtime/CMemory.cpp @@ -71,10 +71,14 @@ IAllocator& CMemorySys::GetGameAllocator() {return g_gameAllocator;} } -void* operator new(std::size_t) +void* operator new(std::size_t sz) { - extern void *bare_new_erroneously_called(); - return bare_new_erroneously_called(); + Retro::CCallStack cs("?\?(?\?)", "UnknownType"); + return Retro::CMemory::Alloc(sz, + Retro::IAllocator::HintNone, + Retro::IAllocator::ScopeDefault, + Retro::IAllocator::TypePrimitive, + cs); } void* operator new(std::size_t sz, @@ -93,10 +97,14 @@ void operator delete(void* ptr) noexcept Retro::CMemory::Free(ptr); } -void* operator new[](std::size_t) +void* operator new[](std::size_t sz) { - extern void *bare_new_array_erroneously_called(); - return bare_new_array_erroneously_called(); + Retro::CCallStack cs("?\?(?\?)", "UnknownType"); + return Retro::CMemory::Alloc(sz, + Retro::IAllocator::HintNone, + Retro::IAllocator::ScopeDefault, + Retro::IAllocator::TypeArray, + cs); } void* operator new[](std::size_t sz, diff --git a/Runtime/CPakFile.hpp b/Runtime/CPakFile.hpp index 6fe20cc7a..5d4d12e7b 100644 --- a/Runtime/CPakFile.hpp +++ b/Runtime/CPakFile.hpp @@ -35,7 +35,7 @@ private: std::vector x5c_depList; std::vector> x6c_resList; public: - CPakFile(const std::string& filename, bool flag); + CPakFile(const std::string& filename, bool flag) : CDvdFile(filename.c_str()) {} const std::vector& GetDepList() const {return x5c_depList;} u32 GetResIdByName(const char* name) const { @@ -44,12 +44,12 @@ public: return p.second.id; return 0; } - const SResInfo* GetResInfoForLoad(u32 id); - const SResInfo* GetResInfo(u32 id) const; - u32 GetFakeStaticSize() const; - void DataLoad(); - void InitialHeaderLoad(); - void Warmup(); + const SResInfo* GetResInfoForLoad(u32 id) {} + const SResInfo* GetResInfo(u32 id) const {} + u32 GetFakeStaticSize() const {} + void DataLoad() {} + void InitialHeaderLoad() {} + void Warmup() {} void AsyncIdle() { if (x2c_asyncLoadPhase == PakAsyncLoaded) diff --git a/Runtime/CSimplePool.hpp b/Runtime/CSimplePool.hpp index db6d507ad..d00dad738 100644 --- a/Runtime/CSimplePool.hpp +++ b/Runtime/CSimplePool.hpp @@ -13,6 +13,15 @@ public: CSimplePool(IFactory&) { } + IObj& GetObj(const SObjectTag&, const CVParamTransfer&) {} + IObj& GetObj(const SObjectTag&) {} + IObj& GetObj(char const*) {} + IObj& GetObj(char const*, const CVParamTransfer&) {} + void HasObject(const SObjectTag&) const {} + void ObjectIsLive(const SObjectTag&) const {} + IFactory& GetFactory() const {} + void Flush() {} + void ObjectUnreferenced(const SObjectTag&) {} }; } diff --git a/Runtime/Character/CAssetFactory.hpp b/Runtime/Character/CAssetFactory.hpp index 962ee388a..5413163b0 100644 --- a/Runtime/Character/CAssetFactory.hpp +++ b/Runtime/Character/CAssetFactory.hpp @@ -7,6 +7,12 @@ namespace Retro { class CCharacterFactoryBuilder : public IFactory { +public: + std::unique_ptr Build(const SObjectTag&, const CVParamTransfer&) {} + void BuildAsync(const SObjectTag&, const CVParamTransfer&, IObj**) {} + void CancelBuild(const SObjectTag&) {} + bool CanBuild(const SObjectTag&) {} + u32 GetResourceIdByName(const char*) const {} }; } diff --git a/Runtime/MP1/CMakeLists.txt b/Runtime/MP1/CMakeLists.txt index ee972bd7d..65058324b 100644 --- a/Runtime/MP1/CMakeLists.txt +++ b/Runtime/MP1/CMakeLists.txt @@ -9,5 +9,6 @@ target_link_libraries(mp1 RuntimeCommon DNAMP1 DNACommon - Boo + HECLDatabase HECLBlender HECLCommon AthenaCore NOD + LogVisor AthenaLibYaml Boo png squish blowfish z lzo2 pthread ${BOO_SYS_LIBS}) diff --git a/hecl b/hecl index cba8336d7..b80f351d6 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit cba8336d73c7ea0dd8f673881a6a6d8d4ec5af34 +Subproject commit b80f351d65b15d9a0ffe28625d69f718be074257 diff --git a/libBoo b/libBoo index 3a6dd3f6b..d69e76d91 160000 --- a/libBoo +++ b/libBoo @@ -1 +1 @@ -Subproject commit 3a6dd3f6b8277ffc0a3a34a933006176024c900a +Subproject commit d69e76d911198e060b825000cc4e8ce9273df537