mirror of https://github.com/PrimeDecomp/prime.git
Add CStateManager::MemoryAllocatorAllocationFailedCallback and RayStaticIntersection
Former-commit-id: c29af5f67d
This commit is contained in:
parent
f585ef383f
commit
c8d4b77885
|
@ -9,6 +9,7 @@ public:
|
|||
static void CollectGarbage();
|
||||
static void PreInitializeAlloc(uint size) { mPreInitializeAlloc += size; }
|
||||
static void Initialize(uint);
|
||||
static void WaitForAllDMAsToComplete();
|
||||
|
||||
private:
|
||||
static uint mPreInitializeAlloc;
|
||||
|
|
|
@ -132,6 +132,7 @@ public:
|
|||
void AddObject(CEntity*);
|
||||
TUniqueId AllocateUniqueId();
|
||||
const rstl::string& HashInstanceName(CInputStream& in);
|
||||
bool SwapOutAllPossibleMemory();
|
||||
|
||||
void BuildNearList(TEntityList& nearList, const CVector3f& pos, const CVector3f& dir, float mag,
|
||||
const CMaterialFilter&, const CActor*) const;
|
||||
|
|
|
@ -17,10 +17,17 @@
|
|||
#include "MetroidPrime/ScriptObjects/CScriptMazeNode.hpp"
|
||||
|
||||
#include "Collision/CCollisionPrimitive.hpp"
|
||||
#include "Collision/CRayCastResult.hpp"
|
||||
#include "Kyoto/Basics/RAssertDolphin.hpp"
|
||||
#include "Kyoto/CARAMManager.hpp"
|
||||
#include "Kyoto/CARAMToken.hpp"
|
||||
#include "Kyoto/Graphics/CLight.hpp"
|
||||
#include "MetaRender/CCubeRenderer.hpp"
|
||||
|
||||
extern "C" {
|
||||
void sub_8036ccfc();
|
||||
}
|
||||
|
||||
CStateManager::CStateManager(const rstl::ncrc_ptr< CScriptMailbox >& mailbox,
|
||||
const rstl::ncrc_ptr< CMapWorldInfo >& mwInfo,
|
||||
const rstl::ncrc_ptr< CPlayerState >& playerState,
|
||||
|
@ -311,10 +318,25 @@ TUniqueId CStateManager::AllocateUniqueId() {
|
|||
return TUniqueId(x4_objectIndexArray[ourIndex], ourIndex);
|
||||
}
|
||||
|
||||
CRayCastResult CStateManager::RayStaticIntersection(const CVector3f& pos, const CVector3f& dir,
|
||||
float length,
|
||||
const CMaterialFilter& filter) const {
|
||||
return CGameCollision::RayStaticIntersection(*this, pos, dir, length, filter);
|
||||
}
|
||||
|
||||
void CStateManager::RemoveObject(TUniqueId id) {}
|
||||
|
||||
void CStateManager::ClearGraveyard() {}
|
||||
|
||||
void CStateManager::RendererDrawCallback(const void*, const void*, int) {}
|
||||
const bool CStateManager::MemoryAllocatorAllocationFailedCallback(const void* obj, unsigned int) {
|
||||
return static_cast< CStateManager* >(const_cast< void* >(obj))->SwapOutAllPossibleMemory();
|
||||
}
|
||||
|
||||
const bool CStateManager::MemoryAllocatorAllocationFailedCallback(const void*, unsigned int) {}
|
||||
bool CStateManager::SwapOutAllPossibleMemory() {
|
||||
sub_8036ccfc();
|
||||
CARAMManager::WaitForAllDMAsToComplete();
|
||||
CARAMToken::UpdateAllDMAs();
|
||||
return true;
|
||||
}
|
||||
|
||||
void CStateManager::RendererDrawCallback(const void*, const void*, int) {}
|
||||
|
|
Loading…
Reference in New Issue