Alchemy
Loading...
Searching...
No Matches

field_obj.h File Reference

Field objects and actors, and the scene transition styles. More...

Go to the source code of this file.

Data Structures

struct  FieldActor
 A field actor: a person or thing on the field with a position, motion toward a target, sprites and an update callback. More...

Macros

#define SCENE_TRANSITION(style, variant)
#define ACTOR_NO_TARGET   ((s32)0x80000000)
 A target coordinate that is not set: the object has no target.

Enumerations

enum  SceneTransitionStyle { TRANSITION_FADE = 0 , TRANSITION_BACKDROP_FADE = 1 , TRANSITION_WINDOW = 2 }
enum  ActorLinkFlag { ACTOR_LINK_KEEP_MOTION = 0x10000 }
 Preserves the current action and motion when assigning a linked target. More...
enum  ActorPriorityFlag { ACTOR_PRIORITY_AUTOMATIC = 0x01 , ACTOR_PRIORITY_UNDERFOOT = 0x02 }
 FieldActor.priorityFlags bits. More...
enum  ActorMotionFlag { ACTOR_FOLLOWS_TERRAIN = 0x01 , ACTOR_FALLS = 0x02 }
 FieldActor.motionFlags bits. More...
enum  ActorSteeringFlag { ACTOR_FACES_MOTION = 0x01 }
 FieldActor.steeringFlags bits. More...

Functions

 STATIC_ASSERT (offsetof(struct FieldActor, facing)==0x06)
 STATIC_ASSERT (offsetof(struct FieldActor, x)==0x08)
 STATIC_ASSERT (offsetof(struct FieldActor, z)==0x10)
 STATIC_ASSERT (offsetof(struct FieldActor, terrainHeight)==0x14)
 STATIC_ASSERT (offsetof(struct FieldActor, scaleY)==0x1c)
 STATIC_ASSERT (offsetof(struct FieldActor, priorityFlags)==0x23)
 STATIC_ASSERT (offsetof(struct FieldActor, motionFlags)==0x55)
 STATIC_ASSERT (offsetof(struct FieldActor, collisionFlags)==0x59)
 STATIC_ASSERT (offsetof(struct FieldActor, steeringFlags)==0x5a)
 STATIC_ASSERT (offsetof(struct FieldActor, paused)==0x5b)
 STATIC_ASSERT (offsetof(struct FieldActor, retainSpriteCache)==0x5c)
 STATIC_ASSERT (offsetof(struct FieldActor, repeatCount)==0x5d)
 STATIC_ASSERT (offsetof(struct FieldActor, wait)==0x5e)
 STATIC_ASSERT (offsetof(struct FieldActor, refused)==0x60)
 STATIC_ASSERT (offsetof(struct FieldActor, frozen)==0x61)
 STATIC_ASSERT (offsetof(struct FieldActor, riseEnabled)==0x63)
 STATIC_ASSERT (offsetof(struct FieldActor, bounce)==0x44)
 STATIC_ASSERT (offsetof(struct FieldActor, gravity)==0x48)
 STATIC_ASSERT (offsetof(struct FieldActor, riseBaseY)==0x4c)
 STATIC_ASSERT (offsetof(struct FieldActor, velocityY)==0x28)
 STATIC_ASSERT (offsetof(struct FieldActor, speed)==0x30)
 STATIC_ASSERT (offsetof(struct FieldActor, targetX)==0x38)
 STATIC_ASSERT (offsetof(struct FieldActor, sprite)==0x50)
 STATIC_ASSERT (offsetof(struct FieldActor, update)==0x6c)

Variables

struct EventWork * gEventWork

Detailed Description

Field objects and actors, and the scene transition styles.

Definition in file field_obj.h.

Macro Definition Documentation

◆ SCENE_TRANSITION

#define SCENE_TRANSITION ( style,
variant )
Value:
((style) << 8 | (variant))

Definition at line 20 of file field_obj.h.

Referenced by AlpineCrossing_LiftBoulder(), AltinPeak_AwardFrostJewelAndDrain(), AltinPeak_CelebrateHydrosVictory(), AltinPeak_DrainAfterSecondBeast(), AltinPeak_DrainAfterThirdBeast(), AltmillerCave_Initialize(), AltmillerCave_InitializeDarkness(), BabiLighthouse_SetupScene(), BabiPalace_ApplyEntryState(), BabiPalace_WakeAfterFinals(), Bilibin_Initialize(), Bilibin_RestoreRaisedEntrance(), BilibinCave_RestoreDouseSection(), BilibinCave_RestoreIcePuzzleSection(), BilibinInteriors_Initialize(), ColosseumEntrance_ExplainPartySupport(), ColosseumEntrance_ExplainTrial(), ColosseumEntrance_ShowClearedTrial(), ColosseumEntrance_ShowFailedTrial(), Colosso_AskDoneCheering(), Colosso_TakePlaceForMatch(), ColossoLog_Initialize(), ColossoLog_PlayPostBattleReunion(), ColossoLog_RunCompetitorTalk(), Event_AudienceWithMcCoy(), Event_BagMercuryStar(), Event_BagVenusStar(), Event_DepartForQuest(), Event_DonpaJudgesDodonpa(), Event_DoraSendsIsaacToThePlaza(), Event_DoraWakesIsaac(), Event_EnterNyunpasHall(), Event_EnterPalace(), Event_EscortSeesPartyOff(), Event_FightEastGuard(), Event_FightFirstMonster(), Event_FightFourthMonster(), Event_FightHallGuard(), Event_FightSecondMonster(), Event_FightThirdMonster(), Event_FightThreeGuards(), Event_FightTret(), Event_FightWestGuard(), Event_FindHammet(), Event_FreeRooferAndConfrontThieves(), Event_GuardsArrestParty(), Event_HurryToThePlaza(), Event_KradenPlansSanctumVisit(), Event_KradenSetsOff(), Event_McCoyRewardsParty(), Event_OpenDoorAndLeave(), Event_PresentRewardChests(), Event_ReadCorneredSuspectsMinds(), Event_RiseToElementalStarRoom(), Event_ShowMythrilBag(), Event_StepOnEastWallSwitch(), Event_StepOnWallSwitch(), Event_StepOnWestWallSwitch(), Event_TakeMarsStar(), Event_TalkToTrialAttendant(), Event_TravelersLeaveAfterBattle(), FieldScene_RunEntrySetup(), FuchinTemple_NyunpaTeachesKi(), HammetPalace_HammetsHomecoming(), HammetPalace_IvanReportsToLayana(), Imil_Initialize(), Imil_MeetMiaAtOldCouplesHouse(), Imil_MiaSaysFarewellToApprentices(), Imil_OpenDoorAndExit(), ImilFuchinFalls_Initialize(), ImilFuchinFalls_PrepareRoom(), ItemLevel_RequestExit(), Kalay_HammetReturnsToPalace(), Kalay_IvanMeetsPalaceGuards(), Kalay_PrepareTunnel(), Kalay_StartWindowTransition(), KalayInteriors_Initialize(), KalayTolbiDocks_PrepareTicketOffice(), Kolima_Initialize(), KolimaForestBend_Initialize(), KolimaForestClearing_Initialize(), KolimaForestRiver_Initialize(), KolimaForestTree_Initialize(), KolimaInteriors_Initialize(), Lalivero_Initialize(), LamakanDesert_Initialize(), LamaTemple_EnterHamasRoom(), LamaTemple_RunHamasFarewell(), LemurianShip_SetupScene(), LinkLobby_RunRoundResult(), LunpaFortress_InitializeColumnRoom(), LunpaFortress_InitializeGuardRooms(), LunpaFortress_InitializeOuterRooms(), MercuryLighthouse_EnterRisingPassage(), MercuryLighthouse_ExitWhenChannelsOpen(), MercuryLighthouse_Initialize(), MercuryLighthouse_MoveStoneDoorBlocks(), MercuryLighthouseAerie_AlexAppears(), MercuryLighthouseAerie_Initialize(), MercuryLighthouseAerie_PartyArrives(), MercuryLighthouseEntrance_FightLizardMan(), MercuryLighthouseEntrance_Initialize(), MercuryLighthouseEntrance_MiaEntersLighthouse(), MogallForest_Initialize(), Sanctum_Initialize(), Sanctum_RequestQuestAcceptance(), Scene_Initialize(), Scene_RunEntrySetup(), SetSail(), SolSanctumElementalStarRoom_BagJupiterStar(), SolSanctumElementalStarRoom_EnterStarRoom(), SolSanctumEntrance_InspectInnerStatues(), SolSanctumEntrance_IntroduceSanctum(), SolSanctumEntrance_RestoreInteriorState(), SolSanctumLunaSolRooms_AnimateSavedStatueLights(), SolSanctumLunaSolRooms_Initialize(), SolSanctumLunaSolRooms_PrepareStatueTransition(), SolSanctumLunaSolRooms_RunStatueLightSequence(), SolSanctumLunaSolRooms_ShowFloatingEye(), SolSanctumLunaSolRooms_SpringStatueTrap(), SolSanctumRooms_Initialize(), SolSanctumStatue_ExplainStatuePuzzle(), SolSanctumStatue_Initialize(), SolSanctumStatue_VisitStatueHall(), Tolbi_ApplyEntryState(), TolbiInteriors_ApplyEntryState(), TolbiInteriors_ExitThroughWindow(), TolbiShipDeck_AnnouncePreparationsReady(), TolbiShipDeck_ArriveAtTolbi(), TolbiShipDeck_Initialize(), TolbiShipDeck_JumpIntoKrakenBattle(), TolbiShipDeck_MonsterLandsOnDeck(), TolbiShipDeck_MonstersAttackCrew(), TolbiShipDeck_MonstersBoard(), TolbiShipDeck_ReturnFromIsland(), TolbiShipDeck_SightLand(), TolbiShipDeck_SightSeaMonsters(), TolbiShipDeck_ThankForKraken(), TolbiShipInteriors_ApplyEntryState(), TolbiShipInteriors_DismissReplacementRowers(), TolbiShipInteriors_ReactToMonsterAttack(), TolbiShipInteriors_RunSceneCommand(), TolbiShipInteriors_ShowRowing(), TolbiShipMast_AnnounceClearCourse(), TolbiShipMast_AnnounceLand(), TolbiShipMast_Initialize(), TolbiShipMast_RunAvastScene(), TolbiShipMast_RunLandingSequence(), TolbiShipMast_ShowMonsters(), TolbiSpring_Initialize(), TretTreeBranch_Initialize(), TretTreeInteriors_EnterRoom(), TretTreeInteriors_PlayPostBattleConversation(), TunnelRuins_Initialize(), Vale_RequestBackdropExit(), ValeBabi_CloseScreenAndExit(), ValeBabi_Initialize(), ValeCave_Initialize(), ValeInteriors_Initialize(), ValeInteriors_RequestWindowExit(), ValeStorm_Initialize(), VaultInteriors_ConfrontThievesAgain(), VaultInteriors_DefeatThieves(), VaultInteriors_DiscussMindReading(), VaultInteriors_LoseToThieves(), VaultInteriors_OpenWindowTransition(), VaultInteriors_ReturnStolenGoods(), VenusLighthouse_AnimateEastTileWave(), VenusLighthouse_AnimatePairedTileWaves(), VenusLighthouse_AnimateWestTileWave(), VenusLighthouseAerie_EnterAndConfrontAntagonists(), VenusLighthouseAerie_PlayShebasFall(), VenusLighthouseAerie_ShowShebaInDanger(), VenusLighthouseAerie_StageShebasFall(), Village_EnterDoor(), WorldMap_RunOpeningRise(), WorldMap_ShowEndingScene(), Xian_Initialize(), and XianInteriors_Initialize().

◆ ACTOR_NO_TARGET

#define ACTOR_NO_TARGET   ((s32)0x80000000)

A target coordinate that is not set: the object has no target.

Definition at line 145 of file field_obj.h.

Referenced by Actor_IsParked(), BabiLighthouse_JumpFromLedge(), Colosso_RestoreCompetitor(), CrossboneIslePillarRooms_SettleActorOnGround(), CrossboneIslePillarRooms_StopAtGroundOrHeight(), Djinn_RunBattleStartHop(), Effect_SpawnRisingDustBurst(), Event_CenterStatueMoved(), Event_FinalsBegin(), Event_PsynergyStoneIsGone(), Event_SetBlockOnBalance(), Event_TalkToJumpingStudent(), Field_ProcessStep(), FieldFx_RunRetreat(), FloatingBlock_Settle(), FuchinTemple_FehSeesChi(), FuchinTemple_FeizhiLeavesForHsu(), FuchinTemple_StudentExplainsChiRules(), FuchinTemple_StudentsSeeTreeFall(), FuchinTemple_ToppleTreeNorth(), FuchinTemple_ToppleTreeSouth(), GomaCaveEntrance_LeapStump(), GomaCaveWaterway_LeapStump(), GondowanCave_RunSpinningLeap(), Leader_StopMoving(), Marker_MoveLeaderAway(), MercuryLighthouse_FollowLeader(), Object_ResetTargetAndSetMode1(), ObjectEffect_PrepareContextEffect(), ObjectMotion_SetHorizontalPositionWithTerrain(), ObjectMotion_SetPositionWithTerrain(), OverlayObject_ResetMotionFields(), ReceiveBlackOrb(), Scene_RunEntrySetup(), SceneEffect_AdvanceAngleUntilIdle(), SolSanctumEruption_FadeCameraTo(), SolSanctumEruption_PlayWiseOneRescue(), SolSanctumEruption_StepEmbers(), SolSanctumEruption_ThrowEruptionRing(), SuhallaDesert_ChaseLeader(), TolbiShipDeck_HoverAndDiveAtOuranos(), TolbiShipDeck_HoverAndDiveAtSean(), TolbiShipDeck_LeapAtOuranos(), TolbiShipDeck_LeapAtSean(), TolbiShipInteriors_HasArrived(), TolbiShipInteriors_ResetActor(), TolbiShipMast_StopDriftingActor(), TunnelRuins_WaitForActorToLand(), Vale_HaveJennaStopTheAlephDetour(), Vale_HaveVillagerWatchTheLeader(), ValeStorm_ShowBoulderSweepingDownriver(), Vault_UpdateRoofComplainerProximity(), VaultCave_PushBlockAhead(), VaultInteriors_IsActorWithinEightPixels(), VaultInteriors_IsActorWithinSixteenPixels(), VaultInteriors_ReturnStolenGoods(), VaultInteriors_UpdateActorStops(), VenusLighthouse_EmitGateParticles(), VenusLighthouse_PushAdjacentBlock(), VenusLighthouseAerie_StopActorMotion(), Xian_Initialize(), Xian_MoveAsideForWaterCarrier(), Xian_TalkToWaterCarrier(), and Xian_WatchWaterCarrierPath().

Enumeration Type Documentation

◆ SceneTransitionStyle

Enumerator
TRANSITION_FADE 
TRANSITION_BACKDROP_FADE 
TRANSITION_WINDOW 

Definition at line 14 of file field_obj.h.

◆ ActorLinkFlag

Preserves the current action and motion when assigning a linked target.

Enumerator
ACTOR_LINK_KEEP_MOTION 

Definition at line 148 of file field_obj.h.

◆ ActorPriorityFlag

FieldActor.priorityFlags bits.

Enumerator
ACTOR_PRIORITY_AUTOMATIC 

The sprite takes its priority from the map cell under it.

ACTOR_PRIORITY_UNDERFOOT 

The depth sort treats it as 320 pixels higher on the screen.

Definition at line 151 of file field_obj.h.

◆ ActorMotionFlag

FieldActor.motionFlags bits.

Enumerator
ACTOR_FOLLOWS_TERRAIN 

moves with the ground height under it

ACTOR_FALLS 

falls by its gravity and bounces

Definition at line 159 of file field_obj.h.

◆ ActorSteeringFlag

FieldActor.steeringFlags bits.

Enumerator
ACTOR_FACES_MOTION 

turns toward its velocity, 1/16 turn a frame

Definition at line 165 of file field_obj.h.

Function Documentation

◆ STATIC_ASSERT() [1/24]

STATIC_ASSERT ( offsetof(struct FieldActor, facing) = =0x06)

◆ STATIC_ASSERT() [2/24]

STATIC_ASSERT ( offsetof(struct FieldActor, x) = =0x08)

◆ STATIC_ASSERT() [3/24]

STATIC_ASSERT ( offsetof(struct FieldActor, z) = =0x10)

◆ STATIC_ASSERT() [4/24]

STATIC_ASSERT ( offsetof(struct FieldActor, terrainHeight) = =0x14)

◆ STATIC_ASSERT() [5/24]

STATIC_ASSERT ( offsetof(struct FieldActor, scaleY) = =0x1c)

◆ STATIC_ASSERT() [6/24]

STATIC_ASSERT ( offsetof(struct FieldActor, priorityFlags) = =0x23)

◆ STATIC_ASSERT() [7/24]

STATIC_ASSERT ( offsetof(struct FieldActor, motionFlags) = =0x55)

◆ STATIC_ASSERT() [8/24]

STATIC_ASSERT ( offsetof(struct FieldActor, collisionFlags) = =0x59)

◆ STATIC_ASSERT() [9/24]

STATIC_ASSERT ( offsetof(struct FieldActor, steeringFlags) = =0x5a)

◆ STATIC_ASSERT() [10/24]

STATIC_ASSERT ( offsetof(struct FieldActor, paused) = =0x5b)

◆ STATIC_ASSERT() [11/24]

STATIC_ASSERT ( offsetof(struct FieldActor, retainSpriteCache) = =0x5c)

◆ STATIC_ASSERT() [12/24]

STATIC_ASSERT ( offsetof(struct FieldActor, repeatCount) = =0x5d)

◆ STATIC_ASSERT() [13/24]

STATIC_ASSERT ( offsetof(struct FieldActor, wait) = =0x5e)

◆ STATIC_ASSERT() [14/24]

STATIC_ASSERT ( offsetof(struct FieldActor, refused) = =0x60)

◆ STATIC_ASSERT() [15/24]

STATIC_ASSERT ( offsetof(struct FieldActor, frozen) = =0x61)

◆ STATIC_ASSERT() [16/24]

STATIC_ASSERT ( offsetof(struct FieldActor, riseEnabled) = =0x63)

◆ STATIC_ASSERT() [17/24]

STATIC_ASSERT ( offsetof(struct FieldActor, bounce) = =0x44)

◆ STATIC_ASSERT() [18/24]

STATIC_ASSERT ( offsetof(struct FieldActor, gravity) = =0x48)

◆ STATIC_ASSERT() [19/24]

STATIC_ASSERT ( offsetof(struct FieldActor, riseBaseY) = =0x4c)

◆ STATIC_ASSERT() [20/24]

STATIC_ASSERT ( offsetof(struct FieldActor, velocityY) = =0x28)

◆ STATIC_ASSERT() [21/24]

STATIC_ASSERT ( offsetof(struct FieldActor, speed) = =0x30)

◆ STATIC_ASSERT() [22/24]

STATIC_ASSERT ( offsetof(struct FieldActor, targetX) = =0x38)

◆ STATIC_ASSERT() [23/24]

STATIC_ASSERT ( offsetof(struct FieldActor, sprite) = =0x50)

◆ STATIC_ASSERT() [24/24]

STATIC_ASSERT ( offsetof(struct FieldActor, update) = =0x6c)

Variable Documentation

◆ gEventWork

struct EventWork* gEventWork
extern