Skip to Content
The Alchemy Project

src/scene/shared/crumbling_pillar.c

The crumbling and pounded pillars of the Izumo Ruins and Dehkan Plateau: lists of (actor, flag) or (actor, kind, flag) entries ended by ACTOR_LIST_END, placed from their flags and stepped on, struck or pounded until they fall.

Included by dehkan_plateau.c, izumo_ruins.c and tundaria_tower.c.

Functions

NameDescription
voidscCrumblingPillarPlace (Uint16 *list)Places each crumbling pillar of an (actor, flag) list: one that has given way is moved out of sight; the others stand as their metatile's ground, 32 pixels above the floor, which the leader jumps onto (MAP_METATILE_JUMP), and a cracked one shows its cracks.
voidscCrumblingPillarStep (Uint16 *list)Stepping onto a crumbling pillar: the first time it cracks, the second time it gives way with the leader.
voidscCrumblingPillarCollapse (const void *data, Sint32 id)A crumbling pillar named in an (actor, flag) list gives way with a shake, dust and a thump.
voidscCrumblingPillarPrepare (Sint32 id)Keeps an actor's sprite picture loaded even out of sight, and stops it moving, colliding and showing (fdActorDisableById).
voidscCrumblingPillarPlaceWithStandIn (Uint16 *list)As scCrumblingPillarPlace, in a room whose pillars share one sprite: first loads the stand-in's and the two pictures' sprites beside the leader, the cracked one showing its cracks, then puts them out of sight; a cracked pillar takes the cracked picture.
voidscCrumblingPillarStepWithStandIn (Uint16 *list)As scCrumblingPillarStep, in a room whose pillars share one sprite: the stand-in takes the pillar's place to crack or give way, and a cracked pillar takes the cracked picture.

Description

The crumbling and pounded pillars of the Izumo Ruins and Dehkan Plateau: lists of (actor, flag) or (actor, kind, flag) entries ended by ACTOR_LIST_END, placed from their flags and stepped on, struck or pounded until they fall.

Functions in detail

scCrumblingPillarPlace

void scCrumblingPillarPlace(Uint16 *list)

Places each crumbling pillar of an (actor, flag) list: one that has given way is moved out of sight; the others stand as their metatile's ground, 32 pixels above the floor, which the leader jumps onto (MAP_METATILE_JUMP), and a cracked one shows its cracks. A leader below the ground where he stands is raised onto it.

References fdActorDisableById(), fdActorGet(), fdActorGetMetatileIndex(), fdActorSelectAnimation(), fdMapGetTerrainHeight(), fdMapGridGetTerrainKind(), fdMapShapeFindOrAdd(), fdScriptGetFlag(), MainRoutineStateWork, MapShapeGrid and Sint32.

Referenced by scDehkanPlateauInitCannon(), scDehkanPlateauInitEntrance() and scDehkanPlateauInitTightropes().

Definition at line 15 of file crumbling_pillar.c.

scCrumblingPillarStep

void scCrumblingPillarStep(Uint16 *list)

Stepping onto a crumbling pillar: the first time it cracks, the second time it gives way with the leader.

References fdActorFindAtMetatile(), fdActorGetById(), fdActorSelectAnimation(), fdActorSetPosAndResetMotion(), fdActorSetSpriteColor(), fdLeaderSetMetatileShapeAt(), fdScriptEnd(), fdScriptStart(), fdTryJumpForward(), MainRoutineStateWork, scDustBurst(), scDustScatter(), Sint32, syGameFlagGet(), syGameFlagSet(), sySoundPlay() and sySynch().

Referenced by scDehkanPlateauStepOnCannonPillar(), scDehkanPlateauStepOnEntrancePillars() and scDehkanPlateauStepOnTightropesPillars().

Definition at line 70 of file crumbling_pillar.c.

scCrumblingPillarCollapse

void scCrumblingPillarCollapse(const void *data, Sint32 id)

A crumbling pillar named in an (actor, flag) list gives way with a shake, dust and a thump.

References fdActorGet(), fdActorSelectAnimation(), fdActorSetMetatileShape(), fdScriptEnd(), fdScriptGetFlag(), fdScriptPlaySound(), fdScriptSetFlag(), fdScriptStart(), scDustBurst(), scDustScatter(), scFieldActorSetPosAndResetMotion(), Sint32 and sySynch().

Definition at line 146 of file crumbling_pillar.c.

scCrumblingPillarPrepare

void scCrumblingPillarPrepare(Sint32 id)

Keeps an actor's sprite picture loaded even out of sight, and stops it moving, colliding and showing (fdActorDisableById).

References fdActorDisableById(), fdActorGet() and Sint32.

Referenced by scCrumblingPillarPlaceWithStandIn().

Definition at line 190 of file crumbling_pillar.c.

scCrumblingPillarPlaceWithStandIn

void scCrumblingPillarPlaceWithStandIn(Uint16 *list)

As scCrumblingPillarPlace, in a room whose pillars share one sprite: first loads the stand-in's and the two pictures' sprites beside the leader, the cracked one showing its cracks, then puts them out of sight; a cracked pillar takes the cracked picture.

References fdActorCopyGraphics(), fdActorDisableById(), fdActorGet(), fdActorGetMetatileIndex(), fdActorPlaceOnActor(), fdActorSetAnimation(), fdMapGetTerrainHeight(), fdMapGridGetTerrainKind(), fdMapShapeFindOrAdd(), fdScriptGetFlag(), MainRoutineStateWork, MapShapeGrid, scCrumblingPillarPrepare(), Sint32 and sySynch().

Referenced by scDehkanPlateauInitPillars().

Definition at line 201 of file crumbling_pillar.c.

scCrumblingPillarStepWithStandIn

void scCrumblingPillarStepWithStandIn(Uint16 *list)

As scCrumblingPillarStep, in a room whose pillars share one sprite: the stand-in takes the pillar's place to crack or give way, and a cracked pillar takes the cracked picture.

References fdActorCopyGraphics(), fdActorFindAtMetatile(), fdActorGetById(), fdActorSelectAnimation(), fdActorSetPosAndResetMotion(), fdActorSetSpriteColor(), fdLeaderSetMetatileShapeAt(), fdScriptEnd(), fdScriptStart(), fdTryJumpForward(), MainRoutineStateWork, scActorTakePlaceOf(), scDustBurst(), scDustScatter(), Sint32, syGameFlagGet(), syGameFlagSet(), sySoundPlay() and sySynch().

Referenced by scDehkanPlateauStepOnPillarsCrumblingPillars().

Definition at line 268 of file crumbling_pillar.c.