Skip to Content
The Alchemy Project

include/field/scene_tables.h

The scene table formats: entrances, exits, actor placements and cues, and the macros that write them.

Included by battle_music.c, field_engine_tables.c, shop_internal.h, field.h and pushed_actor.h.

Structures

NameDescription
structSCENE_ENTRANCEA scene's entrance: where and facing which way the party arrives, and the camera's bounds there (-1 for none).
structACTOR_PLACEAn actor a scene places: its sprite, the condition for placing it, how it behaves, where it stands and which way it faces, and how it turns to talk.
structCUEA cue: its kind and detail, the subject it answers, its condition and its value (a message or a script).
structSCENEA scene's row in ScenesWork: its overlay's resource, its area, its scene type and its map.
structSCENE_EXIT_REGIONA scene's exit region: the box that, while its condition holds, takes the party leader out through its exit.
structSCENE_ENTRY_POINTSThe entry table at the start of each scene overlay: its initialize function and the functions returning its entrances, exits, actor placements, cues and exit regions, each behind a stub word.
structFIELD_POSA position on the field.

Macros

NameDescription
#defineFACING_IS_NORTH (facing)True for a heading strictly between FACING_NORTHWEST and FACING_NORTHEAST.
#defineFACING_NEAREST_CARDINAL (facing) (((facing) + DEGtoANG(45)) & 0xc000)A facing rounded to the nearest of east, south, west and north.
#defineFACING_NEAREST_EIGHTH (facing) (((facing) + TRIG_TURN / 16) & 0xe000)A facing rounded to the nearest eighth of a turn.
#defineFACING_QUARTER (facing) ((facing) & 0xc000)The quarter of a turn a facing lies in, what is past it dropped: east, south, west or north.
#defineFACING_EIGHTH (facing) ((facing) & 0xe000)The eighth of a turn a facing lies in, what is past it dropped.
#defineFACING_EIGHTH_INDEX (facing) ((facing) >> 13)The eighth of a turn a facing lies in, as a number from 0 (east) to 7.
#defineFACING_SIXTEENTH (facing) ((facing) & 0xf000)The sixteenth of a turn a facing lies in, what is past it dropped.
#defineFACING_INDEX (facing) ((facing) >> 12)The sixteenth of a turn a facing lies in, as a number from 0 (east) to 15, which indexes the scenes' sixteen-direction step tables.
#defineIF_FLAG_SET (flag) ((flag) | CONDITION_FLAG_SET)A condition that holds while flag is set.
#defineSCENE_EXITS (map) ((Uint32)&SceneId##map)An exit table's header word: the scene whose exits follow, named by its name (SCENE_EXITS(Bilibin)).
#defineSCENE_EXIT (exit, map, entrance)One exit: exit kind exit leads to entrance of the scene scene, both named in scene_exits.h.
#defineEXIT_SCENE_MASK 0xfffAn exit word's scene.
#defineENTRANCE (word) (((word) & 0xff000) >> 12)An exit word's entrance.
#defineEXIT_ID (word) (((word) & 0x0ff00000) >> 20)An exit word's exit kind.
#defineEXIT_HAS_FLAG 0x10000000An exit word's bit 28: a flag word follows it.
#defineEXIT_ID_ANY 255The exit kind that matches whatever exit the scene ended on.
#defineSCENE_EXIT_UNLESS (exit, map, entrance, flag)An exit with a flag word after it: the exit is taken unless flag is set, and when it is set the search goes on to the next exit.
#defineEXIT_FLAG_NONE 0xffffffffSCENE_EXIT_UNLESS's flag for no flag: gmFlagGetStub reads it as flag 0xfff, which nothing sets, so the exit is always taken.
#defineSCENE_EXITS_END 511The last header word: it ends the last scene's exits and the table.
#defineEXIT_METATILE_BEHAVIOR_OFFSET 50Where a scene numbers its door or exit metatiles by their exits (Imil, Mercury Lighthouse), each one's metatile behavior is its exit's number plus this.
#defineEXIT_TO_BATTLE (exit, group)An exit into a battle: exit kind exit fights formation group.
#defineACTOR_PLACEMENT (One row of a scene's actor placements, its spot in plain pixels.
#defineACTOR_PLACEMENT_SHARE_PREVIOUS_SPRITE 0x01ACTOR_PLACE.flags: the actor takes the previous actor's sprite resource instead of loading its own, when both are single sprites.
#defineCUE_SUBJECT_OWN_EFFECT 0x400CUE.subject bit 10: a Psynergy cue runs in place of its field Psynergy, as Mind Read on someone who notices it does, and an examine cue shows no checking message.
#defineCUE_SUBJECT_FACING 0xf000CUE.subject for an item or Psynergy cue: bits 15 to 12 the leader's facing (an angle's top four bits), heeded only with bit 11 set, and bits 7 to 0 the actor id or metatile behavior it answers.
#defineCUE_SUBJECT_NEEDS_FACING 0x0800
#defineCUE_SUBJECT_TARGET 0xff
#defineFIELD_RAISED_CUE_MENUS 250The raised cue the menus and shortcut keys raise instead of opening while FLAG_MENUS_RAISE_CUE is set, as Vault's inn sets it while the party corners the suspects.
#defineSTEP_CUE_FLAG_WALKING 0x200A step cue that needs the leader to have pushed against it for more than FIELD_PUSH_TICKS ticks, or 2 with STEP_CUE_FLAG_QUICK.
#defineSTEP_CUE_FLAG_QUICK 0x800With STEP_CUE_FLAG_WALKING, 2 ticks of pushing are enough.
#defineCUE_FLAG_FACING 0x400A script that needs the leader to face within an eighth of a turn of the heading in control bits 15..12 (fdFindCue).
#defineSTEP_CUE_WALKING (CUE_STEP | STEP_CUE_FLAG_WALKING)
#defineSTEP_CUE_FACING (facing) (CUE_STEP | CUE_FLAG_FACING | (facing))facing is a FACING; only its top four bits are compared.
#defineSTEP_CUE_WALKING_INTO (facing)
#definePSYNERGY_CUE (phase) ((phase) << 28 | CUE_PSYNERGY)The control word of a Psynergy cue (CUE_PSYNERGY) in the given phase, as fdFindPsynergyCue compares it (bits 30..28 phase | 3..0 kind).
#definePSYNERGY_CUE_ANY PSYNERGY_CUE(PSYNERGY_PHASE_ANY)
#defineCUE_PSYNERGY_ON_ACTOR 0x10A Psynergy cue on the actor the leader faces.
#definePSYNERGY_ON_ACTOR (ability)
#definePSYNERGY_PHASE_ON_ACTOR (ability, phase)A Psynergy cue on an actor at one phase of the cast, as PSYNERGY_ANYWHERE is for any target.
#defineCUE_PSYNERGY_ANYWHERE 0x80A Psynergy cue for any target, not a particular actor or metatile.
#definePSYNERGY_ANYWHERE (ability, phase)
#defineCUE_ITEM_ON_ACTOR 0x10Using an item (one byte) on a metatile behavior, or on an actor, as fdFindItemCue reads them.
#defineUSE_ITEM (item) (CUE_ITEM | (item) << 8)
#defineUSE_ITEM_ON_ACTOR (item) (CUE_ITEM | CUE_ITEM_ON_ACTOR | (item) << 8)
#defineEXAMINE_CUE (target) (CUE_EXAMINE | (target) << 4)An examine cue: the leader presses A at target (EXAMINE) ahead, when it is no actor.
#defineEXAMINE_CUE_FACING (facing) (CUE_EXAMINE | CUE_FLAG_FACING | (facing))An examine cue searched while facing the given way, as a counter is searched across.
#defineEXAMINE_CHEST_FACING (facing)A chest searched while facing the given way.
#defineTALK_CUE_FACING (facing) (CUE_TALK | CUE_FLAG_FACING | (facing))A talk cue that answers only while the leader faces the given way, so one actor can answer differently from each side.
#defineFIND_ITEM (item) (0x00100000 | (item))What a search finds, an examine cue's value: a function when bits 27..24 are set, else a type in its top twelve bits.
#defineFIND_COINS (coins) (0x00200000 | (coins))
#defineFIND_PSYNERGY_STONE 0x00300000A Psynergy Stone, which restores all PP.
#defineFIND_MESSAGE (message) (0x00400000 | (message))
#defineFIND_MIMIC 0x00500000A mimic chest's battle, with the script's value its slot of ENCOUNTER_ZONE_MIMIC.
#defineSCRIPT_REF (script) ((Uint32)(script))A script as a cue's value: its address lies above CUE_RESULT_MESSAGE_END, so it is never taken for a message.
#defineCUE_TABLE_END 0xffffffff
#defineENCOUNTER_BATTLE_MUSIC_MARKER 0x8000The bit that marks a song in EncounterBattleMusic; encounter keys have it clear.
#defineENCOUNTER_BATTLE_MUSIC_MASK 0xfffThe bits of a song marker that hold the song.
#defineENCOUNTER_BATTLE_MUSIC (song) (ENCOUNTER_BATTLE_MUSIC_MARKER | (song))A song marker in EncounterBattleMusic: the song (a MUS_ id) with ENCOUNTER_BATTLE_MUSIC_MARKER set.
#defineENCOUNTER_KEY (zone, slot) (((zone) << 4) + (slot))The key of one battle: slot of zone (an ENCOUNTER_ZONE_ID).

Enumerations

NameDescription
enumFACING { FACING_EAST, FACING_EAST_SOUTHEAST, FACING_SOUTHEAST, FACING … }The sixteen compass headings in 1/65536 turns, from east through south: a quarter turn is DEGtoANG(90), and the screen's y axis points south.
enumanonymous enum { FACING_STEP }A sixteenth of a turn, half the step between two headings.
enumanonymous enum { SCENE_TABLE_END }In the first column of a scene table, ends the table.
enumanonymous enum { CONDITION_ALWAYS, CONDITION_IN_VIEW, CONDITION_FLAG_SET }A table row's condition: CONDITION_ALWAYS, a flag number that must be clear, or IF_FLAG_SET of a flag that must be set (fdGameFlagIsConditionActive).
enumanonymous enum { ENGINE_NONE, ENGINE_LUCKY_WHEELS, ENGINE_LUCKY_DICE, ENGINE_ … }Engine ids above the scene table's rows: the engines other than the field engine, which gmMainRoutineRun runs in its place.
enumMOVEMENT_TYPE { MOVEMENT_TYPE_STAND, MOVEMENT_TYPE_WANDER, MOVEMENT_TYPE_WAN … }The movement types an actor placement's behavior can name, which fdActorSetMovementType turns into scripts.
enumACTOR_TALK_FACING { TALK_FACING_PARTY, TALK_FACING_PARTY_AND_BACK, TALK_FACING_K … }How a placed actor turns when the leader talks to it (fdTalkToActor).
enumACTOR_ID { ACTOR_PARTY_LEADER, ACTOR_GARET, ACTOR_IVAN, ACTOR_MIA, ACTO … }Actor ids: 0 to 7 the party's characters, the placed actors from 8.
enumCUE_KIND { CUE_TALK, CUE_EXIT, CUE_STEP, CUE_EXAMINE, CUE_ITEM, CUE_PSY … }CUE.kind's low four bits: what the cue answers.
enumEXIT_STYLE { EXIT_STYLE_NORMAL, EXIT_STYLE_SILENT, EXIT_STYLE_STAIRS_UP, … }An exit cue's control bits 5..4: how the leader leaves (fdRunStepCueOrExit).
enumPSYNERGY_PHASE { PSYNERGY_PHASE_AFTER_CAST, PSYNERGY_PHASE_BEFORE_CAST, PSYNE … }When a Psynergy cue runs around its field Psynergy, control bits 30..28.
enumPSYNERGY_SCRIPT_TARGET { PSYNERGY_SCRIPT_PLAYS_CAST }Bits of an after-cast Psynergy cue's target word, beside the actor's number.
enumEXAMINE { EXAMINE_SILENT, EXAMINE_CHEST, EXAMINE_JAR, EXAMINE_BARREL, … }What an examine cue is on, EXAMINE_CUE()'s control bits 8..4: it picks the line fdExamineMetatile shows before the search's result, MsgTileChecked + target ("checked the jar..."), and EXAMINE_SILENT shows none.

Variables

NameDescription
extern const Sint32ActorFaceWatchedScript []SC_FACE_WATCHED every tick, forever: the script of an actor told to keep facing its watched actor.
extern const Sint16SceneRestartRules []Where the party returns after a defeat: {scene, entrance (-1 any), return scene, return entrance} rows, ended by scene -1 (fdSetRestartPoint).
extern Sint32SceneBattleBackgroundRules []Battle backgrounds by scene: a background word (bit 31 set, resource id below) and then its scenes, ended by 0; a scene not listed takes the last background (fdBattleBackgroundSelectForMap).
extern SCENE_ENTRANCESceneFallbackEntrances []Entrance tables more than one scene file holds, each from a part of src/scene/shared/: the fallback of a cave or island scene (scene_entrances_default.c) and of Kalay's (kalay_fallback_entrances.c), the title's and the File Screen's (scene_entrances_mapless.c), and Sol Sanctum's Elemental Star room's (sol_sanctum_star_room_entrances.c).
extern SCENE_ENTRANCEKalayFallbackEntrances []
extern SCENE_ENTRANCEScreenEntrances []
extern SCENE_ENTRANCESolSanctumStarRoomEntrances []
extern const SCENEScenesWork []Every scene's row, by scene number (field/scenes.s).
extern SCENE_ENTRY_POINTSOverlayAreaThe running scene's overlay, loaded into these 32 KB of EWRAM at each scene change; its code opens with its 48-byte entry table.

Description

The scene table formats: entrances, exits, actor placements and cues, and the macros that write them.

Macros in detail

FACING_IS_NORTH

#define FACING_IS_NORTH(facing)

True for a heading strictly between FACING_NORTHWEST and FACING_NORTHEAST.

Referenced by scBattleArenaTellLinkedWins(), scCottageRoomsATalkToArmorMerchant(), scCottageRoomsATalkToItemMerchant(), scCottageRoomsATalkToWeaponMerchant(), scCottageRoomsCTalkToArmorMerchant(), scCottageRoomsCTalkToInnkeeper(), scCottageRoomsCTalkToItemMerchant(), scCottageRoomsCTalkToWeaponMerchant(), scFuchinTempleTalkToHealer(), scKolimaTalkToHealer(), scLamaTempleTalkToHealer(), scLogRoomsBTalkToArmorMerchant(), scLogRoomsBTalkToInnkeeper(), scLogRoomsBTalkToItemMerchant(), scLogRoomsBTalkToWeaponMerchant(), scLogRoomsCTalkToArmorMerchant(), scLogRoomsCTalkToInnkeeper(), scLogRoomsCTalkToItemMerchant(), scLogRoomsCTalkToWeaponMerchant(), scRockRoomsTalkToArmorMerchant(), scRockRoomsTalkToHealer(), scRockRoomsTalkToInnkeeper(), scRockRoomsTalkToItemMerchant(), scRockRoomsTalkToTravelingHealer() and scRockRoomsTalkToWeaponMerchant().

Definition at line 46 of file scene_tables.h.

FACING_NEAREST_CARDINAL

#define FACING_NEAREST_CARDINAL(facing) (((facing) + DEGtoANG(45)) & 0xc000)

A facing rounded to the nearest of east, south, west and north.

Referenced by fdDjinnRunBattleStartHop(), fdEffectSpawnMoveHand(), fdFindNearbyPsynergyTarget(), fdPsynergySetupActorPair(), fdTryJumpForward(), scBabiLighthouseClimbOrPushRoadPillar(), scBabiPalaceRestInPalaceBeds(), scBabiPalaceShowBeds(), scColossoFindActorAhead(), scCrossboneIsleSteppingStonesTryJumpAcrossPillar(), scCrossboneIsleTryHop(), scKalayTolbiDocksTalkToManCheckingTickets(), scKolimaForestFloodgateRollLog(), scStuccoRoomsBTalkToArmorMerchant(), scStuccoRoomsBTalkToHealer(), scStuccoRoomsBTalkToItemMerchant(), scStuccoRoomsBTalkToWeaponMerchant(), scTimberRoomsATalkToHealer(), scTimberRoomsATalkToInnkeeper(), scTimberRoomsATalkToMerchant(), scTimberRoomsBCLeaderGetSide(), scTimberRoomsBCTalkToWeaponMerchant(), scTunnelRuinsHopLeaderTo(), scVenusLighthouseJumpAcrossGap() and scXianJumpOverSpilledWater().

Definition at line 51 of file scene_tables.h.

FACING_NEAREST_EIGHTH

#define FACING_NEAREST_EIGHTH(facing) (((facing) + TRIG_TURN / 16) & 0xe000)

A facing rounded to the nearest eighth of a turn.

Referenced by scColosseumSatrageMatchRollLogToMetatile(), scMercuryLighthouseAerieJumpToNextPlatform() and scVenusLighthouseAerieJumpToNextPlatform().

Definition at line 53 of file scene_tables.h.

FACING_QUARTER

#define FACING_QUARTER(facing) ((facing) & 0xc000)

The quarter of a turn a facing lies in, what is past it dropped: east, south, west or north.

Referenced by scAltinPeakTurnCartLeft() and scAltinPeakTurnCartRight().

Definition at line 56 of file scene_tables.h.

FACING_EIGHTH

#define FACING_EIGHTH(facing) ((facing) & 0xe000)

The eighth of a turn a facing lies in, what is past it dropped.

Referenced by scColosseumNavampaMatchUpdateEastEndCollision().

Definition at line 58 of file scene_tables.h.

FACING_EIGHTH_INDEX

#define FACING_EIGHTH_INDEX(facing) ((facing) >> 13)

The eighth of a turn a facing lies in, as a number from 0 (east) to 7.

Referenced by scColosseumNavampaMatchRollLongLog().

Definition at line 60 of file scene_tables.h.

FACING_SIXTEENTH

#define FACING_SIXTEENTH(facing) ((facing) & 0xf000)

The sixteenth of a turn a facing lies in, what is past it dropped.

Referenced by fdActorMoveByKeys(), scAltmillerCaveHopOverPuddle(), scLamakanDesertFallIntoPit(), scLogRoomsASuspectedLeaderDodges(), scLogRoomsASuspectedThiefDodges(), scShipRoomsStepBesideLeader(), scTolbiKidStopForTarget(), scValeTestFacing(), scVaultStopIfFacingNear() and scXianStopCarrierBeforeLeader().

Definition at line 62 of file scene_tables.h.

FACING_INDEX

#define FACING_INDEX(facing) ((facing) >> 12)

The sixteenth of a turn a facing lies in, as a number from 0 (east) to 15, which indexes the scenes' sixteen-direction step tables.

Referenced by scBabiLighthouseFindMetatileAhead(), scBilibinCavePushTorch(), scBilibinPushStatueOrCrates(), scColossoPushActorAhead(), scKalayPushTunnelStatue(), scPushedActorAdvancePair(), scPushedActorFindLargeThingAhead(), scPushedActorRoll(), scPushedActorStopBlockedMotion(), scShipRoomsStepBesideLeader(), scSolSanctumEntrancePushStatue(), scVaultCavePushPillarAhead() and scVenusLighthousePushPillarAhead().

Definition at line 65 of file scene_tables.h.

IF_FLAG_SET

#define IF_FLAG_SET(flag) ((flag) | CONDITION_FLAG_SET)

A condition that holds while flag is set.

Referenced by AlpineCrossingActorPlacements, BabiLighthouseStoneDoorCues, BabiPalaceCuesAfterColosso, BabiPalaceCuesBabiMissing, BabiPalaceCuesFinals, BattleArenaActorPlacements, BattleArenaBattleActorPlacements, BilibinBarricadeCues, BilibinCaveIceCues, ColosseumNavampaMatchCues, FuchinTempleCues, FuchinTempleGroundsCues, ImilFuchinFallsDragonsEyeRoomCues, ImilRoomCues, KalayTolbiDocksTolbiCues, KolimaCues, LacquerRoomsBSchoolRoomActorPlacements, LogRoomsACues, LogRoomsCCues, MercuryLighthouseEntranceCues, MercuryLighthouseExteriorActorPlacements, MercuryLighthouseExteriorCues, MercuryLighthouseLowerCues, MercuryLighthouseMiddleCues, MercuryLighthouseUpperActorPlacements, StoneRoomsThiefActorPlacements, StoneRoomsThiefCues, SuhallaDesertCuesOther, TolbiCuesAfterColosso, TolbiCuesFestival, TolbiCuesFinalsDay, VaultActorPlacements, VaultRevisitCues, WorldMapActorPlacements, WorldMapCues and XianActorPlacements.

Definition at line 87 of file scene_tables.h.

SCENE_EXITS

#define SCENE_EXITS(map) ((Uint32)&SceneId##map)

An exit table's header word: the scene whose exits follow, named by its name (SCENE_EXITS(Bilibin)).

Referenced by AlpineCrossingLamaTempleExits, AltinExits, AltinPeakExits, AltmillerCaveExits, BabiLighthouseExits, BabiPalaceExits, BilibinCaveExits, BilibinExits, ColosseumAzartMatchExits, ColosseumEntranceExits, ColosseumNavampaMatchExits, ColosseumSatrageMatchExits, CottageRoomsAExits, CottageRoomsAStormExits, CottageRoomsBExits, CottageRoomsBStormExits, CottageRoomsCExits, CrossboneIsleExits, CrossboneIsleKeysExits, CrossboneIsleSteppingStonesExits, FuchinTempleExits, GomaCaveEntranceExits, GomaCavePillarExits, GomaCavePondExits, GomaCaveStreamAndBridgeExits, GondowanCaveExits, HammetPalaceExits, ImilExits, ImilFuchinFallsExits, KalayExits, KalayTolbiDocksExits, KolimaExits, KolimaForestCliffExits, KolimaForestEntranceExits, KolimaForestFloodgateExits, KolimaForestGladeExits, KolimaForestTreeExits, LacquerRoomsBExits, LaliveroExits, LamakanDesertExits, LemurianShipExits, LogRoomsAExits, LogRoomsBExits, LogRoomsCExits, LunpaExits, LunpaFortressCaveAndToadonpaExits, LunpaFortressExitsOther, LunpaFortressGatesExits, LunpaFortressUpperFloorExits, McCoyPalaceExits and 49 more.

Definition at line 113 of file scene_tables.h.

SCENE_EXIT

#define SCENE_EXIT(exit, map, entrance)

One exit: exit kind exit leads to entrance of the scene scene, both named in scene_exits.h.

Referenced by AlpineCrossingLamaTempleExits, AltinExits, AltinPeakExits, AltmillerCaveExits, BabiLighthouseExits, BabiPalaceExits, BilibinCaveExits, BilibinExits, ColosseumAzartMatchExits, ColosseumEntranceExits, ColosseumNavampaMatchExits, ColosseumSatrageMatchExits, CottageRoomsAExits, CottageRoomsAStormExits, CottageRoomsBExits, CottageRoomsBStormExits, CottageRoomsCExits, CrossboneIsleExits, CrossboneIsleKeysExits, CrossboneIsleSteppingStonesExits, FuchinTempleExits, GomaCaveEntranceExits, GomaCavePillarExits, GomaCavePondExits, GomaCaveStreamAndBridgeExits, GondowanCaveExits, HammetPalaceExits, ImilExits, ImilFuchinFallsExits, KalayExits, KalayTolbiDocksExits, KolimaExits, KolimaForestCliffExits, KolimaForestEntranceExits, KolimaForestFloodgateExits, KolimaForestGladeExits, KolimaForestTreeExits, LacquerRoomsBExits, LaliveroExits, LamakanDesertExits, LemurianShipExits, LogRoomsAExits, LogRoomsBExits, LogRoomsCExits, LunpaExits, LunpaFortressCaveAndToadonpaExits, LunpaFortressExitsOther, LunpaFortressGatesExits, LunpaFortressUpperFloorExits, McCoyPalaceExits and 46 more.

Definition at line 116 of file scene_tables.h.

EXIT_SCENE_MASK

#define EXIT_SCENE_MASK 0xfff

An exit word's scene.

Referenced by gmTakeExit().

Definition at line 120 of file scene_tables.h.

ENTRANCE

#define ENTRANCE(word) (((word) & 0xff000) >> 12)

An exit word's entrance.

Referenced by gmTakeExit().

Definition at line 122 of file scene_tables.h.

EXIT_ID

#define EXIT_ID(word) (((word) & 0x0ff00000) >> 20)

An exit word's exit kind.

Referenced by gmTakeExit().

Definition at line 124 of file scene_tables.h.

EXIT_HAS_FLAG

#define EXIT_HAS_FLAG 0x10000000

An exit word's bit 28: a flag word follows it.

Referenced by gmTakeExit().

Definition at line 126 of file scene_tables.h.

EXIT_ID_ANY

#define EXIT_ID_ANY 255

The exit kind that matches whatever exit the scene ended on.

Referenced by gmTakeExit().

Definition at line 128 of file scene_tables.h.

SCENE_EXIT_UNLESS

#define SCENE_EXIT_UNLESS(exit, map, entrance, flag)

An exit with a flag word after it: the exit is taken unless flag is set, and when it is set the search goes on to the next exit.

Referenced by SolSanctumEntranceExits and TolbiSpringExits.

Definition at line 131 of file scene_tables.h.

EXIT_FLAG_NONE

#define EXIT_FLAG_NONE 0xffffffff

SCENE_EXIT_UNLESS's flag for no flag: gmFlagGetStub reads it as flag 0xfff, which nothing sets, so the exit is always taken.

Referenced by SolSanctumEntranceExits and TolbiSpringExits.

Definition at line 135 of file scene_tables.h.

SCENE_EXITS_END

#define SCENE_EXITS_END 511

The last header word: it ends the last scene's exits and the table.

Referenced by AlpineCrossingLamaTempleExits, AltinExits, AltinPeakExits, AltmillerCaveExits, BabiLighthouseExits, BabiPalaceExits, BattleArenaExits, BilibinCaveExits, BilibinExits, ColosseumAzartMatchExits, ColosseumEntranceExits, ColosseumNavampaMatchExits, ColosseumSatrageMatchExits, CottageRoomsAExits, CottageRoomsAStormExits, CottageRoomsBExits, CottageRoomsBStormExits, CottageRoomsCExits, CrossboneIsleExits, CrossboneIsleKeysExits, CrossboneIsleSteppingStonesExits, FileScreenExits, FuchinTempleExits, gmTakeExit(), GomaCaveEntranceExits, GomaCavePillarExits, GomaCavePondExits, GomaCaveStreamAndBridgeExits, GondowanCaveExits, HammetPalaceExits, ImilExits, ImilFuchinFallsExits, IncreaseItemAndLevelExits, KalayExits, KalayTolbiDocksExits, KolimaExits, KolimaForestCliffExits, KolimaForestEntranceExits, KolimaForestFloodgateExits, KolimaForestGladeExits, KolimaForestTreeExits, LacquerRoomsBExits, LaliveroExits, LamakanDesertExits, LemurianShipExits, LogRoomsAExits, LogRoomsBExits, LogRoomsCExits, LunpaExits, LunpaFortressCaveAndToadonpaExits and 56 more.

Definition at line 137 of file scene_tables.h.

EXIT_METATILE_BEHAVIOR_OFFSET

#define EXIT_METATILE_BEHAVIOR_OFFSET 50

Where a scene numbers its door or exit metatiles by their exits (Imil, Mercury Lighthouse), each one's metatile behavior is its exit's number plus this.

Referenced by ImilTownCues, MercuryLighthouseEntranceCues, MercuryLighthouseExteriorCues, MercuryLighthouseLowerCues, MercuryLighthouseMiddleCues, MercuryLighthouseUpperCues, scImilOpenDoorAndExit(), scMercuryLighthouseWaterfallToGapRoom(), scMercuryLighthouseWaterfallToSleetsRoom() and scMercuryLighthouseWaterfallToUpperPath().

Definition at line 141 of file scene_tables.h.

EXIT_TO_BATTLE

#define EXIT_TO_BATTLE(exit, group)

An exit into a battle: exit kind exit fights formation group.

Referenced by SolSanctumLunaSolRoomsExits and SolSanctumStatueExits.

Definition at line 158 of file scene_tables.h.

ACTOR_PLACEMENT

#define ACTOR_PLACEMENT(

One row of a scene's actor placements, its spot in plain pixels.

Referenced by AlpineCrossingActorPlacements, AltinActorPlacements, AltinPeakFallingRocksActorPlacements, AltinPeakFirstWaterBeastActorPlacements, AltinPeakHydrosStatueActorPlacements, AltinPeakJunctionActorPlacements, AltinPeakPoolActorPlacements, AltinPeakSecondWaterBeastActorPlacements, AltinPeakSpritzActorPlacements, AltinPeakThirdWaterBeastActorPlacements, AltinPeakWestExitActorPlacements, AltmillerCaveBabiActorPlacements, AltmillerCaveDraughtActorPlacements, AltmillerCaveSquallActorPlacements, BabiLighthouseEntryActorPlacements, BabiLighthouseLuffActorPlacements, BabiLighthouseRoadActorPlacements, BabiLighthouseStoneDoorActorPlacements, BabiPalaceActorPlacementsAfterColosso, BabiPalaceActorPlacementsBabiMissing, BabiPalaceActorPlacementsFinals, BabiPalaceOutsideActorPlacements, BattleArenaActorPlacements, BattleArenaBattleActorPlacements, BilibinActorPlacements, BilibinBarricadeActorPlacements, BilibinCaveEntranceActorPlacements, BilibinCaveIceActorPlacements, BilibinCaveRapierActorPlacements, BilibinTreasuryActorPlacements, ColosseumActorPlacements, ColosseumActorPlacementsFromColosseumAzartMatchWest, ColosseumActorPlacementsFromColosseumNavampaMatch, ColosseumAzartMatchActorPlacements, ColosseumEntranceActorPlacements, ColosseumEntranceActorPlacementsAfterColosso, ColosseumEntranceActorPlacementsFinalsDay, ColosseumEntranceActorPlacementsOther, ColosseumNavampaMatchActorPlacements, ColosseumSatrageMatchActorPlacements, ColosseumSoldiersActorPlacements, ColosseumStandsActorPlacements, ColosseumTrialGroundsActorPlacements, CottageRoomsAActorPlacements, CottageRoomsAActorPlacementsAfterKalay, CottageRoomsAActorPlacementsAfterLeaving, CottageRoomsBActorPlacements, CottageRoomsBActorPlacementsAfterKalay, CottageRoomsBActorPlacementsAfterLeaving, CottageRoomsBBabiScholarsActorPlacements and 193 more.

Definition at line 180 of file scene_tables.h.

ACTOR_PLACEMENT_SHARE_PREVIOUS_SPRITE

#define ACTOR_PLACEMENT_SHARE_PREVIOUS_SPRITE 0x01

ACTOR_PLACE.flags: the actor takes the previous actor's sprite resource instead of loading its own, when both are single sprites.

Referenced by AltinActorPlacements, BabiLighthouseEntryActorPlacements, BattleArenaActorPlacements, BattleArenaBattleActorPlacements, BilibinCaveIceActorPlacements, ColosseumEntranceActorPlacements, ColosseumEntranceActorPlacementsFinalsDay, ColosseumNavampaMatchActorPlacements, ColosseumSatrageMatchActorPlacements, ColosseumStandsActorPlacements, ColosseumTrialGroundsActorPlacements, CottageRoomsAActorPlacementsAfterKalay, CrossboneIsleBaneActorPlacements, CrossboneIsleFloatingLogsActorPlacements, fdScriptSpawnActorPlacements(), GomaCaveEntranceActorPlacements, KolimaActorPlacements, KolimaForestEntranceActorPlacements, KolimaMoreGroundSparklePlacements, McCoyPalaceActorPlacements, MercuryLighthouseAerieActorPlacements, MercuryLighthouseEntranceActorPlacements, MercuryLighthouseExteriorActorPlacements, MogallForestKillerApeActorPlacements, MogallForestQuartzActorPlacements, MogallForestSignActorPlacements, ShipRoomsFirstAttackMonsters, ShipRoomsRowingDeckActorPlacements, ShipRoomsSecondAttackMonsters, ShipRoomsThirdAttackMonsters, SolSanctumReliefsFirstReliefRoomActorPlacements, SolSanctumReliefsSecondReliefRoomActorPlacements, SolSanctumStatueActorPlacements, SuhallaDesertNorthActorPlacements, SuhallaDesertSouthActorPlacements, TolbiShipDeckActorPlacements, TolbiShipDeckActorPlacementsArrived, TolbiShipDeckActorPlacementsAtSea, TolbiShipDeckActorPlacementsRowing, TolbiShipDeckActorPlacementsWaiting, TolbiShipDeckMonstersBoardActorPlacements, TolbiShipDeckThirdAttackActorPlacements, TolbiShipMastFirstAttackActorPlacements, TunnelRuinsActorPlacementsOther, TunnelRuinsGreatStatueActorPlacements, ValeCaveKiteActorPlacements, ValePrologueActorPlacements, VenusLighthouseAerieActorPlacements, VenusLighthouseFirstFloorActorPlacements, VenusLighthouseFourthFloorActorPlacements and 4 more.

Definition at line 227 of file scene_tables.h.

CUE_SUBJECT_OWN_EFFECT

#define CUE_SUBJECT_OWN_EFFECT 0x400

CUE.subject bit 10: a Psynergy cue runs in place of its field Psynergy, as Mind Read on someone who notices it does, and an examine cue shows no checking message.

Referenced by AltmillerCaveBabiCues, BabiPalaceOutsideCuesFinals, CottageRoomsBCuesAfterKalay, fdExamineMetatile(), fdUseItem(), fdUsePsynergy(), ImilRoomCues, KolimaForestTreeCues, LaliveroCuesAfterLighthouse, LogRoomsACues, LogRoomsBCues, MercuryLighthouseExteriorCues, SuhallaGateCheckpointCues, TimberRoomsCCues, ValeCuesAfterKalay, ValePlazaCuesAfterKalay, VaultRevisitCues, VenusLighthouseEntryCues and WorldMapCues.

Definition at line 264 of file scene_tables.h.

CUE_SUBJECT_FACING

#define CUE_SUBJECT_FACING 0xf000

CUE.subject for an item or Psynergy cue: bits 15 to 12 the leader's facing (an angle's top four bits), heeded only with bit 11 set, and bits 7 to 0 the actor id or metatile behavior it answers.

Referenced by fdFindItemCue() and fdFindPsynergyCue().

Definition at line 269 of file scene_tables.h.

CUE_SUBJECT_NEEDS_FACING

#define CUE_SUBJECT_NEEDS_FACING 0x0800

Referenced by fdFindItemCue() and fdFindPsynergyCue().

Definition at line 270 of file scene_tables.h.

CUE_SUBJECT_TARGET

#define CUE_SUBJECT_TARGET 0xff

Referenced by fdFindItemCue() and fdFindPsynergyCue().

Definition at line 271 of file scene_tables.h.

FIELD_RAISED_CUE_MENUS

#define FIELD_RAISED_CUE_MENUS 250

The raised cue the menus and shortcut keys raise instead of opening while FLAG_MENUS_RAISE_CUE is set, as Vault's inn sets it while the party corners the suspects.

Referenced by fdEngineRun(), fdRequestShortcut() and LogRoomsACues.

Definition at line 306 of file scene_tables.h.

STEP_CUE_FLAG_WALKING

#define STEP_CUE_FLAG_WALKING 0x200

A step cue that needs the leader to have pushed against it for more than FIELD_PUSH_TICKS ticks, or 2 with STEP_CUE_FLAG_QUICK.

Referenced by AltmillerCaveDraughtCues, AltmillerCaveSquallCues, BabiLighthouseEntryCues, BabiLighthouseRoadCues, CrossboneIsleBaneCues, CrossboneIsleDragonStatueCues, CrossboneIsleFloodgateCues, CrossboneIsleFloorCues, CrossboneIsleIcePillarsCues, CrossboneIsleIsleCues, CrossboneIsleStackedPillarsCues, CrossboneIsleSteppingStonesCues, fdFindCue(), fdRunStepCueOrExit(), GomaCavePillarCues, GondowanCaveCues, KalayTunnelCues, KolimaForestCliffCues, KolimaForestEntranceCues, KolimaForestFloodgateCues, KolimaForestGladeCues, TreeRoomsCues, TunnelRuinsCuesOther, TunnelRuinsGreatStatueCues, ValeCaveKiteCues, ValeCaveLogsCues, VaultCaveMouthCues, VaultCaveVambraceCues, VenusLighthouseAerieCues, VenusLighthouseFirstFloorCues, VenusLighthouseFourthFloorCues, VenusLighthouseGroundFloorCues, VenusLighthouseSecondFloorCues, VenusLighthouseThirdFloorCues and XianCues.

Definition at line 310 of file scene_tables.h.

STEP_CUE_FLAG_QUICK

#define STEP_CUE_FLAG_QUICK 0x800

With STEP_CUE_FLAG_WALKING, 2 ticks of pushing are enough.

Referenced by fdFindCue(), MercuryLighthouseEntranceCues, MercuryLighthouseLowerCues and TretTreeBranchCues.

Definition at line 312 of file scene_tables.h.

CUE_FLAG_FACING

#define CUE_FLAG_FACING 0x400

A script that needs the leader to face within an eighth of a turn of the heading in control bits 15..12 (fdFindCue).

Referenced by ColosseumAzartMatchCues, ColosseumNavampaMatchCues, ColosseumSatrageMatchCues, CottageRoomsACues, CottageRoomsACuesAfterKalay, CottageRoomsACuesAfterLeaving, CottageRoomsAStormCues, CottageRoomsBCues, CottageRoomsBCuesAfterKalay, CottageRoomsBCuesAfterLeaving, CottageRoomsBStormCues, fdFindCue(), LacquerRoomsBCues, LogRoomsACues, LogRoomsACuesAfterThieves, LogRoomsBCues, ShipRoomsCaptainsQuartersCues, SuhallaGateDewCues, TolbiCuesAfterColosso, TolbiCuesFestival, TolbiCuesFinalsDay, TreeRoomsCues and WorldMapCues.

Definition at line 315 of file scene_tables.h.

STEP_CUE_WALKING

#define STEP_CUE_WALKING (CUE_STEP | STEP_CUE_FLAG_WALKING)

Referenced by BilibinBarricadeCues, BilibinCaveIceCues, BilibinCues, BilibinTreasuryCues, ColosseumAzartMatchCues, ColosseumNavampaMatchCues, ColosseumSatrageMatchCues, LogRoomsACues, LunpaFortressCaveCues, MercuryLighthouseAerieCues, MercuryLighthouseEntranceCues, MercuryLighthouseLowerCues, MercuryLighthouseMiddleCues, MercuryLighthouseUpperCues, MogallForestKillerApeCues, MogallForestQuartzCues, MogallForestSignCues, SolSanctumReliefsFirstReliefRoomCues, SolSanctumReliefsSecondReliefRoomCues, SolSanctumStatueCues and TretTreeBranchCues.

Definition at line 316 of file scene_tables.h.

STEP_CUE_FACING

#define STEP_CUE_FACING(facing) (CUE_STEP | CUE_FLAG_FACING | (facing))

facing is a FACING; only its top four bits are compared.

Referenced by AltinCues, FuchinTempleCues, LunpaFortressCaveCues, LunpaFortressCuesOther, LunpaFortressGroundFloorCues, LunpaFortressUpperFloorCues and McCoyPalaceCues.

Definition at line 318 of file scene_tables.h.

STEP_CUE_WALKING_INTO

#define STEP_CUE_WALKING_INTO(facing)

Referenced by AltinCues, AltinPeakSpritzCues, AltmillerCaveSquallCues, BabiLighthouseEntryCues, BabiLighthouseLuffCues, BabiPalaceCuesAfterColosso, BabiPalaceCuesBabiMissing, BabiPalaceCuesFinals, BabiPalaceOutsideCuesAfterColosso, BabiPalaceOutsideCuesBabiMissing, BabiPalaceOutsideCuesFinals, BilibinBarricadeCues, BilibinCaveIceCues, BilibinCues, BilibinTreasuryCues, ColosseumAzartMatchCues, ColosseumSatrageMatchCues, CrossboneIsleFloatingLogsCues, CrossboneIsleFloorCues, CrossboneIsleKeysRoomCues, CrossboneIslePirateShipCues, CrossboneIsleStackedPillarsCues, FuchinTempleCues, FuchinTempleGroundsCues, GomaCaveEntranceCues, GomaCavePillarCues, GondowanCaveCues, HammetPalaceCues, ImilFuchinFallsArcticBladeRoomCues, ImilFuchinFallsDragonsEyeRoomCues, ImilFuchinFallsEntranceCues, ImilFuchinFallsZephyrRoomCues, ImilTownCues, KalayHammetPalaceCues, KalayTolbiDocksKalayCues, KalayTolbiDocksKalayCuesShipGone, KalayTolbiDocksTolbiCues, KalayTolbiDocksTolbiCuesStranded, KalayTownCues, KalayTunnelCues, KolimaCues, KolimaForestCliffCues, KolimaForestEntranceCues, KolimaForestFloodgateCues, LaliveroCues, LaliveroCuesAfterLighthouse, LamaTempleCues, LunpaFortressCaveCues, McCoyPalaceGroundsCues, MercuryLighthouseEntranceCues and 48 more.

Definition at line 319 of file scene_tables.h.

PSYNERGY_CUE

#define PSYNERGY_CUE(phase) ((phase) << 28 | CUE_PSYNERGY)

The control word of a Psynergy cue (CUE_PSYNERGY) in the given phase, as fdFindPsynergyCue compares it (bits 30..28 phase | 3..0 kind).

Referenced by fdPsynergyEndReveal(), fdPsynergyForce(), fdPsynergyFrost(), fdPsynergyReveal(), fdRunPsynergyEndScripts() and fdUsePsynergy().

Definition at line 348 of file scene_tables.h.

PSYNERGY_CUE_ANY

#define PSYNERGY_CUE_ANY PSYNERGY_CUE(PSYNERGY_PHASE_ANY)

Referenced by fdFindPsynergyCue() and fdHasPsynergyCue().

Definition at line 349 of file scene_tables.h.

CUE_PSYNERGY_ON_ACTOR

#define CUE_PSYNERGY_ON_ACTOR 0x10

A Psynergy cue on the actor the leader faces.

Referenced by fdFindPsynergyCue().

Definition at line 352 of file scene_tables.h.

PSYNERGY_ON_ACTOR

#define PSYNERGY_ON_ACTOR(ability)

Referenced by AlpineCrossingCues, AltinCues, AltinPeakFallingRocksCues, AltinPeakFirstWaterBeastCues, AltinPeakFirstWaterBeastCuesDrained, AltinPeakJunctionCues, AltinPeakPoolCues, AltinPeakSecondWaterBeastCues, AltinPeakSpritzCues, AltinPeakThirdWaterBeastCues, AltinPeakWestExitCues, AltmillerCaveBabiCues, AltmillerCaveSquallCues, BabiLighthouseEntryCues, BabiLighthouseRoadCues, BabiLighthouseStoneDoorCues, BabiPalaceCuesAfterColosso, BabiPalaceCuesBabiMissing, BabiPalaceCuesFinals, BabiPalaceOutsideCuesAfterColosso, BabiPalaceOutsideCuesBabiMissing, BabiPalaceOutsideCuesFinals, BilibinBarricadeCues, BilibinCaveEntranceCues, BilibinCaveIceCues, BilibinCaveRapierCues, BilibinCues, BilibinTreasuryCues, ColosseumAzartMatchCues, ColosseumCues, ColosseumEntranceCues, ColosseumNavampaMatchCues, ColosseumSatrageMatchCues, CottageRoomsACuesAfterKalay, CottageRoomsACuesAfterLeaving, CottageRoomsBBabiScholarsCues, CottageRoomsBBabiScholarsLaterCues, CottageRoomsBCuesAfterKalay, CottageRoomsBCuesAfterLeaving, CottageRoomsCTriggers, CottageRoomsDCues, CrossboneIsleBaneCues, CrossboneIsleDragonStatueCues, CrossboneIsleFloorCues, CrossboneIsleIsleCues, CrossboneIsleKeysRoomCues, CrossboneIsleStackedPillarsCues, CrossboneIsleStatuesCues, CrossboneIsleSteppingStonesCues, FuchinTempleCues and 131 more.

Definition at line 353 of file scene_tables.h.

PSYNERGY_PHASE_ON_ACTOR

#define PSYNERGY_PHASE_ON_ACTOR(ability, phase)

A Psynergy cue on an actor at one phase of the cast, as PSYNERGY_ANYWHERE is for any target.

Referenced by AlpineCrossingCues, AltmillerCaveSquallCues, BabiLighthouseRoadCues, ColosseumNavampaMatchCues, ColosseumSatrageMatchCues, CrossboneIsleDragonStatueCues, IncreaseItemAndLevelCues, MenuTestCues, SolSanctumStatueCues, SuhallaDesertCuesOther, TunnelRuinsCuesOther, TunnelRuinsGreatStatueCues, VenusLighthouseFirstFloorCues, WorldMapCues and XianCues.

Definition at line 366 of file scene_tables.h.

CUE_PSYNERGY_ANYWHERE

#define CUE_PSYNERGY_ANYWHERE 0x80

A Psynergy cue for any target, not a particular actor or metatile.

Referenced by fdFindPsynergyCue().

Definition at line 370 of file scene_tables.h.

PSYNERGY_ANYWHERE

#define PSYNERGY_ANYWHERE(ability, phase)

Referenced by AlpineCrossingCues, AltmillerCaveBabiCues, AltmillerCaveCookieChestCues, AltmillerCaveCuesOther, AltmillerCaveDraughtCues, AltmillerCaveVialChestCues, BabiLighthouseStoneDoorCues, BilibinCaveRapierCues, CrossboneIsleKeysRoomCues, CrossboneIsleStatuesCues, ImilFuchinFallsDragonRoomCues, LamakanDesertCues, LamaTempleCues, LemurianShipCues, LunpaFortressCaveCues, LunpaFortressGatesCues, MercuryLighthouseEntranceCues, MercuryLighthouseExteriorCues, MercuryLighthouseLowerCues, MercuryLighthouseMiddleCues, MercuryLighthouseUpperCues, SuhallaDesertCuesOther, TolbiCuesAfterColosso, TolbiCuesFestival, TolbiCuesFinalsDay, TreeRoomsCues, TretTreeBranchCues, TunnelRuinsCuesOther, ValeCaveKiteCues, VaultRevisitCues and VenusLighthouseGroundFloorCues.

Definition at line 371 of file scene_tables.h.

CUE_ITEM_ON_ACTOR

#define CUE_ITEM_ON_ACTOR 0x10

Using an item (one byte) on a metatile behavior, or on an actor, as fdFindItemCue reads them.

Referenced by fdFindItemCue().

Definition at line 377 of file scene_tables.h.

USE_ITEM

#define USE_ITEM(item) (CUE_ITEM | (item) << 8)

Referenced by ImilFuchinFallsDragonRoomCues, LemurianShipCues, MercuryLighthouseExteriorCues, SolSanctumReliefsCues, SolSanctumReliefsSecondReliefRoomCues and WorldMapCues.

Definition at line 378 of file scene_tables.h.

USE_ITEM_ON_ACTOR

#define USE_ITEM_ON_ACTOR(item) (CUE_ITEM | CUE_ITEM_ON_ACTOR | (item) << 8)

Referenced by KolimaForestTreeCues, ShipRoomsCaptainsQuartersCues, VaultCuesAfterThieves and VaultRevisitCues.

Definition at line 379 of file scene_tables.h.

EXAMINE_CUE

#define EXAMINE_CUE(target) (CUE_EXAMINE | (target) << 4)

An examine cue: the leader presses A at target (EXAMINE) ahead, when it is no actor.

Referenced by AlpineCrossingCues, AltinPeakFallingRocksCues, AltinPeakHydrosStatueCues, AltinPeakJunctionCues, AltinPeakPoolCues, AltinPeakSecondWaterBeastCues, AltinPeakSpritzCues, AltinPeakThirdWaterBeastCues, AltinPeakWestExitCues, AltmillerCaveBabiCues, AltmillerCaveCookieChestCues, AltmillerCaveDraughtCues, AltmillerCaveVialChestCues, BabiLighthouseLuffCues, BabiLighthouseStoneDoorCues, BabiPalaceCuesAfterColosso, BabiPalaceCuesBabiMissing, BabiPalaceCuesFinals, BabiPalaceOutsideCuesAfterColosso, BabiPalaceOutsideCuesBabiMissing, BabiPalaceOutsideCuesFinals, BilibinBarricadeCues, BilibinCaveIceCues, BilibinCaveRapierCues, BilibinCues, BilibinTreasuryCues, ColosseumAzartMatchCues, ColosseumCues, ColosseumNavampaMatchCues, ColosseumSatrageMatchCues, CottageRoomsACues, CottageRoomsACuesAfterKalay, CottageRoomsACuesAfterLeaving, CottageRoomsAStormCues, CottageRoomsBBabiScholarsCues, CottageRoomsBBabiScholarsLaterCues, CottageRoomsBCues, CottageRoomsBCuesAfterKalay, CottageRoomsBCuesAfterLeaving, CottageRoomsBStormCues, CottageRoomsCTriggers, CottageRoomsDCues, CrossboneIsleBaneCues, CrossboneIsleDragonStatueCues, CrossboneIsleFloatingLogsCues, CrossboneIsleFloodgateCues, CrossboneIsleFloorCues, CrossboneIsleIcePillarsCues, CrossboneIsleKeysRoomCues, CrossboneIslePirateShipCues and 122 more.

Definition at line 383 of file scene_tables.h.

EXAMINE_CUE_FACING

#define EXAMINE_CUE_FACING(facing) (CUE_EXAMINE | CUE_FLAG_FACING | (facing))

An examine cue searched while facing the given way, as a counter is searched across.

Referenced by ImilRoomCues and LamaTempleCues.

Definition at line 386 of file scene_tables.h.

EXAMINE_CHEST_FACING

#define EXAMINE_CHEST_FACING(facing)

A chest searched while facing the given way.

Referenced by AltinPeakThirdWaterBeastCues, BabiLighthouseRoadCues, CrossboneIsleFloodgateCues, CrossboneIsleIsleCues, CrossboneIsleStackedPillarsCues and LaliveroCues.

Definition at line 388 of file scene_tables.h.

TALK_CUE_FACING

#define TALK_CUE_FACING(facing) (CUE_TALK | CUE_FLAG_FACING | (facing))

A talk cue that answers only while the leader faces the given way, so one actor can answer differently from each side.

Referenced by KalayTolbiDocksKalayCues.

Definition at line 392 of file scene_tables.h.

FIND_ITEM

#define FIND_ITEM(item) (0x00100000 | (item))

What a search finds, an examine cue's value: a function when bits 27..24 are set, else a type in its top twelve bits.

Referenced by AlpineCrossingCues, AltinPeakHydrosStatueCues, AltinPeakJunctionCues, AltinPeakSecondWaterBeastCues, AltinPeakSpritzCues, AltinPeakThirdWaterBeastCues, AltinPeakWestExitCues, AltmillerCaveCookieChestCues, AltmillerCaveDraughtCues, AltmillerCaveVialChestCues, BabiLighthouseRoadCues, BabiPalaceCuesAfterColosso, BabiPalaceCuesBabiMissing, BabiPalaceCuesFinals, BilibinCaveIceCues, BilibinCaveRapierCues, BilibinCues, ColosseumAzartMatchCues, ColosseumNavampaMatchCues, ColosseumSatrageMatchCues, CottageRoomsACues, CottageRoomsACuesAfterKalay, CottageRoomsACuesAfterLeaving, CottageRoomsBBabiScholarsCues, CottageRoomsBBabiScholarsLaterCues, CottageRoomsBCues, CottageRoomsBCuesAfterKalay, CottageRoomsBCuesAfterLeaving, CottageRoomsCTriggers, CottageRoomsDCues, CrossboneIsleBaneCues, CrossboneIsleDragonStatueCues, CrossboneIsleFloatingLogsCues, CrossboneIsleFloodgateCues, CrossboneIsleIcePillarsCues, CrossboneIsleIsleCues, CrossboneIsleKeysRoomCues, CrossboneIslePirateShipCues, CrossboneIsleStackedPillarsCues, CrossboneIsleStatuesCues, CrossboneIsleSteppingStonesCues, fdEffectSpawnRevealMarkers(), FuchinTempleCues, GomaCavePillarCues, GomaCaveStreamCues, GondowanCaveCues, GondowanCaveRiverCues, GondowanPassageCues, GondowanPassageCuesWithIodem, HammetPalaceCues and 71 more.

Definition at line 435 of file scene_tables.h.

FIND_COINS

#define FIND_COINS(coins) (0x00200000 | (coins))

Referenced by BilibinCues, CottageRoomsACues, CottageRoomsACuesAfterKalay, CottageRoomsACuesAfterLeaving, CottageRoomsBCues, CottageRoomsBCuesAfterKalay, CottageRoomsBCuesAfterLeaving, CottageRoomsDCues, CrossboneIsleBaneCues, CrossboneIsleDragonStatueCues, CrossboneIsleFloatingLogsCues, CrossboneIsleFloodgateCues, CrossboneIsleIcePillarsCues, CrossboneIsleIsleCues, CrossboneIsleKeysRoomCues, CrossboneIsleStackedPillarsCues, CrossboneIsleStatuesCues, CrossboneIsleSteppingStonesCues, fdEffectSpawnRevealMarkers(), fdExamineMetatile(), FuchinTempleCuesFromLamaTemple, ImilTownCues, KalayTolbiDocksTolbiCues, KalayTolbiDocksTolbiCuesStranded, KalayTunnelCues, LamakanDesertCues, LogRoomsACues, LogRoomsACuesAfterThieves, LogRoomsBCues, LogRoomsCCues, LunpaFortressGroundFloorCues, ShipRoomsHoldCues, ShipRoomsHoldCuesAtIsland, ShipRoomsHoldCuesChoosingRowers, StoneRoomsThiefCues, StuccoRoomsAHouseCues, StuccoRoomsAInnCues, SuhallaCues, SuhallaCuesLater, TolbiCuesAfterColosso, TolbiCuesFestival and TolbiCuesFinalsDay.

Definition at line 436 of file scene_tables.h.

FIND_PSYNERGY_STONE

#define FIND_PSYNERGY_STONE 0x00300000

A Psynergy Stone, which restores all PP.

Referenced by CottageRoomsBCuesAfterKalay, fdEffectSpawnRevealMarkers(), fdExamineMetatile(), fdPlaceTreasureSpots(), FuchinTempleGroundsCues, GatewayCaveCues, LamakanDesertCues, LamaTempleCues, MercuryLighthouseAerieCues, MogallForestSidePathsCues, SolSanctumPsynergyStoneCues, SuhallaDesertCuesOther, TreeRoomsCues, VenusLighthouseFirstFloorCues and VenusLighthouseFourthFloorCues.

Definition at line 438 of file scene_tables.h.

FIND_MESSAGE

#define FIND_MESSAGE(message) (0x00400000 | (message))

Referenced by BabiPalaceCuesAfterColosso, BabiPalaceCuesBabiMissing, BabiPalaceCuesFinals, BilibinBarricadeCues, ColosseumCues, CottageRoomsACues, CottageRoomsACuesAfterKalay, CottageRoomsACuesAfterLeaving, CottageRoomsAStormCues, CottageRoomsBBabiScholarsCues, CottageRoomsBBabiScholarsLaterCues, CottageRoomsBCues, CottageRoomsBCuesAfterKalay, CottageRoomsBCuesAfterLeaving, CottageRoomsBStormCues, CottageRoomsCTriggers, CottageRoomsDCues, fdExamineMetatile(), HammetPalaceCues, ImilRoomCues, LacquerRoomsBCues, LogRoomsACues, LogRoomsACuesAfterThieves, LogRoomsBCues, LogRoomsCCues, McCoyPalaceCues, RockRoomsReopenedCues, RockRoomsSealedCues, StuccoRoomsAHouseCues, StuccoRoomsAInnCues, StuccoRoomsBCuesAfterColosso, StuccoRoomsBCuesFestival, StuccoRoomsBCuesFinalsDay, TimberRoomsATriggers, TimberRoomsATriggersAfterColosso, TimberRoomsBCues, TimberRoomsBCuesAfterLighthouse, TimberRoomsCCues and TimberRoomsCCuesAfterLighthouse.

Definition at line 439 of file scene_tables.h.

FIND_MIMIC

#define FIND_MIMIC 0x00500000

A mimic chest's battle, with the script's value its slot of ENCOUNTER_ZONE_MIMIC.

Referenced by AltinPeakPoolCues, AltmillerCaveBabiCues, CrossboneIsleFloorCues, CrossboneIslePirateShipCues, fdEffectSpawnRevealMarkers(), fdExamineCueIgnoresCondition(), fdExamineMetatile(), fdPlaceTreasureSpots(), ImilFuchinFallsEntranceCues, MercuryLighthouseEntranceCues, SuhallaDesertCuesOther and VaultCavePassageCues.

Definition at line 442 of file scene_tables.h.

SCRIPT_REF

#define SCRIPT_REF(script) ((Uint32)(script))

A script as a cue's value: its address lies above CUE_RESULT_MESSAGE_END, so it is never taken for a message.

Referenced by AlpineCrossingCues, AltinCues, AltinPeakFallingRocksCues, AltinPeakFirstWaterBeastCues, AltinPeakFirstWaterBeastCuesDrained, AltinPeakHydrosStatueCues, AltinPeakPoolCues, AltinPeakSecondWaterBeastCues, AltinPeakSpritzCues, AltinPeakThirdWaterBeastCues, AltmillerCaveBabiCues, AltmillerCaveCookieChestCues, AltmillerCaveCuesOther, AltmillerCaveDraughtCues, AltmillerCaveSquallCues, AltmillerCaveVialChestCues, BabiLighthouseEntryCues, BabiLighthouseLuffCues, BabiLighthouseRoadCues, BabiLighthouseStoneDoorCues, BabiPalaceCuesAfterColosso, BabiPalaceCuesBabiMissing, BabiPalaceCuesFinals, BabiPalaceOutsideCuesAfterColosso, BabiPalaceOutsideCuesBabiMissing, BabiPalaceOutsideCuesFinals, BattleArenaCues, BilibinBarricadeCues, BilibinCaveEntranceCues, BilibinCaveIceCues, BilibinCaveRapierCues, BilibinCues, BilibinTreasuryCues, ColosseumAzartMatchCues, ColosseumCues, ColosseumCuesFromColosseumAzartMatchWest, ColosseumEntranceCues, ColosseumNavampaMatchCues, ColosseumSatrageMatchCues, CottageRoomsACues, CottageRoomsACuesAfterKalay, CottageRoomsACuesAfterLeaving, CottageRoomsAStormCues, CottageRoomsBBabiScholarsLaterCues, CottageRoomsBCues, CottageRoomsBCuesAfterKalay, CottageRoomsBCuesAfterLeaving, CottageRoomsBStormCues, CottageRoomsCTriggers, CottageRoomsDCues and 166 more.

Definition at line 446 of file scene_tables.h.

CUE_TABLE_END

#define CUE_TABLE_END 0xffffffff

Referenced by AlpineCrossingCues, AltinCues, AltinNoCues, AltinPeakCuesOther, AltinPeakFallingRocksCues, AltinPeakFirstWaterBeastCues, AltinPeakFirstWaterBeastCuesDrained, AltinPeakHydrosStatueCues, AltinPeakJunctionCues, AltinPeakPoolCues, AltinPeakRailTunnelCues, AltinPeakSecondWaterBeastCues, AltinPeakSouthEntranceCues, AltinPeakSpritzCues, AltinPeakThirdWaterBeastCues, AltinPeakWestExitCues, AltmillerCaveBabiCues, AltmillerCaveCookieChestCues, AltmillerCaveCuesOther, AltmillerCaveDraughtCues, AltmillerCaveSquallCues, AltmillerCaveVialChestCues, BabiLighthouseEntryCues, BabiLighthouseLuffCues, BabiLighthouseRoadCues, BabiLighthouseStoneDoorCues, BabiPalaceCuesAfterColosso, BabiPalaceCuesBabiMissing, BabiPalaceCuesFinals, BabiPalaceOutsideCuesAfterColosso, BabiPalaceOutsideCuesBabiMissing, BabiPalaceOutsideCuesFinals, BattleArenaCues, BilibinBarricadeCues, BilibinCaveCuesOther, BilibinCaveEntranceCues, BilibinCaveIceCues, BilibinCaveRapierCues, BilibinCues, BilibinCuesOther, BilibinTreasuryCues, ColosseumAzartMatchCues, ColosseumCues, ColosseumCuesFromColosseumAzartMatchWest, ColosseumEntranceCues, ColosseumEntranceCuesOther, ColosseumNavampaMatchCues, ColosseumSatrageMatchCues, ColosseumTunnelCues, CottageRoomsACues and 221 more.

Definition at line 447 of file scene_tables.h.

ENCOUNTER_BATTLE_MUSIC_MARKER

#define ENCOUNTER_BATTLE_MUSIC_MARKER 0x8000

The bit that marks a song in EncounterBattleMusic; encounter keys have it clear.

Referenced by fdEncounterSelectBattleMusic().

Definition at line 545 of file scene_tables.h.

ENCOUNTER_BATTLE_MUSIC_MASK

#define ENCOUNTER_BATTLE_MUSIC_MASK 0xfff

The bits of a song marker that hold the song.

Referenced by fdEncounterSelectBattleMusic().

Definition at line 548 of file scene_tables.h.

ENCOUNTER_BATTLE_MUSIC

#define ENCOUNTER_BATTLE_MUSIC(song) (ENCOUNTER_BATTLE_MUSIC_MARKER | (song))

A song marker in EncounterBattleMusic: the song (a MUS_ id) with ENCOUNTER_BATTLE_MUSIC_MARKER set.

Referenced by EncounterBattleMusic.

Definition at line 552 of file scene_tables.h.

ENCOUNTER_KEY

#define ENCOUNTER_KEY(zone, slot) (((zone) << 4) + (slot))

The key of one battle: slot of zone (an ENCOUNTER_ZONE_ID).

Referenced by EncounterBattleMusic and fdEncounterSelectBattleMusic().

Definition at line 554 of file scene_tables.h.

Enumerations in detail

FACING

enum FACING

The sixteen compass headings in 1/65536 turns, from east through south: a quarter turn is DEGtoANG(90), and the screen's y axis points south.

EnumeratorValueDescription
FACING_EAST0
FACING_EAST_SOUTHEASTTRIG_TURN / 16
FACING_SOUTHEASTDEGtoANG(45)
FACING_SOUTH_SOUTHEASTTRIG_TURN * 3 / 16
FACING_SOUTHDEGtoANG(90)
FACING_SOUTH_SOUTHWESTTRIG_TURN * 5 / 16
FACING_SOUTHWESTTRIG_TURN * 3 / 8
FACING_WEST_SOUTHWESTTRIG_TURN * 7 / 16
FACING_WESTDEGtoANG(180)
FACING_WEST_NORTHWESTTRIG_TURN * 9 / 16
FACING_NORTHWESTTRIG_TURN * 5 / 8
FACING_NORTH_NORTHWESTTRIG_TURN * 11 / 16
FACING_NORTHTRIG_TURN * 3 / 4
FACING_NORTH_NORTHEASTTRIG_TURN * 13 / 16
FACING_NORTHEASTTRIG_TURN * 7 / 8
FACING_EAST_NORTHEASTTRIG_TURN * 15 / 16

Definition at line 19 of file scene_tables.h.

anonymous enum

enum { FACING_STEP }

A sixteenth of a turn, half the step between two headings.

EnumeratorValueDescription
FACING_STEPTRIG_TURN / 16

Definition at line 40 of file scene_tables.h.

anonymous enum

enum { SCENE_TABLE_END }

In the first column of a scene table, ends the table.

EnumeratorValueDescription
SCENE_TABLE_END-1

Definition at line 68 of file scene_tables.h.

anonymous enum

enum { CONDITION_ALWAYS, CONDITION_IN_VIEW, CONDITION_FLAG_SET }

A table row's condition: CONDITION_ALWAYS, a flag number that must be clear, or IF_FLAG_SET of a flag that must be set (fdGameFlagIsConditionActive).

EnumeratorValueDescription
CONDITION_ALWAYS-1
CONDITION_IN_VIEW0An actor placement's condition that fdAssignViewFlags replaces with whether the actor lies within the map's view bounds, in the scenes that call it, so only the room entered is populated.
CONDITION_FLAG_SET0x1000the flag must be set, not clear

Definition at line 75 of file scene_tables.h.

anonymous enum

enum { ENGINE_NONE, ENGINE_LUCKY_WHEELS, ENGINE_LUCKY_DICE, ENGINE_BATTLE }

Engine ids above the scene table's rows: the engines other than the field engine, which gmMainRoutineRun runs in its place.

EnumeratorValueDescription
ENGINE_NONE507Runs nothing and returns 0; nothing in the game sends the party there.
ENGINE_LUCKY_WHEELS508Lucky Wheels, from its room in Tolbi, SceneIdStuccoRoomsC (lucky_wheels.c).
ENGINE_LUCKY_DICE509Lucky Dice, from its room in Tolbi, SceneIdStuccoRoomsC (lucky_dice.c).
ENGINE_BATTLE510A battle; the entrance is the formation, and the result -1 a defeat.

Definition at line 145 of file scene_tables.h.

MOVEMENT_TYPE

enum MOVEMENT_TYPE

The movement types an actor placement's behavior can name, which fdActorSetMovementType turns into scripts.

EnumeratorValueDescription
MOVEMENT_TYPE_STAND1its script only ends
MOVEMENT_TYPE_WANDER2wanders around home (SC_WANDER_HOME), within 16 pixels
MOVEMENT_TYPE_WANDER_NEAR3as MOVEMENT_TYPE_WANDER, within 8 pixels
MOVEMENT_TYPE_WANDER_CLOSE4paces without stopping, a little slower, within 6 pixels
MOVEMENT_TYPE_FOLLOW_WATCHED5moves toward the watched actor
MOVEMENT_TYPE_FACE_LEADER6watches the leader and turns toward it
MOVEMENT_TYPE_RESET_ACTION7stands with no shadow, and nothing collides with it

Definition at line 197 of file scene_tables.h.

ACTOR_TALK_FACING

enum ACTOR_TALK_FACING

How a placed actor turns when the leader talks to it (fdTalkToActor). With all but TALK_FACING_KEEP the leader stops and each watches the other.

EnumeratorValueDescription
TALK_FACING_PARTY0faces the party and stays so
TALK_FACING_PARTY_AND_BACK1Faces the party, then turns back to its old heading.
TALK_FACING_KEEP2keeps its heading
TALK_FACING_PARTY_THEN_WATCH3Faces the party, then keeps turning to face the leader once the talk is over (ActorFaceWatchedScript).

Definition at line 214 of file scene_tables.h.

ACTOR_ID

enum ACTOR_ID

Actor ids: 0 to 7 the party's characters, the placed actors from 8.

EnumeratorValueDescription
ACTOR_PARTY_LEADER0
ACTOR_GARET1
ACTOR_IVAN2
ACTOR_MIA3
ACTOR_JENNA5
ACTOR_SHEBA6
ACTOR_FIRST_PLACED8
ACTOR_LAST_IDACTOR_ID_COUNT - 1The last actor id, as scenes loop over every placed actor.

Definition at line 230 of file scene_tables.h.

CUE_KIND

enum CUE_KIND

CUE.kind's low four bits: what the cue answers.

EnumeratorValueDescription
CUE_TALK0the A button on an actor; the subject is its id
CUE_EXIT1stepping on subject metatile behavior (no step cue); value is exit kind
CUE_STEP2stepping onto or pushing against a metatile behavior
CUE_EXAMINE3the A button on what is ahead, when it is no actor
CUE_ITEM4an item used on a metatile or an actor
CUE_PSYNERGY5
CUE_RAISED6raised by code through FIELD_STATE.raisedCue
CUE_TALK_HALTED7talking to an actor Halt has stopped (fdFindActorTalkCue)

Definition at line 274 of file scene_tables.h.

EXIT_STYLE

enum EXIT_STYLE

An exit cue's control bits 5..4: how the leader leaves (fdRunStepCueOrExit).

EnumeratorValueDescription
EXIT_STYLE_NORMAL0x00with SE_MAP_EXIT
EXIT_STYLE_SILENT0x10
EXIT_STYLE_STAIRS_UP0x20With SE_STAIRS_UP and ANIM_LEADER_LEAVE; the next scene plays ANIM_LEADER_ARRIVE (FLAG_ARRIVAL_STAIRS_UP).
EXIT_STYLE_STAIRS_DOWN0x30With SE_STAIRS_DOWN and
EXIT_STYLE_MASK0x30ANIM_LEADER_LEAVE_ALTERNATE; the next scene plays ANIM_LEADER_ARRIVE_ALTERNATE (FLAG_ARRIVAL_STAIRS_DOWN).

Definition at line 289 of file scene_tables.h.

PSYNERGY_PHASE

enum PSYNERGY_PHASE

When a Psynergy cue runs around its field Psynergy, control bits 30..28.

EnumeratorValueDescription
PSYNERGY_PHASE_AFTER_CAST0After the field Psynergy (fdUsePsynergy), PSYNERGY_ON_ACTOR's phase. With PSYNERGY_SCRIPT_PLAYS_CAST the script plays the cast itself.
PSYNERGY_PHASE_BEFORE_CAST1Once the PP is paid, before the field Psynergy.
PSYNERGY_PHASE_AFTER_END2After a Psynergy that runs out by itself has ended: fdRunPsynergyEndScripts runs it for a use with ACT_PACKED, as Cloak fades or Reveal runs out.
PSYNERGY_PHASE_BEFORE_END3As PSYNERGY_PHASE_AFTER_END, before it.
PSYNERGY_PHASE_FADES4As Reveal's colours come back (fdPsynergyEndReveal): the scenes hide again what Reveal showed.
PSYNERGY_PHASE_ACTS5A script in this phase also makes fdUsePsynergy aim the field Psynergy at the actor ahead.
PSYNERGY_PHASE_ANY7fdFindPsynergyCue matches every phase.

Definition at line 323 of file scene_tables.h.

PSYNERGY_SCRIPT_TARGET

enum PSYNERGY_SCRIPT_TARGET

Bits of an after-cast Psynergy cue's target word, beside the actor's number.

EnumeratorValueDescription
PSYNERGY_SCRIPT_PLAYS_CAST0x400fdUsePsynergy clears FLAG_PLAY_PSYNERGY_CAST and plays no cast of its own, leaving it to the script.

Definition at line 357 of file scene_tables.h.

EXAMINE

enum EXAMINE

What an examine cue is on, EXAMINE_CUE()'s control bits 8..4: it picks the line fdExamineMetatile shows before the search's result, MsgTileChecked + target ("checked the jar..."), and EXAMINE_SILENT shows none.

EnumeratorValueDescription
EXAMINE_SILENT0
EXAMINE_CHEST1
EXAMINE_JAR
EXAMINE_BARREL
EXAMINE_WALL
EXAMINE_GROUND
EXAMINE_ROCK
EXAMINE_HOLE
EXAMINE_GRAVE
EXAMINE_TREE
EXAMINE_UNDERBRUSH
EXAMINE_DOOR
EXAMINE_CHIMNEY
EXAMINE_WOODEN_BOX
EXAMINE_BED
EXAMINE_BOOKCASE
EXAMINE_STONE_COFFIN
EXAMINE_FIREPLACE
EXAMINE_WATER
EXAMINE_STONE_PILLAR
EXAMINE_STALACTITE
EXAMINE_BOARDS
EXAMINE_FOUNTAIN
EXAMINE_OVEN
EXAMINE_TABLE
EXAMINE_STONE_STATUE
EXAMINE_STONE_TABLET
EXAMINE_SHELF
EXAMINE_WARDROBE
EXAMINE_FIREWOOD
EXAMINE_BOOKS
EXAMINE_WELL

Definition at line 397 of file scene_tables.h.

Variables in detail

SceneRestartRules

extern const Sint16 SceneRestartRules[]

Where the party returns after a defeat: {scene, entrance (-1 any), return scene, return entrance} rows, ended by scene -1 (fdSetRestartPoint).

Referenced by fdSetRestartPoint().

Definition at line 455 of file scene_tables.h.

ScenesWork

extern const SCENE ScenesWork[]

Every scene's row, by scene number (field/scenes.s).

Referenced by gmGetArea(), gmLoadOverlay() and gmMainRoutineRun().

Definition at line 537 of file scene_tables.h.

OverlayArea

extern SCENE_ENTRY_POINTS OverlayArea

The running scene's overlay, loaded into these 32 KB of EWRAM at each scene change; its code opens with its 48-byte entry table.

Referenced by fdApplyEntrance(), fdCheckExitRegions(), fdEffectSpawnRevealMarkers(), fdEngineRun(), fdOverlayCallInit(), fdPlaceTreasureSpots(), gmLoadOverlay() and gmTakeExit().

Definition at line 541 of file scene_tables.h.