2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 21:07:42 +00:00

Implement CScriptSpindleCamera

This commit is contained in:
Jack Andersen
2019-02-09 18:41:35 -10:00
parent 88591f48f0
commit 01af7b735d
18 changed files with 534 additions and 143 deletions

View File

@@ -24,13 +24,17 @@ CIOWin::EMessageReturn CStateSetterFlow::OnMessage(const CArchitectureMessage& m
m->ResetGameState();
g_GameState->SetCurrentWorldId(worldId);
CWorldLayerState& layers = *g_GameState->StateForWorld(worldId).GetLayerState();
CWorldState& ws = g_GameState->StateForWorld(worldId);
CWorldLayerState& layers = *ws.GetLayerState();
if (m->m_warpAreaId < layers.GetAreaCount()) {
g_GameState->StateForWorld(worldId).SetAreaId(m->m_warpAreaId);
ws.SetAreaId(m->m_warpAreaId);
if (m->m_warpLayerBits) {
for (u32 i = 0; i < layers.GetAreaLayerCount(m->m_warpAreaId); ++i)
layers.SetLayerActive(m->m_warpAreaId, i, ((m->m_warpLayerBits >> i) & 1) != 0);
}
CRelayTracker& relays = *ws.RelayTracker();
for (const auto& r : m->m_warpMemoryRelays)
relays.AddRelay(r);
}
g_GameState->GameOptions().ResetToDefaults();
g_GameState->WriteBackupBuf();