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