Alchemy
Loading...
Searching...
No Matches

object.h

Go to the documentation of this file.
1#ifndef ALCHEMY_UNIT_OBJECT_OBJECT_H
2#define ALCHEMY_UNIT_OBJECT_OBJECT_H
3
4#include "types.h"
5#include "effect_slot.h"
6
7struct ArcEffectObject;
10struct DispatchObject;
12struct Effect05Object;
13struct EffectDescriptor;
14struct EffectSlot;
15struct EffectVector;
16struct EffectObj;
17struct FacingObject;
18struct FieldActor;
19struct MotionObject;
20struct ObjectRuntime;
21struct OrbitEffect;
22struct ScenePlacement;
24struct SparkObject;
25struct UiWindow;
26union FieldObject;
27
28void Scene_TakeExit(s32 exitKind);
29void Scene_ReturnFromBattle(s32 result);
31void Game_ResetForNewGame(s32 mode);
32void Scene_LoadOverlay(s32 unused);
33void Scene_ResetFlagsOnEnter(s32 unused, s32 keep);
35void Encounter_SelectSceneZones(s32 useRules);
38s32 Encounter_RollTerrain(u32 terrain, s32 steps);
43s32 Scene_GetAreaNameIndex(s32 scene, s32 entrance);
48// Matching builds call BattleFx_SelectBattleCue without a prototype, as in
49// object.c above its definition: in one file its definition
50// would come before Field_RequestDjinnBattle and
51// Field_RequestBattleFromEncounterTable, and Field_RequestDjinnBattle changes
52// (2 of 52 instructions in tbs-en). Split evidence for object|psynergy_effects.
53#ifdef UBFIX
54void BattleFx_SelectBattleCue(s32 zone, s32 slot);
55#endif
58void FieldFx_RunLift(void);
59void FieldFx_RunCarry(void);
60
61/// One of the scene's events (the same 12 bytes as struct SceneEvent).
63 s32 flags; ///< the low 4 bits are the kind (SceneEventKind; 7 talks to
64 ///< the actor the party stopped)
65 u8 value; ///< the target (an actor or a tile code)
67 s16 condition; ///< as for GameFlag_IsConditionActive
68 s32 result; ///< below 0x10000 a message, else a function to call
69};
70
71#define OBJ_LAST 66 ///< the last actor slot searched
72
73//--------------------------------------------------------------------------
74// The map's marker actors (chests and Psynergy stones)
75//--------------------------------------------------------------------------
76#define MARKER_MAX 10
77
78#define MODE_WORLD_MAP 3 ///< the world map
79
81s32 Party_RemapCharacterIdIfEnabled(s32 character, s32 childhood);
82void Event_SpawnObjectTable(struct ScenePlacement *entry, s32 slot);
83void ObjectTable_DestroyAtIndex(s32 actorIndex);
86void *ObjectTable_GetSlotAddress(u32 actorIndex);
87void Scene_AssignViewFlags(struct ScenePlacement *entry);
90void ObjectTable_ClearAll(void);
91void *ObjectTable_Get(u32 actorIndex);
92void ObjectTable_Snapshot(void);
93void ObjectTable_Restore(void);
94
95void Field_ClearRequests(void);
98void Field_CheckExitRegions(s32 positionX, s32 positionY, s32 positionZ);
99void Field_ProcessStep(s32 layer, s32 x, s32 y, s32 z);
100void BattleParty_ApplyDrain(s32 amount, s32 unused);
101void BattleParty_ApplyHealthDelta(s32 amount, s32 percent);
103void WorldMap_BeginEvent(void);
104void WorldMap_EndEvent(void);
105s32 Field_RunScene(s32 entrance);
107void Scene_ApplyEntrance(void);
108void Debug_RunPaletteEditor(void);
109
113struct EffectDescriptor *Scene_FindEvent(s32 kind, s32 target);
119s32 Field_RunPushTileEvent(s32 collisionCode);
125void Animation_ApplyChildPalette(struct MotionObject *object, s32 palette);
128s32 Field_UseItem(s32 packedItem, s32 slot);
129void *BattleFx_FindMatchingEvent(s32 eventFlags, s32 group, void *target);
134
135void ObjectMotion_SnapToTerrain(void *object);
136void Field_PlaceMapMarkers(void);
139void Marker_CloseChest(s32 id);
140void Marker_LaunchMimic(s32 id);
141void Marker_OpenChest(s32 id);
142void Marker_ShowOpened(s32 id);
144void Marker_Hide(s32 id);
146
147void Marker_MoveLeaderAway(void);
148void ItemDisplay_EmitSparkles(union FieldObject *fieldObject);
150void Object_DestroyIfPresent(void *object);
152void EffectRuntime_RunRisingObjectSequence(void *object, s32 flags);
153void BattleFx_StartEffectObject22(s32 item, s32 flags);
155void RevealMarker_EmitSparkles(union FieldObject *fieldObject);
156s32 Field_IsRevealActive(struct ScriptInterpreter *interpreter);
158
164void DisplayTransition_Start(s32 mode, s32 frames);
166void DisplayState_ClearFlags(s32 clearBg3, s32 clearBg2, s32 clearBg1);
167void DisplayTransition_Update(void);
173
174void BattleFx_InterpolateBuffers(s16 *source, s16 *target, s16 *step,
175 s32 frames);
177// UB: psynergy_effects.c calls BattleFx_BuildBuffer with no declaration in
178// scope, as a function returning int. With its prototype in scope (as in one
179// file with its definition) FieldFx_StartLightning and
180// BattleFx_StartBufferBlend change, 6 of 67 and 6 of 74 instructions in
181// tbs-en, and even a declaration without a prototype moves two instructions
182// in tbs-ja: evidence that object.c and psynergy_effects.c were separate
183// files. UBFIX declares it.
184#ifdef UBFIX
186#endif
195void FadeOverlay_DrawMarks(void);
196void BattleFx_StartFadeOverlay(void *object);
197void FadeOverlay_Suspend(void);
198void FadeOverlay_Resume(void);
203
204#endif
void * ObjectTable_Get(u32 actorIndex)
Returns the actor in slot index (0 to 65), or NULL.
Definition actors.c:462
s32 ObjectTable_FindLastActiveId(void)
Returns the slot after the last placed actor (8 when there is none), or -1 when slot 65 is occupied.
Definition actors.c:285
void ObjectTable_ResetForObject(struct ScenePlacement *table)
Creates a scene's actors on entering it: the party leader where the game state puts it,...
Definition actors.c:217
void Scene_AssignViewFlags(struct ScenePlacement *entry)
Gives each placement with condition 0 a condition saying whether it lies within the map's view bounds...
Definition actors.c:325
void ObjectTable_Snapshot(void)
Saves up to 32 actors (only the party's 8 on the world map) into gObjectSnapshots,...
Definition actors.c:488
void ObjectTable_ClearAll(void)
Empties all 66 actor slots, without destroying the actors.
Definition actors.c:443
void ObjectTable_DestroyAtIndex(s32 actorIndex)
Destroys the actor in slot actorIndex, if there is one, and empties the slot.
Definition actors.c:186
void ObjectTable_Restore(void)
Puts back the actors ObjectTable_Snapshot saved, and moves the camera to the party leader's height.
Definition actors.c:545
UNUSED void * ObjectTable_GetSlotAddress(u32 actorIndex)
Returns the address of actor slot index in the event work.
Definition actors.c:307
void Event_SpawnObjectTable(struct ScenePlacement *entry, s32 slot)
Creates the actors of a scene's placement table (ended by sprite -1), and records the table among the...
Definition actors.c:75
s32 Party_RemapCharacterIdByFlags(s32 character)
Returns the sprite of character, which is the character itself except that FLAG_CHILDHOOD gives chara...
Definition actors.c:19
void BattleEffect_ClearOutOfBoundsObjects(void)
Destroys the placed actors far from the view's centre: more than 160 pixels to either side,...
Definition actors.c:357
void BattleEffect_ClearAllObjects(void)
Destroys every placed actor and places the scene's actors again from its first placement table after ...
Definition actors.c:417
s32 Party_RemapCharacterIdIfEnabled(s32 character, s32 childhood)
Returns the sprite of character as Party_RemapCharacterIdByFlags would with FLAG_CHILDHOOD set to chi...
Definition actors.c:45
void FieldFx_RunCarry(void)
Carry cast with no target: objects appear above the caster and to either side, move apart and scatter...
Definition carry.c:285
void BattlePalette_StopBlendAndReleaseBuffer(void)
Stops the colour buffer and frees it: removes BattlePalette_UpdateBlend and releases heap slot 32.
Definition color.c:389
void BattleFx_InterpolateBuffers(s16 *source, s16 *target, s16 *step, s32 frames)
Sets each of the 1344 colour channels of step to the amount to add each frame for source to reach tar...
Definition color.c:17
void BattleFx_ApplyColorToTargetBuffer(s32 mode, s32 half)
Sets the colours the buffer moves toward (see BattleFx_BuildBuffer); does nothing without a colour bu...
Definition color.c:398
void BattlePalette_UpdateBlend(void)
Each frame (unless flag 0x152 is set): moves the colour buffer one step toward its target,...
Definition color.c:43
s32 BattleFx_ClampRgb555Component(s32 value)
Clamps a colour channel shifted up 10 bits to at most 31 << 10.
Definition color.c:452
void BattleEffect_InitializeBuffers(void)
Sets up the colour buffer (heap block 32) from the BG and OBJ palettes and starts updating the palett...
Definition color.c:373
void BattleFx_SetPrimaryBufferValue(u32 color)
Sets the buffer's source backdrop colour (BG colour 0 of its palette copy).
Definition color.c:419
void BattleFx_BuildBuffer(u32 mode, u16 *src, u16 *dst, s32 half)
Builds colours for the colour buffer from the palette src into dst, which holds each colour as B,...
Definition color.c:108
s32 BattleFx_ClampRgb555Channel(s32 value)
Clamps a 5-bit colour channel to 0 to 31.
Definition color.c:443
void BattleFx_StartBufferInterpolation(s32 frames)
Starts moving the shown colours to the target colours over frames frames: sets work->duration,...
Definition color.c:431
void BattleFx_ApplyColorToSourceBuffer(s32 mode, s32 half)
Sets the colours the buffer shows now (see BattleFx_BuildBuffer).
Definition color.c:409
Effect slots: the particles Psynergy effects move and draw.
void FadeOverlay_Suspend(void)
Stops drawing the fade overlay, keeping its work.
void FadeOverlay_DrawMarks(void)
Each frame of the fade overlay: on each of the two cells beside the actor (left and right of it),...
void BattleFx_StartFadeOverlay(void *object)
Starts the fade overlay on object (the party leader when NULL): loads its solid tiles,...
void FadeOverlay_Resume(void)
Draws the fade overlay again after FadeOverlay_Suspend.
void ItemDisplay_EmitSparkles(union FieldObject *fieldObject)
Each frame of a found item's picture: one time in ten, a sparkle appears within 16 pixels of it.
Definition field_fx.c:99
void Object_DestroyIfPresent(void *object)
Releases object unless it is NULL.
Definition field_fx.c:212
void Marker_MoveLeaderAway(void)
Keeps the party leader off the markers: a leader within 16 pixels of a marker cell's centre is moved ...
Definition field_fx.c:43
struct EffectObj * BattleFx_StartRandomParticleEmitter(s32 actor, s32 item)
Shows the picture of item (0 for none) at the centre of the cell 16 pixels in front of character acto...
Definition field_fx.c:132
void FieldEffect_SpawnNearbyMarkers(void)
Reveal: marks with sparkles the hidden things within 8 cells left or right and 5 up or down of the le...
Definition field_fx.c:380
void EffectRuntime_RunRisingObjectSequence(void *object, s32 flags)
Shows a found item's picture: flags bit 0 adds sparkles and bit 1 raises it above the leader,...
Definition field_fx.c:244
void BattleFx_StartEffectObject22(s32 item, s32 flags)
Shows the picture of item 36 pixels above the party leader for 80 frames; flags bit 0 adds sparkles a...
Definition field_fx.c:273
void RevealMarker_EmitSparkles(union FieldObject *fieldObject)
Each frame of a Reveal marker: one time in ten, a sparkle appears within 16 pixels of it.
Definition field_fx.c:336
void ItemDisplay_RaiseAboveLeader(struct ObjectRuntime *object)
Raises a found item's picture to 36 pixels above the party leader, who holds it up (animation 28) fac...
Definition field_fx.c:221
s32 Field_IsRevealActive(struct ScriptInterpreter *interpreter)
Returns 1 while Reveal is active, else 0.
Definition field_fx.c:361
void * BattleFx_FindMatchingEvent(s32 eventFlags, s32 group, void *target)
Returns the scene's Psynergy event (kind 5) for Psynergy of the given group that applies to what the ...
Definition items.c:206
s32 Field_FindItemEvent(s32 item)
Returns the scene's item event (kind 4) for item that applies to what the leader faces,...
Definition items.c:16
s32 Field_RunPsynergyEvents(s32 packed)
Runs the scene's events for Psynergy without paying its PP or showing its usual effect (phases 3 and ...
Definition items.c:253
s32 Field_UseItem(s32 packedItem, s32 slot)
Uses an item on the field.
Definition items.c:65
void BattleFx_ShrinkObjectAndDestroySlow(union FieldObject *fieldObject)
Spins and shrinks an object by 0x1c0 a frame, then releases it.
Definition jupiter.c:110
void FieldFx_RunLift(void)
Lift cast with no target: objects appear above the caster and to either side, move apart and scatter ...
Definition lift.c:81
void Field_PlaceMapMarkers(void)
Places an actor at each of the map's markers (ids 100 to 239) that the scene has an event for,...
Definition markers.c:30
void Marker_SetActorPosition(s32 id, s32 x, s32 z)
Moves the actor of marker id to (x, z) on the ground; -1 keeps the centre of its cell on that axis.
Definition markers.c:255
s32 Marker_FindSlot(s32 id)
Returns the marker slot (0 to 9) whose event trigger is id, or -1.
Definition markers.c:138
struct ObjectRuntime * Marker_GetActor(s32 id)
Returns the actor of marker id, or NULL when no slot has it.
Definition markers.c:226
UNUSED void EffectRuntime_ReservedNoOp(void)
Definition markers.c:154
void ObjectMotion_SnapToTerrain(void *object)
Sets an actor's y and terrainHeight to the map's height at its x and z.
Definition markers.c:9
void Marker_CloseChest(s32 id)
Closes the chest of marker id again (its item could not be carried), with SE_125.
Definition markers.c:176
void Marker_ShowOpened(s32 id)
Shows the chest of marker id open (animation 2), with no sound.
Definition markers.c:209
void Marker_OpenChest(s32 id)
Opens the chest of marker id (animation 4) with SE_124, and waits 12 frames.
Definition markers.c:205
void Marker_LaunchMimic(s32 id)
Makes the chest of marker id jump up as a mimic: after 18 frames it takes animation 7,...
Definition markers.c:183
void Marker_Hide(s32 id)
Hides the actor of marker id by clearing its animationKind.
Definition markers.c:238
void BattleFx_ShrinkObjectAndDestroyFast(union FieldObject *fieldObject)
Spins and shrinks an object by 0x400 a frame, then releases it.
Definition mars.c:137
void Battle_SelectTerrainBackdrop(s32 behavior)
Chooses the battle backdrop for a world map terrain behavior (1 to 7; any other gives Sol Sanctum's) ...
Definition encounter.c:404
void Scene_ResolveInteractionResult(void)
Chooses the current scene's field music (gGameState.cue) from the first rule matching the scene or it...
Definition encounter.c:279
s32 Encounter_ResolveWorldMapZoneAndBackdrop(void *pos)
Returns the world map encounter zone for the terrain at pos (0 for none), and chooses the battle back...
Definition encounter.c:103
u16 Encounter_GetEnemyGroupAtSlot(s32 zone, s32 slot)
Returns the enemy group in slot (0 to 7) of zone; 14 halfwords make a zone.
Definition encounter.c:244
s32 Encounter_SelectEnemyGroup(s32 zone, s32 steps)
Advances the encounter counter for zone and returns the enemy group to fight, or 0 for no battle.
Definition encounter.c:130
s16 Event_GetSpecialValue(void)
Returns the battle backdrop chosen for the current scene.
Definition encounter.c:375
s32 Encounter_RollWorldMap(s32 pos, s32 steps)
Rolls a random battle on the world map, taking the zone from the tile at pos.
Definition encounter.c:236
void BattleFx_SelectBattleCue(s32 zone, s32 slot)
Chooses the battle music for slot of zone (gGameState.sceneCue).
Definition encounter.c:439
void Encounter_SelectSceneZones(s32 useRules)
Chooses the current scene's encounter zones, one for each kind of ground the party can stand on (gEve...
Definition encounter.c:49
s32 Encounter_RollTerrain(u32 terrain, s32 steps)
Rolls a random battle on the encounter zone of the ground underfoot.
Definition encounter.c:226
void Battle_SelectSceneBackdrop(void)
Chooses the battle backdrop for the current scene.
Definition encounter.c:382
s16 Encounter_GetDjinnEnemyGroup(s32 djinni)
Returns the enemy group of Djinni battle djinni, which the table gives as a zone and slot.
Definition encounter.c:251
void Scene_SetDefeatReturnPoint(void)
Sets the scene the party returns to after a defeat (gGameState.savedScene and savedEntrance),...
Definition encounter.c:357
s32 Scene_GetAreaNameIndex(s32 scene, s32 entrance)
Returns the place name of scene and entrance, from the first rule matching the scene or its group; 0 ...
Definition encounter.c:326
s32 GameFlag_IsConditionActive(s32 condition)
Returns whether an event condition holds: -1 always holds; a condition with bit 0x1000 holds while th...
Definition events.c:65
struct EffectDescriptor * Scene_FindEvent(s32 kind, s32 target)
Returns the first of the scene's events of kind for target whose condition holds, or NULL.
Definition events.c:111
s32 Scene_TalkToActor(s32 id)
Talks to actor id: shows its event's message or calls its event function, with the actor stopped and ...
Definition events.c:197
s32 Scene_RunTouchOrExit(s32 value)
Runs the touch event (kind 2) of what the leader touched, or else takes its exit (kind 1): plays the ...
Definition events.c:333
s32 Scene_FindActorTalkEvent(s32 id)
Returns the talk event of actor id: for the actor the party has stopped, its kind 7 event if it has o...
Definition events.c:175
s32 Field_SearchTile(s32 tile)
Searches the tile ahead with the given collision code.
Definition events.c:429
UNUSED void Runtime_CallWorkBlockEntry(void)
Nothing calls this.
Definition events.c:168
s32 Scene_RunRaisedEvent(s32 value)
Runs the scene's raised event (kind 6) for value: its message or its function.
Definition events.c:301
struct ScenePlacement * Scene_FindActorPlacement(s32 id)
Returns the placement of actor id in the scene's placement tables, or NULL: for a party character (0 ...
Definition events.c:14
s32 Field_RunPushTileEvent(s32 collisionCode)
Runs the event of a tile the leader pushes against (codes 0xf9 and 0xfc to 0xfe), once it has pushed ...
Definition events.c:389
u32 Event_SearchIgnoresCondition(s32 flags, s32 result)
Returns 1 for a search event (kind 3) that holds whatever its condition: one with more flags than its...
Definition events.c:86
s32 Field_UsePsynergy(u32 code)
Uses Psynergy on the field.
Definition psynergy.c:17
u32 BattleFx_HasTrigger(u16 item)
Returns whether the scene has an event for item and what the leader faces.
Definition psynergy.c:151
s32 BattleFx_HasMatchingEvent5(s32 group)
Returns whether the scene has a Psynergy event, in any phase, for Psynergy of group and what the lead...
Definition psynergy.c:141
s32 Field_FindNearbyPsynergyTarget(s32 id, s32 kind)
Returns the actor nearest in front of actor id that a field Psynergy of the given kind can reach,...
Definition targets.c:110
void Battle_ResetEffectCounter(void)
Clears the field's busy flag and, while Reveal is active, ends it: Reveal used with ACT_PACKED runs i...
Definition targets.c:261
s32 Field_FindNearbyTalkTarget(s32 id)
Returns the actor nearest to actor id that it could talk to, or -1: within 48 pixels of height and 32...
Definition targets.c:33
s32 Field_GetPsynergyTargetRange(s32 kind)
Returns how far, in pixels, a field Psynergy of the given kind reaches: gBattleFx_TargetRangeByMode p...
Definition targets.c:10
void Animation_ApplyChildPalette(struct MotionObject *object, s32 palette)
Gives every part of a motion object's sprite (but those at palette 15) palette - 1,...
Definition targets.c:227
s32 BattleFx_PlayCueAndStartEmitterOnTarget(s32 actor, s32 target, s32 itemId)
If actor target exists, plays SE_124, gives it animation 4 and, 12 frames later, shows itemId in fron...
Definition targets.c:207
void DisplayTransition_InitializeBattleEffectState(s32 mode)
Starts window transition mode at value 0, with no duration: the caller moves it.
Definition transition.c:559
void DisplayState_ClearFlags(s32 clearBg3, s32 clearBg2, s32 clearBg1)
Clears the map's display-control bits for backgrounds 3, 2 and 1 (0x0800, 0x0400 and 0x0200) for each...
Definition transition.c:771
void DisplayTransition_FillTilemapAndSolidTile(s32 color)
Fills background screen block 4 with tile 0 in palette 15 and, unless color is -1,...
Definition transition.c:979
void DisplayTransition_UpdateScanline(void)
The VCount interrupt of the centre-line transition: switches the display to mode 2 (nothing shown) at...
Definition transition.c:879
void DisplayTransition_Start(s32 mode, s32 frames)
Fades the screen in over frames frames.
Definition transition.c:603
void DisplayTransition_Finish(s32 mode, s32 frames)
Fades the screen out over frames frames, as DisplayTransition_Start fades it in.
Definition transition.c:698
void DisplayTransition_UpdateScanlineTable(void)
Each frame of a window transition: advances its value toward its end (and at the end turns the window...
Definition transition.c:75
void BattleFx_StartWindowHBlankDma(void)
Each frame, before drawing: turns windows 0 and 1 on, writes the first four values of the shown page ...
Definition transition.c:16
void DisplayTransition_SuspendCallbacks(void)
Suspends the window transition's two callbacks.
Definition transition.c:576
void DisplayTransition_InitializeState(s32 value)
Starts a dissolve of the given mode and waits 120 frames.
void DisplayTransition_Update(void)
Each frame of the centre-line transition: moves the value toward its end and sets the two lines where...
Definition transition.c:794
struct DisplayTransitionState * DisplayTransition_AllocateAndClearState(void)
Allocates the display transition state (heap block 31) and clears it.
Definition transition.c:585
void DisplayTransition_UpdateFrame(void)
Each frame of the dissolve: moves the value toward its end and sets two more of the solid tile's 64 p...
Definition transition.c:930
void DisplayTransition_UpdateFromCentre(void)
As DisplayTransition_Update, but the lines flicker every other frame.
Definition transition.c:834
void Debug_RunPaletteEditor(void)
The debug palette editor (L on the pause menu in debug mode).
void Scene_ApplyEntrance(void)
Places the party at the entrance it came in by (the first matching entry, or the scene's first one) u...
Definition run_scene.c:461
s32 Object_GetTriggerTileAheadOfCurrent(void)
Returns the collision code of the map cell 16 pixels ahead of the party leader when there is somethin...
Definition run_scene.c:407
s32 Field_RunScene(s32 entrance)
Runs the current field scene, which the party entered by entrance, until it leaves; returns the exit ...
Definition run_scene.c:26
void Audio_PlayCueFromEventWork(void)
Starts the current scene's field music, chosen by Scene_ResolveInteractionResult.
Definition scene.c:355
s32 BattleFx_GetResourceGroup(s32 scene)
Returns the group scene belongs to.
Definition scene.c:156
void Scene_TakeExit(s32 exitKind)
Chooses the scene and entrance to go to when the party leaves the current scene.
Definition scene.c:25
void Scene_ResetFlagsOnEnter(s32 unused, s32 keep)
Updates the flags and state that last for one scene or one group of scenes, on entering the current s...
Definition scene.c:311
void Game_ResetForNewGame(s32 mode)
The game's main loop, which never returns.
Definition scene.c:204
void Scene_LoadOverlay(s32 unused)
Loads the current scene's overlay code (its resource) into gOverlayArea.
Definition scene.c:294
void Scene_ReturnFromBattle(s32 result)
Chooses where the game continues after a battle or another scene that is not a field map (see Game_Re...
Definition scene.c:95
s32 BattleFx_GetAnimationValue(s32 id)
Returns the sprite id stored by a live actor's animated sprite, or 0 when that actor has no animated ...
Definition speakers.c:27
s32 BattleFx_GetResourceId(u32 id)
Returns the portrait shown beside the messages of sprite id (0x100 plus its definition's value),...
Definition speakers.c:40
struct BattleEffectEntry * BattleFx_FindDefinition(u32 id)
Returns the speaker definition of sprite id from gBattleFx_DefinitionTable, or its last entry when th...
Definition speakers.c:10
s32 BattleFx_GetFlags(s32 id)
Returns the definition flags of actor id's sprite, which choose its line when it has nothing to say.
Definition speakers.c:52
void WorldMap_EndEvent(void)
Ends what WorldMap_BeginEvent started: on the world map, reloads the area's graphics and sets the cam...
Definition step.c:484
void BattleParty_ApplyDrain(s32 amount, s32 unused)
Gives each character in the party amount PP (PP regenerates as the party walks).
Definition step.c:362
s32 BattleParty_ApplyStatusDamage(void)
Hurts each poisoned character in the party: poison takes a twentieth of their maximum HP and venom a ...
Definition step.c:416
void WorldMap_BeginEvent(void)
Starts an event or menu on the world map: ends any colour ratio transition in progress,...
Definition step.c:464
void Field_ClearRequests(void)
Clears the field's twelve pending requests (see struct FieldWork).
Definition step.c:33
void Field_ProcessStep(s32 layer, s32 x, s32 y, s32 z)
Handles one step of the party leader onto the cell at (x, y, z) of map layer: records step events and...
Definition step.c:193
s32 Field_GetCollisionAheadOfLeader(void)
Returns the collision code of the map cell 16 pixels ahead of the party leader (a world map block on ...
Definition step.c:69
s32 Field_CountRequests(void)
Returns the sum of the field's twelve pending requests (counting the actor event request twice): non-...
Definition step.c:56
void Field_CheckExitRegions(s32 positionX, s32 positionY, s32 positionZ)
Takes the exit of the first of the scene's exit regions that contains the position (x,...
Definition step.c:135
void BattleParty_ApplyHealthDelta(s32 amount, s32 percent)
Changes each party member's HP by amount, or by that percentage of maximum HP when percent is set.
Definition step.c:376
A field object as Avoid's caster: its facing, its animation records and the phase and frame count of ...
Definition fx_scene.h:17
A speaker definition, a row of gBattleFx_DefinitionTable: a sprite, its portrait (0xff for none) and ...
A FieldActor seen with the halfword at 0x64 unsigned and the one at 0x66 signed, as the bytes read th...
A field object as the object dispatcher's far calls take it.
The display transition state (heap block 31): two pages of window edges for every line,...
u16 value
The progress, moved from start to end over duration frames: bit 5 says whether the transition opens o...
u16 mode
The window transition's shape: modes are listed at DisplayTransition_UpdateScanlineTable.
A FieldActor seen with the halfword at 0x5e (here its phase), which FieldActor does not name.
Definition douse.c:9
One of the scene's events (the same 12 bytes as struct SceneEvent).
Definition object.h:62
u8 value
the target (an actor or a tile code)
Definition object.h:65
s32 result
below 0x10000 a message, else a function to call
Definition object.h:68
s16 condition
as for GameFlag_IsConditionActive
Definition object.h:67
s32 flags
the low 4 bits are the kind (SceneEventKind; 7 talks to the actor the party stopped)
Definition object.h:63
An actor as these effects see it.
Definition field_fx.c:12
A particle a Psynergy effect moves and draws: its sprite, its position and target,...
Definition effect_slot.h:18
A world position, as Camera_WorldToScreen converts it to the screen.
Definition battle.h:73
A field object seen as one that turns toward its facing target: its facing, its ground position and t...
A field actor: a person or thing on the field with a position, motion toward a target,...
Definition field_obj.h:30
An effect object that moves and draws one sprite: its position, scale, velocity and target,...
Definition motobj.h:20
One of the 64 field objects in the object pool (heap slot 5): its script, position,...
s32 z
16.16 fixed-point pixels
s32 x
16.16 fixed-point pixels
An actor a scene places: its sprite, the condition for placing it, how it behaves,...
Definition field_scene.h:81
u8 flags
PLACEMENT_SHARE_PREVIOUS_SPRITE.
Definition field_scene.h:96
s16 condition
-1 always, a flag | 0x1000 set, else the flag clear; off the world map, 48 to 127 also need condition...
Definition field_scene.h:87
The prefix that command handlers read from a field object's 0x70-byte slot.
Definition script.h:16
A FieldActor seen with the halfword at 0x5e (its lifetime), which FieldActor does not name.
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...
Definition uiwindow.h:11
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
unsigned int u32
Definition types.h:15
signed short s16
Definition types.h:12
unsigned short u16
Definition types.h:13
unsigned char u8
Definition types.h:11
An object on the field, read as an actor or as an effect.
void BattleFx_ClearRandomParticles(void)