Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
cardgame_3.c
Go to the documentation of this file.
1/* CARDGAME's third object's data, which the second object's functions use
2 too. */
3
5
6/* The data: the rest of the overlay's, this object's tables and the
7 variables, which the second object shares */
9/* where the deck window's six counts are */
11 {0x24, 0x14}, {0x47, 0x14}, {0x6A, 0x14}, {0x8D, 0x14}, {0xB0, 0x14}, {0xD3, 0x14},
12};
13#if VERSION_EU
15 {0x1800, 0x9000, 0x1800, 0x3200},
16 {0x1800, 0x9C00, 0x1800, 0x2600},
17};
18#endif
19/* where the three CardGauge gauges are */
21 {0x49, 0x61}, {0x7B, 0x61}, {0xAD, 0x61},
22};
24 {0x00, 0x0A, 0x02, 2}, {0xBE, 0x0A, 0x03, 2}, {0xBE, 0x18, 0x04, 2},
25 {0x43, 0x18, 0x05, 2}, {0x00, 0x1E, 0x37, 2}, {0x140, 0x0A, 0x19, 1},
26};
28 0x0004, 0x0018, 0x0049, 0x0000,
29};
30s32 CARDGAME_messageWindowPositions[][2] = {{0, 138}, {0, 96}, {0, 50}, {0, 96}};
32 {0x1, 0xE, 0x11, 0x2F, {17, 69}, {38, 71}, {249, 71}, {291, 71}, {1, -15}, {30, 52}, {46, 52},
33 {78, 52}, {94, 52}, {228, 69}, {270, 69}, {-7, -22}, {11, 67}, {222, 64}, {264, 64}, {-6, -20},
34 {23, 48}, {71, 48}},
35 {0x1, 0xF, 0x14, 0x30, {17, 14}, {38, 16}, {249, 16}, {291, 16}, {1, 21}, {30, 35}, {46, 35},
36 {78, 35}, {94, 35}, {228, 14}, {270, 14}, {-7, -6}, {11, 12}, {222, 9}, {264, 9}, {-6, -5},
37 {23, 31}, {71, 31}},
38};
39u8 CARDGAME_panelLightCluts[8] = {0, 1, 2, 3, 2, 1, 0, 0};
41 {0x4D, 0x56}, {0x4E, 0x57}, {0x4F, 0x58}, {0x50, 0x59},
42 {0x52, 0x5B}, {0x51, 0x5A}, {0x53, 0x5C}, {0, 0},
43};
45 0x00, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
46};
48 0x00, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
49};
51 0x00, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
52};
54 0x1D, 0x20, 0x23, 0x26, 0x29, 0x00, 0x00, 0x00,
55};
57 0x00, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
58};
59#if VERSION_EU
61 {{{0x7C, 0x33}, {0x7C, 0x23}}, {{0x8A, 0x34}, {0x8A, 0x24}}},
62 {{{0x7C, 0x3F}, {0x7C, 0x17}}, {{0x8A, 0x40}, {0x8A, 0x18}}},
63};
64#endif
66 -0x100, 0x300, -0x300, 0x100,
67};
69 -0x400, 0x200, -0x200, 0x400,
70};
72 12, 28, 32, 0x7C00A0,
73 0x2E0028, 0xFC0020, 0, 65280,
74 1, 65535, 0,
75};
77 0x00, 0x01, 0x02, 0x03,
78};
80 0x00, 0x01, 0x02, 0x03,
81};
83 0x00, 0x01, 0x02, 0x03, 0x02, 0x01, 0x00, 0x00,
84};
86 0x003C, 0x003D, 0x003E, 0x0040, 0x0041, 0x0042, 0x0043, 0x0046,
87 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x0067, 0x0068,
88 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x0070, 0x0071,
89 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079,
90 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x009A, 0x009B,
91 0x009C, 0x009D, 0x009E, 0x009F, 0x00A0, 0x00A1, 0x00A2, 0x00A3,
92 0x00A4, 0x00BD, 0x00BE, 0x00BF, 0x00C0, 0x00C2, 0x00C3, 0x00C4,
93 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CD,
94 0x00CE, 0x00CF, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00ED, 0x00EE,
95 0x00EF, 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6,
96 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x0113, 0x0114, 0x0118, 0x0119,
97 0x011A, 0x011B, 0x011C, 0x011D, 0x011E, 0x011F, 0x0120, 0x0121,
98 0x0122, 0x0124, 0x0125, 0x013A,
99};
100/* the cards everyone has, after the two decks in the card list */
102 0x050, 0x063, 0x08C, 0x0B8, 0x0E5, 0x0FB, 0x139, 0x13A, 0x13B,
103 /* the padding up to the next word, which each version fills with junk */
104#if VERSION_US
105 0x2D2D,
106#elif VERSION_EU
107 0x0A0D,
108#elif VERSION_JP
109 0x00E0,
110#endif
111};
113 { 0x2B, 1 },
114 { 0x0F, 1 },
115#if VERSION_US || VERSION_JP
116 { 2023, 0 },
117 { 2024, 0 },
118 { 2025, 0 },
119 { 2026, 0 },
120 { 2027, 0 },
121#elif VERSION_EU
122 { 2038, 0 },
123 { 2039, 0 },
124 { 2040, 0 },
125 { 2041, 0 },
126 { 2042, 0 },
127#endif
128 { -2, 0 },
129 { 0x1D, 1 },
130 { 0x16, 1 },
131 { 0x6A, 1 },
132 { -1, 0 },
133};
135 0x0044, 0x006F, 0x009A, 0x00C5, 0x00F0, 0x0000,
136};
138 0x005B, 0x005B, 0x0169, 0x016A, 0x016B, 0x016C, 0x016D, 0x016E,
139 0x016F, 0x0170, 0x0171, 0x0172, 0x0173, 0x0174, 0x0175, 0x0176,
140 0x0177, 0x0178, 0x0179, 0x017A, 0x017B, 0x017C, 0x017D, 0x017E,
141 0x017F, 0x0180, 0x0181, 0x0182, 0x0183, 0x0184, 0x0185, 0x0186,
142 0x0187, 0x0188, 0x0189, 0x018A,
143};
145 0x0138, 0x002A, 0x002B, 0x0136, 0x0136, 0x0136, 0x0021, 0x0021,
146 0x0050, 0x0029, 0x0031, 0x0031, 0x0031, 0x0031, 0x0031, 0x0031,
147 0x0031, 0x0031, 0x0031, 0x0031, 0x0009, 0x0009, 0x0009, 0x0009,
148 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0006, 0x0006,
149 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006,
150 0x0029, 0x0029, 0x0050, 0x0015, 0x0007, 0x001A, 0x0008, 0x0029,
151 0x0002, 0x0008, 0x002E, 0x000D, 0x000D, 0x000D, 0x0036, 0x0050,
152 0x000B, 0x000B, 0x0024, 0x000B, 0x0019, 0x000B, 0x0019, 0x001F,
153 0x0050, 0x0028, 0x0014, 0x0050, 0x0050, 0x0050, 0x0050, 0x0001,
154 0x0001, 0x0139, 0x0023, 0x0018, 0x0018, 0x0050, 0x003B, 0x003A,
155};
157 { 0x80, 0x80, 0x80, 1 }, { 0x00, 0x00, 0x80, 1 }, { 0x00, 0x80, 0x00, 1 },
158 { 0x80, 0x00, 0x00, 1 }, { 0x80, 0x80, 0x80, 2 }, { 0x80, 0x80, 0x00, 1 },
159};
160s16 CARDGAME_animPiles[7][2] = {{0, 0}, {1, 1}, {1, 2}, {1, 0}, {0, 1}, {0, 2}, {0, 0}};
161CardOffset CARDGAME_deckWindowPos[3] = {{0x17, 0x50}, {0x17, 0x7D}, {0x17, 0xAA}};
163 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
164};
166 {0x00, CARD_PHASE_NONE}, /* after no phase */
167 {0xA6, CARD_PHASE_CHOOSE_DECK}, /* after CARD_PHASE_FADE_IN */
168 {0xA0, CARD_PHASE_FIRST_PICK}, /* after CARD_PHASE_CHOOSE_DECK */
169 {0xA1, CARD_PHASE_DEAL}, /* after CARD_PHASE_FIRST_PICK */
170 {0xA2, CARD_PHASE_PLAYS_BEFORE}, /* after CARD_PHASE_DEAL */
171 {0xA3, CARD_PHASE_PUT_OUT}, /* after CARD_PHASE_PLAYS_BEFORE */
172 {0xA4, CARD_PHASE_PLAYS_AFTER}, /* after CARD_PHASE_PUT_OUT */
173 {0xA5, CARD_PHASE_END_ROUND}, /* after CARD_PHASE_PLAYS_AFTER */
174 {0xA0, CARD_PHASE_FIRST_PICK}, /* after CARD_PHASE_END_ROUND */
175 {0xA0, CARD_PHASE_FIRST_PICK}, /* after CARD_PHASE_NEXT_ROUND */
176};
177CardOffset CARDGAME_playedCardPos[2][2] = {{{0x82, 0xBF}, {0x82, 0x1D}}, {{0x82, 0xCB}, {0x82, 0x11}}};
178RECT CARDGAME_fadeRect = {0, -15, 320, 260};
182u8 CARDGAME_slotMoves[2][6][2] = {{{0}}};
183/* per side, the entries of CARDGAME_slotMoves; bytes 2 and 3 are
184 CARDGAME_markedCounts, the marked slots (config/<version>/
185 undefined_syms_cardgame.txt), and the rest is not used. Two symbols, not a
186 struct or an array: CARDGAME_removeMarkedSlots loads each address with its
187 own lui and addiu, and GCC 2.8.1 folds the members of one object into one
188 base (CARDGAME_removeMarkedSlots no longer matches as either). The zero
189 variables from CARDGAME_promptText on end the file, as an overlay's .bss
190 would: two 2-byte variables 2 bytes apart fit commons that the linker laid
191 out, not word-aligned C definitions. */
CARDGAME.PRO: the card battle (mode 0x700).
@ CARD_PHASE_FIRST_PICK
who starts
Definition battle.h:82
@ CARD_PHASE_PUT_OUT
Definition battle.h:85
@ CARD_PHASE_DEAL
six cards to each side
Definition battle.h:83
@ CARD_PHASE_PLAYS_AFTER
plays after: any kind but 0
Definition battle.h:86
@ CARD_PHASE_PLAYS_BEFORE
plays before the cards are put out: kind 2 cards only
Definition battle.h:84
@ CARD_PHASE_END_ROUND
Definition battle.h:87
@ CARD_PHASE_NONE
for nextPhase: no switch
Definition battle.h:79
@ CARD_PHASE_CHOOSE_DECK
Definition battle.h:81
u8 CARDGAME_slotMoveCounts[8]
per side, the entries of CARDGAME_slotMoves; bytes 2 and 3 are CARDGAME_markedCounts,...
Definition cardgame_3.c:192
s16 CARDGAME_animPiles[7][2]
the side and pile CARDGAME_updateCardAnims passes to CARDGAME_layOutPile
Definition cardgame_3.c:160
CardOffset CARDGAME_panelIconPositions[2][2][2]
CARDGAME_drawPanelIcon's icon and label positions, by SHIFT_PAL_SCREEN and side (EU)
Definition cardgame_3.c:60
CardFileEntry CARDGAME_preloadFiles[]
Definition cardgame_3.c:112
u8 CARDGAME_highlightCluts[]
a palette cycle: 0, 1, 2, 3, 2, 1
Definition cardgame_3.c:82
CardOffset CARDGAME_deckCountOffsets[]
where the deck window's six counts are
Definition cardgame_3.c:10
u8 CARDGAME_slotMoves[2][6][2]
per side, the slot moves (from, to) of CARDGAME_removeMarkedSlots
Definition cardgame_3.c:182
u8 CARDGAME_flag7Frames[]
the frames of the panel's sprites for flags 7, 6 and 5 and its five flag icons (CARDGAME_flagIconSpri...
Definition cardgame_3.c:44
RECT CARDGAME_fadeRect
Definition cardgame_3.c:178
s32 CARDGAME_selectionText
the message of CARDGAME_chooseCard's selection
Definition cardgame_3.c:181
s32 CARDGAME_messageWindowPositions[][2]
the message window's places (x, y), by CardScreen.message.place
Definition cardgame_3.c:30
u8 CARDGAME_loopFrames[]
the frames of a sprite's effect 1, which loops
Definition cardgame_3.c:76
u8 CARDGAME_panelBarSprites[8][2]
the sprites of the panel's two bars, by LANGUAGE (USA: 1)
Definition cardgame_3.c:40
CardFadeColor CARDGAME_fadeColors[]
CARDGAME_startStepFade's fade colours and blends, by fade - 1.
Definition cardgame_3.c:156
u8 CARDGAME_onceFrames[]
the frames of its effect 2, which plays once
Definition cardgame_3.c:79
s32 CARDGAME_slotRowPositions[2][4]
sprite positions, by SHIFT_PAL_SCREEN
Definition cardgame_3.c:14
u8 CARDGAME_turnStates[]
the next record.turnState state, by step and side
Definition cardgame_3.c:162
s16 CARDGAME_shakeOffsets[]
CARDGAME_shakeSprite's x offsets, by time.
Definition cardgame_3.c:65
s32 CARDGAME_promptText
the text of window 0
Definition cardgame_3.c:179
u16 CARDGAME_windowTextOffsets[]
a window's text x, by CARDGAME_drawWindowText's index
Definition cardgame_3.c:27
s16 CARDGAME_commonCards[]
the cards everyone has, after the two decks in the card list
Definition cardgame_3.c:101
s16 CARDGAME_otherCards[]
the 100 cards whose images CARDGAME_loadCardImages loads after the decks (CARDGAME_getOtherCard)
Definition cardgame_3.c:85
s16 CARDGAME_jitterOffsets[]
CARDGAME_jitterSprite's x and y offsets.
Definition cardgame_3.c:68
CardPanelLayout CARDGAME_panelLayouts[2]
the panels' layouts, by side
Definition cardgame_3.c:31
u8 CARDGAME_flag6Frames[]
Definition cardgame_3.c:47
u16 CARDGAME_defaultDeck[]
the deck used when the chosen one is empty: its first 40 cards, as card ids - 1 (CardBattle....
Definition cardgame_3.c:144
u8 CARDGAME_boxFrames[]
Definition cardgame_3.c:50
s32 CARDGAME_pictureSheet[]
the sprite sheet CARDGAME_drawCardPicture draws a card's picture with
Definition cardgame_3.c:71
u8 CARDGAME_flagIconSprites[]
the sprites of the panel's five flag icons
Definition cardgame_3.c:53
CardOffset CARDGAME_deckWindowPos[3]
the three deck windows
Definition cardgame_3.c:161
CardBattleMessage CARDGAME_battleMessages[]
the step and nextPhase of CARDGAME_startBattleMessage, by prevPhase
Definition cardgame_3.c:165
s16 CARDGAME_savedPanelScales[2]
the panels' scale states, kept by CARDGAME_viewTable
Definition cardgame_3.c:180
CardOffset CARDGAME_gaugePositions[]
where the three CardGauge gauges are
Definition cardgame_3.c:20
RECT CARDGAME_screenRect
The data: the rest of the overlay's, this object's tables and the variables, which the second object ...
Definition cardgame_3.c:8
CardMessageWindow CARDGAME_savedScreenState
Definition cardgame_3.c:193
CardOffset CARDGAME_playedCardPos[2][2]
then the same moved for SHIFT_PAL_SCREEN
Definition cardgame_3.c:177
s16 CARDGAME_prizeItems[]
the item an opponent gives for a win (CardBattle.prize), by its CardOpponent.prize
Definition cardgame_3.c:137
u8 CARDGAME_panelLightCluts[8]
the clut rows of the panel's blinking lights: 0, 1, 2, 3, 2, 1
Definition cardgame_3.c:39
s16 CARDGAME_countingCards[]
five card ids, minus one
Definition cardgame_3.c:134
u8 CARDGAME_flagIconFrames[]
Definition cardgame_3.c:56
CardWindowLayout CARDGAME_windowLayouts[]
Definition cardgame_3.c:23
signed int s32
Definition common.h:11
signed short s16
Definition common.h:9
unsigned short u16
Definition common.h:10
unsigned char u8
Definition common.h:8
#define SCREEN_WIDTH
The screen the modes draw on (setDisplayMode, their layers' rects)
Definition gfx.h:36
#define SCREEN_HEIGHT
Definition gfx.h:37
What a phase does once it is over (CARDGAME_battleMessages): the step that shows its message,...
Definition battle.h:94
A fade colour and blend mode (CardBattle.fade - 1 picks one)
Definition screen.h:51
A file CARDGAME_tickPreloader reads; a text file is in each language.
Definition screen.h:19
The battle screen's message window (CardScreen.message), which CARDGAME_runBattleMenu keeps a copy of...
Definition screen.h:248
An offset from a window's corner.
Definition screen.h:59
Where CARDGAME_drawPanel draws the parts of a side's panel (CARDGAME_panelLayouts),...
Definition screen.h:107
How each of the six CardWindow windows is drawn.
Definition screen.h:65