Alchemy
Loading...
Searching...
No Matches

MapCell Struct Reference

One cell of a map layer: its metatile and flags, its collision code and an attribute indexing the collision table. More...

#include <map.h>

Data Fields

u16 metatileAndFlags
 bits: 15..12 flags (15..14 read by Map_GetCellHighFlags) | 11..0 metatile
u8 collisionCode
 The step code: 1 to 239 scene events, 240 and 241 encounter ground, 250 hazard, 252 to 254 for Field_RunPushTileEvent, 0xff a wall.
u8 attributeB
 Indexes the 4-byte collision entries (gMapCollision): terrain kind in the first byte's low four bits, then its height samples.

Detailed Description

One cell of a map layer: its metatile and flags, its collision code and an attribute indexing the collision table.

Definition at line 13 of file map.h.

Field Documentation

◆ metatileAndFlags

u16 MapCell::metatileAndFlags

bits: 15..12 flags (15..14 read by Map_GetCellHighFlags) | 11..0 metatile

Definition at line 15 of file map.h.

Referenced by Map_GetCellHighFlags().

◆ collisionCode

◆ attributeB

u8 MapCell::attributeB

Indexes the 4-byte collision entries (gMapCollision): terrain kind in the first byte's low four bits, then its height samples.

Definition at line 21 of file map.h.

Referenced by CrossboneIslePillarRooms_SetCellAttributes(), KolimaForestBend_CheckLogFits(), Map_CheckObjectStep(), Map_GetCellAttributeLowNibble(), and Map_GetTerrainHeight().