src/menu/menu_use.c
Using an item or Psynergy from the menu: what it does to the party, and the sound it plays. More…
Included by menu.c.
Functions
| Name | Description | |
|---|---|---|
void | mnItemPrepareUsePalette (void) | Unused: lends HIGHLIGHT_PALETTE to the item icons and makes the highlight in the palette below it instead. |
void | mnItemUseNoOperation (void) | Unused: does nothing. |
Sint32 | mnItemUse (Sint32 slot, Sint32 memberId, Sint32 targetId) | Uses the item in memberId's inventory slot on targetId, or on every party member when its ability's range is ABILITY_RANGE_ALL, at the ability's plain power; a consumed item leaves the bag, and Hermes' Water leaves its Empty Bottle. |
Sint32 | mnItemUseReturnTrue (void) | Unused: returns 1. |
Sint32 | mnAbilityApplyToTargets (Sint32 abilityId, Sint32 casterId, Sint32 targetId, Sint32 fixedPower) | Applies the healing, curing, revival or lasting stat rise of ability abilityId, used by party member casterId, to targetId, or to every party member when its range is ABILITY_RANGE_ALL. |
void | mnItemPlayUseSound (Uint32 item) | Plays the sound of using the item's ability from the menu. |
void | mnAbilityPlayUseSound (Sint32 abilityId) | Plays the sound of an ability used from the menu, and returns at once: no animation is drawn and nothing waits. |
Sint32 | mnAbilityReturnFalse (void) | Unused: returns 0. |
Description
Using an item or Psynergy from the menu: what it does to the party, and the
sound it plays. Part of menu.c.
Functions in detail
mnItemPrepareUsePalette
void mnItemPrepareUsePalette(void)
Unused: lends HIGHLIGHT_PALETTE to the item icons and makes the highlight in
the palette below it instead.
References mnPaletteLightenHighlight() and mnPaletteLoadIconsIntoHighlight().
Definition at line 8 of file menu_use.c.
mnItemUseNoOperation
void mnItemUseNoOperation(void)
Unused: does nothing.
Definition at line 15 of file menu_use.c.
mnItemUse
Sint32 mnItemUse(Sint32 slot, Sint32 memberId, Sint32 targetId)
Uses the item in memberId's inventory slot on targetId, or on every party
member when its ability's range is ABILITY_RANGE_ALL, at the ability's plain
power; a consumed item leaves the bag, and Hermes' Water leaves its Empty
Bottle. Returns 0, or -1 when it did nothing and the menu is to show why.
References gmInventoryRemoveStub(), gmItemGetDefinitionStub(), gmUnitGetStub(), mnAbilityApplyToTargets(), mnItemMenuCollectItems() and Sint32.
Referenced by mnItemMenuUse().
Definition at line 23 of file menu_use.c.
mnItemUseReturnTrue
Sint32 mnItemUseReturnTrue(void)
Unused: returns 1.
References Sint32.
Definition at line 57 of file menu_use.c.
mnAbilityApplyToTargets
Sint32 mnAbilityApplyToTargets(Sint32 abilityId, Sint32 casterId, Sint32 targetId, Sint32 fixedPower)
Applies the healing, curing, revival or lasting stat rise of ability
abilityId, used by party member casterId, to targetId, or to every party
member when its range is ABILITY_RANGE_ALL. An item heals by the ability's
power as it stands (fixedPower); Psynergy scales it by the caster's power in
its element. Leaves the result's message in the menu's msgOffset and returns
0, or -1 when nothing changed.
References gmAbilityGetDefinitionStub(), gmBattleCalculateRecoveryStub(), gmUnitCalculateStub(), gmUnitGetStub(), gmUnitRecalculateGaugesStub(), mnMessageArgumentPushStub() and Sint32.
Referenced by mnItemUse() and mnPsynergyMenuRunSteps().
Definition at line 68 of file menu_use.c.
mnItemPlayUseSound
void mnItemPlayUseSound(Uint32 item)
Plays the sound of using the item's ability from the menu.
References gmItemGetDefinitionStub() and mnAbilityPlayUseSound().
Referenced by mnItemMenuUse().
Definition at line 388 of file menu_use.c.
mnAbilityPlayUseSound
void mnAbilityPlayUseSound(Sint32 abilityId)
Plays the sound of an ability used from the menu, and returns at once: no animation is drawn and nothing waits.
References gmAbilityGetDefinitionStub(), mnUseSoundPlay() and Sint32.
Referenced by mnItemPlayUseSound() and mnPsynergyMenuRunSteps().
Definition at line 396 of file menu_use.c.
mnAbilityReturnFalse
Sint32 mnAbilityReturnFalse(void)
Unused: returns 0.
References Sint32.
Definition at line 437 of file menu_use.c.