Alchemy
Loading...
Searching...
No Matches

MapScrollWork Struct Reference

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.

Detailed Description

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.

Field Documentation

◆ origin

◆ shakeX

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().

◆ shakeY

◆ shakeDecay

◆ script

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().

◆ flags

◆ wideTiles

u8 MapScrollWork::wideTiles

nonzero: tile animations copy 64-byte tiles

Definition at line 36 of file map_scroll.h.

◆ footprints

u8 MapScrollWork::footprints

nonzero: the leader leaves footprints

Definition at line 37 of file map_scroll.h.

◆ anim

struct MapAnimation MapScrollWork::anim[16]

Definition at line 38 of file map_scroll.h.

◆ blend

struct BlendScriptState MapScrollWork::blend

Definition at line 39 of file map_scroll.h.

◆ viewX

◆ viewY

◆ minX

◆ minY

◆ maxX

◆ maxY

◆ animationActive

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.

◆ unk0fd

u8 MapScrollWork::unk0fd[3]

not named by TBS code

Definition at line 45 of file map_scroll.h.

◆ enabled

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().

◆ unk103

u8 MapScrollWork::unk103

MapState's blendControl, the last BLDCNT the blend script set.

Definition at line 48 of file map_scroll.h.

◆ layers