Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
screen.h File Reference

CARDGAME's battle screen: its task, panels, card sprites, blinkers, gauges, numbers and windows, the fader, the preloader and the scene (screen.c, panels.c, sprites.c, windows.c, message_window.c, fader.c, preloader.c and scene.c). More...

Include dependency graph for screen.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CardFileEntry
 A file CARDGAME_tickPreloader reads; a text file is in each language. More...
 
struct  CardPreloader
 Reads CARDGAME's files into the file cache, one at a time. More...
 
struct  CardFader
 Fades the screen to a colour: a POLY_F4 over it, blended (blend is the semi-transparency rate) More...
 
struct  CardFadeColor
 A fade colour and blend mode (CardBattle.fade - 1 picks one) More...
 
struct  CardOffset
 An offset from a window's corner. More...
 
struct  CardWindowLayout
 How each of the six CardWindow windows is drawn. More...
 
struct  CardNumber
 A number drawn with the TIM archive's digits (CARDGAME_drawNumber) More...
 
struct  CardScreenItems
 The battle screen's task items. More...
 
struct  CardPanelScale
 A panel's open (state 1) or close (state 3) scale, which goes over duration frames. More...
 
struct  CardPanelLayout
 Where CARDGAME_drawPanel draws the parts of a side's panel (CARDGAME_panelLayouts), relative to CardPanel.x and y (or the box's, boxX and boxY) More...
 
struct  CardPanel
 One side's panel on the battle screen (CardScreen.panels): 0 is the player's, 1 the opponent's. More...
 
struct  CardSprite
 A card on the battle screen (CardScreen.sprites) More...
 
struct  CardBlinker
 A blinking marker on the battle screen (CardScreen.blinkers), which can move to a target. More...
 
struct  CardGauge
 A value that goes from from to to (0x1000 is 1) over duration frames. More...
 
struct  CardWindow
 A window that opens (its scale goes from from to to) More...
 
struct  CardMessageWindow
 The battle screen's message window (CardScreen.message), which CARDGAME_runBattleMenu keeps a copy of (CARDGAME_savedScreenState) More...
 
struct  CardScreen
 The battle screen (created by CARDGAME_createScreen): the two panels, the cards on the table and the windows. More...
 

Macros

#define FILE_CARDGAME_TIMS   0x25D
 CARDGAME's own pictures, a TIM archive.
 

Enumerations

enum  CardPanelValue {
  CARD_PANEL_DECK = 5 , CARD_PANEL_HAND , CARD_PANEL_DISCARDS , CARD_PANEL_AP ,
  CARD_PANEL_HP
}
 What CARDGAME_setPanelValue sets: 0-4 a colour's points, then these. More...
 

Functions

void CARDGAME_drawBackground (CardScreen *screen)
 Draws the scrolling background, which fades in through its palettes (fadeState 1) and then stays.
 
void CARDGAME_updateMessageWindow (CardScreen *screen, CardScreenItems *items)
 The message window: it opens at its place, shows its prompt (showMessagePrompt) and message (showMessageText) with the cursor, then closes.
 
void CARDGAME_updateWindow (CardScreen *screen, CardScreenItems *items, CardWindow *window, s32 index)
 Opens (state 1), shows (2) or closes (3) window index, each its own way.
 
void CARDGAME_updateMenuWindow (CardScreen *screen, CardScreenItems *items)
 A menu window (CardScreen.menuState): it opens, shows text file 0x10 with the cursor on menuRow, then closes.
 
void CARDGAME_updateBlinkers (CardScreen *screen, CardScreenItems *items)
 Moves and draws the twelve blinkers.
 
void CARDGAME_updatePanels (CardScreen *screen, CardScreenItems *items)
 Runs and draws both panels and their icons.
 
void CARDGAME_updateSprites (CardScreen *screen, CardScreenItems *items)
 Animates the sprites, then draws them: the moving ones first.
 
void CARDGAME_moveBlinker (CardBlinker *blinker)
 Moves a blinker towards its target; it stops there (state 1)
 
void CARDGAME_drawBlinker (CardBlinker *blinker)
 Draws a blinker, its CLUT row changing every four frames.
 
void CARDGAME_drawPanelIcon (CardScreen *screen, CardScreenItems *items, s32 side, CardPanelScale *scale)
 Draws a side's panel icon at the panel's open or close scale, and once the panel is open (state 2) its label; the European version takes both positions from CARDGAME_panelIconPositions, by SHIFT_PAL_SCREEN.
 
void CARDGAME_updatePanelIcon (CardScreen *screen, CardScreenItems *items, s32 side, CardPanelScale *scale)
 Grows (state 1) or shrinks (3) side's panel icon, and draws it.
 
void CARDGAME_slidePanel (CardPanel *panel, CardScreenItems *items, s32 side)
 Moves a side's panel between its shown and hidden places: in (state 1, slidePanelIn), out (3, slidePanelOut), or only x/y in or out (4, 5)
 
void CARDGAME_drawPanel (CardPanel *panel, CardScreenItems *items, s32 side)
 Draws a side's panel (CardScreen.panels): its lights, bars, numbers and parts (drawPanelParts), which blink by its flags.
 
void CARDGAME_drawSpriteHighlights (CardScreen *screen, CardSprite *sprite)
 Draws the highlights over a sprite (highlight bits 0-2), with a cycling palette.
 
void CARDGAME_drawSpriteMarks (CardScreen *screen, CardSprite *sprite)
 Draws a card's marks that are set (marks[0..2]: sprites 0x37 to 0x39), in a row 8 pixels apart.
 
void CARDGAME_drawSpriteOrder (CardScreen *screen, CardSprite *sprite)
 Draws a sprite's order number (order), the place of its card in the record.
 
void CARDGAME_drawSpriteEffect (CardScreen *screen, CardSprite *sprite)
 Draws a sprite's effect animation (1-4, frames 0x28-0x4C of the fourth TIM) and ends it when its time runs out.
 
void CARDGAME_drawSpriteDim (CardScreen *screen, CardSprite *sprite)
 Draws the shade over a dimmed sprite.
 
void CARDGAME_drawSpriteCard (CardScreen *screen, CardSprite *sprite)
 Draws a card sprite: its frame (visible 1, with the numbers or the mark and the image) or its back (visible 2 or 3)
 
void CARDGAME_drawSpriteBlink (CardScreen *screen, CardSprite *sprite)
 Draws a blinking sprite's flash (state 11), its CLUT row changing.
 
void CARDGAME_animateSprite (CardScreen *screen, CardScreenItems *items, CardSprite *sprite)
 Runs a sprite's animation for its state; sets bit 0 of spriteFlags while one runs.
 
void CARDGAME_updateScene (Task *task, CardBattle **items)
 The steps CARDGAME_runEffectStep starts (CardBattle.effectStep.next) and runs (effectStep.id)
 
void CARDGAME_drawNumber (CardNumber *number, s32 scaled)
 Draws a number with the TIM archive's digits, seven pixels apart, without leading zeros unless asked; scaled about its pivot when scaled.
 
void CARDGAME_drawGauge (CardScreen *screen, CardScreenItems *items, s32 index, CardGauge *p)
 Draws a gauge at its place (CARDGAME_gaugePositions), at its scale.
 
void CARDGAME_updateGauge (CardScreen *screen, CardScreenItems *items, s32 index, CardGauge *p)
 Grows (state 1), holds (2) or shrinks (3) a gauge, and draws it.
 
void CARDGAME_updateGauges (CardScreen *screen, CardScreenItems *items)
 Runs and draws the three gauges.
 
void CARDGAME_drawWindowFrame (CardScreen *screen, CardScreenItems *items, CardWindow *window)
 Draws a window's frame (CARDGAME_windowLayouts), scaled while it opens, and its count.
 
void CARDGAME_drawWindowNumbers (CardScreen *screen, CardScreenItems *items, CardWindow *window)
 Puts a window's two numbers (numbers) on its texts, right aligned.
 
void CARDGAME_drawWindowText (CardScreen *screen, CardWindow *window, TextWindow *text, s32 file, s32 index)
 Puts a window's string value of file on text, or hides text when it has none.
 
void CARDGAME_drawCenteredText (CardScreen *screen, CardScreenItems *items, CardWindow *window, TextWindow *text, s32 file)
 Puts a window's string value of file on text, centred on the screen (string 0x1F in palette 3), or hides text.
 
void CARDGAME_updateWindows (CardScreen *screen, CardScreenItems *items)
 Runs and draws the six windows.
 
void CARDGAME_drawMessageFrame (CardScreen *screen, CardScreenItems *items, s16 scale, s32 x, s32 y)
 Draws the message window's frame at a scale.
 
void CARDGAME_drawMessageMark (CardScreen *screen, CardScreenItems *items, s32 x, s32 y)
 Draws sprite 0x18 of the message window.
 
void CARDGAME_drawMenuFrame (CardScreen *screen, CardScreenItems *items, s16 scale, s32 x, s32 y)
 Draws the menu window's frame at a scale.
 
s32 CARDGAME_getHandOffset (s32 count, s32 index)
 CardScreen.getHandOffset: how far the hand's card index is from its first: 0x2900 a card up to six cards, else count share 0xF600.
 
s32 CARDGAME_shakeSprite (CardScreen *screen, CardSprite *sprite)
 Shakes a sprite sideways and stretches it, for 12 frames: 1 at the end.
 
s32 CARDGAME_holdSpriteThenBlink (CardScreen *screen, CardSprite *sprite)
 Holds a sprite for 10 frames, then starts its blink: 1 at the end.
 
s32 CARDGAME_holdSprite (CardScreen *screen, CardSprite *sprite, s32 duration)
 Holds a sprite for duration frames, then ends its effect: 1 at the end.
 
s32 CARDGAME_jitterSprite (CardScreen *screen, CardSprite *sprite)
 Jitters a sprite about where it started and squashes it, for 12 frames: 1 at the end.
 
s32 CARDGAME_flipSprite (CardScreen *screen, CardSprite *sprite)
 Turns a sprite over for 12 frames, its side swapped after 7: 1 at the end.
 
void CARDGAME_drawSprite (CardScreen *screen, CardSprite *sprite)
 Draws a sprite and its marks, unless it is scaled to nothing.
 
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 arg1, s32 arg2, s16 arg3, s32 arg4)
 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 value)
 Puts the message window's cursor on choice.
 
void CARDGAME_openMenuWindow (CardScreen *screen, s16 value)
 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 value)
 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.
 
void CARDGAME_tickPreloader (CardPreloader *task)
 Requests the files of CARDGAME_preloadFiles one after the other, and ends after the last.
 
CardPreloader * CARDGAME_startPreloader (void)
 Starts the preloader of the card game's files (CARDGAME_tickPreloader)
 
void CARDGAME_moveSprite (CardScreen *screen, CardSprite *sprite)
 Moves and scales a sprite towards its targets; at the end it plays a sound (unless in state 3) and goes to state 1.
 
s32 CARDGAME_flySprite (CardScreen *screen, CardSprite *sprite)
 Flies a sprite from start to target along an arc while scaling it; at the end it swaps start and target, goes to state 2 with 2.5 times the time, and returns 1.
 
void CARDGAME_drawCardPicture (CardSprite *sprite)
 Draws a card's picture: a one-part sprite sheet (CARDGAME_pictureSheet) made on the fly, the 32x32 cell index of an 8-row grid with the card's own CLUT row.
 
void CARDGAME_drawFader (CardFader *fader, RECT rect)
 Draws the fader over RECT, in layer 0x100.
 
void CARDGAME_stepFader (CardFader *fader)
 Moves the colour towards the target as the time runs out.
 
void CARDGAME_setFaderColor (CardFader *fader, u8 r, u8 g, u8 b)
 Sets the colour at once.
 
void CARDGAME_startFade (CardFader *fader, u8 r, u8 g, u8 b, s32 frames, s32 killWhenDone)
 Fades from the current colour to r, g, b in FRAMES vsyncs; the task ends at the end when KILLWHENDONE is set.
 
s32 CARDGAME_isFadeDone (CardFader *fader)
 1 once the fade has reached its colour
 
void CARDGAME_killFader (CardFader *fader)
 Ends the task.
 
void CARDGAME_tickFader (CardFader *fader)
 A fader's task: steps its fade while fading, draws it over CARDGAME_fadeRect every frame and ends once killed.
 
CardFader * CARDGAME_createFader (u8 blend)
 Creates a fader, with the semi-transparency rate BLEND.
 

Variables

RECT CARDGAME_screenRect
 The functions and data the overlay's files share.
 
RECT CARDGAME_fadeRect
 
CardFileEntry CARDGAME_preloadFiles []
 
s16 CARDGAME_otherCards []
 the 100 cards whose images CARDGAME_loadCardImages loads after the decks (CARDGAME_getOtherCard)
 
s16 CARDGAME_commonCards []
 the cards everyone has, loaded after the two decks
 
CardOffset CARDGAME_gaugePositions []
 where the three CardGauge gauges are
 
u16 CARDGAME_windowTextOffsets []
 a window's text x, by CARDGAME_drawWindowText's index
 
CardWindowLayout CARDGAME_windowLayouts []
 
s16 CARDGAME_shakeOffsets []
 CARDGAME_shakeSprite's x offsets, by time.
 
s16 CARDGAME_jitterOffsets []
 CARDGAME_jitterSprite's x and y offsets.
 
s32 CARDGAME_pictureSheet []
 the sprite sheet CARDGAME_drawCardPicture draws a card's picture with
 
u8 CARDGAME_loopFrames []
 the frames of a sprite's effect 1, which loops
 
u8 CARDGAME_onceFrames []
 the frames of its effect 2, which plays once
 
u8 CARDGAME_highlightCluts []
 a palette cycle: 0, 1, 2, 3, 2, 1
 
s32 CARDGAME_messageWindowPositions [][2]
 the message window's places (x, y), by CardScreen.message.place
 
CardPanelLayout CARDGAME_panelLayouts [2]
 the panels' layouts, by side
 
u8 CARDGAME_panelLightCluts [8]
 the clut rows of the panel's blinking lights: 0, 1, 2, 3, 2, 1
 
u8 CARDGAME_panelBarSprites [8][2]
 the sprites of the panel's two bars, by LANGUAGE (USA: 1)
 
u8 CARDGAME_flag7Frames []
 the frames of the panel's sprites for flags 7, 6 and 5 and its five flag icons (CARDGAME_flagIconSprites), when the flag is set: 0, 1, 2, 1, 0
 
u8 CARDGAME_flag6Frames []
 
u8 CARDGAME_boxFrames []
 
u8 CARDGAME_flagIconSprites []
 the sprites of the panel's five flag icons
 
u8 CARDGAME_flagIconFrames []
 

Detailed Description

CARDGAME's battle screen: its task, panels, card sprites, blinkers, gauges, numbers and windows, the fader, the preloader and the scene (screen.c, panels.c, sprites.c, windows.c, message_window.c, fader.c, preloader.c and scene.c).

Definition in file screen.h.

Macro Definition Documentation

◆ FILE_CARDGAME_TIMS

#define FILE_CARDGAME_TIMS   0x25D

CARDGAME's own pictures, a TIM archive.

Definition at line 15 of file screen.h.

Enumeration Type Documentation

◆ CardPanelValue

What CARDGAME_setPanelValue sets: 0-4 a colour's points, then these.

Enumerator
CARD_PANEL_DECK 
CARD_PANEL_HAND 
CARD_PANEL_DISCARDS 
CARD_PANEL_AP 
CARD_PANEL_HP 

Definition at line 198 of file screen.h.

Function Documentation

◆ CARDGAME_drawBackground()

void CARDGAME_drawBackground ( CardScreen *  screen)

Draws the scrolling background, which fades in through its palettes (fadeState 1) and then stays.

Definition at line 7 of file windows.c.

Referenced by CARDGAME_updateScreen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_updateMessageWindow()

void CARDGAME_updateMessageWindow ( CardScreen *  screen,
CardScreenItems *  items 
)

The message window: it opens at its place, shows its prompt (showMessagePrompt) and message (showMessageText) with the cursor, then closes.

Definition at line 110 of file message_window.c.

Referenced by CARDGAME_updateScreen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_updateWindow()

void CARDGAME_updateWindow ( CardScreen *  screen,
CardScreenItems *  items,
CardWindow *  window,
s32  index 
)

Opens (state 1), shows (2) or closes (3) window index, each its own way.

< CARDGM: the card battle's

< CARDNM

< CARDGM: the card battle's

< CARDGM: the card battle's

< CARDGM: the card battle's

< CARDNM

< CARDGM: the card battle's

< CARDGM: the card battle's

< CARDGM: the card battle's

< CARDST

Definition at line 228 of file windows.c.

Referenced by CARDGAME_updateWindows().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_updateMenuWindow()

void CARDGAME_updateMenuWindow ( CardScreen *  screen,
CardScreenItems *  items 
)

A menu window (CardScreen.menuState): it opens, shows text file 0x10 with the cursor on menuRow, then closes.

< CARDGM: the card battle's

Definition at line 183 of file message_window.c.

Referenced by CARDGAME_updateScreen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_updateBlinkers()

void CARDGAME_updateBlinkers ( CardScreen *  screen,
CardScreenItems *  items 
)

Moves and draws the twelve blinkers.

Definition at line 456 of file panels.c.

Referenced by CARDGAME_updateScreen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_updatePanels()

void CARDGAME_updatePanels ( CardScreen *  screen,
CardScreenItems *  items 
)

Runs and draws both panels and their icons.

Definition at line 473 of file panels.c.

Referenced by CARDGAME_updateScreen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_updateSprites()

void CARDGAME_updateSprites ( CardScreen *  screen,
CardScreenItems *  items 
)

Animates the sprites, then draws them: the moving ones first.

Definition at line 577 of file sprites.c.

Referenced by CARDGAME_updateScreen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_moveBlinker()

void CARDGAME_moveBlinker ( CardBlinker *  blinker)

Moves a blinker towards its target; it stops there (state 1)

Definition at line 415 of file panels.c.

Referenced by CARDGAME_updateBlinkers().

Here is the caller graph for this function:

◆ CARDGAME_drawBlinker()

void CARDGAME_drawBlinker ( CardBlinker *  blinker)

Draws a blinker, its CLUT row changing every four frames.

Definition at line 430 of file panels.c.

Referenced by CARDGAME_updateBlinkers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawPanelIcon()

void CARDGAME_drawPanelIcon ( CardScreen *  screen,
CardScreenItems *  items,
s32  side,
CardPanelScale *  scale 
)

Draws a side's panel icon at the panel's open or close scale, and once the panel is open (state 2) its label; the European version takes both positions from CARDGAME_panelIconPositions, by SHIFT_PAL_SCREEN.

< CARDGM: the card battle's

Definition at line 339 of file panels.c.

Referenced by CARDGAME_updatePanelIcon().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_updatePanelIcon()

void CARDGAME_updatePanelIcon ( CardScreen *  screen,
CardScreenItems *  items,
s32  side,
CardPanelScale *  scale 
)

Grows (state 1) or shrinks (3) side's panel icon, and draws it.

Definition at line 390 of file panels.c.

Referenced by CARDGAME_updatePanels().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_slidePanel()

void CARDGAME_slidePanel ( CardPanel *  panel,
CardScreenItems *  items,
s32  side 
)

Moves a side's panel between its shown and hidden places: in (state 1, slidePanelIn), out (3, slidePanelOut), or only x/y in or out (4, 5)

Definition at line 235 of file panels.c.

Referenced by CARDGAME_updatePanels().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawPanel()

void CARDGAME_drawPanel ( CardPanel *  panel,
CardScreenItems *  items,
s32  side 
)

Draws a side's panel (CardScreen.panels): its lights, bars, numbers and parts (drawPanelParts), which blink by its flags.

Definition at line 57 of file panels.c.

Referenced by CARDGAME_updatePanels().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawSpriteHighlights()

void CARDGAME_drawSpriteHighlights ( CardScreen *  screen,
CardSprite *  sprite 
)

Draws the highlights over a sprite (highlight bits 0-2), with a cycling palette.

Definition at line 291 of file sprites.c.

Referenced by CARDGAME_drawSprite().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawSpriteMarks()

void CARDGAME_drawSpriteMarks ( CardScreen *  screen,
CardSprite *  sprite 
)

Draws a card's marks that are set (marks[0..2]: sprites 0x37 to 0x39), in a row 8 pixels apart.

Definition at line 344 of file sprites.c.

Referenced by CARDGAME_drawSprite().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawSpriteOrder()

void CARDGAME_drawSpriteOrder ( CardScreen *  screen,
CardSprite *  sprite 
)

Draws a sprite's order number (order), the place of its card in the record.

Definition at line 327 of file sprites.c.

Referenced by CARDGAME_drawSprite().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawSpriteEffect()

void CARDGAME_drawSpriteEffect ( CardScreen *  screen,
CardSprite *  sprite 
)

Draws a sprite's effect animation (1-4, frames 0x28-0x4C of the fourth TIM) and ends it when its time runs out.

Definition at line 242 of file sprites.c.

Referenced by CARDGAME_drawSprite().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawSpriteDim()

void CARDGAME_drawSpriteDim ( CardScreen *  screen,
CardSprite *  sprite 
)

Draws the shade over a dimmed sprite.

Definition at line 480 of file sprites.c.

Referenced by CARDGAME_drawSprite().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawSpriteCard()

void CARDGAME_drawSpriteCard ( CardScreen *  screen,
CardSprite *  sprite 
)

Draws a card sprite: its frame (visible 1, with the numbers or the mark and the image) or its back (visible 2 or 3)

Definition at line 418 of file sprites.c.

Referenced by CARDGAME_drawSprite().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawSpriteBlink()

void CARDGAME_drawSpriteBlink ( CardScreen *  screen,
CardSprite *  sprite 
)

Draws a blinking sprite's flash (state 11), its CLUT row changing.

Definition at line 497 of file sprites.c.

Referenced by CARDGAME_updateSprites().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_animateSprite()

void CARDGAME_animateSprite ( CardScreen *  screen,
CardScreenItems *  items,
CardSprite *  sprite 
)

Runs a sprite's animation for its state; sets bit 0 of spriteFlags while one runs.

Definition at line 512 of file sprites.c.

Referenced by CARDGAME_updateSprites().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_updateScene()

void CARDGAME_updateScene ( Task *  task,
CardBattle **  items 
)

The steps CARDGAME_runEffectStep starts (CardBattle.effectStep.next) and runs (effectStep.id)

The steps CARDGAME_runEffectStep starts (CardBattle.effectStep.next) and runs (effectStep.id)

< STAGSLCT, the debug stage select

Definition at line 8 of file scene.c.

Referenced by CARDGAME_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawNumber()

void CARDGAME_drawNumber ( CardNumber *  number,
s32  scaled 
)

Draws a number with the TIM archive's digits, seven pixels apart, without leading zeros unless asked; scaled about its pivot when scaled.

Definition at line 41 of file windows.c.

Referenced by CARDGAME_drawPanel(), drawCardNumbers(), and drawWindowCount().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawGauge()

void CARDGAME_drawGauge ( CardScreen *  screen,
CardScreenItems *  items,
s32  index,
CardGauge *  p 
)

Draws a gauge at its place (CARDGAME_gaugePositions), at its scale.

Definition at line 66 of file windows.c.

Referenced by CARDGAME_updateGauge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_updateGauge()

void CARDGAME_updateGauge ( CardScreen *  screen,
CardScreenItems *  items,
s32  index,
CardGauge *  p 
)

Grows (state 1), holds (2) or shrinks (3) a gauge, and draws it.

Definition at line 78 of file windows.c.

Referenced by CARDGAME_updateGauges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_updateGauges()

void CARDGAME_updateGauges ( CardScreen *  screen,
CardScreenItems *  items 
)

Runs and draws the three gauges.

Definition at line 105 of file windows.c.

Referenced by CARDGAME_updateScreen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawWindowFrame()

void CARDGAME_drawWindowFrame ( CardScreen *  screen,
CardScreenItems *  items,
CardWindow *  window 
)

Draws a window's frame (CARDGAME_windowLayouts), scaled while it opens, and its count.

Definition at line 142 of file windows.c.

Referenced by CARDGAME_updateWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawWindowNumbers()

void CARDGAME_drawWindowNumbers ( CardScreen *  screen,
CardScreenItems *  items,
CardWindow *  window 
)

Puts a window's two numbers (numbers) on its texts, right aligned.

Definition at line 181 of file windows.c.

Referenced by CARDGAME_updateWindow().

Here is the caller graph for this function:

◆ CARDGAME_drawWindowText()

void CARDGAME_drawWindowText ( CardScreen *  screen,
CardWindow *  window,
TextWindow *  text,
s32  file,
s32  index 
)

Puts a window's string value of file on text, or hides text when it has none.

Definition at line 196 of file windows.c.

Referenced by CARDGAME_updateWindow().

Here is the caller graph for this function:

◆ CARDGAME_drawCenteredText()

void CARDGAME_drawCenteredText ( CardScreen *  screen,
CardScreenItems *  items,
CardWindow *  window,
TextWindow *  text,
s32  file 
)

Puts a window's string value of file on text, centred on the screen (string 0x1F in palette 3), or hides text.

Definition at line 207 of file windows.c.

Referenced by CARDGAME_updateWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_updateWindows()

void CARDGAME_updateWindows ( CardScreen *  screen,
CardScreenItems *  items 
)

Runs and draws the six windows.

Definition at line 322 of file windows.c.

Referenced by CARDGAME_updateScreen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawMessageFrame()

void CARDGAME_drawMessageFrame ( CardScreen *  screen,
CardScreenItems *  items,
s16  scale,
s32  x,
s32  y 
)

Draws the message window's frame at a scale.

Definition at line 6 of file message_window.c.

Referenced by CARDGAME_updateMessageWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawMessageMark()

void CARDGAME_drawMessageMark ( CardScreen *  screen,
CardScreenItems *  items,
s32  x,
s32  y 
)

Draws sprite 0x18 of the message window.

Definition at line 18 of file message_window.c.

Referenced by CARDGAME_updateMessageWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawMenuFrame()

void CARDGAME_drawMenuFrame ( CardScreen *  screen,
CardScreenItems *  items,
s16  scale,
s32  x,
s32  y 
)

Draws the menu window's frame at a scale.

Definition at line 170 of file message_window.c.

Referenced by CARDGAME_updateMenuWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_getHandOffset()

s32 CARDGAME_getHandOffset ( s32  count,
s32  index 
)

CardScreen.getHandOffset: how far the hand's card index is from its first: 0x2900 a card up to six cards, else count share 0xF600.

Definition at line 234 of file message_window.c.

Referenced by CARDGAME_createScreen(), and CARDGAME_dealSprites().

Here is the caller graph for this function:

◆ CARDGAME_shakeSprite()

s32 CARDGAME_shakeSprite ( CardScreen *  screen,
CardSprite *  sprite 
)

Shakes a sprite sideways and stretches it, for 12 frames: 1 at the end.

Definition at line 101 of file sprites.c.

Referenced by CARDGAME_animateSprite().

Here is the caller graph for this function:

◆ CARDGAME_holdSpriteThenBlink()

s32 CARDGAME_holdSpriteThenBlink ( CardScreen *  screen,
CardSprite *  sprite 
)

Holds a sprite for 10 frames, then starts its blink: 1 at the end.

Definition at line 128 of file sprites.c.

Referenced by CARDGAME_animateSprite().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_holdSprite()

s32 CARDGAME_holdSprite ( CardScreen *  screen,
CardSprite *  sprite,
s32  duration 
)

Holds a sprite for duration frames, then ends its effect: 1 at the end.

Definition at line 140 of file sprites.c.

Referenced by CARDGAME_animateSprite().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_jitterSprite()

s32 CARDGAME_jitterSprite ( CardScreen *  screen,
CardSprite *  sprite 
)

Jitters a sprite about where it started and squashes it, for 12 frames: 1 at the end.

Definition at line 153 of file sprites.c.

Referenced by CARDGAME_animateSprite().

Here is the caller graph for this function:

◆ CARDGAME_flipSprite()

s32 CARDGAME_flipSprite ( CardScreen *  screen,
CardSprite *  sprite 
)

Turns a sprite over for 12 frames, its side swapped after 7: 1 at the end.

Definition at line 181 of file sprites.c.

Referenced by CARDGAME_animateSprite().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawSprite()

void CARDGAME_drawSprite ( CardScreen *  screen,
CardSprite *  sprite 
)

Draws a sprite and its marks, unless it is scaled to nothing.

Definition at line 565 of file sprites.c.

Referenced by CARDGAME_updateSprites().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_updateScreen()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_openGauge()

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().

Here is the caller graph for this function:

◆ CARDGAME_closeGauge()

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().

Here is the caller graph for this function:

◆ CARDGAME_openWindow()

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.

< SYSTEM03

Definition at line 70 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the caller graph for this function:

◆ CARDGAME_closeWindow()

void CARDGAME_closeWindow ( CardScreen *  screen,
s32  index 
)

Closes window index.

< SYSTEM04

Definition at line 84 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the caller graph for this function:

◆ CARDGAME_showBlinker()

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().

Here is the caller graph for this function:

◆ CARDGAME_startBlinkerMove()

s32 CARDGAME_startBlinkerMove ( CardScreen *  screen,
s32  index,
u8  duration,
s16  x,
s32  y 
)

Starts moving blinker index to x, y over duration frames.

Definition at line 110 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the caller graph for this function:

◆ CARDGAME_openMessage()

void CARDGAME_openMessage ( CardScreen *  screen,
s32  arg1,
s32  arg2,
s16  arg3,
s32  arg4 
)

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().

Here is the caller graph for this function:

◆ CARDGAME_closeMessage()

void CARDGAME_closeMessage ( CardScreen *  screen)

Closes the message window.

< SYSTEM04

Definition at line 135 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the caller graph for this function:

◆ CARDGAME_confirmMessage()

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().

Here is the caller graph for this function:

◆ CARDGAME_setMessageChoice()

void CARDGAME_setMessageChoice ( CardScreen *  screen,
s32  value 
)

Puts the message window's cursor on choice.

Definition at line 151 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the caller graph for this function:

◆ CARDGAME_openMenuWindow()

void CARDGAME_openMenuWindow ( CardScreen *  screen,
s16  value 
)

Opens the menu window with the cursor on row.

< SYSTEM03

Definition at line 156 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the caller graph for this function:

◆ CARDGAME_closeMenuWindow()

void CARDGAME_closeMenuWindow ( CardScreen *  screen)

Closes the menu window.

< SYSTEM04

Definition at line 165 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the caller graph for this function:

◆ CARDGAME_confirmMenuWindow()

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().

Here is the caller graph for this function:

◆ CARDGAME_setMenuWindowRow()

void CARDGAME_setMenuWindowRow ( CardScreen *  screen,
s16  value 
)

Puts the menu window's cursor on row.

Definition at line 181 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the caller graph for this function:

◆ CARDGAME_resetPanels()

void CARDGAME_resetPanels ( CardScreen *  screen)

Puts both panels away at once.

Definition at line 186 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the caller graph for this function:

◆ CARDGAME_openPanels()

void CARDGAME_openPanels ( CardScreen *  screen)

Slides both panels in, over 20 frames.

Definition at line 208 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the caller graph for this function:

◆ CARDGAME_closePanels()

void CARDGAME_closePanels ( CardScreen *  screen)

Slides both panels out, over 10 frames.

Definition at line 231 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the caller graph for this function:

◆ CARDGAME_openPanel()

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().

Here is the caller graph for this function:

◆ CARDGAME_closePanel()

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().

Here is the caller graph for this function:

◆ CARDGAME_openPanelIcon()

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().

Here is the caller graph for this function:

◆ CARDGAME_closePanelIcon()

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().

Here is the caller graph for this function:

◆ CARDGAME_addSprite()

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().

Here is the caller graph for this function:

◆ CARDGAME_startSpriteFlip()

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().

Here is the caller graph for this function:

◆ CARDGAME_startSpriteJitter()

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().

Here is the caller graph for this function:

◆ CARDGAME_startSpriteShake()

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().

Here is the caller graph for this function:

◆ CARDGAME_startSpriteRecovery()

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().

Here is the caller graph for this function:

◆ CARDGAME_startSpriteEffect()

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().

Here is the caller graph for this function:

◆ CARDGAME_setSpriteScaleTarget()

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().

Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_scaleSprite()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_setSpriteMove()

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().

Here is the caller graph for this function:

◆ CARDGAME_startSpriteMove()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_startSpriteSlide()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_startSpriteFly()

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.

Definition at line 450 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the caller graph for this function:

◆ CARDGAME_setPanelValue()

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().

Here is the caller graph for this function:

◆ CARDGAME_setPanelFlags()

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().

Here is the caller graph for this function:

◆ CARDGAME_clearPanelFlags()

void CARDGAME_clearPanelFlags ( CardScreen *  screen)

CardScreen.clearPanelFlags: clears both panels' blink flags.

Definition at line 567 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the caller graph for this function:

◆ CARDGAME_removeSprite()

s32 CARDGAME_removeSprite ( CardScreen *  screen,
s32  index 
)

CardScreen.removeSprite: hides a sprite.

Definition at line 573 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the caller graph for this function:

◆ CARDGAME_startSpriteBlink()

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().

Here is the caller graph for this function:

◆ CARDGAME_dealSprites()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_getCardColor()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_setSpriteCard()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_loadCardImage()

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.

Definition at line 634 of file screen.c.

Referenced by CARDGAME_loadCardImages().

Here is the caller graph for this function:

◆ CARDGAME_getOtherCard()

s32 CARDGAME_getOtherCard ( s32  index)

Card index of CARDGAME_otherCards.

Definition at line 641 of file screen.c.

Referenced by CARDGAME_loadCardImages().

Here is the caller graph for this function:

◆ CARDGAME_loadCardImages()

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.

Definition at line 648 of file screen.c.

Referenced by CARDGAME_createScreen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_tickPreloader()

void CARDGAME_tickPreloader ( CardPreloader *  task)

Requests the files of CARDGAME_preloadFiles one after the other, and ends after the last.

Definition at line 7 of file preloader.c.

Referenced by CARDGAME_startPreloader().

Here is the caller graph for this function:

◆ CARDGAME_startPreloader()

CardPreloader * CARDGAME_startPreloader ( void  )

Starts the preloader of the card game's files (CARDGAME_tickPreloader)

Definition at line 46 of file preloader.c.

Referenced by CARDGAME_updateBattle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_moveSprite()

void CARDGAME_moveSprite ( CardScreen *  screen,
CardSprite *  sprite 
)

Moves and scales a sprite towards its targets; at the end it plays a sound (unless in state 3) and goes to state 1.

Definition at line 12 of file sprites.c.

Referenced by CARDGAME_animateSprite().

Here is the caller graph for this function:

◆ CARDGAME_flySprite()

s32 CARDGAME_flySprite ( CardScreen *  screen,
CardSprite *  sprite 
)

Flies a sprite from start to target along an arc while scaling it; at the end it swaps start and target, goes to state 2 with 2.5 times the time, and returns 1.

Definition at line 42 of file sprites.c.

Referenced by CARDGAME_animateSprite().

Here is the caller graph for this function:

◆ CARDGAME_drawCardPicture()

void CARDGAME_drawCardPicture ( CardSprite *  sprite)

Draws a card's picture: a one-part sprite sheet (CARDGAME_pictureSheet) made on the fly, the 32x32 cell index of an 8-row grid with the card's own CLUT row.

Definition at line 204 of file sprites.c.

Referenced by CARDGAME_drawSpriteCard().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_drawFader()

void CARDGAME_drawFader ( CardFader *  fader,
RECT  rect 
)

Draws the fader over RECT, in layer 0x100.

Definition at line 6 of file fader.c.

Referenced by CARDGAME_tickFader().

Here is the caller graph for this function:

◆ CARDGAME_stepFader()

void CARDGAME_stepFader ( CardFader *  fader)

Moves the colour towards the target as the time runs out.

Definition at line 34 of file fader.c.

Referenced by CARDGAME_tickFader().

Here is the caller graph for this function:

◆ CARDGAME_setFaderColor()

void CARDGAME_setFaderColor ( CardFader *  fader,
u8  r,
u8  g,
u8  b 
)

Sets the colour at once.

Definition at line 55 of file fader.c.

Referenced by CARDGAME_createFader().

Here is the caller graph for this function:

◆ CARDGAME_startFade()

void CARDGAME_startFade ( CardFader *  fader,
u8  r,
u8  g,
u8  b,
s32  frames,
s32  killWhenDone 
)

Fades from the current colour to r, g, b in FRAMES vsyncs; the task ends at the end when KILLWHENDONE is set.

Definition at line 63 of file fader.c.

Referenced by CARDGAME_createFader().

Here is the caller graph for this function:

◆ CARDGAME_isFadeDone()

s32 CARDGAME_isFadeDone ( CardFader *  fader)

1 once the fade has reached its colour

Definition at line 79 of file fader.c.

Referenced by CARDGAME_createFader().

Here is the caller graph for this function:

◆ CARDGAME_killFader()

void CARDGAME_killFader ( CardFader *  fader)

Ends the task.

Definition at line 84 of file fader.c.

Referenced by CARDGAME_createFader().

Here is the caller graph for this function:

◆ CARDGAME_tickFader()

void CARDGAME_tickFader ( CardFader *  fader)

A fader's task: steps its fade while fading, draws it over CARDGAME_fadeRect every frame and ends once killed.

Definition at line 90 of file fader.c.

Referenced by CARDGAME_createFader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_createFader()

CardFader * CARDGAME_createFader ( u8  blend)

Creates a fader, with the semi-transparency rate BLEND.

Definition at line 112 of file fader.c.

Referenced by CARDGAME_startStepFade(), CARDGAME_updateBattle(), and countRoundWin().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ CARDGAME_screenRect

RECT CARDGAME_screenRect
extern

The functions and data the overlay's files share.

The functions and data the overlay's files share.

Definition at line 8 of file cardgame_3.c.

Referenced by CARDGAME_updateScene().

◆ CARDGAME_fadeRect

RECT CARDGAME_fadeRect
extern

Definition at line 178 of file cardgame_3.c.

Referenced by CARDGAME_tickFader().

◆ CARDGAME_preloadFiles

CardFileEntry CARDGAME_preloadFiles[]
extern

Definition at line 112 of file cardgame_3.c.

Referenced by CARDGAME_tickPreloader().

◆ CARDGAME_otherCards

s16 CARDGAME_otherCards[]
extern

the 100 cards whose images CARDGAME_loadCardImages loads after the decks (CARDGAME_getOtherCard)

Definition at line 85 of file cardgame_3.c.

Referenced by CARDGAME_getOtherCard().

◆ CARDGAME_commonCards

s16 CARDGAME_commonCards[]
extern

the cards everyone has, loaded after the two decks

the cards everyone has, loaded after the two decks

Definition at line 101 of file cardgame_3.c.

Referenced by CARDGAME_loadCardImages().

◆ CARDGAME_gaugePositions

CardOffset CARDGAME_gaugePositions[]
extern

where the three CardGauge gauges are

Definition at line 20 of file cardgame_3.c.

Referenced by CARDGAME_drawGauge().

◆ CARDGAME_windowTextOffsets

u16 CARDGAME_windowTextOffsets[]
extern

a window's text x, by CARDGAME_drawWindowText's index

Definition at line 27 of file cardgame_3.c.

Referenced by CARDGAME_drawWindowText().

◆ CARDGAME_windowLayouts

CardWindowLayout CARDGAME_windowLayouts[]
extern

Definition at line 23 of file cardgame_3.c.

Referenced by CARDGAME_drawWindowFrame(), and drawWindowCount().

◆ CARDGAME_shakeOffsets

s16 CARDGAME_shakeOffsets[]
extern

CARDGAME_shakeSprite's x offsets, by time.

Definition at line 65 of file cardgame_3.c.

Referenced by CARDGAME_shakeSprite().

◆ CARDGAME_jitterOffsets

s16 CARDGAME_jitterOffsets[]
extern

CARDGAME_jitterSprite's x and y offsets.

Definition at line 68 of file cardgame_3.c.

Referenced by CARDGAME_jitterSprite().

◆ CARDGAME_pictureSheet

s32 CARDGAME_pictureSheet[]
extern

the sprite sheet CARDGAME_drawCardPicture draws a card's picture with

Definition at line 71 of file cardgame_3.c.

Referenced by CARDGAME_drawCardPicture().

◆ CARDGAME_loopFrames

u8 CARDGAME_loopFrames[]
extern

the frames of a sprite's effect 1, which loops

Definition at line 76 of file cardgame_3.c.

Referenced by CARDGAME_drawSpriteEffect().

◆ CARDGAME_onceFrames

u8 CARDGAME_onceFrames[]
extern

the frames of its effect 2, which plays once

Definition at line 79 of file cardgame_3.c.

Referenced by CARDGAME_drawSpriteEffect().

◆ CARDGAME_highlightCluts

u8 CARDGAME_highlightCluts[]
extern

a palette cycle: 0, 1, 2, 3, 2, 1

Definition at line 82 of file cardgame_3.c.

Referenced by CARDGAME_drawSpriteHighlights().

◆ CARDGAME_messageWindowPositions

s32 CARDGAME_messageWindowPositions[][2]
extern

the message window's places (x, y), by CardScreen.message.place

Definition at line 30 of file cardgame_3.c.

Referenced by CARDGAME_updateMessageWindow(), showMessagePrompt(), and showMessageText().

◆ CARDGAME_panelLayouts

CardPanelLayout CARDGAME_panelLayouts[2]
extern

the panels' layouts, by side

Definition at line 31 of file cardgame_3.c.

Referenced by CARDGAME_drawPanel(), and drawPanelParts().

◆ CARDGAME_panelLightCluts

u8 CARDGAME_panelLightCluts[8]
extern

the clut rows of the panel's blinking lights: 0, 1, 2, 3, 2, 1

Definition at line 39 of file cardgame_3.c.

Referenced by CARDGAME_drawPanel().

◆ CARDGAME_panelBarSprites

u8 CARDGAME_panelBarSprites[8][2]
extern

the sprites of the panel's two bars, by LANGUAGE (USA: 1)

Definition at line 40 of file cardgame_3.c.

Referenced by CARDGAME_drawPanel().

◆ CARDGAME_flag7Frames

u8 CARDGAME_flag7Frames[]
extern

the frames of the panel's sprites for flags 7, 6 and 5 and its five flag icons (CARDGAME_flagIconSprites), when the flag is set: 0, 1, 2, 1, 0

Definition at line 44 of file cardgame_3.c.

Referenced by drawPanelParts().

◆ CARDGAME_flag6Frames

u8 CARDGAME_flag6Frames[]
extern

Definition at line 47 of file cardgame_3.c.

Referenced by drawPanelParts().

◆ CARDGAME_boxFrames

u8 CARDGAME_boxFrames[]
extern

Definition at line 50 of file cardgame_3.c.

Referenced by drawPanelParts().

◆ CARDGAME_flagIconSprites

u8 CARDGAME_flagIconSprites[]
extern

the sprites of the panel's five flag icons

Definition at line 53 of file cardgame_3.c.

Referenced by drawPanelParts().

◆ CARDGAME_flagIconFrames

u8 CARDGAME_flagIconFrames[]
extern

Definition at line 56 of file cardgame_3.c.

Referenced by drawPanelParts().