Alchemy
Loading...
Searching...
No Matches

object.h

Go to the documentation of this file.
1/// @file
2/// Scene events, field Psynergy, objects and effect lifecycles.
3/// Far-call interfaces; their ordered jump stubs live in
4/// games/tbs/src/system/far_call/OBJECT.S.
5
13void Event_SetSceneEventsFar(const struct SceneEvent *events);
19void Party_LearnAbilityFar(s32 unit, s32 ability);
22void ObjectMotion_SetSpeedParametersFar(u32 objectId, s32 speedLimit,
32void ObjectMotion_CenterOnColumnFar(u32 objectId, s32 action, s32 z_offset);
34 s32 z_offset);
37 s32 z);
38void Object_SetModeByIdFar(u32 objectId, s32 action);
39void Object_SetActionByIdFar(u32 objectId, s32 action);
42void ObjectMotion_LaunchFar(u32 objectId, s32 speed, s32 event_id);
44void Motion_SetVarCbAndRefreshFar(u32 objectId, s32 variant);
45void Actor_JumpDownLedgeFar(s32 sequence_arg, s32 mode_or_frame,
46 s32 optional_action);
47void ObjectMotion_SetAngleTowardFar(s32 firstId, s32 second_id, s32 wait);
48void Object_LinkPairFar(s32 firstId, s32 second_id, s32 wait);
50void ObjectGroup_SetChildValueFar(struct FieldActor *actor, s32 value);
51void Object_SetTargetAndCallbackFar(u32 objectId, s32 targetId,
52 const void *callback);
57 s32 value);
59void ObjectMotion_ArmCallbackFar(s32 objectId, s32 angle, s32 wait);
60void Battle_ShowPairedUnitWorkAndWaitFar(s32 first, s32 first_x, s32 first_y,
61 s32 first_arg, s32 first_extra,
62 s32 second, s32 second_x, s32 second_y,
63 s32 second_arg, s32 second_extra);
65void ObjectMotion_SetActionVariantFar(s32 objectId, s32 priority);
66void BattleFx_SpawnLinkedFar(s32 id, s32 mode, s32 wait);
68void ObjectVisual_CopyAttributesFar(u32 targetId, u32 sourceId);
71void Camera_MoveWithinMapBoundsFar(s32 requested_x, s32 requested_y,
72 s32 requested_z, s32 use_setter);
76void Map_SetViewBoundsFar(s32 minX, s32 minY, s32 maxX, s32 maxY);
77void Event_SetDestinationFar(s32 first, s32 second);
106 s32 ampX, s32 freqY, s32 stepY,
107 s32 ampY);
110 s32 mode);
121void BattleFx_SetupObjectPairFar(s32 user_id, s32 targetId);
131struct AnimationObject *
133 struct AnimationObject *sharedSprite);
135void BattleParty_ApplyDrainFar(s32 amount, s32 unused);
138void Djinn_JoinPartyFar(s32 slot, s32 element, s32 djinn);
139void EffectSlot_UpdateFar(struct EffectSlot *effect);
141void EffectSlot_SetPositionFar(struct EffectSlot *effect, s32 x, s32 z);
142void EffectSlot_SetObjectModeFar(struct EffectSlot *effect, s32 mode);
144 EffectCallback callback);
145void EffectSlot_InitializeFar(struct EffectSlot *effect, s32 kind, s32 x,
146 s32 z);
153void Motion_LaunchFromFocusedObjectFar(u32 arg0, s32 arg1, s32 arg2, s32 arg3);
155 s32 z_offset);
157 s32 z_offset);
158void Object_LinkObjectAndSetCallbackFar(u32 objectId, u32 linked_object_id);
160/// Far call to ObjectTable_Snapshot.
170#if TBS_PATCH_2
171void BattleFx_ClearRandomParticlesFar(void);
172#endif
void(*) EffectCallback(struct EffectSlot *)
Definition effect_slot.h:14
void BattleFx_ConfigureLinkedObjectFar(s32 id, s32 flags)
s32 Field_RunSceneFar(s32 entrance)
s32 Menu_AskYesNoFar(s32 value)
void EventObject_InitializeFar(void)
void Camera_MoveWithinMapBoundsFar(s32 requested_x, s32 requested_y, s32 requested_z, s32 use_setter)
void Audio_PlayCueFromEventWorkFar(void)
void Event_SetSceneEventsFar(const struct SceneEvent *events)
void FieldEvent_ShowMessageAndWaitFar(s32 action, s32 flag)
void Motion_SetModeAndWaitAnimationFar(u32 objectId, s32 action)
void FieldFx_StartLightningFar(void)
void Field_RequestBattleFromEncounterTableFar(s32 zone_no, s32 slot_no)
void BattlePres_RunActionThenWaitIfModeZeroFar(s32 first, s32 second, s32 value)
void Scene_AssignViewFlagsFar(struct ScenePlacement *entry)
void BattleFx_SetQueuedSoundAndPlayFar(s32 sound_id)
void EffectRuntime_StopCurrentObjectFar(void)
void ObjectGroup_SetChildValueFar(struct FieldActor *actor, s32 value)
void Object_SetTargetAndCallbackFar(u32 objectId, s32 targetId, const void *callback)
void Event_SetDefeatDestinationFar(s32 first, s32 second)
void Camera_WorldToScreenFar(struct EffectVector *position)
s32 BattleFx_PlayCueAndStartEmitterOnTargetFar(s32 effect, s32 target, s32 mode)
void * ObjectTable_GetFar(u32 index)
void ObjectMotion_OffsetPositionAndResetFar(u32 objectId, s32 x_offset, s32 z_offset)
void Motion_LaunchFromFocusedObjectFar(u32 arg0, s32 arg1, s32 arg2, s32 arg3)
void Object_RefreshSelectorByIdFar(u32 objectId)
void BattleFx_ApplyColorToTargetBufferFar(s32 mode, s32 half)
void ObjectMotion_EnableActionAndResetMotionFar(u32 objectId)
void EffectRuntime_RunRisingObjectSequenceFar(void *object, s32 flags)
void Event_SetMessageIdFar(s32 value)
void Field_RequestDjinnBattleFar(s32 flag, s32 no)
void FieldEffect_InitSparklesFar(void)
void Party_LearnAbilityFar(s32 unit, s32 ability)
void BattleFx_SpawnLinkedFar(s32 id, s32 mode, s32 wait)
void Object_SetActionByIdFar(u32 objectId, s32 action)
void BattleFx_SetupObjectPairFar(s32 user_id, s32 targetId)
void Event_ClearInvalidPackedValuesFar(void)
void ObjectVisual_CopyAttributesFar(u32 targetId, u32 sourceId)
void Event_FinishScreenTransitionFar(void)
void ObjectMotion_SetAngleTowardFar(s32 firstId, s32 second_id, s32 wait)
s32 PartyInventory_GiveItemFar(s32 item, s32 unused)
void Marker_MoveLeaderAwayFar(void)
s32 BattleFx_GetResourceIdFar(u32 id)
void Ui_SetMessageVoiceFromActorFar(s32 arg0)
void ObjectMotion_ArmCallbackFar(s32 objectId, s32 angle, s32 wait)
void Map_SetViewBoundsFar(s32 minX, s32 minY, s32 maxX, s32 maxY)
void BattleFx_ClearOwnedSlotFar(struct EffectSlot *slot)
s32 Object_GetScreenPositionFar(s32 objectId, s32 *position)
u32 BattleFx_HasTriggerFar(u16 item)
void BattleFx_LoadActionEffectResourcesFar(s32 abilityId, s32 mode)
void Battle_ShowPairedUnitWorkAndWaitFar(s32 first, s32 first_x, s32 first_y, s32 first_arg, s32 first_extra, s32 second, s32 second_x, s32 second_y, s32 second_arg, s32 second_extra)
void WorldMap_EndEventFar(void)
void ObjectTable_DestroyByIdFar(s32 index)
u32 EffectSlot_HasPendingTargetFar(struct EffectSlot *effect)
void Event_RequestDestinationFar(u16 first, u16 second)
void ObjectMotion_ResetAndSetPositionFar(u32 objectId, s32 x, s32 z)
s32 Scene_GetAreaNameIndexFar(s32 scene, s32 entrance)
void Event_SetExitRequestFar(u16 value)
void Event_SetDestinationFar(s32 first, s32 second)
void Motion_SetVarCbAndRefreshFar(u32 objectId, s32 variant)
void BattleEffect_CleanupSceneObjectsFar(void)
void EffectSlot_SetCallbackFar(struct EffectSlot *effect, EffectCallback callback)
void Object_PlaceCurrentWithinCameraBoundsFar(s32 arg0, s32 arg1)
void BattleFx_FinishSceneAndReleaseHeapBlockFar(void)
void BattleFx_InitializeSlotsFar(void)
void EffectSlot_InitializeFar(struct EffectSlot *effect, s32 kind, s32 x, s32 z)
void SaveState_CaptureObjectTableFar(void)
Far call to ObjectTable_Snapshot.
void ObjectMotion_LaunchFar(u32 objectId, s32 speed, s32 event_id)
void Object_LinkPairFar(s32 firstId, s32 second_id, s32 wait)
void ObjectMotion_CommitPositionAndActivateFar(u32 objectId, s32 x_offset, s32 z_offset)
void FieldFx_LastLightningFar(void)
void Event_PrepareTwoObjectsAndApplyFar(s32 first, s32 second)
void Object_SetActionCallbackAndRefreshByIdFar(u32 objectId, s32 action)
void Event_CallWithLastActiveObjectIdFar(struct ScenePlacement *table)
void ObjectMotion_OffsetPositionAndResetMotionFar(u32 objectId, s32 x_offset, s32 z_offset)
void BattleFx_ApplyColorToSourceBufferFar(s32 mode, s32 half)
void Camera_SetSpeedParametersFar(s32 first, s32 second)
void BattleFx_StartBufferBlendFar(s32 from, s32 to)
struct UiWindow * UiText_OpenMessageAtObjectFar(s32 arg, s32 unused)
void BattleFx_StartFadeOverlayFar(void *object)
s32 BattleFx_HasMatchingEvent5Far(s32 group)
void Event_WaitTransitionFramesFar(void)
void ObjectMotion_CommitCurrentPositionAndActivateFar(u32 objectId)
void ObjectMotion_SetHorizontalPositionWithTerrainFar(u32 objectId, s32 x, s32 z)
void Camera_FollowActorFar(s32 id, s32 flag)
s32 Party_RemapCharacterIdByFlagsFar(s32 arg0)
void ObjectMotion_SetVariantCallbackFar(u32 objectId, s32 variant)
void EffectSlot_SetPositionFar(struct EffectSlot *effect, s32 x, s32 z)
void Camera_WaitForArrivalFar(void)
void ObjectMotion_SetPositionAndCommitFar(u32 objectId, s32 x, s32 z)
s32 Field_ClimbDownFar(void)
void BattleFx_PlayQueuedSoundFar(void)
s32 Field_TryJumpForwardFar(void)
void FieldFx_StartGroundParticlesFar(void)
void EffectSlot_UpdateFar(struct EffectSlot *effect)
void Actor_JumpDownLedgeFar(s32 sequence_arg, s32 mode_or_frame, s32 optional_action)
void ObjectMotion_SetActionVariantFar(s32 objectId, s32 priority)
void BattleEffect_PauseObjectFar(s32 id)
void DisplayScroll_DisarmHBlankDmaFar(void)
void BattleFx_ClearActiveSlotsAndScheduleUpdatesFar(void)
s32 Event_AskYesNoWithActorAnimationFar(s32 actor, s32 force_bottom)
void Object_SetModeByIdFar(u32 objectId, s32 action)
void ObjectMotion_SetSpeedParametersFar(u32 objectId, s32 speedLimit, s32 acceleration)
void Marker_SetActorPositionFar(s32 id, s32 x, s32 y)
void Battle_ResetEffectCounterFar(void)
void Ui_SetBank15PaletteAndClearRenderModeFar(void)
void FieldEvent_WaitFramesFar(s32 frames)
void Event_WaitForZoomTransitionFar(void)
void Djinn_JoinPartyFar(s32 slot, s32 element, s32 djinn)
void FieldFx_StopLightningFar(void)
void Object_LinkObjectAndSetCallbackFar(u32 objectId, u32 linked_object_id)
void FieldFx_ResumeLightningFar(void)
void FieldEvent_EndFar(void)
void ObjectGroup_ConfigureChildValueFar(s32 objectId, s32 value)
s32 Field_ClimbUpFar(void)
void BattleFx_ScheduleRatioTransitionFar(s32 zoom, s32 frames)
void ObjectMotion_EnableActionAndSetCallbackFar(u32 objectId, s32 action)
void BattleFx_StartEffectObject22Far(s32 value, s32 flags)
void Event_StartScreenTransitionFar(void)
void Party_RemoveOwnerRestoredFar(s32 owner)
void ObjectMotion_SetActionCallbackFar(struct ObjectRuntime *object, s32 kind)
s32 FieldEvent_AskYesNoAndShowResponseFar(s32 objectId, s32 actionId)
s16 Event_GetSpecialValueFar(void)
void ObjectMotion_SetPositionAndResetFar(u32 objectId, s32 x, s32 z)
void DisplayScroll_InitializeHBlankDmaFar(s32 mode, s32 freqX, s32 stepX, s32 ampX, s32 freqY, s32 stepY, s32 ampY)
void Leader_StopMovingFar(void)
void Field_DispatchTypeHandlerFar(s32 kind)
struct FieldActor * Camera_GetEventObjectFar(void)
void FieldEvent_BeginFar(void)
s32 Object_GetTriggerTileAheadOfCurrentFar(void)
void ObjectMotion_CenterOnColumnFar(u32 objectId, s32 action, s32 z_offset)
void ObjectMotion_WaitForAnimationChangeFar(u32 objectId)
void BattleFx_StartBufferInterpolationFar(s32 frames)
void DisplayTransition_InitializeBattleEffectStateFar(s32 mode)
struct AnimationObject * Sprite_ShareVramCacheFar(struct AnimationObject *sourceSprite, struct AnimationObject *sharedSprite)
void Event_SetNextDestinationFar(s32 first, s32 second)
void Game_ResetForNewGameFar(s32 mode)
void BattleParty_ApplyDrainFar(s32 amount, s32 unused)
void EffectSlot_SetObjectModeFar(struct EffectSlot *effect, s32 mode)
void ObjectMotion_ResetAndSetPositionInMode2Far(u32 objectId, s32 x, s32 z)
void ObjectTable_RestoreFar(void)
void WorldMap_BeginEventFar(void)
struct FieldActor * Object_GetByIdFar(s32 objectId)
s32 Party_RemapCharacterIdIfEnabledFar(s32 arg0, s32 arg1)
void RunSceneTransitionEffectFar(s32 x, s32 y)
void Event_PrepareObjectAndApplyValueFar(s32 event_id, s32 value)
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
Definition animspr.h:108
u8 slot
VRAM cache entry holding its tiles.
Definition animspr.h:112
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 actor: a person or thing on the field with a position, motion toward a target,...
Definition field_obj.h:30
s32 speed
speed limit, 16.16 fixed-point pixels per frame
Definition field_obj.h:55
union FieldCoordinate x
16.16 fixed-point pixels
Definition field_obj.h:35
union FieldCoordinate y
16.16 fixed-point pixels
Definition field_obj.h:36
union FieldCoordinate z
16.16 fixed-point pixels
Definition field_obj.h:37
s32 acceleration
Added toward the target each frame, or taken off the speed when there is none, in 16....
Definition field_obj.h:58
u16 wait
the object script's wait, in frames (ScriptMotionObject)
Definition field_obj.h:98
One of the 64 field objects in the object pool (heap slot 5): its script, position,...
A scene event: its kind and detail, the trigger it answers, its condition and its value (a message or...
An actor a scene places: its sprite, the condition for placing it, how it behaves,...
Definition field_scene.h:81
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...
Definition uiwindow.h:11
u16 flags
UI_WINDOW_ flags; 0 once closing or free.
Definition uiwindow.h:25
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