Alchemy
Loading...
Searching...
No Matches

MapState Struct Reference

The map work in heap slot 8 (struct MapScrollWork), seen as its tile animation channels, blend script and layers' cells. More...

#include <map.h>

Data Fields

u8 unk000 [0x14]
 MapScrollWork's origin, shake and script.
u16 flags
 REG_DISPCNT bits; Map_SetShownLayers sets BG1 to BG3.
u8 wideTiles
 nonzero: tile animations copy 64-byte tiles
u8 unk17
 MapScrollWork's footprints; Bilibin Cave sets it.
struct MapAnimation anim [16]
struct BlendScriptState blend
u8 unke4 [0x1f]
 MapScrollWork's view, bounds and shown layers.
u8 blendControl
 The last BLDCNT the blend script wrote; with mode 1 in bits 7..6 its values go to BLDALPHA, else to BLDY.
u8 unk104 [0x2c]
 the first layer's scroll values; not named by TBS code
struct MapLayer layers [4]
 Each layer's cells, at MapScrollWork's layers[i].cells; readers mask the layer with 3, and the fourth entry lies past MapScrollWork's end.

Detailed Description

The map work in heap slot 8 (struct MapScrollWork), seen as its tile animation channels, blend script and layers' cells.

Definition at line 49 of file map.h.

Field Documentation

◆ unk000

u8 MapState::unk000[0x14]

MapScrollWork's origin, shake and script.

Definition at line 50 of file map.h.

◆ flags

u16 MapState::flags

REG_DISPCNT bits; Map_SetShownLayers sets BG1 to BG3.

Definition at line 51 of file map.h.

Referenced by Map_SetShownLayers(), and Scene_Initialize().

◆ wideTiles

u8 MapState::wideTiles

nonzero: tile animations copy 64-byte tiles

Definition at line 52 of file map.h.

Referenced by MapAnimation_Update().

◆ unk17

u8 MapState::unk17

MapScrollWork's footprints; Bilibin Cave sets it.

Definition at line 53 of file map.h.

Referenced by Event_ClearMapTriggerFlag(), Event_SetMapTriggerFlag(), and Imil_UpdateMapLayerByLeaderPosition().

◆ anim

◆ blend

struct BlendScriptState MapState::blend

Definition at line 55 of file map.h.

Referenced by DisplayBlend_RunScript(), and DisplayBlend_StartScript().

◆ unke4

u8 MapState::unke4[0x1f]

MapScrollWork's view, bounds and shown layers.

Definition at line 56 of file map.h.

◆ blendControl

u8 MapState::blendControl

The last BLDCNT the blend script wrote; with mode 1 in bits 7..6 its values go to BLDALPHA, else to BLDY.

Definition at line 59 of file map.h.

Referenced by DisplayBlend_RunScript().

◆ unk104

u8 MapState::unk104[0x2c]

the first layer's scroll values; not named by TBS code

Definition at line 60 of file map.h.

◆ layers

struct MapLayer MapState::layers[4]

Each layer's cells, at MapScrollWork's layers[i].cells; readers mask the layer with 3, and the fourth entry lies past MapScrollWork's end.

Definition at line 63 of file map.h.

Referenced by CheckMapPositionCellOccupied(), Field_GetCollisionAheadOfLeader(), Field_ProcessStep(), GetMapCellCollision(), Map_CheckObjectStep(), Map_GetCellAttributeLowNibble(), Map_GetTerrainHeight(), and SetMapCellCollision().