mirror of https://github.com/AxioDL/metaforce.git
Fix Windows compile fail
This commit is contained in:
parent
f669595040
commit
52fe795407
|
@ -477,7 +477,7 @@ void CStateManager::DrawWorld() const
|
|||
|
||||
int areaCount = 0;
|
||||
CGameArea* areaArr[10];
|
||||
for (CGameArea* area = x850_world->x4c_chainHeads[3];
|
||||
for (CGameArea* area = x850_world->GetChainHead(EChain::Alive);
|
||||
area != CWorld::AliveAreasEnd() && areaCount != 10;
|
||||
area = area->x130_next)
|
||||
{
|
||||
|
@ -671,7 +671,7 @@ void CStateManager::PreRender()
|
|||
proj.setPersp(zeus::SProjPersp{zeus::degToRad(cam->GetFov()),
|
||||
cam->GetAspectRatio(), cam->GetNearClipDistance(), cam->GetFarClipDistance()});
|
||||
frustum.updatePlanes(x870_cameraManager->GetCurrentCameraTransform(*this), proj);
|
||||
for (CGameArea* area = x850_world->x4c_chainHeads[3];
|
||||
for (CGameArea* area = x850_world->GetChainHead(EChain::Alive);
|
||||
area != CWorld::AliveAreasEnd();
|
||||
area = area->x130_next)
|
||||
{
|
||||
|
|
|
@ -378,8 +378,9 @@ void CGraphics::FlushProjection()
|
|||
zeus::CVector2i CGraphics::ProjectPoint(const zeus::CVector3f& point)
|
||||
{
|
||||
zeus::CVector3f projPt = GetPerspectiveProjectionMatrix(false).multiplyOneOverW(point);
|
||||
return {int(projPt.x * g_Viewport.x10_halfWidth) + g_Viewport.x10_halfWidth,
|
||||
g_Viewport.x14_halfHeight - (int(projPt.y * g_Viewport.x14_halfHeight) + g_Viewport.x14_halfHeight)};
|
||||
return {int(projPt.x * g_Viewport.x10_halfWidth) + int(g_Viewport.x10_halfWidth),
|
||||
int(g_Viewport.x14_halfHeight) - (int(projPt.y * g_Viewport.x14_halfHeight) +
|
||||
int(g_Viewport.x14_halfHeight))};
|
||||
}
|
||||
|
||||
SClipScreenRect CGraphics::ClipScreenRectFromMS(const zeus::CVector3f& p1,
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "Particle/CElementGen.hpp"
|
||||
#include "Particle/CParticleElectric.hpp"
|
||||
#include "Particle/CParticleSwoosh.hpp"
|
||||
#include "Particle/CGenDescription.hpp"
|
||||
#include "World/CWorld.hpp"
|
||||
#include "Graphics/CBooRenderer.hpp"
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ void CScriptAreaAttributes::Accept(IVisitor& visitor)
|
|||
|
||||
void CScriptAreaAttributes::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr)
|
||||
{
|
||||
AcceptScriptMsg(msg, objId, stateMgr);
|
||||
CEntity::AcceptScriptMsg(msg, objId, stateMgr);
|
||||
if (x4_areaId == kInvalidAreaId)
|
||||
return;
|
||||
|
||||
|
|
|
@ -541,34 +541,24 @@ void CWorld::PropogateAreaChain(CGameArea::EOcclusionState occlusionState, CGame
|
|||
if (occlusionState == CGameArea::EOcclusionState::Occluded)
|
||||
area->SetOcclusionState(CGameArea::EOcclusionState::Occluded);
|
||||
|
||||
CGameArea* areaItr = world->x4c_chainHeads[3];
|
||||
|
||||
while (areaItr != skGlobalNonConstEnd)
|
||||
for (CGameArea* areaItr = world->GetChainHead(EChain::Alive);
|
||||
areaItr != skGlobalNonConstEnd;
|
||||
areaItr = areaItr->x130_next)
|
||||
{
|
||||
if (areaItr == area)
|
||||
{
|
||||
areaItr = areaItr->x130_next;
|
||||
continue;
|
||||
}
|
||||
if (areaItr->IsPostConstructed() && areaItr->GetOcclusionState() == CGameArea::EOcclusionState::Occluded)
|
||||
areaItr->PrepTokens();
|
||||
areaItr = areaItr->x130_next;
|
||||
}
|
||||
|
||||
areaItr = world->x4c_chainHeads[3];
|
||||
|
||||
while (areaItr != skGlobalNonConstEnd)
|
||||
for (CGameArea* areaItr = world->GetChainHead(EChain::Alive);
|
||||
areaItr != skGlobalNonConstEnd;
|
||||
areaItr = areaItr->x130_next)
|
||||
{
|
||||
if (areaItr == area)
|
||||
{
|
||||
areaItr = areaItr->x130_next;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (area->IsPostConstructed() && areaItr->GetOcclusionState() == CGameArea::EOcclusionState::NotOccluded)
|
||||
areaItr->PrepTokens();
|
||||
areaItr = areaItr->x130_next;
|
||||
}
|
||||
|
||||
if (occlusionState == CGameArea::EOcclusionState::NotOccluded)
|
||||
|
@ -577,7 +567,9 @@ void CWorld::PropogateAreaChain(CGameArea::EOcclusionState occlusionState, CGame
|
|||
|
||||
void CWorld::PreRender()
|
||||
{
|
||||
for (CGameArea* head = x4c_chainHeads[3] ; head != skGlobalNonConstEnd ; head = head->x130_next)
|
||||
for (CGameArea* head = x4c_chainHeads[3] ;
|
||||
head != skGlobalNonConstEnd ;
|
||||
head = head->x130_next)
|
||||
{
|
||||
head->PreRender();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue