Add temporary malloc/free to CGameAllocator

Add missing CTimeProvider to CMakeLists.txt
This commit is contained in:
Phillip Stephens 2015-10-27 21:45:02 -07:00
parent 7dedea85ff
commit 3209748a66
4 changed files with 15 additions and 7 deletions

View File

@ -3,6 +3,8 @@
namespace Retro
{
LogVisor::LogModule AllocLog("CGameAllocator");
CGameAllocator::SGameMemInfo* CGameAllocator::FindFreeBlock(u32)
{
return nullptr;
@ -51,19 +53,21 @@ bool CGameAllocator::Initialize()
void CGameAllocator::Shutdown()
{
}
void* CGameAllocator::Alloc(size_t, EHint, EScope, EType, const CCallStack&)
void* CGameAllocator::Alloc(size_t sz, EHint, EScope, EType, const CCallStack&)
{
return nullptr;
AllocLog.report(LogVisor::Warning, _S("Remind Phil to reimplement Alloc!!!!"));
return malloc(sz);
}
void CGameAllocator::Free(void*)
void CGameAllocator::Free(void* ptr)
{
free(ptr);
}
void CGameAllocator::ReleaseAll()
{
}
void* CGameAllocator::AllocSecondary(size_t, EHint, EScope, EType, const CCallStack&)
void* CGameAllocator::AllocSecondary(size_t sz, EHint, EScope, EType, const CCallStack&)
{
return nullptr;
return malloc(sz);
}
void CGameAllocator::FreeSecondary(void*)
{

View File

@ -48,6 +48,7 @@ add_library(RuntimeCommon
CArchitectureQueue.hpp CArchitectureQueue.cpp
IObj.hpp
IVParamObj.hpp
CTimeProvider.hpp CTimeProvider.cpp
CToken.hpp
CAreaOctTree.hpp CAreaOctTree.cpp
CActor.hpp CActor.cpp

View File

@ -26,6 +26,7 @@ static const SObjectTag& IDFromFactory(CResFactory& factory, const char* name)
void CTweaks::RegisterTweaks()
{
#if 0
CResFactory& factory = *g_ResFactory;
CResLoader& loader = factory.GetLoader();
std::unique_ptr<CInputStream> strm;
@ -37,6 +38,7 @@ void CTweaks::RegisterTweaks()
strm.reset(loader.LoadNewResourceSync(IDFromFactory(factory, "PlayerControls"), nullptr));
TOneStatic<DNAMP1::CTweakPlayerControl> playerControl(*strm);
g_tweakPlayerControl = playerControl.GetAllocSpace();
#endif
}
void CTweaks::RegisterResourceTweaks()

View File

@ -109,8 +109,8 @@ class CGameArchitectureSupport
public:
CGameArchitectureSupport()
: m_audioSys(0,0,0,0,0),
m_inputGenerator(g_tweakPlayer->GetLeftLogicalThreshold(),
g_tweakPlayer->GetRightLogicalThreshold())
m_inputGenerator(0.0f /*g_tweakPlayer->GetLeftLogicalThreshold()*/,
0.0f /*g_tweakPlayer->GetRightLogicalThreshold()*/)
{
}
bool Update()
@ -179,6 +179,7 @@ int main(int argc, const char* argv[])
std::setlocale(LC_ALL, "en-US.UTF-8");
#endif
LogVisor::RegisterConsoleLogger();
Retro::TOneStatic<Retro::MP1::CMain> main;
std::unique_ptr<boo::IApplication> app =
boo::ApplicationBootstrap(boo::IApplication::PLAT_AUTO, *main,