Skip to Content
The Alchemy Project

src/field/field_psynergy_shape_entries.c

The map's shape entries and the flag blocks: the puddles Frost freezes into pillars of ice, each with the flag that says it is frozen. More…

Included by field_psynergy.c.

Functions

NameDescription
voidfdFlagBlockPlaceAllMarkingEdges (ACTOR_FLAG *list)Sets up Alhafra's and the Alhafran Cave's puddles as fdFlagBlockPlaceAll does, and marks the open metatiles on each puddle's four sides a gap to jump across (fdMapGridMarkJumpIfOpen), so the leader jumps onto a frozen one.
voidfdFlagBlockApplyFlags (ACTOR_FLAG *list)For each flag block whose animation disagrees with its flag, turns its metatile and flag over: with the flag set and the ice pillar not showing, the metatile is lowered 32 pixels to a wall and the flag cleared; with the flag clear and the puddle not showing (Frost freezing it), the metatile is raised 32 pixels, open and a gap to jump across, and the flag set.
Sint32fdActorGetMetatileIndex (ACTOR *actor)Returns the index of the actor's metatile in its map layer.
Sint32fdMapShapeFindOrAdd (Sint32 layer, Sint32 shape, Sint32 height)Returns the index of the map's shape entry (MapGridShapes, MAP_SHAPE) of shape whose first height is height, in 8-pixel steps, writing it into the first free entry (MAP_SHAPE_FREE) when there is none: the entry a raised or lowered metatile's shape grid byte takes.

Description

The map's shape entries and the flag blocks: the puddles Frost freezes into pillars of ice, each with the flag that says it is frozen. Part of field_psynergy.c.

Functions in detail

fdFlagBlockPlaceAllMarkingEdges

void fdFlagBlockPlaceAllMarkingEdges(ACTOR_FLAG *list)

Sets up Alhafra's and the Alhafran Cave's puddles as fdFlagBlockPlaceAll does, and marks the open metatiles on each puddle's four sides a gap to jump across (fdMapGridMarkJumpIfOpen), so the leader jumps onto a frozen one.

References fdActorGetById(), fdActorGetMetatileIndex(), fdActorSelectAnimationStub(), fdActorSetSpriteFlagsStub(), fdFlagBlockApplyFlags(), fdMapGridGetTerrainHeightAboveStub(), fdMapGridGetTerrainHeightStub(), fdMapGridMarkJumpIfOpen(), fdPartyGetLeaderActor(), Sint32, syGameFlagClear() and syGameFlagGet().

Referenced by scAlhafranCaveSetUpCave() and scInit().

Definition at line 8 of file field_psynergy_shape_entries.c.

fdFlagBlockApplyFlags

void fdFlagBlockApplyFlags(ACTOR_FLAG *list)

For each flag block whose animation disagrees with its flag, turns its metatile and flag over: with the flag set and the ice pillar not showing, the metatile is lowered 32 pixels to a wall and the flag cleared; with the flag clear and the puddle not showing (Frost freezing it), the metatile is raised 32 pixels, open and a gap to jump across, and the flag set. The field state remembers the block.

References fdActorGetById(), fdActorGetMetatileIndex(), fdMapGridGetTerrainHeightStub(), fdMapGridGetTerrainKindStub(), fdMapShapeFindOrAdd(), MapShapeGrid, Sint32, syGameFlagClear(), syGameFlagGet() and syGameFlagSet().

Referenced by fdFlagBlockPlaceAll(), fdFlagBlockPlaceAllMarkingEdges(), scAirsRockFreezePuddle(), scAlhafraFreezePuddle(), scAlhafranCaveFreezePuddle(), scFreezePuddleIntoPillar(), scIzumoRuinsFreezePuddle(), scKibomboFreezePuddle(), scLemurianShipDeckFreezePuddle(), scLemurianShipFreezePipeRoomPuddle(), scLemurianShipFreezeSixJellyRoomPuddle(), scLemurianShipFreezeTwoJellyRoomPuddle() and scMadraCatacombsFreezePuddle().

Definition at line 71 of file field_psynergy_shape_entries.c.

fdActorGetMetatileIndex

Sint32 fdActorGetMetatileIndex(ACTOR *actor)

Returns the index of the actor's metatile in its map layer.

References Sint32.

Referenced by fdActorLiftTargetBlock(), fdActorPlaceBlocks(), fdActorPlaceMovedBlock(), fdActorSetMetatileOpen(), fdFlagBlockApplyFlags(), fdFlagBlockPlaceAll(), fdFlagBlockPlaceAllMarkingEdges(), scCrumblingPillarPlace(), scCrumblingPillarPlaceWithStandIn(), scDehkanPlateauInitTightropes(), scDehkanPlateauPlaceVinePillar(), scHeldActorRaiseMetatile(), scKandoreanTempleDropOffLowMetatiles(), scMagmaRockInsideRestoreCrumblingPillars(), scMagmaRockInsideRestorePillars(), scMagmaRockRestoreCrumblingPillars(), scPillarLowerHeldMetatiles(), scPillarRaise(), scShrineOfTheSeaGodTrackUpperLevel(), scYampiDesertBlockPoundedStakes(), scYampiDesertCheckUpperLevelOnRise(), scYampiDesertOpenStakeMetatiles(), scYampiDesertStepOffStakeTops(), scYampiDesertStepOntoStakeTops() and scYampiDesertUpdateSandFlow().

Definition at line 148 of file field_psynergy_shape_entries.c.

fdMapShapeFindOrAdd

Sint32 fdMapShapeFindOrAdd(Sint32 layer, Sint32 shape, Sint32 height)

Returns the index of the map's shape entry (MapGridShapes, MAP_SHAPE) of shape whose first height is height, in 8-pixel steps, writing it into the first free entry (MAP_SHAPE_FREE) when there is none: the entry a raised or lowered metatile's shape grid byte takes. The layer goes unread.

References MapGridShapes and Sint32.

Referenced by fdActorLiftTargetBlock(), fdActorPlaceBlocks(), fdActorPlaceMovedBlock(), fdActorSetMetatileShape(), fdFlagBlockApplyFlags(), scCrumblingPillarPlace(), scCrumblingPillarPlaceWithStandIn(), scHeldActorRaiseMetatile(), scMagmaRockInsideRestoreCrumblingPillars(), scMagmaRockInsideRestorePillars(), scMagmaRockInsideSetMetatileShape(), scMagmaRockRestoreCrumblingPillars(), scPillarLowerHeldMetatiles(), scPillarRaise(), scYampiDesertStepOffStakeTops() and scYampiDesertStepOntoStakeTops().

Definition at line 158 of file field_psynergy_shape_entries.c.