src/field/script_commands_view.c
The view bounds, zoom transitions and actors that ride another. More…
Included by script_commands.c.
Macros
| Name | Description | |
|---|---|---|
#define | EMOTE_BUBBLE_MASK 0xff | fdActorShowEmoteById's emote: the bubble (EMOTE) in its low byte, of which the low four bits pick its animation, then flags (EMOTE_IN_FRONT). |
#define | EMOTE_ANIMATION_MASK 15 |
Functions
| Name | Description | |
|---|---|---|
void | fdMapGridSetCameraBounds (Sint32 minX, Sint32 minZ, Sint32 maxX, Sint32 maxZ) | Sets the map coordinates the camera keeps the screen inside. |
void | fdWorldMapStepZoom (void) | Each tick of a World Map zoom: moves the zoom from zoomFrom toward zoomTo over zoomFrame ticks. |
void | fdWorldMapStartZoom (FIXED zoom, Sint32 ticks) | Starts a zoom to zoom (16.16) over ticks ticks, on the World Map only: fdWorldMapStepZoom takes the view's MAP_STATE.zoom to farPlane / zoom. |
void | fdScriptWaitForZoomTransition (void) | Waits for a zoom transition to end (on the World Map only, at most 300 ticks). |
Sint32 | fdEffectCopyWatchedActorPos (ACTOR *actor) | Per-tick update: keeps the actor on the actor it watches, raised by the height of that actor's sprite and 8 pixels more. |
ACTOR * | fdActorShowEmoteById (Sint32 actorId, Sint32 emote, Sint32 ticks) | The script command "actor show emote": shows an emote bubble (SPRITE_EMOTE) over an actor, then waits the given number of ticks. |
Bool | fdActorIsNotAttachedEffect (ACTOR *actor) | Returns 0 while the actor's sprite is an attached effect (SPRITE_RAY_ARC), else 1. |
Variables
| Name | Description | |
|---|---|---|
extern const Uint8 | EmoteBubbleScript [] | An emote bubble's script (fdActorShowEmoteById): it pops up, squashing and stretching, stays 30 ticks and is released. |
Description
The view bounds, zoom transitions and actors that ride another. Part of
script_commands.c.
Macros in detail
EMOTE_BUBBLE_MASK
#define EMOTE_BUBBLE_MASK 0xff
fdActorShowEmoteById's emote: the bubble (EMOTE) in its low byte, of which
the low four bits pick its animation, then flags (EMOTE_IN_FRONT).
Referenced by fdActorShowEmoteById().
Definition at line 8 of file script_commands_view.c.
EMOTE_ANIMATION_MASK
#define EMOTE_ANIMATION_MASK 15
Referenced by fdActorShowEmoteById().
Definition at line 9 of file script_commands_view.c.
Functions in detail
fdMapGridSetCameraBounds
void fdMapGridSetCameraBounds(Sint32 minX, Sint32 minZ, Sint32 maxX, Sint32 maxZ)
Sets the map coordinates the camera keeps the screen inside.
References Sint32.
Referenced by fdSetCameraBounds() and scLemurianShipSetUpHold().
Definition at line 12 of file script_commands_view.c.
fdWorldMapStepZoom
void fdWorldMapStepZoom(void)
Each tick of a World Map zoom: moves the zoom from zoomFrom toward zoomTo over zoomFrame ticks.
References ScanlinePitch, Sint32, syCloseEvent() and syHeapSlotAllocateEWRAM().
Referenced by fdWorldMapStartZoom().
Definition at line 27 of file script_commands_view.c.
fdWorldMapStartZoom
void fdWorldMapStartZoom(FIXED zoom, Sint32 ticks)
Starts a zoom to zoom (16.16) over ticks ticks, on the World Map only:
fdWorldMapStepZoom takes the view's MAP_STATE.zoom to farPlane / zoom.
References fdWorldMapStepZoom(), result, Sint32, syDivFX(), syHeapSlotAllocateEWRAM() and sySetEvent().
Referenced by fdWorldMapZoomOutWhileLHeld() and scFieldWorldMapStartZoom().
Definition at line 58 of file script_commands_view.c.
fdScriptWaitForZoomTransition
void fdScriptWaitForZoomTransition(void)
Waits for a zoom transition to end (on the World Map only, at most 300 ticks).
References Sint32, syHeapSlotAllocateEWRAM() and sySynch().
Referenced by scWorldMapDeliverLohoCannon(), scWorldMapExplainGivingDjinn(), scWorldMapFightBanditAndThieves() and scWorldMapMeetEcho().
Definition at line 78 of file script_commands_view.c.
fdEffectCopyWatchedActorPos
Sint32 fdEffectCopyWatchedActorPos(ACTOR *actor)
Per-tick update: keeps the actor on the actor it watches, raised by the height of that actor's sprite and 8 pixels more.
References fdFindActorPlacement(), fdResourceGetMetadataRecordStubStub() and Sint32.
Referenced by fdActorShowEmoteById() and fdEffectSetAttached().
Definition at line 101 of file script_commands_view.c.
fdActorShowEmoteById
ACTOR *fdActorShowEmoteById(Sint32 actorId, Sint32 emote, Sint32 ticks)
The script command "actor show emote": shows an emote bubble (SPRITE_EMOTE)
over an actor, then waits the given number of ticks. Returns the bubble.
References EmoteBubbleScript, fdActorCreateStub(), fdActorLookup(), fdActorSelectAnimationStub(), fdActorStartScriptStub(), fdEffectCopyWatchedActorPos(), fdScriptWait(), Sint32 and sySoundPlayStub().
Referenced by fdActorShowEmote(), fdDjinnRunBattleStartHop(), scAlhafraFindGoldCoins(), scAlhafraMadransArrive(), scAlhafraManorBriggsEscapes(), scAlhafraSailorToldToWork(), scAncientLemuriaMeetTheLemurians(), scAnkohlRuinsCarriedOffLedge(), scApojiiIslandsDouseAquaStone(), scAttekaInletHammaShowsTheWings(), scAttekaInletHammetsMessengerArrives(), scAttekaInletShipwrightsStopTheParty(), scChampaCliffCavesAskIfBriggsLearned(), scChampaCliffCavesObabaAsksForSecondPiece(), scChampaCliffCavesObabaForgesTrident(), scChampaCliffCavesObabaMournsSalamander(), scChampaCliffCavesObabaSeesAWeapon(), scDailaMeetAlex(), scDehkanPlateauCannonCornered(), scDehkanPlateauCannonCracksPillars(), scDehkanPlateauCannonDropsPoundCube(), scDehkanPlateauCannonFleesEast(), scDehkanPlateauCannonFleesOverCracks(), scDehkanPlateauCannonLeapsAway(), scDehkanPlateauCannonPoundsLeaderThrough(), scDehkanPlateauCannonPoundsStake(), scEasternAlhafraShipBriggsIsCaught(), scEasternAlhafraShipMayorArrives(), scFieldActorShowEmote(), scGabombaCatacombsGabombaBestowsPower(), scGabombaStatueChamberAkafubuOffersToHelp(), scGabombaStatueChamberGabombaNamesWitchDoctor(), scGabombaStatueChamberWhereIsTheOrb(), scIdejimaCatchUpWithFelix(), scIdejimaWakeSheba(), scInit(), scIsletsGiveTurtle(), scIsletsTradeWithCow(), scIzumoFinishMovingStone(), scIzumoOfferATokenOfGratitude(), scIzumoRoomsAskAfterSusa(), scIzumoRoomsGiveUzumeTheDoll(), scIzumoRoomsReadUzumesMind(), scIzumoRoomsRecognizeTheHeroes(), scIzumoStopThePartyToThankThem(), scIzumoTellTheCloudBrandLegend(), scKandoreanTempleMeditate(), scKandoreanTempleMeetPoi(), scKandoreanTemplePassTheTest(), scKandoreanTempleReadTheGateStudent() and 20 more.
Definition at line 128 of file script_commands_view.c.
fdActorIsNotAttachedEffect
Bool fdActorIsNotAttachedEffect(ACTOR *actor)
Returns 0 while the actor's sprite is an attached effect (SPRITE_RAY_ARC),
else 1.
References Sint32.
Referenced by fdEffectSetAttached().
Definition at line 171 of file script_commands_view.c.