16 if (marker->
fast == 0) {
19 row = marker->
time >> 1;
35 switch (marker->
state) {
46 switch (marker->
phase) {
113 s16 rows[8] = {0, 1, 2, 3, 2, 1, 0, 0};
127 if (window->
blink != 0) {
128 i = window->
time >> 1;
147 switch (window->
state) {
158 texts[0]->
setPos(texts[0], window->
x + 5, window->
y + 3);
159 for (i = 0; i < 6; i++) {
167 switch (window->
phase) {
194 if (window->
phase == 1) {
195 texts[0]->
setPos(texts[0], window->
x + 5, window->
y + 3);
197 for (i = 0; i < 6; i++) {
203 for (i = 0; i < 6; i++) {
233 for (i = 0; i < 6; i++) {
236 for (i = 0; i < 40; i++) {
CARDGAME.PRO: the card battle (mode 0x700).
void initCardDrawer(CardDrawer *obj)
Clears a card drawer, gives it its methods and binds it.
CardOffset CARDGAME_deckCountOffsets[]
where the deck window's six counts are
void CARDGAME_setMarkerPos(CardMarker *marker, s16 x, s16 y)
CardMarker.setPos: moves the marker to x, y.
void CARDGAME_updateDeckWindow(CardDeckWindow *window, TextWindow **texts)
A deck window's task: makes its name and colour counts, opens by widening over 12 frames,...
void CARDGAME_drawMarker(CardMarker *marker)
Draws the deck marker at its size, cycling its palettes (or running through them once when fast)
void CARDGAME_setMarkerFast(CardMarker *marker)
CardMarker.setFast: runs its palettes once from the start (the deck was picked)
CardMarker * CARDGAME_createMarker(s16 x, s16 y)
Creates the deck marker at x, y, which shows the selected deck window.
void CARDGAME_setDeckWindowBlink(CardDeckWindow *window)
CardDeckWindow.setBlink: blinks its icon (the deck was picked)
void CARDGAME_drawDeckWindow(CardDeckWindow *window)
Draws a deck window's frame and icon at its size, the icon running through its palettes once when it ...
void CARDGAME_closeMarker(CardMarker *marker)
CardMarker.close: shrinks it over 5 frames.
void CARDGAME_closeDeckWindow(CardDeckWindow *window)
CardDeckWindow.close: narrows it over 6 frames.
void CARDGAME_updateMarker(CardMarker *marker)
The deck marker's task: opens by growing over 10 frames, stays until closed, then shrinks and is draw...
CardDeckWindow * CARDGAME_createDeckWindow(s32 deck, s32 x, s32 y)
Creates the window of deck deck at x, y, with how many cards of each colour it has.
GfxState GFX
GFX: the graphics state and its methods.
GameState GAME
The save data, the game mode and the methods.
FileCache FILE_CACHE
The file cache.
#define FILE_CARDGAME_TIMS
CARDGAME's own pictures, a TIM archive.
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
A deck's window (CARDGAME_createDeckWindow): its name and how many cards of each of the six colours i...
void(* close)(struct CardDeckWindow *window)
void(* setBlink)(struct CardDeckWindow *window)
void(* setState)(struct CardDeckWindow *task, s32 state)
void(* nextState)(struct CardDeckWindow *task)
u8 phase
0 opening, 1 open, 2 closing
Draws the cards' images (CardImage), from files 0x7E7-0x7EB.
A blinking marker that opens and closes by scaling (CARDGAME_createMarker): frame 0x47 of the TIM arc...
u8 phase
0 opening, 1 open, 2 closing
void(* close)(struct CardMarker *marker)
u8 fast
the blink's palette cycle
void(* setState)(struct CardMarker *task, s32 state)
void(* setFast)(struct CardMarker *marker)
void(* setPos)(struct CardMarker *marker, s16 x, s16 y)
void(* nextState)(struct CardMarker *task)
void *(* getEntry)(u32 fileAndIndex)
s32(* getFrameTime)(void)
Draws sprites from a sprite sheet (such as file 0x277, the menu graphics): a sheet has a table of fra...
void(* setScale)()
(x, y, z), ONE = 1.0
void(* setLayerId)()
(id, depth)
void(* setClutRow)()
(row)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
void(* setRightAlign)()
no prototype: callers would truncate u8 args
void(* setPos)(struct TextWindow *obj, s16 x, s16 y)
void(* setVisible)(struct TextWindow *obj, u8 arg)
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
TextWindow * createTextWindow(s16 layerId, s16 style, s16 x, s16 y)
A text window on a layer, in a font style, at (x, y)