Skip to Content
The Alchemy Project

src/scene/shared/map_metatile_set.c

scMapMetatileSetAttributes, the field engine's function that replaces a map metatile's collision code and attributes, as the scenes that change their metatiles keep a copy of it (Treasure Isle's unused): included at its place in each scene's overlay, after the field engine's map_metatile_get.c or before it as the ROM has it.

Included by airs_rock.c, airs_rock_inside.c, caverns.c, izumo_ruins.c, magma_rock_inside.c, mars_lighthouse_entrance.c, sea_of_time.c, treasure_isle.c and tundaria_tower.c.

Functions

NameDescription
Sint32scMapMetatileSetAttributes (Uint32 layer, Sint32 x, Sint32 z, Sint32 value)Replaces a metatile's collision code and attributes on a layer, or in the metatile buffer for a layer past the overhead one, and returns the old value.

Description

scMapMetatileSetAttributes, the field engine's function that replaces a map metatile's collision code and attributes, as the scenes that change their metatiles keep a copy of it (Treasure Isle's unused): included at its place in each scene's overlay, after the field engine's map_metatile_get.c or before it as the ROM has it.

Functions in detail

scMapMetatileSetAttributes

Sint32 scMapMetatileSetAttributes(Uint32 layer, Sint32 x, Sint32 z, Sint32 value)

Replaces a metatile's collision code and attributes on a layer, or in the metatile buffer for a layer past the overhead one, and returns the old value.

References MapGridMetatileBuffer and Sint32.

Referenced by scAirsRockInsideFinishPushingPillar(), scAirsRockInsideSetStakeMetatiles(), scAirsRockInsideVanishStone(), scAirsRockMoveSecondPillar(), scCavernsFinishMovingAngaraBlock(), scCavernsPlaceAngaraBlocks(), scCavernsStartMovingAngaraBlock(), scFieldMapMetatileSetAttributes(), scInit(), scIzumoRuinsFinishMovingPillar(), scIzumoRuinsShowStakeState(), scIzumoRuinsStartMovingPillar(), scMagmaRockInsideDrainLava(), scMagmaRockInsideFadeStoneAway(), scMagmaRockInsideGrowFlame(), scMagmaRockInsideGrowTabletFlame(), scMagmaRockInsideSetEntranceFlooded(), scMagmaRockInsideSetFuryFlooded(), scMarsLighthouseEntranceSetIceConeMetatiles(), scSeaOfTimePlaceRock(), scSeaOfTimeRemoveRock(), scTundariaTowerRefluxAppears(), scTundariaTowerRevealHiddenWay(), scTundariaTowerSetColumnMetatile() and scTundariaTowerUpdateBrownWallMetatile().

Definition at line 13 of file map_metatile_set.c.