Windows refactors

This commit is contained in:
Jack Andersen 2015-08-30 17:44:42 -10:00
parent 7223a9dce5
commit d1faf4e72d
40 changed files with 129 additions and 80 deletions

View File

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
project(PathShagged)
if(MSVC)
# Shaddup MSVC
add_definitions(-DUNICODE=1 -D_UNICODE=1 -D_CRT_SECURE_NO_WARNINGS=1 /wd4267 /wd4244)
add_definitions(-DUNICODE=1 -D_UNICODE=1 -D_CRT_SECURE_NO_WARNINGS=1 -DD_SCL_SECURE_NO_WARNINGS=1 /wd4267 /wd4244 /wd4305)
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-multichar -fno-exceptions")
endif()

View File

@ -108,7 +108,7 @@ bool ReadANCSToBlender(HECL::BlenderConnection& conn,
if (cmdlE)
{
HECL::ProjectPath cmdlPath = pakRouter.getWorking(cmdlE);
os.linkBlend(cmdlPath.getAbsolutePath(), pakRouter.getBestEntryName(*cmdlE), true);
os.linkBlend(cmdlPath.getAbsolutePathUTF8(), pakRouter.getBestEntryName(*cmdlE), true);
/* Attach CMDL to CINF */
os << "if obj.name not in bpy.context.scene.objects:\n"

View File

@ -1,3 +1,5 @@
#define _USE_MATH_DEFINES
#include <math.h>
#include "ANIM.hpp"
namespace Retro

View File

@ -1,7 +1,6 @@
#ifndef _DNACOMMON_ANIMBITSTREAM_HPP_
#define _DNACOMMON_ANIMBITSTREAM_HPP_
#include <math.h>
#include "DNACommon.hpp"
namespace Retro

View File

@ -204,7 +204,7 @@ public:
}
operator bool()
{
return *m_cur && ((m_cur - m_dl.get()) < m_dlSize);
return *m_cur && ((m_cur - m_dl.get()) < intptr_t(m_dlSize));
}
GX::Primitive readPrimitive()
{
@ -618,7 +618,7 @@ bool ReadCMDLToBlender(HECL::BlenderConnection& conn,
os.format("materials[%u].pass_index = %u\n", sHead.matIdx, surfIdx++);
if (matUVCount > createdUVLayers)
{
for (int l=createdUVLayers ; l<matUVCount ; ++l)
for (unsigned l=createdUVLayers ; l<matUVCount ; ++l)
os.format("bm.loops.layers.uv.new('UV_%u')\n", l);
createdUVLayers = matUVCount;
}
@ -663,7 +663,7 @@ bool ReadCMDLToBlender(HECL::BlenderConnection& conn,
if (matUVCount)
{
os << "if last_face is not None:\n";
for (int j=0 ; j<matUVCount ; ++j)
for (unsigned j=0 ; j<matUVCount ; ++j)
os.format(" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n",
@ -685,7 +685,7 @@ bool ReadCMDLToBlender(HECL::BlenderConnection& conn,
if (matUVCount)
{
os << "if last_face is not None:\n";
for (int j=0 ; j<matUVCount ; ++j)
for (unsigned j=0 ; j<matUVCount ; ++j)
os.format(" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n",
@ -720,7 +720,7 @@ bool ReadCMDLToBlender(HECL::BlenderConnection& conn,
if (matUVCount)
{
os << "if last_face is not None:\n";
for (int j=0 ; j<matUVCount ; ++j)
for (unsigned j=0 ; j<matUVCount ; ++j)
os.format(" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n",
@ -756,7 +756,7 @@ bool ReadCMDLToBlender(HECL::BlenderConnection& conn,
if (matUVCount)
{
os << "if last_face is not None:\n";
for (int j=0 ; j<matUVCount ; ++j)
for (unsigned j=0 ; j<matUVCount ; ++j)
os.format(" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n"
" loop_from_facevert(last_face, %u)[last_mesh.loops.layers.uv[%u]].uv = uv_list[%u]\n",

View File

@ -87,7 +87,7 @@ public:
inline std::string toString() const
{
char buf[17];
snprintf(buf, 17, "%016lX", m_id);
snprintf(buf, 17, "%016llX", m_id);
return std::string(buf);
}
};
@ -143,7 +143,7 @@ public:
inline std::string toString() const
{
char buf[33];
snprintf(buf, 33, "%016lX%016lX", m_id[0], m_id[1]);
snprintf(buf, 33, "%016llX%016llX", m_id[0], m_id[1]);
return std::string(buf);
}
};
@ -173,10 +173,11 @@ struct CaseInsensitiveCompare
};
/* Word Bitmap reader/writer */
struct WordBitmap
class WordBitmap
{
std::vector<atUint32> m_words;
size_t m_bitCount = 0;
public:
void read(Athena::io::IStreamReader& reader, size_t bitCount)
{
m_bitCount = bitCount;

View File

@ -93,7 +93,7 @@ struct ResExtractor
std::function<bool(const SpecBase&, PAKEntryReadStream&, const HECL::ProjectPath&)> func_a;
std::function<bool(const SpecBase&, PAKEntryReadStream&, const HECL::ProjectPath&, PAKRouter<PAKBRIDGE>&,
const typename PAKBRIDGE::PAKType::Entry&, bool)> func_b;
const char* fileExts[4];
const HECL::SystemChar* fileExts[4];
unsigned weight;
};
@ -200,7 +200,11 @@ public:
const HECL::ProjectPath& pakPath = m_bridgePaths[uniqueSearch->second.first].first;
pakPath.makeDir();
HECL::ProjectPath uniquePath = entry->unique.uniquePath(pakPath);
#if HECL_UCS2
HECL::SystemString entName = HECL::UTF8ToWide(m_pak->bestEntryName(*entry));
#else
HECL::SystemString entName = m_pak->bestEntryName(*entry);
#endif
if (extractor.fileExts[0] && !extractor.fileExts[1])
entName += extractor.fileExts[0];
return HECL::ProjectPath(uniquePath, entName);
@ -210,7 +214,11 @@ public:
{
const HECL::ProjectPath& pakPath = m_bridgePaths[m_curBridgeIdx].first;
HECL::ProjectPath uniquePathPre = entry->unique.uniquePath(pakPath);
#if HECL_UCS2
HECL::SystemString entBase = HECL::UTF8ToWide(m_pak->bestEntryName(*entry));
#else
HECL::SystemString entBase = m_pak->bestEntryName(*entry);
#endif
HECL::SystemString entName = entBase;
if (extractor.fileExts[0] && !extractor.fileExts[1])
entName += extractor.fileExts[0];
@ -290,7 +298,7 @@ public:
HECL::ProjectPath aPath = getWorking(&a, BRIDGETYPE::LookupExtractor(a));
HECL::SystemString ret;
for (int i=0 ; i<aPath.levelCount() ; ++i)
ret += "../";
ret += _S("../");
HECL::ProjectPath bPath = getWorking(be, BRIDGETYPE::LookupExtractor(*be));
ret += bPath.getRelativePath();
return ret;

View File

@ -245,7 +245,7 @@ void ANIM::ANIM2::read(Athena::io::IStreamReader& reader)
{
ChannelDesc desc;
desc.read(reader);
bones.emplace_back(desc.id, desc.keyCount2);
bones.emplace_back(desc.id, desc.keyCount2 != 0);
if (desc.keyCount1)
{

View File

@ -304,7 +304,7 @@ struct MaterialSet : BigDNA
inline void readToBlender(HECL::BlenderConnection::PyOutStream& os,
const PAKRouter<PAKBridge>& pakRouter,
const typename PAKRouter<PAKBridge>::EntryType& entry,
const PAKRouter<PAKBridge>::EntryType& entry,
unsigned setIdx,
const SpecBase& dataspec)
{

View File

@ -104,7 +104,7 @@ UniqueResult PAKBridge::uniqueCheck(const PAK::Entry& entry)
static HECL::SystemString LayerName(const std::string& name)
{
#if HECL_UCS2
HECL::SystemString ret = HECL::UTF8ToWide(mlvl.layerNames[layerIdx++]);
HECL::SystemString ret = HECL::UTF8ToWide(name);
#else
HECL::SystemString ret = name;
#endif
@ -177,15 +177,15 @@ ResExtractor<PAKBridge> PAKBridge::LookupExtractor(const PAK::Entry& entry)
switch (entry.type)
{
case SBIG('STRG'):
return {STRG::Extract, nullptr, {".yaml"}};
return {STRG::Extract, nullptr, {_S(".yaml")}};
case SBIG('TXTR'):
return {TXTR::Extract, nullptr, {".png"}};
return {TXTR::Extract, nullptr, {_S(".png")}};
case SBIG('CMDL'):
return {nullptr, CMDL::Extract, {".blend"}, 2};
return {nullptr, CMDL::Extract, {_S(".blend")}, 2};
case SBIG('ANCS'):
return {nullptr, ANCS::Extract, {".yaml", ".blend"}, 1};
return {nullptr, ANCS::Extract, {_S(".yaml"), _S(".blend")}, 1};
case SBIG('MLVL'):
return {MLVL::Extract, nullptr, {".yaml"}};
return {MLVL::Extract, nullptr, {_S(".yaml")}};
}
return {};
}

View File

@ -379,7 +379,7 @@ void ANIM::ANIM2::read(Athena::io::IStreamReader& reader)
{
ChannelDesc desc;
desc.read(reader);
bones.emplace_back(desc.id, std::make_tuple(desc.keyCount1, desc.keyCount2, desc.keyCount3));
bones.emplace_back(desc.id, std::make_tuple(desc.keyCount1 != 0, desc.keyCount2 != 0, desc.keyCount3 != 0));
if (desc.keyCount1)
{

View File

@ -65,7 +65,7 @@ struct MaterialSet : BigDNA
inline void readToBlender(HECL::BlenderConnection::PyOutStream& os,
const PAKRouter<PAKBridge>& pakRouter,
const typename PAKRouter<PAKBridge>::EntryType& entry,
const PAKRouter<PAKBridge>::EntryType& entry,
unsigned setIdx,
const SpecBase& dataspec)
{

View File

@ -103,7 +103,7 @@ UniqueResult PAKBridge::uniqueCheck(const DNAMP1::PAK::Entry& entry)
static HECL::SystemString LayerName(const std::string& name)
{
#if HECL_UCS2
HECL::SystemString ret = HECL::UTF8ToWide(mlvl.layerNames[layerIdx++]);
HECL::SystemString ret = HECL::UTF8ToWide(name);
#else
HECL::SystemString ret = name;
#endif
@ -138,7 +138,6 @@ void PAKBridge::build()
}
if (areaDeps.name.empty())
{
areaDeps.name = area.internalAreaName;
#if HECL_UCS2
areaDeps.name = HECL::UTF8ToWide(area.internalAreaName);
#else
@ -185,13 +184,13 @@ ResExtractor<PAKBridge> PAKBridge::LookupExtractor(const DNAMP1::PAK::Entry& ent
switch (entry.type)
{
case SBIG('STRG'):
return {STRG::Extract, nullptr, {".yaml"}};
return {STRG::Extract, nullptr, {_S(".yaml")}};
case SBIG('TXTR'):
return {TXTR::Extract, nullptr, {".png"}};
return {TXTR::Extract, nullptr, {_S(".png")}};
case SBIG('CMDL'):
return {nullptr, CMDL::Extract, {".blend"}, 2};
return {nullptr, CMDL::Extract, {_S(".blend")}, 2};
case SBIG('ANCS'):
return {nullptr, ANCS::Extract, {".yaml", ".blend"}, 1};
return {nullptr, ANCS::Extract, {_S(".yaml"), _S(".blend")}, 1};
}
return {};
}

View File

@ -190,7 +190,7 @@ struct MaterialSet : BigDNA
inline void readToBlender(HECL::BlenderConnection::PyOutStream& os,
const PAKRouter<PAKBridge>& pakRouter,
const typename PAKRouter<PAKBridge>::EntryType& entry,
const PAKRouter<PAKBridge>::EntryType& entry,
unsigned setIdx,
const SpecBase& dataspec)
{

View File

@ -58,11 +58,11 @@ ResExtractor<PAKBridge> PAKBridge::LookupExtractor(const PAK::Entry& entry)
switch (entry.type)
{
case SBIG('STRG'):
return {STRG::Extract, nullptr, {".yaml"}};
return {STRG::Extract, nullptr, {_S(".yaml")}};
case SBIG('TXTR'):
return {TXTR::Extract, nullptr, {".png"}};
return {TXTR::Extract, nullptr, {_S(".png")}};
case SBIG('CMDL'):
return {nullptr, CMDL::Extract, {".blend"}, 1};
return {nullptr, CMDL::Extract, {_S(".blend")}, 1};
}
return {};
}

@ -1 +1 @@
Subproject commit 151b0e63338a8f8645f908e48fb7423795224690
Subproject commit 5270d232ab4d46dde7ea2e662a08a6ec3d4c9775

2
NODLib

@ -1 +1 @@
Subproject commit 83b96b1bc2fd524916a32e5060b637fed0296e31
Subproject commit 23a536a2b169703556d0bcb39b5f0ba7b7382d26

View File

@ -10,8 +10,9 @@ class CAudioStateWin : public CIOWin
{
public:
CAudioStateWin() : CIOWin("CAudioStateWin") {}
virtual CIOWin::EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue)
CIOWin::EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue)
{
return MsgRetNormal;
}
};

View File

@ -27,11 +27,11 @@ public:
void UpdateFilePos(int) {}
void CalcFileOffset(int, ESeekOrigin) {}
static void internalCallback(s32, DVDFileInfo*) {}
static bool FileExists(const char*) {}
static bool FileExists(const char*) {return false;}
void CloseFile() {}
CDvdRequest* AsyncSeekRead(void*, u32, ESeekOrigin, int) {}
CDvdRequest* AsyncSeekRead(void*, u32, ESeekOrigin, int) {return nullptr;}
void SyncSeekRead(void*, u32, ESeekOrigin, int) {}
CDvdRequest* AsyncRead(void*, u32) {}
CDvdRequest* AsyncRead(void*, u32) {return nullptr;}
void SyncRead(void*, u32) {}
void StallForARAMFile() {}
void StartARAMFileLoad() {}

View File

@ -5,21 +5,26 @@ namespace Retro
CGameAllocator::SGameMemInfo* CGameAllocator::FindFreeBlock(u32)
{
return nullptr;
}
CGameAllocator::SGameMemInfo* CGameAllocator::FindFreeBlockFromTopOfHeap(u32)
{
return nullptr;
}
u32 CGameAllocator::FixupAllocPtrs(SGameMemInfo*, u32, u32, EHint, const CCallStack&)
{
return 0;
}
void CGameAllocator::UpdateAllocDebugStats(u32, u32, u32)
{
}
bool CGameAllocator::FreeNormalAllocation(void*)
{
return false;
}
u32 CGameAllocator::GetFreeBinEntryForSize(u32)
{
return 0;
}
void CGameAllocator::AddFreeEntryToFreeList(SGameMemInfo*)
{
@ -32,6 +37,7 @@ void CGameAllocator::DumpAllocations() const
}
u32 CGameAllocator::GetLargestFreeChunk() const
{
return 0;
}
CGameAllocator::SGameMemInfo* CGameAllocator::GetMemInfoFromBlockPtr(void* ptr)
{
@ -40,12 +46,14 @@ CGameAllocator::SGameMemInfo* CGameAllocator::GetMemInfoFromBlockPtr(void* ptr)
bool CGameAllocator::Initialize()
{
return false;
}
void CGameAllocator::Shutdown()
{
}
void* CGameAllocator::Alloc(size_t, EHint, EScope, EType, const CCallStack&)
{
return nullptr;
}
void CGameAllocator::Free(void*)
{
@ -55,6 +63,7 @@ void CGameAllocator::ReleaseAll()
}
void* CGameAllocator::AllocSecondary(size_t, EHint, EScope, EType, const CCallStack&)
{
return nullptr;
}
void CGameAllocator::FreeSecondary(void*)
{
@ -69,15 +78,18 @@ void CGameAllocator::SetOutOfMemoryCallback(const TOutOfMemoryCallback cb, void*
}
int CGameAllocator::EnumAllocations(const TAllocationVisitCallback, void*, bool) const
{
return 0;
}
CGameAllocator::SAllocInfo CGameAllocator::GetAllocInfo(void*) const
{
return CGameAllocator::SAllocInfo();
}
void CGameAllocator::OffsetFakeStatics(int)
{
}
CGameAllocator::SMetrics CGameAllocator::GetMetrics() const
{
return CGameAllocator::SMetrics();
}
}

View File

@ -1,17 +1,19 @@
#ifndef __RETRO_CGAMEOPTIONS_HPP__
#define __RETRO_CGAMEOPTIONS_HPP__
#include "RetroTypes.hpp"
namespace Retro
{
class CGameOptions
{
char a = 0;
char b = 0;
char c = 128;
char d = 128;
char e = 255;
char f = 255;
u8 a = 0;
u8 b = 0;
u8 c = 128;
u8 d = 128;
u8 e = 255;
u8 f = 255;
bool g = true;
};

View File

@ -1,4 +1,4 @@
include_directories(${BOO_INCLUDE_DIR})
include_directories(${BOO_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
add_subdirectory(Audio)
add_subdirectory(Character)

View File

@ -35,15 +35,19 @@ void CMoviePlayer::Rewind()
bool CMoviePlayer::GetIsMovieFinishedPlaying() const
{
return false;
}
bool CMoviePlayer::GetIsFullyCached() const
{
return false;
}
float CMoviePlayer::GetPlayedSeconds() const
{
return 0.0;
}
float CMoviePlayer::GetTotalSeconds() const
{
return 0.0;
}
void CMoviePlayer::SetPlayMode(EPlayMode mode)
{

View File

@ -8,6 +8,7 @@ void CNODDvdRequest::WaitUntilComplete()
}
bool CNODDvdRequest::IsComplete()
{
return false;
}
void CNODDvdRequest::PostCancelRequest()
{

View File

@ -44,9 +44,9 @@ public:
return &p.second;
return nullptr;
}
const SResInfo* GetResInfoForLoad(u32 id) {}
const SResInfo* GetResInfo(u32 id) const {}
u32 GetFakeStaticSize() const {}
const SResInfo* GetResInfoForLoad(u32 id) {return nullptr;}
const SResInfo* GetResInfo(u32 id) const {return nullptr;}
u32 GetFakeStaticSize() const {return 0;}
void DataLoad() {}
void InitialHeaderLoad() {}
void Warmup() {}

View File

@ -13,7 +13,7 @@ class CPlayMovieBase : public CIOWin
public:
CPlayMovieBase(const char* iowName, const char* path)
: CIOWin(iowName), x18_moviePlayer(path, 0.0, false) {}
EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) {}
EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) {return MsgRetNormal;}
void Draw() const {}
};

View File

@ -1,10 +1,12 @@
#include "CResFactory.hpp"
#include "IObj.hpp"
namespace Retro
{
std::unique_ptr<IObj> CResFactory::Build(const SObjectTag&, const CVParamTransfer&)
{
return std::unique_ptr<IObj>();
}
void CResFactory::BuildAsync(const SObjectTag&, const CVParamTransfer&, IObj**)
{

View File

@ -135,7 +135,7 @@ FourCC CResLoader::GetResourceTypeById(u32 id)
{
if (FindResource(id))
return x50_cachedResInfo->x0_type;
return false;
return FourCC();
}
const SObjectTag* CResLoader::GetResourceIdByName(const char* name) const

View File

@ -9,7 +9,7 @@
namespace Retro
{
class SObjectTag;
struct SObjectTag;
class CDvdRequest;
class CResLoader

View File

@ -9,17 +9,19 @@ class IFactory;
class CSimplePool : public IObjectStore
{
IFactory& m_factory;
public:
CSimplePool(IFactory&)
CSimplePool(IFactory& factory)
: m_factory(factory)
{
}
IObj& GetObj(const SObjectTag&, const CVParamTransfer&) {}
IObj& GetObj(const SObjectTag&) {}
IObj& GetObj(char const*) {}
IObj& GetObj(char const*, const CVParamTransfer&) {}
IObj* GetObj(const SObjectTag&, const CVParamTransfer&) {return nullptr;}
IObj* GetObj(const SObjectTag&) {return nullptr;}
IObj* GetObj(char const*) {return nullptr;}
IObj* GetObj(char const*, const CVParamTransfer&) {return nullptr;}
void HasObject(const SObjectTag&) const {}
void ObjectIsLive(const SObjectTag&) const {}
IFactory& GetFactory() const {}
IFactory& GetFactory() const {return m_factory;}
void Flush() {}
void ObjectUnreferenced(const SObjectTag&) {}
};

View File

@ -2,17 +2,18 @@
#define __RETRO_CASSETFACTORY_HPP__
#include "../IFactory.hpp"
#include "../IObj.hpp"
namespace Retro
{
class CCharacterFactoryBuilder : public IFactory
{
public:
std::unique_ptr<IObj> Build(const SObjectTag&, const CVParamTransfer&) {}
std::unique_ptr<IObj> Build(const SObjectTag&, const CVParamTransfer&) {return std::unique_ptr<IObj>();}
void BuildAsync(const SObjectTag&, const CVParamTransfer&, IObj**) {}
void CancelBuild(const SObjectTag&) {}
bool CanBuild(const SObjectTag&) {}
const SObjectTag* GetResourceIdByName(const char*) const {}
bool CanBuild(const SObjectTag&) {return false;}
const SObjectTag* GetResourceIdByName(const char*) const {return nullptr;}
};
}

View File

@ -13,8 +13,8 @@ extern class CGameState* g_GameState;
extern class CInGameTweakManagerBase* g_TweakManager;
extern class CBooRenderer* g_Renderer;
extern class ITweakPlayer* g_tweakPlayer;
extern class ITweakPlayerControl* g_tweakPlayerControl;
extern struct ITweakPlayer* g_tweakPlayer;
extern struct ITweakPlayerControl* g_tweakPlayerControl;
}

View File

@ -3,7 +3,7 @@
namespace Retro
{
class SObjectTag;
struct SObjectTag;
class CVParamTransfer;
class IFactory;
class IObj;
@ -11,10 +11,10 @@ class IObj;
class IObjectStore
{
public:
virtual IObj& GetObj(const SObjectTag&, const CVParamTransfer&)=0;
virtual IObj& GetObj(const SObjectTag&)=0;
virtual IObj& GetObj(char const*)=0;
virtual IObj& GetObj(char const*, const CVParamTransfer&)=0;
virtual IObj* GetObj(const SObjectTag&, const CVParamTransfer&)=0;
virtual IObj* GetObj(const SObjectTag&)=0;
virtual IObj* GetObj(char const*)=0;
virtual IObj* GetObj(char const*, const CVParamTransfer&)=0;
virtual void HasObject(const SObjectTag&) const=0;
virtual void ObjectIsLive(const SObjectTag&) const=0;
virtual IFactory& GetFactory() const=0;

View File

@ -31,9 +31,9 @@ void CFrontEndUI::OnFileMenuAdvance(CGuiTableGroup* grp)
void CFrontEndUI::OnMainMenuAdvance(CGuiTableGroup* grp)
{}
const char* CFrontEndUI::GetAttractMovieFileName(int idx)
{}
{return nullptr;}
const char* CFrontEndUI::GetNextAttractMovieFileName(int idx)
{}
{return nullptr;}
void CFrontEndUI::SetCurrentMovie(EMenuMovie movie)
{}
void CFrontEndUI::StopAttractMovie()
@ -45,7 +45,7 @@ void CFrontEndUI::UpdateMenuHighlights(CGuiTableGroup* grp)
void CFrontEndUI::CompleteStateTransition()
{}
bool CFrontEndUI::CanBuild(const SObjectTag& tag)
{}
{return false;}
void CFrontEndUI::StartStateTransition(EScreen screen)
{}
void CFrontEndUI::HandleDebugMenuReturnValue(CGameDebug::EReturnValue val, CArchitectureQueue& queue)
@ -57,7 +57,7 @@ void CFrontEndUI::UpdateMovies(float dt)
void CFrontEndUI::Update(float dt, CArchitectureQueue& queue)
{}
CIOWin::EMessageReturn CFrontEndUI::OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue)
{}
{return MsgRetNormal;}
void CFrontEndUI::StartGame()
{}
void CFrontEndUI::InitializeFrame()

View File

@ -8,7 +8,7 @@ namespace Retro
{
class CGuiSliderGroup;
class CGuiTableGroup;
class SObjectTag;
struct SObjectTag;
namespace MP1
{

View File

@ -57,7 +57,7 @@ public:
void StreamNewGameState(CInputStream&);
void CheckTweakManagerDebugOptions() {}
void AddWorldPaks();
int RsMain(int argc, const char* argv[]);
int RsMain(int argc, const boo::SystemChar* argv[]);
bool CheckReset();
bool CheckTerminate() {return false;}
void DrawDebugMetrics(double, CStopwatch&) {}

View File

@ -16,5 +16,5 @@ target_link_libraries(mp1
DNAMP1
DNACommon
HECLDatabase HECLBlender HECLCommon AthenaCore NOD
LogVisor AthenaLibYaml Boo png squish blowfish z lzo2 pthread
LogVisor AthenaLibYaml Boo png squish blowfish z lzo2
${BOO_SYS_LIBS})

View File

@ -1,3 +1,8 @@
#if _WIN32
#include <objbase.h>
#endif
#include <clocale>
#include <memory>
#include <boo/boo.hpp>
#include "CBasics.hpp"
@ -139,7 +144,7 @@ void CMain::FillInAssetIDs()
void CMain::LoadAudio()
{
}
int CMain::RsMain(int argc, const char* argv[])
int CMain::RsMain(int argc, const boo::SystemChar* argv[])
{
TOneStatic<CGameGlobalObjects> globalObjs;
InitializeSubsystems();
@ -159,11 +164,21 @@ int CMain::RsMain(int argc, const char* argv[])
}
}
#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
Retro::TOneStatic<Retro::MP1::CMain> main;
std::unique_ptr<boo::IApplication> app =
boo::ApplicationBootstrap(boo::IApplication::PLAT_AUTO, *main,
"mp1", "MP1", argc, argv);
_S("mp1"), _S("MP1"), argc, argv);
return main->RsMain(argc, argv);
}

2
hecl

@ -1 +1 @@
Subproject commit b80f351d65b15d9a0ffe28625d69f718be074257
Subproject commit e9a1a9391b1c6032b64e401ebc497142ad056377

2
libBoo

@ -1 +1 @@
Subproject commit f9c4ed076157c78fd131f83c5d0f3bc4c95ae13a
Subproject commit 49771b0e15fc9a7a7974dfc9b8c74fe4b25d66a5