Skip to Content
The Alchemy Project

include/battle/stubs.h

The stub calls into the battle module, as the other modules' code calls them.

Included by battle_effect_internal.h and window_internal.h.

Functions

NameDescription
FIXEDbtUnitGetEffectHeightStub (Sint32 unitId)Returns the height above a unit where its battle effects play, in 16.16 pixels.
voidbtBackgroundLoadStub (Sint32 mode, Sint32 resource, Sint32 level)Loads a battle background, its palette darkened by level sixtieths.
voidbtCameraSetViewStub (Sint32 x, Sint32 depth, Sint32 y, Sint32 zoom)Points the battle camera at (x, depth, y) with a zoom in percent.
voidbtBackgroundSetPaletteLevelStub (Sint32 unused, Sint32 level)Darkens the battle background's palette by level sixtieths; 0 restores it.
void *btActorGetSpriteStub (void *object, Sint32 recordIndex)Returns sprite recordIndex of a unit's motion object, or null.
Sint32btMotionProjectCursorPointStub (Sint32 unitId, struct TARGET_POINT *screen)Projects the point above a unit, where the target cursor points, onto the screen.
voidbtActorSpawnObjectsForListStub (Sint16 *list, Sint32 refresh)Readies the sprites of the listed units and destroys every other unit's.
voidbtObjectDestroySpritesStub (Sint32 unitId)Destroys a unit's sprites, its status icon and shadow with them.
voidbtObjectPutStub (void)Readies every unit's sprites, destroying those of units no longer in the battle, and sets each unit's pose again.
voidbtMotionApplyKnockbackStub (Sint32 unitId, Sint32 variant)Knocks a unit back as variant (BATTLE_KNOCKBACK) says.
voidbtPlaybackStartStub (Sint32 sound)Plays the action on its targets as the blow lands, with sound as the hit's sound (0 keeps the one set).
voidbtColorBufferScaleStub (void *src, void *dest, Sint32 scale, Sint32 count)Writes count colours of source to destination scaled by scale / 256.
voidbtBackgroundSetModeStub (Sint32 mode, Sint32 background, Sint32 fade)Switches the battle background's display mode, darkened by fade.
voidbtChangeEnemyFormStub (Sint32 formation)Replaces the first enemy with the Doom Dragon's next form after formation.
Sint32btMotionGetSlotPaletteStub (Sint32 unitId)Returns the palette of a unit's battle object.
Sint32btPartyPrepareReserveOwnersStub (Uint16 *owners)Lists the party's reserve members into owners and returns how many there are.
Sint32btUnitListLivingIdsStub (Sint32 sideMask, Uint16 *unitIds)As btUnitListIds, listing only the units whose HP is not 0.
voidbtSummonUpdateAvailabilityStub (void)Works out which summons the party can call.
voidbtCameraSetCommandViewStub (Sint32 verticalOffset)Turns the battle camera to the view the commands are chosen in, raised by verticalOffset pixels.
Sint32btUnitListIdsStub (Sint32 sideMask, Uint16 *unitIds)Lists the units on the sides in sideMask into unitIds, or only counts them when it is NULL, and returns how many.
Sint32btPartyPrepareMembersStub (Uint16 *owners)Lists the party members who fight into owners when it is not NULL, and returns how many.
struct BATTLE_OBJECT *btObjectGetStub (Sint32 objectId)Returns a unit's battle object, or null for a unit with no place (btObjectGet).

Description

The stub calls into the battle module, as the other modules' code calls them.

Functions in detail

btUnitGetEffectHeightStub

FIXED btUnitGetEffectHeightStub(Sint32 unitId)

Returns the height above a unit where its battle effects play, in 16.16 pixels.

Referenced by btEffectRunAttackSlash(), btEffectRunBreak(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunCriticalHit(), btEffectRunDeathPlunge(), btEffectRunDrainMotes(), btEffectRunFire(), btEffectRunFroth(), btEffectRunGatheringLights(), btEffectRunNirvana(), btEffectRunProjectileVolley(), btEffectRunSoulShatter(), btEffectRunStarMine(), btEffectRunStatBoost() and btUnitProjectToScreen().

Definition at line 13 of file stubs.h.

btBackgroundLoadStub

void btBackgroundLoadStub(Sint32 mode, Sint32 resource, Sint32 level)

Loads a battle background, its palette darkened by level sixtieths.

Referenced by btEffectRunAtalanta(), btEffectRunAzul(), btEffectRunBackgroundFadeIn(), btEffectRunBoreas(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCondemn(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunEclipse(), btEffectRunFlora(), btEffectRunGeode(), btEffectRunHaures(), btEffectRunHeartbreak(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunMegiddo(), btEffectRunNeptune(), btEffectRunOdyssey(), btEffectRunProcne(), btEffectRunRamses(), btEffectRunRisingDragonEnemy(), btEffectRunShatteringOpening(), btEffectRunThor(), btEffectRunUlysses(), btEffectSetupBlendedDisplay(), btIrisChangeBackdrop() and btIrisRestoreBattle().

Definition at line 15 of file stubs.h.

btCameraSetViewStub

void btCameraSetViewStub(Sint32 x, Sint32 depth, Sint32 y, Sint32 zoom)

Points the battle camera at (x, depth, y) with a zoom in percent.

Referenced by btEffectOpenCanvasLayer(), btEffectRunBackgroundFadeIn(), btEffectRunDragonCloud(), btEffectRunFire(), btEffectRunShatteringOpening(), btEffectRunVoidBeam(), btEffectStartCanvasLayer() and btEffectStartElementStreaks().

Definition at line 17 of file stubs.h.

btBackgroundSetPaletteLevelStub

void btBackgroundSetPaletteLevelStub(Sint32 unused, Sint32 level)

Darkens the battle background's palette by level sixtieths; 0 restores it.

Referenced by btEffectEndCanvasLayer() and btEffectRunCriticalHit().

Definition at line 19 of file stubs.h.

btActorGetSpriteStub

void *btActorGetSpriteStub(void *object, Sint32 recordIndex)

Returns sprite recordIndex of a unit's motion object, or null.

Referenced by btEffectRunAzul(), btEffectRunCybele(), btEffectTintBattler(), btObjectSetSpritePriority() and btUnitProjectToScreen().

Definition at line 21 of file stubs.h.

btMotionProjectCursorPointStub

Sint32 btMotionProjectCursorPointStub(Sint32 unitId, struct TARGET_POINT *screen)

Projects the point above a unit, where the target cursor points, onto the screen.

Referenced by mnBattleTargetRunSelection().

Definition at line 24 of file stubs.h.

btActorSpawnObjectsForListStub

void btActorSpawnObjectsForListStub(Sint16 *list, Sint32 refresh)

Readies the sprites of the listed units and destroys every other unit's.

Referenced by btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunEclipse(), btEffectRunMegiddo(), btEffectRunOdyssey(), btEffectShowLivingTargets(), btIrisChangeBackdrop() and mnBattleStatusScreenRun().

Definition at line 27 of file stubs.h.

btObjectDestroySpritesStub

void btObjectDestroySpritesStub(Sint32 unitId)

Destroys a unit's sprites, its status icon and shadow with them.

Referenced by btEffectRunAzul() and mnBattleStatusScreenRun().

Definition at line 29 of file stubs.h.

btObjectPutStub

void btObjectPutStub(void)

Readies every unit's sprites, destroying those of units no longer in the battle, and sets each unit's pose again.

Referenced by btEffectRunMegiddo(), btEffectRunOdyssey(), btEffectRunStarfieldFall(), mnBattleCollectPartyCommands(), mnBattlePartyChooseReserve() and mnBattleStatusScreenRun().

Definition at line 32 of file stubs.h.

btBackgroundSetModeStub

void btBackgroundSetModeStub(Sint32 mode, Sint32 background, Sint32 fade)

Switches the battle background's display mode, darkened by fade.

Referenced by btEffectEndCanvasLayer(), btEffectHideBg1AndRestoreBackdrop(), btEffectOpenCanvasLayer(), btEffectRunBackgroundFadeIn(), btEffectRunCanvasBurst(), btEffectRunJudgment(), btEffectRunProcne(), btEffectRunShatteringOpening(), btEffectSetupCanvasTileMap(), btEffectStartCanvasLayer() and btEffectStartElementStreaks().

Definition at line 42 of file stubs.h.

btChangeEnemyFormStub

void btChangeEnemyFormStub(Sint32 formation)

Replaces the first enemy with the Doom Dragon's next form after formation.

Referenced by btEffectRunFormChange().

Definition at line 44 of file stubs.h.

btMotionGetSlotPaletteStub

Sint32 btMotionGetSlotPaletteStub(Sint32 unitId)

Returns the palette of a unit's battle object.

Referenced by btEffectTintBattler().

Definition at line 46 of file stubs.h.

btPartyPrepareReserveOwnersStub

Sint32 btPartyPrepareReserveOwnersStub(Uint16 *owners)

Lists the party's reserve members into owners and returns how many there are.

Referenced by mnBattleCollectPartyCommands() and mnBattlePartyChooseReserve().

Definition at line 48 of file stubs.h.

btUnitListLivingIdsStub

Sint32 btUnitListLivingIdsStub(Sint32 sideMask, Uint16 *unitIds)

As btUnitListIds, listing only the units whose HP is not 0.

Referenced by mnBattlePartyChooseReserve().

Definition at line 50 of file stubs.h.

btSummonUpdateAvailabilityStub

void btSummonUpdateAvailabilityStub(void)

Works out which summons the party can call.

Referenced by mnBattleCollectPartyCommands().

Definition at line 52 of file stubs.h.

btCameraSetCommandViewStub

void btCameraSetCommandViewStub(Sint32 verticalOffset)

Turns the battle camera to the view the commands are chosen in, raised by verticalOffset pixels.

Referenced by mnBattleCollectPartyCommands() and mnBattleMenuUpdateEachTick().

Definition at line 55 of file stubs.h.

btUnitListIdsStub

Sint32 btUnitListIdsStub(Sint32 sideMask, Uint16 *unitIds)

Lists the units on the sides in sideMask into unitIds, or only counts them when it is NULL, and returns how many.

Referenced by mnBattleCollectPartyCommands() and mnPartyStatusHighlightMembers().

Definition at line 59 of file stubs.h.

btPartyPrepareMembersStub

Sint32 btPartyPrepareMembersStub(Uint16 *owners)

Lists the party members who fight into owners when it is not NULL, and returns how many.

Referenced by mnPartyStatusBuildLayoutBounds() and mnPartyStatusDraw().

Definition at line 62 of file stubs.h.

btObjectGetStub

struct BATTLE_OBJECT *btObjectGetStub(Sint32 objectId)

Returns a unit's battle object, or null for a unit with no place (btObjectGet).

Referenced by btEffectHopBackToSpot(), btEffectRunAgingGas(), btEffectRunAnnihilation(), btEffectRunAstralBlast(), btEffectRunAttackSlash(), btEffectRunAzul(), btEffectRunBackstab(), btEffectRunBind(), btEffectRunBreak(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunCharon(), btEffectRunCriticalHit(), btEffectRunCruelRuin(), btEffectRunCrystal(), btEffectRunCybele(), btEffectRunDeathPlunge(), btEffectRunDjinnBeams(), btEffectRunDjinnHeal(), btEffectRunDjinniCharge(), btEffectRunDjinniEntrance(), btEffectRunDragonCloud(), btEffectRunDragonFire(), btEffectRunDrainMotes(), btEffectRunFire(), btEffectRunFireDance(), btEffectRunFirePuppet(), btEffectRunFlashingStrike(), btEffectRunFlurry(), btEffectRunFroth(), btEffectRunGaspFamily(), btEffectRunGatheringLights(), btEffectRunGeode(), btEffectRunGround(), btEffectRunHaunt(), btEffectRunHealingMotes(), btEffectRunHeavyBlow(), btEffectRunLeapingStrike(), btEffectRunLightSurge(), btEffectRunLobbedShells(), btEffectRunMegiddo(), btEffectRunMineBall(), btEffectRunMoteFountain(), btEffectRunNereid(), btEffectRunNereidCopy(), btEffectRunNirvana(), btEffectRunOdyssey(), btEffectRunPlumeEdge(), btEffectRunProcne(), btEffectRunProjectileVolley() and 40 more.

Definition at line 66 of file stubs.h.