The field map's work: the followed position, screen shake, tile animations, blend script, view and its bounds, and three scrolling layers. More...
#include <map_scroll.h>
Data Fields | |
| s32 * | origin |
| The followed point, read as x, height and z in 16.16 fixed-point pixels; Camera_FollowActor points it at the camera's position. | |
| s32 | shakeX |
| Screen shake amplitudes in 16.16 fixed-point pixels, and the 16.16 factor that scales them each frame. | |
| s32 | shakeY |
| s32 | shakeDecay |
| u8 * | script |
| set from the layered scene's header; not read by name | |
| u16 | flags |
| REG_DISPCNT bits: objects and the BG1 to BG3 shown. | |
| u8 | wideTiles |
| nonzero: tile animations copy 64-byte tiles | |
| u8 | footprints |
| nonzero: the leader leaves footprints | |
| struct MapAnimation | anim [16] |
| struct BlendScriptState | blend |
| s32 | viewX |
| s32 | viewY |
| the view's top left, 16.16 fixed-point pixels | |
| s32 | minX |
| s32 | minY |
| s32 | maxX |
| s32 | maxY |
| 16.16 fixed-point pixels | |
| s8 | animationActive |
| Set while a BG1 animation runs; the tile animations are then neither suspended nor resumed. | |
| u8 | unk0fd [3] |
| not named by TBS code | |
| u8 | enabled [3] |
| Each layer's BG priority, written into its BGCNT; zero hides the layer. | |
| u8 | unk103 |
| MapState's blendControl, the last BLDCNT the blend script set. | |
| struct MapLayerScroll | layers [3] |
| BG3, BG2 and BG1, in that order. | |
The field map's work: the followed position, screen shake, tile animations, blend script, view and its bounds, and three scrolling layers.
Heap slot 8.
Definition at line 27 of file map_scroll.h.
| s32* MapScrollWork::origin |
The followed point, read as x, height and z in 16.16 fixed-point pixels; Camera_FollowActor points it at the camera's position.
Definition at line 30 of file map_scroll.h.
Referenced by Camera_FollowActor(), Camera_MoveWithinMapBounds(), Event_DemonstratePsynergy(), Event_WatchThePuppies(), FieldEffect_InitSparkles(), FieldEffect_UpdateSparkles(), FieldFx_StartGroundParticles(), FieldFx_UpdateGroundParticles(), FieldMotes_Start(), FieldMotes_Update(), Map_CenterOnFollowedPoint(), Map_UpdateLayerScroll(), ObjectTable_ResetForObject(), SolSanctumStatue_RunSealOpenedSequence(), TolbiShipDeck_RockDeck(), TolbiShipMast_FollowCameraAndRotate(), TolbiShipMast_RunAvastScene(), and TolbiShipMast_UpdateSway().
| s32 MapScrollWork::shakeX |
Screen shake amplitudes in 16.16 fixed-point pixels, and the 16.16 factor that scales them each frame.
Definition at line 33 of file map_scroll.h.
Referenced by BattleEffect_CleanupSceneObjects(), BattleFx_LoadActionEffectResources(), Map_SetScreenShake(), Map_UpdateLayerScroll(), and Map_WaitForShakeToSettle().
| s32 MapScrollWork::shakeY |
Definition at line 33 of file map_scroll.h.
Referenced by BattleEffect_CleanupSceneObjects(), BattleFx_LoadActionEffectResources(), Map_SetScreenShake(), Map_UpdateLayerScroll(), and Map_WaitForShakeToSettle().
| s32 MapScrollWork::shakeDecay |
Definition at line 33 of file map_scroll.h.
Referenced by BattleEffect_CleanupSceneObjects(), BattleFx_LoadActionEffectResources(), Map_SetScreenShake(), Map_UpdateLayerScroll(), and Map_WaitForShakeToSettle().
| u8* MapScrollWork::script |
set from the layered scene's header; not read by name
Definition at line 34 of file map_scroll.h.
Referenced by Map_LoadLayeredScene().
| u16 MapScrollWork::flags |
REG_DISPCNT bits: objects and the BG1 to BG3 shown.
Definition at line 35 of file map_scroll.h.
Referenced by AltinPeak_RestoreRoom1(), AltinPeak_RestoreRoom3(), AltinPeak_RestoreRoom4(), AltinPeak_RestoreRoom5(), AltinPeak_RestoreRoom6(), Clear_LoadBackground(), Event_MoveGateBlock(), Map_LoadLayeredScene(), and Title_LoadBackground().
| u8 MapScrollWork::wideTiles |
nonzero: tile animations copy 64-byte tiles
Definition at line 36 of file map_scroll.h.
| u8 MapScrollWork::footprints |
nonzero: the leader leaves footprints
Definition at line 37 of file map_scroll.h.
| struct MapAnimation MapScrollWork::anim[16] |
Definition at line 38 of file map_scroll.h.
| struct BlendScriptState MapScrollWork::blend |
Definition at line 39 of file map_scroll.h.
| s32 MapScrollWork::viewX |
Definition at line 40 of file map_scroll.h.
Referenced by Camera_WorldToScreen(), DisplayTransition_UpdateScanlineTable(), FadeOverlay_DrawMarks(), FieldEffect_UpdateSparkles(), FieldFx_UpdateGroundParticles(), FieldMotes_Update(), Map_GetScreenRelativePosition(), Map_LoadLayeredScene(), Map_SetCameraCenter(), Map_UpdateLayerScroll(), Object_GetScreenPosition(), ObjectSystem_UpdateCamera(), and SolSanctumStatue_UpdateScrollingSprites().
| s32 MapScrollWork::viewY |
the view's top left, 16.16 fixed-point pixels
Definition at line 40 of file map_scroll.h.
Referenced by Camera_WorldToScreen(), DisplayTransition_UpdateScanlineTable(), FadeOverlay_DrawMarks(), Map_GetScreenRelativePosition(), Map_LoadLayeredScene(), Map_SetCameraCenter(), Map_UpdateLayerScroll(), MercuryLighthouseAerie_FlickerBeacon(), Object_GetScreenPosition(), ObjectSystem_UpdateCamera(), SolSanctumStatue_UpdateScrollingSprites(), and VenusLighthouseAerie_SpawnSideOrbitParticles().
| s32 MapScrollWork::minX |
Definition at line 41 of file map_scroll.h.
Referenced by Camera_FollowLeaderInBounds(), Camera_MoveWithinMapBounds(), Event_DoraWakesIsaac(), Map_LoadLayeredScene(), Map_SetCameraCenter(), Map_SetViewBounds(), Map_UpdateLayerScroll(), Scene_ApplyEntrance(), Scene_AssignViewFlags(), TolbiShipDeck_ApplyEntryState(), TolbiShipDeck_SetUpAtAnchor(), and TretTreeInteriors_EnterRoom().
| s32 MapScrollWork::minY |
Definition at line 41 of file map_scroll.h.
Referenced by Camera_FollowLeaderInBounds(), Camera_MoveWithinMapBounds(), Event_DoraWakesIsaac(), Map_LoadLayeredScene(), Map_SetCameraCenter(), Map_SetViewBounds(), Map_UpdateLayerScroll(), Scene_ApplyEntrance(), Scene_AssignViewFlags(), and TretTreeInteriors_EnterRoom().
| s32 MapScrollWork::maxX |
Definition at line 41 of file map_scroll.h.
Referenced by Camera_FollowLeaderInBounds(), Camera_MoveWithinMapBounds(), Event_DoraWakesIsaac(), Map_LoadLayeredScene(), Map_SetCameraCenter(), Map_SetViewBounds(), Map_UpdateLayerScroll(), Scene_ApplyEntrance(), and Scene_AssignViewFlags().
| s32 MapScrollWork::maxY |
16.16 fixed-point pixels
Definition at line 41 of file map_scroll.h.
Referenced by Camera_FollowLeaderInBounds(), Camera_MoveWithinMapBounds(), Event_DoraWakesIsaac(), Map_LoadLayeredScene(), Map_SetCameraCenter(), Map_SetViewBounds(), Map_UpdateLayerScroll(), Scene_ApplyEntrance(), and Scene_AssignViewFlags().
| s8 MapScrollWork::animationActive |
Set while a BG1 animation runs; the tile animations are then neither suspended nor resumed.
Definition at line 44 of file map_scroll.h.
| u8 MapScrollWork::unk0fd[3] |
not named by TBS code
Definition at line 45 of file map_scroll.h.
| u8 MapScrollWork::enabled[3] |
Each layer's BG priority, written into its BGCNT; zero hides the layer.
Definition at line 47 of file map_scroll.h.
Referenced by Map_LoadLayeredScene(), and Map_SetCameraCenter().
| u8 MapScrollWork::unk103 |
MapState's blendControl, the last BLDCNT the blend script set.
Definition at line 48 of file map_scroll.h.
| struct MapLayerScroll MapScrollWork::layers[3] |
BG3, BG2 and BG1, in that order.
Definition at line 49 of file map_scroll.h.
Referenced by CrossboneIslePillarRooms_QueryFootprint(), CrossboneIslePillarRooms_ReadMapCell(), CrossboneIslePillarRooms_SetCellAttributes(), Event_StepOnEastWallSwitch(), Event_StepOnWallSwitch(), Event_StepOnWestWallSwitch(), FieldScene_RedrawActorFootprint(), LunpaFortress_UpdateHallGuardDetection(), LunpaFortress_UpdateOuterGuardDetection(), LunpaFortress_UpdatePairedGuardDetection(), Map_CopyCellIndexRect(), Map_CopyMetatileCellsRect(), Map_CopyMetatileIndicesRect(), Map_LoadLayeredScene(), Map_SetCameraCenter(), Map_UpdateLayerScroll(), MercuryLighthouse_RideLift(), MercuryLighthouseAerie_AlexAppears(), MercuryLighthouseAerie_CallLift(), MercuryLighthouseAerie_Initialize(), MercuryLighthouseAerie_LowerLift(), MercuryLighthouseAerie_RaiseLift(), ObjectSystem_UpdateCamera(), SceneActor_MoveAndRedraw(), SetSail(), StagedActor_FillGridAttributeRectangle(), StagedActor_FillGridAttributeRectangle(), TolbiShipDeck_Initialize(), TolbiShipDeck_RockDeck(), TretTreeBranch_UpdateBg3ScrollSplit(), TretTreeInteriors_EnterRoom(), and VaultCave_RunRumble().