Alchemy

field_event.h

games/tbs/include/field_event.h on GitHub

Functions

Actor_SetActionScript

static inline void Actor_SetActionScript(s32 actor, const s32 *script)

The engine encodes either a built-in action or an action-script address.

Used by AltmillerCave_RestoreBabiAndInviteParty, BabiPalace_TalkToIndigestedWarrior, ColosseumEntrance_CelebrateAdvancement, ColosseumEntrance_CelebrateBothWins, ColosseumEntrance_ExplainPartySupport, ColosseumEntrance_ShowClearedTrial, ColosseumEntrance_ShowFailedTrial, ColossoLogRollingStage_SpawnPeriodicParticle, ColossoLog_PlayPostBattleReunion, CrossboneIslePillarRooms_FreezePool, CrossboneIslePillarRooms_RestoreFlaggedPillar, Event_ApproachSuspects, Event_ConfrontSaturosAndMenardi, Event_CrowdRecognizesIsaac, Event_DepartForQuest, Event_DiscussSuspiciousGuests, Event_DoraWakesIsaac, Event_DouseBeginsOnPillar, Event_DouseBeginsOnPillarB, Event_FightTret, Event_FinalsBegin, Event_FreeRooferAndConfrontThieves, Event_GaretComesHome, Event_GaretJoinsIsaac, Event_GatherAfterRiverRescue, Event_HurryToThePlaza, Event_JumpDown, Event_McCoyRewardsParty, Event_MoveGateBlock, Event_PsynergyStoneIsGone, Event_ReturnFromMtAleph, Event_SentToAidElders, Event_StormGivesChase, Event_SuspectedLeaderDodges, Event_SuspectedThiefDodges, Event_TalkAboutRescuingFelix, Event_TravelersLeaveAfterBattle, Event_VillagerAsksForHelp, Event_WarnAgainstSneakingUpMtAleph, Event_WatchBoulderFall and 78 more.

Line 166

Actor_RunActionScriptAndWait

static inline void Actor_RunActionScriptAndWait(s32 actor, const s32 *script)

Runs a script, waiting at most 300 frames for its final command.

Used by ColosseumEntrance_CelebrateAdvancement, ColosseumEntrance_CelebrateBothWins, ColosseumEntrance_ExplainPartySupport, Event_ConfrontSaturosAndMenardi, Event_CrowdRecognizesIsaac, Event_DepartForQuest, Event_FightTret, Event_FinalsBegin, Event_GaretComesHome, Event_GaretJoinsIsaac, Event_HurryToThePlaza, Event_SentToAidElders, Event_TalkToRockslideSurvivor, Event_TravelersLeaveAfterBattle, Event_WatchBoulderFall, HammetPalace_HammetsHomecoming, HammetPalace_IvanReportsToLayana, Imil_MeetMiaAtOldCouplesHouse, Imil_TalkToArmorMerchant, Imil_TalkToOldMan, Imil_TalkToWeaponMerchant, Kalay_HammetReturnsToPalace, Kalay_WatchTourGroupDeparture, KolimaForestBridge_WitnessForestCurse, KolimaForestTree_RestoreTret, Kolima_WitnessForestCurse, TolbiShipDeck_MonsterLandsOnDeck, TolbiShipDeck_MonstersAttackCrew, TolbiShipInteriors_NoticeShipRocking, TolbiShipInteriors_ReachIsland, TolbiShipInteriors_ReactToMonsterAttack, TolbiShipInteriors_ReportMonstersBelowdecks, TretTreeInteriors_PlayPostBattleConversation, ValeHome_FightTravelers, ValeStorm_MeetVillagerAtExit6, ValeStorm_RunRiverSearch, ValeStorm_ShowBoulderSweepingDownriver, Vale_AskAboutSneakingToAleph, VenusLighthouseAerie_EnterAndConfrontAntagonists, VenusLighthouseAerie_EruptBeacon and 2 more.

Line 171

Map_SetShake

static inline void Map_SetShake(s32 horizontal, s32 vertical, s32 decay)

Sets shake amplitudes in fixed-point pixels and the per-frame decay factor. A negative argument keeps that component unchanged; Q16_ONE keeps the shake.

Used by AltmillerCave_ReleaseWallBurst, AltmillerCave_TurnRock, BabiLighthouse_LandWithParticles, Beast_Hop, Beast_HopAway, ColosseumEntrance_ShowClearedTrial, Event_BagMercuryStar, Event_BagVenusStar, Event_CenterStatueMoved, Event_DoraWakesIsaac, Event_MoveColumn, Event_PushStumpOver, Event_ReactToAnotherTremor, Event_ReturnFromMtAleph, Event_Rock11Falls, Event_Rock12Falls, Event_Rock13Falls, Event_Rock14Falls, Event_StepOnEastWallSwitch, Event_StepOnWallSwitch, Event_StepOnWestWallSwitch, Event_TakeMarsStar, Event_UnlockColumnRoomDoor, Event_UnlockGuardRoomDoor, Event_UnlockOuterDoor, Event_UnlockRescueRoomDoor, Event_WatchBoulderFall, GomaCaveEntrance_LeapStump, GomaCaveWaterway_LeapStump, GondowanCave_RunSpinningLeap, HouseScene_RunRepairMorning, Kolima_ShowBridgeCollapse, LunpaFortress_ActivateLeverTrap, MercuryLighthouseAerie_PartyArrives, MercuryLighthouse_AnimateFountainTiles, MercuryLighthouse_ExitWhenChannelsOpen, MercuryLighthouse_RestoreFountainTiles, MogallForest_KillerApeAttacks, RaiseTheShip, SolSanctumElementalStarRoom_BagJupiterStar and 27 more.

Line 292

Also, functions without a comment: Actor_SetBuiltinAction, Event_SkipMessages, Event_ShowMessage, Event_OpenMessage, Event_AskYesNo, Actor_Get, Actor_SetPosition, Actor_SetSpeed, Actor_SetDestination, Actor_SetDestinationOffset, Actor_WalkTo, Actor_WalkBy, Actor_FaceDirection, Actor_FaceActor, Actor_ShowEmote, Actor_SetAttachedEffect, Camera_SetSpeed, Camera_MoveTo, Map_CopyCells, Map_CopyCellAttributes, FieldEvent_GameFlagIsSet, FieldEvent_GameFlagSet, FieldEvent_GameFlagClear, Event_PlayCue, Random_Next, Math_Divide, Object_Create, Object_SetScript, Map_AnimateCells, MapObject_SetPosition, Actor_CenterAndWalk, Actor_WalkByAndWait, Event_ShowMessageAndWait, Actor_SetChildValue, Map_CopyCellsTo, Map_CopyCellsLayered, ColorBuffer_ApplySource, ColorBuffer_ApplyTarget, Actor_MoveToAndWait, Actor_WalkToAndWait, Event_ShowTwoMessagesAndWait.

Structures

MapCellAnim

struct MapCellAnim

Cell replacement: procedure and destination cells

FieldDeclared as
stepsconst u16 *stepsMAP_CELL_STEP records, ended by MAP_CELL_STEPS_END, for Map_PlayMetatileCopySequence.
xu16 xdestination cell column
yu16 ydestination cell row

Used by gAltinVillage_Doors, gKalayInteriors_DoorCells, gKalay_DoorCells, gLunpaDoors, gTolbiDoors, gTolbiInteriorsDoors.

Line 64

Enumerations, without a comment: ActorAnimation, ObjectBlendMode.

Macros

STORE_CONST

#define STORE_CONST(place) (*(__typeof__(((void)0, (place))) *)&(place))

The comma expression removes qualifiers without promoting narrow integers.

Used by ColossoRiver_ShowMatchResult, ColossoWall_ShowBattleResultLettering, FieldScene_RunScene3bcSequenceA, TolbiShipDeck_GetPlacements.

Line 27

Also, macros without a comment: STORE_CONST, EMOTE_IN_FRONT, SPEAKER_PORTRAIT_LEFT, SPEAKER_PORTRAIT_RIGHT, SPEAKER_WINDOW_ABOVE, SPEAKER_WINDOW_BELOW, MAP_CELL_STEP, MAP_CELL_STEPS_END, GameFlag_Set, GameFlag_IsSet, GameFlag_Clear, ACTION_TABLE_STOP.

Globals, without a comment: gSceneState, gColossoWork.

Declarations, without a comment: Engine_EventWait, Engine_EventOpenMessage, Engine_EventAskYesNo, Engine_EventChooseYesNo, Engine_MessageShowCentered, Engine_EventOpenScreen, Engine_EventCloseScreen, Engine_EventWaitForScreen, Engine_BlendSetDarkenTarget16, Engine_ResourceGetTableEntry, Engine_ActorSetSpeed, Engine_ActorSetDestination, Engine_ActorSetDestinationOffset, Engine_ActorWalkTo, Engine_ActorWalkBy, Engine_ActorWaitForMove, Engine_ActorFaceDirection, Engine_ActorFaceActor, Engine_ActorFaceEachOther, Engine_ActorSetAnimationAndWait, Engine_ActorStartRepeatedMotion, Engine_ActorRunRepeatedMotion, Engine_ActorSetAttachedEffect, Engine_ActorSetSpritePriority, Engine_CameraFollowActor, Engine_CameraSetSpeed, Engine_CameraMoveTo, Engine_CameraMoveToActor, Engine_CameraWaitForMove, Engine_MapCopyCells, Engine_MapCopyCellAttributes, Engine_MapRedraw, Engine_WorkSetValuesIfNonNegative, Engine_GameFlagIsSet, Engine_GameFlagSet, Engine_GameFlagClear, Engine_ShopOpen, Engine_InnOpen, Engine_SanctumOpen, Engine_TaskRemoveCallback, Engine_RandomNext, Engine_MathSin, Engine_MathCos, Math_RemainderUnsigned, Engine_HeapAllocate, Engine_HeapRelease, Engine_VramLoad, Object_SetMode, Engine_ObjectSetScript, Engine_ObjectSetBlendMode, Engine_ObjectSetPartPalettes, Engine_ObjectSetPosition, Engine_MapAnimateCells, Engine_MapObjectSetPosition, Engine_ItemLoadIcon, Engine_ItemShowFound, Engine_PartyGiveItem, Engine_ActorStop, Engine_ActorCenterAndWalk, Engine_ActorWalkByAndWait, Engine_LeaderCheckAhead, Engine_PsynergyBegin, Engine_PsynergySetTarget, Engine_PsynergyRaiseHands, Engine_PsynergyPlayEffect, Engine_PsynergyLowerHands, Engine_PsynergyCancel, Engine_EventShowMessageAndWait, Engine_EventGetViewCenter, Engine_ActorLookup, Engine_ActorDestroy, Engine_ActorSetChildValue, Engine_ActorEnableActionCallback, Engine_ActorSetActionCallback, Engine_ActorsRefresh, Engine_MapCopyCellsTo, Engine_MapCopyCellsLayered, Engine_ColorBufferApplySource, Engine_ColorBufferApplyTarget, Engine_ColorBufferInterpolate, Engine_ActorMoveToAndWait, Engine_ActorWalkToAndWait, Engine_ActorJump, Engine_EventShowTwoMessagesAndWait, Engine_PartyAddMembers, Engine_MapRenderWaitForValues, Engine_ObjectMotionSetPositionAndCommit, Engine_ObjectDispatchRelease, Engine_MapWaitWorkValuesBelow256, Engine_RunRisingObjectSequence, Audio_PlayCue.

On this page