|
Digimon World 3 decomp
The European version, SLES_039.36
|
CARDGAME's card screen (CARDGAME_createScreen): its task and the functions the battle calls on it. More...
#include "cardgame/card_battle.h"Go to the source code of this file.
Functions | |
| void | CARDGAME_updateScreen (CardScreen *screen, CardScreenItems *items) |
| The card screen's task: makes its cursor and text windows, then each frame updates its blinkers, windows, sprites, gauges, background and panels. | |
| void | CARDGAME_openGauge (CardScreen *screen, s32 index, s16 value) |
| Opens gauge index showing value, over 10 frames. | |
| void | CARDGAME_closeGauge (CardScreen *screen, s32 index) |
| Closes gauge index, over 5 frames. | |
| void | CARDGAME_openWindow (CardScreen *screen, s32 index, s16 layout, s32 value, s32 x, s32 y) |
| Opens window index (CardScreen.windows) at x, y, with its layout and value. | |
| void | CARDGAME_closeWindow (CardScreen *screen, s32 index) |
| Closes window index. | |
| s32 | CARDGAME_showBlinker (CardScreen *screen, s32 index, s16 x, s16 y) |
| Shows blinker index, still, at x, y. | |
| s32 | CARDGAME_startBlinkerMove (CardScreen *screen, s32 index, u8 duration, s16 x, s32 y) |
| Starts moving blinker index to x, y over duration frames. | |
| void | CARDGAME_openMessage (CardScreen *screen, s32 message, s32 prompt, s16 choice, s32 place) |
| Opens the message window at place with message, asking prompt with the cursor on choice. | |
| void | CARDGAME_closeMessage (CardScreen *screen) |
| Closes the message window. | |
| void | CARDGAME_confirmMessage (CardScreen *screen) |
| Confirms the message window's choice: the cursor nudges, then it closes. | |
| void | CARDGAME_setMessageChoice (CardScreen *screen, s32 choice) |
| Puts the message window's cursor on choice. | |
| void | CARDGAME_openMenuWindow (CardScreen *screen, s16 row) |
| Opens the menu window with the cursor on row. | |
| void | CARDGAME_closeMenuWindow (CardScreen *screen) |
| Closes the menu window. | |
| void | CARDGAME_confirmMenuWindow (CardScreen *screen) |
| Confirms the menu window's row: the cursor nudges, then it closes. | |
| void | CARDGAME_setMenuWindowRow (CardScreen *screen, s16 row) |
| Puts the menu window's cursor on row. | |
| void | CARDGAME_resetPanels (CardScreen *screen) |
| Puts both panels away at once. | |
| void | CARDGAME_openPanels (CardScreen *screen) |
| Slides both panels in, over 20 frames. | |
| void | CARDGAME_closePanels (CardScreen *screen) |
| Slides both panels out, over 10 frames. | |
| void | CARDGAME_openPanel (CardScreen *screen, s32 side) |
| Slides side's panel in over 10 frames, stopping the other's. | |
| void | CARDGAME_closePanel (CardScreen *screen, s32 side) |
| Slides side's panel out over 5 frames, stopping the other's. | |
| void | CARDGAME_openPanelIcon (CardScreen *screen, s32 side) |
| Grows side's panel icon over 12 frames. | |
| void | CARDGAME_closePanelIcon (CardScreen *screen, s32 side) |
| Shrinks side's panel icon over 6 frames. | |
| s32 | CARDGAME_addSprite (CardScreen *screen, s32 index, s32 x, s32 y) |
| CardScreen.addSprite: puts a card sprite, still and at full size, at x, y. | |
| s32 | CARDGAME_startSpriteFlip (CardScreen *screen, s32 index) |
| Starts turning a sprite over (state 4, CARDGAME_flipSprite) | |
| s32 | CARDGAME_startSpriteJitter (CardScreen *screen, s32 index) |
| Starts a sprite's jitter (state 6, CARDGAME_jitterSprite), with effect 1. | |
| s32 | CARDGAME_startSpriteShake (CardScreen *screen, s32 index) |
| Starts a sprite's shake (state 7, CARDGAME_shakeSprite), with effect 1. | |
| s32 | CARDGAME_startSpriteRecovery (CardScreen *screen, s32 index) |
| Starts a sprite's effect 2 with the recovery sound (state 8), and then its blink. | |
| s32 | CARDGAME_startSpriteEffect (CardScreen *screen, s32 index, s32 which) |
| Starts a sprite's effect 3 (which 0) for 36 frames, or 4 for 28. | |
| s32 | CARDGAME_setSpriteScaleTarget (CardScreen *screen, s32 index, s32 duration, s32 scaleX, s32 scaleY, s32 instant) |
| Scales a sprite to scaleX, scaleY: at once when instant is 1, else over duration (state 2) | |
| void | CARDGAME_setSpriteScale (CardScreen *screen, s32 index, s32 scaleX, s32 scaleY) |
| CardScreen.setSpriteScale: scales a sprite at once. | |
| void | CARDGAME_scaleSprite (CardScreen *screen, s32 index, s32 duration, s32 scaleX, s32 scaleY) |
| CardScreen.scaleSprite: scales a sprite over duration. | |
| void | CARDGAME_setSpriteMove (CardScreen *screen, s32 index, s32 duration, s32 x, s32 y) |
| Sets a sprite's move to x, y over duration, from where it is. | |
| void | CARDGAME_startSpriteMove (CardScreen *screen, s32 index, s32 duration, s32 x, s32 y) |
| Starts moving a sprite to x, y over duration (state 2), with a sound at the start and the end. | |
| void | CARDGAME_startSpriteSlide (CardScreen *screen, s32 index, s32 duration, s32 x, s32 y) |
| Starts moving a sprite to x, y over duration without sounds (state 3) | |
| s32 | CARDGAME_startSpriteFly (CardScreen *screen, s32 index, s32 duration, s32 x, s32 y) |
| Starts a sprite's flight to x, y and back (state 5, CARDGAME_flySprite), after it grows for 16 frames. | |
| void | CARDGAME_setPanelValue (CardScreen *screen, s32 side, u32 which, s32 value) |
| CardScreen.setPanelValue: sets one of side's panel values: its points (0 to 4), its deck, hand and discard counts, its AP or its HP (CARD_PANEL_*) | |
| void | CARDGAME_setPanelFlags (CardScreen *screen, s32 bits) |
| CardScreen.setPanelFlags: sets the panels' blink flags from bits, two to a flag: the even bits the player's, the odd ones the opponent's. | |
| void | CARDGAME_clearPanelFlags (CardScreen *screen) |
| CardScreen.clearPanelFlags: clears both panels' blink flags. | |
| s32 | CARDGAME_removeSprite (CardScreen *screen, s32 index) |
| CardScreen.removeSprite: hides a sprite. | |
| s32 | CARDGAME_startSpriteBlink (CardScreen *screen, s32 index) |
| Starts a sprite's blink (state 11), with the confirm sound. | |
| void | CARDGAME_dealSprites (CardScreen *screen, s16 duration, s16 count, s32 x, s32 y) |
| CardScreen.dealSprites: lays out count sprites as a hand from x, y, at once (duration 0) or moving there. | |
| s32 | CARDGAME_getCardColor (CardScreen *screen, s32 index) |
| CardScreen.getCardColor: the colour of the screen's card index. | |
| void | CARDGAME_setSpriteCard (CardScreen *screen, s32 sprite, s32 index) |
| CardScreen.setSpriteCard: shows the screen's card index on sprite, with its AP, HP, points and colour. | |
| void | CARDGAME_loadCardImage (TimLoader *loader, u8 *image, s32 slot) |
| Loads a card's image to VRAM slot slot, in columns of eight, with its CLUT. | |
| s32 | CARDGAME_getOtherCard (s32 index) |
| Card index of CARDGAME_otherCards. | |
| s32 | CARDGAME_loadCardImages (s16 *dst, s16 *player, s16 *opponent) |
| CardScreen.loadCardImages: loads the images of the player's 40 cards, the opponent's 40, the 9 common ones and the 100 others, and lists them in dst; returns how many. | |
| CardScreen * | CARDGAME_createScreen (s16 *cards) |
| Creates the card screen over cards, with its functions. | |
CARDGAME's card screen (CARDGAME_createScreen): its task and the functions the battle calls on it.
Definition in file screen.c.
| void CARDGAME_updateScreen | ( | CardScreen * | screen, |
| CardScreenItems * | items | ||
| ) |
The card screen's task: makes its cursor and text windows, then each frame updates its blinkers, windows, sprites, gauges, background and panels.
Definition at line 8 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_openGauge | ( | CardScreen * | screen, |
| s32 | index, | ||
| s16 | value | ||
| ) |
Opens gauge index showing value, over 10 frames.
Definition at line 51 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_closeGauge | ( | CardScreen * | screen, |
| s32 | index | ||
| ) |
Closes gauge index, over 5 frames.
Definition at line 61 of file screen.c.
Referenced by CARDGAME_createScreen().
Opens window index (CardScreen.windows) at x, y, with its layout and value.
< SYSTEM03
Definition at line 70 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_closeWindow | ( | CardScreen * | screen, |
| s32 | index | ||
| ) |
Closes window index.
< SYSTEM04
Definition at line 84 of file screen.c.
Referenced by CARDGAME_createScreen().
| s32 CARDGAME_showBlinker | ( | CardScreen * | screen, |
| s32 | index, | ||
| s16 | x, | ||
| s16 | y | ||
| ) |
Shows blinker index, still, at x, y.
Nothing calls this method or CARDGAME_startBlinkerMove.
Definition at line 95 of file screen.c.
Referenced by CARDGAME_createScreen().
Starts moving blinker index to x, y over duration frames.
Definition at line 110 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_openMessage | ( | CardScreen * | screen, |
| s32 | message, | ||
| s32 | prompt, | ||
| s16 | choice, | ||
| s32 | place | ||
| ) |
Opens the message window at place with message, asking prompt with the cursor on choice.
< SYSTEM03
Definition at line 123 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_closeMessage | ( | CardScreen * | screen | ) |
Closes the message window.
< SYSTEM04
Definition at line 135 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_confirmMessage | ( | CardScreen * | screen | ) |
Confirms the message window's choice: the cursor nudges, then it closes.
< SYSTEM00: a choice is taken
Definition at line 143 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_setMessageChoice | ( | CardScreen * | screen, |
| s32 | choice | ||
| ) |
Puts the message window's cursor on choice.
Definition at line 151 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_openMenuWindow | ( | CardScreen * | screen, |
| s16 | row | ||
| ) |
Opens the menu window with the cursor on row.
< SYSTEM03
Definition at line 156 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_closeMenuWindow | ( | CardScreen * | screen | ) |
Closes the menu window.
< SYSTEM04
Definition at line 165 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_confirmMenuWindow | ( | CardScreen * | screen | ) |
Confirms the menu window's row: the cursor nudges, then it closes.
< SYSTEM00: a choice is taken
Definition at line 173 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_setMenuWindowRow | ( | CardScreen * | screen, |
| s16 | row | ||
| ) |
Puts the menu window's cursor on row.
Definition at line 181 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_resetPanels | ( | CardScreen * | screen | ) |
Puts both panels away at once.
Definition at line 186 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_openPanels | ( | CardScreen * | screen | ) |
Slides both panels in, over 20 frames.
Definition at line 208 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_closePanels | ( | CardScreen * | screen | ) |
Slides both panels out, over 10 frames.
Definition at line 231 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_openPanel | ( | CardScreen * | screen, |
| s32 | side | ||
| ) |
Slides side's panel in over 10 frames, stopping the other's.
Definition at line 253 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_closePanel | ( | CardScreen * | screen, |
| s32 | side | ||
| ) |
Slides side's panel out over 5 frames, stopping the other's.
Definition at line 269 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_openPanelIcon | ( | CardScreen * | screen, |
| s32 | side | ||
| ) |
Grows side's panel icon over 12 frames.
Definition at line 284 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_closePanelIcon | ( | CardScreen * | screen, |
| s32 | side | ||
| ) |
Shrinks side's panel icon over 6 frames.
Definition at line 292 of file screen.c.
Referenced by CARDGAME_createScreen().
| s32 CARDGAME_addSprite | ( | CardScreen * | screen, |
| s32 | index, | ||
| s32 | x, | ||
| s32 | y | ||
| ) |
CardScreen.addSprite: puts a card sprite, still and at full size, at x, y.
Definition at line 300 of file screen.c.
Referenced by CARDGAME_createScreen(), and CARDGAME_dealSprites().
| s32 CARDGAME_startSpriteFlip | ( | CardScreen * | screen, |
| s32 | index | ||
| ) |
Starts turning a sprite over (state 4, CARDGAME_flipSprite)
Definition at line 322 of file screen.c.
Referenced by CARDGAME_createScreen().
| s32 CARDGAME_startSpriteJitter | ( | CardScreen * | screen, |
| s32 | index | ||
| ) |
Starts a sprite's jitter (state 6, CARDGAME_jitterSprite), with effect 1.
Definition at line 334 of file screen.c.
Referenced by CARDGAME_createScreen().
| s32 CARDGAME_startSpriteShake | ( | CardScreen * | screen, |
| s32 | index | ||
| ) |
Starts a sprite's shake (state 7, CARDGAME_shakeSprite), with effect 1.
Definition at line 349 of file screen.c.
Referenced by CARDGAME_createScreen().
| s32 CARDGAME_startSpriteRecovery | ( | CardScreen * | screen, |
| s32 | index | ||
| ) |
Starts a sprite's effect 2 with the recovery sound (state 8), and then its blink.
< RECOVERY
Definition at line 363 of file screen.c.
Referenced by CARDGAME_createScreen().
| s32 CARDGAME_startSpriteEffect | ( | CardScreen * | screen, |
| s32 | index, | ||
| s32 | which | ||
| ) |
Starts a sprite's effect 3 (which 0) for 36 frames, or 4 for 28.
Definition at line 376 of file screen.c.
Referenced by CARDGAME_createScreen().
| s32 CARDGAME_setSpriteScaleTarget | ( | CardScreen * | screen, |
| s32 | index, | ||
| s32 | duration, | ||
| s32 | scaleX, | ||
| s32 | scaleY, | ||
| s32 | instant | ||
| ) |
Scales a sprite to scaleX, scaleY: at once when instant is 1, else over duration (state 2)
Definition at line 398 of file screen.c.
Referenced by CARDGAME_scaleSprite(), and CARDGAME_setSpriteScale().
| void CARDGAME_setSpriteScale | ( | CardScreen * | screen, |
| s32 | index, | ||
| s32 | scaleX, | ||
| s32 | scaleY | ||
| ) |
CardScreen.setSpriteScale: scales a sprite at once.
Definition at line 415 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_scaleSprite | ( | CardScreen * | screen, |
| s32 | index, | ||
| s32 | duration, | ||
| s32 | scaleX, | ||
| s32 | scaleY | ||
| ) |
CardScreen.scaleSprite: scales a sprite over duration.
Definition at line 420 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_setSpriteMove | ( | CardScreen * | screen, |
| s32 | index, | ||
| s32 | duration, | ||
| s32 | x, | ||
| s32 | y | ||
| ) |
Sets a sprite's move to x, y over duration, from where it is.
Definition at line 425 of file screen.c.
Referenced by CARDGAME_startSpriteMove(), and CARDGAME_startSpriteSlide().
| void CARDGAME_startSpriteMove | ( | CardScreen * | screen, |
| s32 | index, | ||
| s32 | duration, | ||
| s32 | x, | ||
| s32 | y | ||
| ) |
Starts moving a sprite to x, y over duration (state 2), with a sound at the start and the end.
Definition at line 436 of file screen.c.
Referenced by CARDGAME_createScreen(), and CARDGAME_dealSprites().
| void CARDGAME_startSpriteSlide | ( | CardScreen * | screen, |
| s32 | index, | ||
| s32 | duration, | ||
| s32 | x, | ||
| s32 | y | ||
| ) |
Starts moving a sprite to x, y over duration without sounds (state 3)
Definition at line 443 of file screen.c.
Referenced by CARDGAME_createScreen().
Starts a sprite's flight to x, y and back (state 5, CARDGAME_flySprite), after it grows for 16 frames.
Definition at line 450 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_setPanelValue | ( | CardScreen * | screen, |
| s32 | side, | ||
| u32 | which, | ||
| s32 | value | ||
| ) |
CardScreen.setPanelValue: sets one of side's panel values: its points (0 to 4), its deck, hand and discard counts, its AP or its HP (CARD_PANEL_*)
Definition at line 466 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_setPanelFlags | ( | CardScreen * | screen, |
| s32 | bits | ||
| ) |
CardScreen.setPanelFlags: sets the panels' blink flags from bits, two to a flag: the even bits the player's, the odd ones the opponent's.
Definition at line 503 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_clearPanelFlags | ( | CardScreen * | screen | ) |
CardScreen.clearPanelFlags: clears both panels' blink flags.
Definition at line 567 of file screen.c.
Referenced by CARDGAME_createScreen().
| s32 CARDGAME_removeSprite | ( | CardScreen * | screen, |
| s32 | index | ||
| ) |
CardScreen.removeSprite: hides a sprite.
Definition at line 573 of file screen.c.
Referenced by CARDGAME_createScreen().
| s32 CARDGAME_startSpriteBlink | ( | CardScreen * | screen, |
| s32 | index | ||
| ) |
Starts a sprite's blink (state 11), with the confirm sound.
< SYSTEM07
Definition at line 581 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_dealSprites | ( | CardScreen * | screen, |
| s16 | duration, | ||
| s16 | count, | ||
| s32 | x, | ||
| s32 | y | ||
| ) |
CardScreen.dealSprites: lays out count sprites as a hand from x, y, at once (duration 0) or moving there.
Definition at line 591 of file screen.c.
Referenced by CARDGAME_createScreen().
| s32 CARDGAME_getCardColor | ( | CardScreen * | screen, |
| s32 | index | ||
| ) |
CardScreen.getCardColor: the colour of the screen's card index.
Definition at line 606 of file screen.c.
Referenced by CARDGAME_createScreen().
| void CARDGAME_setSpriteCard | ( | CardScreen * | screen, |
| s32 | sprite, | ||
| s32 | index | ||
| ) |
CardScreen.setSpriteCard: shows the screen's card index on sprite, with its AP, HP, points and colour.
Definition at line 616 of file screen.c.
Referenced by CARDGAME_createScreen().
Loads a card's image to VRAM slot slot, in columns of eight, with its CLUT.
Definition at line 634 of file screen.c.
Referenced by CARDGAME_loadCardImages().
Card index of CARDGAME_otherCards.
Definition at line 641 of file screen.c.
Referenced by CARDGAME_loadCardImages().
CardScreen.loadCardImages: loads the images of the player's 40 cards, the opponent's 40, the 9 common ones and the 100 others, and lists them in dst; returns how many.
Definition at line 648 of file screen.c.
Referenced by CARDGAME_createScreen().
| CardScreen * CARDGAME_createScreen | ( | s16 * | cards | ) |
Creates the card screen over cards, with its functions.
Definition at line 684 of file screen.c.
Referenced by CARDGAME_updateBattle().