Merge remote-tracking branch 'pret/master' into RHH/pr/sync/pretmerge_20221124
# Conflicts: # include/battle.h # src/battle_ai_script_commands.c # src/battle_ai_switch_items.c # src/battle_dome.c # src/battle_main.c # src/battle_pike.c # src/battle_script_commands.c # src/battle_tower.c # src/data/pokemon/species_info.h # src/pokemon.c
@ -426,13 +426,13 @@ SHADOW = FC 03 @ same as fc 01
|
||||
COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes
|
||||
PALETTE = FC 05 @ used in credits
|
||||
FONT = FC 06 @ Given a font id, or use font constants below instead
|
||||
RESET_SIZE = FC 07
|
||||
RESET_FONT = FC 07
|
||||
PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them
|
||||
PAUSE_UNTIL_PRESS = FC 09
|
||||
WAIT_SE = FC 0A
|
||||
PLAY_BGM = FC 0B
|
||||
ESCAPE = FC 0C
|
||||
SHIFT_TEXT = FC 0D
|
||||
SHIFT_RIGHT = FC 0D
|
||||
SHIFT_DOWN = FC 0E
|
||||
FILL_WINDOW = FC 0F
|
||||
PLAY_SE = FC 10
|
||||
|
@ -212,13 +212,13 @@
|
||||
#define EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW 0x04
|
||||
#define EXT_CTRL_CODE_PALETTE 0x05
|
||||
#define EXT_CTRL_CODE_FONT 0x06
|
||||
#define EXT_CTRL_CODE_RESET_SIZE 0x07
|
||||
#define EXT_CTRL_CODE_RESET_FONT 0x07
|
||||
#define EXT_CTRL_CODE_PAUSE 0x08
|
||||
#define EXT_CTRL_CODE_PAUSE_UNTIL_PRESS 0x09
|
||||
#define EXT_CTRL_CODE_WAIT_SE 0x0A
|
||||
#define EXT_CTRL_CODE_PLAY_BGM 0x0B
|
||||
#define EXT_CTRL_CODE_ESCAPE 0x0C
|
||||
#define EXT_CTRL_CODE_SHIFT_TEXT 0x0D
|
||||
#define EXT_CTRL_CODE_SHIFT_RIGHT 0x0D
|
||||
#define EXT_CTRL_CODE_SHIFT_DOWN 0x0E
|
||||
#define EXT_CTRL_CODE_FILL_WINDOW 0x0F
|
||||
#define EXT_CTRL_CODE_PLAY_SE 0x10
|
||||
|
@ -354,7 +354,7 @@ u8 *StringExpandPlaceholders(u8 *dest, const u8 *src)
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case EXT_CTRL_CODE_RESET_SIZE:
|
||||
case EXT_CTRL_CODE_RESET_FONT:
|
||||
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
||||
case EXT_CTRL_CODE_FILL_WINDOW:
|
||||
case EXT_CTRL_CODE_JPN:
|
||||
@ -665,13 +665,13 @@ u8 GetExtCtrlCodeLength(u8 code)
|
||||
[EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW] = 4,
|
||||
[EXT_CTRL_CODE_PALETTE] = 2,
|
||||
[EXT_CTRL_CODE_FONT] = 2,
|
||||
[EXT_CTRL_CODE_RESET_SIZE] = 1,
|
||||
[EXT_CTRL_CODE_RESET_FONT] = 1,
|
||||
[EXT_CTRL_CODE_PAUSE] = 2,
|
||||
[EXT_CTRL_CODE_PAUSE_UNTIL_PRESS] = 1,
|
||||
[EXT_CTRL_CODE_WAIT_SE] = 1,
|
||||
[EXT_CTRL_CODE_PLAY_BGM] = 3,
|
||||
[EXT_CTRL_CODE_ESCAPE] = 2,
|
||||
[EXT_CTRL_CODE_SHIFT_TEXT] = 2,
|
||||
[EXT_CTRL_CODE_SHIFT_RIGHT] = 2,
|
||||
[EXT_CTRL_CODE_SHIFT_DOWN] = 2,
|
||||
[EXT_CTRL_CODE_FILL_WINDOW] = 1,
|
||||
[EXT_CTRL_CODE_PLAY_SE] = 3,
|
||||
|
16
gflib/text.c
@ -1009,7 +1009,7 @@ static u16 RenderText(struct TextPrinter *textPrinter)
|
||||
subStruct->fontId = *textPrinter->printerTemplate.currentChar;
|
||||
textPrinter->printerTemplate.currentChar++;
|
||||
return RENDER_REPEAT;
|
||||
case EXT_CTRL_CODE_RESET_SIZE:
|
||||
case EXT_CTRL_CODE_RESET_FONT:
|
||||
return RENDER_REPEAT;
|
||||
case EXT_CTRL_CODE_PAUSE:
|
||||
textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar;
|
||||
@ -1042,7 +1042,7 @@ static u16 RenderText(struct TextPrinter *textPrinter)
|
||||
textPrinter->printerTemplate.currentChar++;
|
||||
PlaySE(currChar);
|
||||
return RENDER_REPEAT;
|
||||
case EXT_CTRL_CODE_SHIFT_TEXT:
|
||||
case EXT_CTRL_CODE_SHIFT_RIGHT:
|
||||
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar;
|
||||
textPrinter->printerTemplate.currentChar++;
|
||||
return RENDER_REPEAT;
|
||||
@ -1271,7 +1271,7 @@ static u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpaci
|
||||
case EXT_CTRL_CODE_FONT:
|
||||
case EXT_CTRL_CODE_PAUSE:
|
||||
case EXT_CTRL_CODE_ESCAPE:
|
||||
case EXT_CTRL_CODE_SHIFT_TEXT:
|
||||
case EXT_CTRL_CODE_SHIFT_RIGHT:
|
||||
case EXT_CTRL_CODE_SHIFT_DOWN:
|
||||
case EXT_CTRL_CODE_CLEAR:
|
||||
case EXT_CTRL_CODE_SKIP:
|
||||
@ -1279,7 +1279,7 @@ static u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpaci
|
||||
case EXT_CTRL_CODE_MIN_LETTER_SPACING:
|
||||
++strPos;
|
||||
break;
|
||||
case EXT_CTRL_CODE_RESET_SIZE:
|
||||
case EXT_CTRL_CODE_RESET_FONT:
|
||||
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
||||
case EXT_CTRL_CODE_WAIT_SE:
|
||||
case EXT_CTRL_CODE_FILL_WINDOW:
|
||||
@ -1413,7 +1413,7 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
||||
case EXT_CTRL_CODE_PALETTE:
|
||||
case EXT_CTRL_CODE_PAUSE:
|
||||
case EXT_CTRL_CODE_ESCAPE:
|
||||
case EXT_CTRL_CODE_SHIFT_TEXT:
|
||||
case EXT_CTRL_CODE_SHIFT_RIGHT:
|
||||
case EXT_CTRL_CODE_SHIFT_DOWN:
|
||||
++str;
|
||||
break;
|
||||
@ -1444,7 +1444,7 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
||||
case EXT_CTRL_CODE_ENG:
|
||||
isJapanese = 0;
|
||||
break;
|
||||
case EXT_CTRL_CODE_RESET_SIZE:
|
||||
case EXT_CTRL_CODE_RESET_FONT:
|
||||
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
||||
case EXT_CTRL_CODE_WAIT_SE:
|
||||
case EXT_CTRL_CODE_FILL_WINDOW:
|
||||
@ -1556,7 +1556,7 @@ u8 RenderTextHandleBold(u8 *pixels, u8 fontId, u8 *str)
|
||||
case EXT_CTRL_CODE_PALETTE:
|
||||
case EXT_CTRL_CODE_PAUSE:
|
||||
case EXT_CTRL_CODE_ESCAPE:
|
||||
case EXT_CTRL_CODE_SHIFT_TEXT:
|
||||
case EXT_CTRL_CODE_SHIFT_RIGHT:
|
||||
case EXT_CTRL_CODE_SHIFT_DOWN:
|
||||
case EXT_CTRL_CODE_CLEAR:
|
||||
case EXT_CTRL_CODE_SKIP:
|
||||
@ -1564,7 +1564,7 @@ u8 RenderTextHandleBold(u8 *pixels, u8 fontId, u8 *str)
|
||||
case EXT_CTRL_CODE_MIN_LETTER_SPACING:
|
||||
++strPos;
|
||||
break;
|
||||
case EXT_CTRL_CODE_RESET_SIZE:
|
||||
case EXT_CTRL_CODE_RESET_FONT:
|
||||
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
||||
case EXT_CTRL_CODE_WAIT_SE:
|
||||
case EXT_CTRL_CODE_FILL_WINDOW:
|
||||
|
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 156 B After Width: | Height: | Size: 156 B |
19
graphics/interface/red.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
115 164 197
|
||||
255 82 0
|
||||
131 32 0
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 197 B |
@ -1,259 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
256
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
Before Width: | Height: | Size: 1.2 KiB |
19
graphics/wireless_status_screen/anim_00.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_01.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_02.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_03.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_04.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_05.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_06.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_07.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_08.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_09.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_10.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_11.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_12.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_13.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
BIN
graphics/wireless_status_screen/bg.png
Normal file
After Width: | Height: | Size: 490 B |
19
graphics/wireless_status_screen/default.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
@ -688,7 +688,7 @@ $(WALLPAPERGFXDIR)/whiscash/tiles.4bpp: $(WALLPAPERGFXDIR)/friends_frame2.4bpp $
|
||||
$(OBJEVENTGFXDIR)/pics/effects/unknown_4F6D38/0.4bpp: %.4bpp: %.png
|
||||
$(GFX) $< $@ -num_tiles 11 -Wnum_tiles
|
||||
|
||||
$(INTERFACEGFXDIR)/selector_outline.4bpp: %.4bpp: %.png
|
||||
$(INTERFACEGFXDIR)/outline_cursor.4bpp: %.4bpp: %.png
|
||||
$(GFX) $< $@ -num_tiles 8 -Wnum_tiles
|
||||
|
||||
$(BATTRANSGFXDIR)/frontier_logo_center.4bpp: %.4bpp: %.png
|
||||
|
@ -240,7 +240,7 @@ struct WishFutureKnock
|
||||
u8 wishCounter[MAX_BATTLERS_COUNT];
|
||||
u8 wishPartyId[MAX_BATTLERS_COUNT];
|
||||
u8 weatherDuration;
|
||||
u8 knockedOffMons[2]; // Each battler is represented by a bit. The array entry is dependent on the battler's side.
|
||||
u8 knockedOffMons[NUM_BATTLE_SIDES]; // Each battler is represented by a bit.
|
||||
};
|
||||
|
||||
struct AI_SavedBattleMon
|
||||
@ -451,9 +451,9 @@ struct BattleTv_Mon
|
||||
|
||||
struct BattleTv
|
||||
{
|
||||
struct BattleTv_Mon mon[2][PARTY_SIZE]; // [side][partyId]
|
||||
struct BattleTv_Position pos[2][2]; // [side][flank]
|
||||
struct BattleTv_Side side[2]; // [side]
|
||||
struct BattleTv_Mon mon[NUM_BATTLE_SIDES][PARTY_SIZE];
|
||||
struct BattleTv_Position pos[NUM_BATTLE_SIDES][2]; // [side][flank]
|
||||
struct BattleTv_Side side[NUM_BATTLE_SIDES];
|
||||
};
|
||||
|
||||
struct BattleTvMovePoints
|
||||
@ -570,7 +570,7 @@ struct BattleStruct
|
||||
u8 wallyWaitFrames;
|
||||
u8 wallyMoveFrames;
|
||||
u16 lastTakenMove[MAX_BATTLERS_COUNT]; // Last move that a battler was hit with.
|
||||
u16 hpOnSwitchout[2];
|
||||
u16 hpOnSwitchout[NUM_BATTLE_SIDES];
|
||||
u32 savedBattleTypeFlags;
|
||||
u16 abilityPreventingSwitchout;
|
||||
u8 hpScale;
|
||||
@ -916,8 +916,8 @@ extern u16 gMoveResultFlags;
|
||||
extern u32 gHitMarker;
|
||||
extern u8 gTakenDmgByBattler[MAX_BATTLERS_COUNT];
|
||||
extern u8 gUnusedFirstBattleVar2;
|
||||
extern u32 gSideStatuses[2];
|
||||
extern struct SideTimer gSideTimers[2];
|
||||
extern u32 gSideStatuses[NUM_BATTLE_SIDES];
|
||||
extern struct SideTimer gSideTimers[NUM_BATTLE_SIDES];
|
||||
extern u32 gStatuses3[MAX_BATTLERS_COUNT];
|
||||
extern u32 gStatuses4[MAX_BATTLERS_COUNT];
|
||||
extern struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT];
|
||||
|
@ -36,6 +36,7 @@
|
||||
|
||||
#define B_SIDE_PLAYER 0
|
||||
#define B_SIDE_OPPONENT 1
|
||||
#define NUM_BATTLE_SIDES 2
|
||||
|
||||
#define B_FLANK_LEFT 0
|
||||
#define B_FLANK_RIGHT 1
|
||||
|
@ -7,12 +7,20 @@
|
||||
#define LIST_CANCEL -2
|
||||
#define LIST_HEADER -3
|
||||
|
||||
#define LIST_NO_MULTIPLE_SCROLL 0
|
||||
#define LIST_MULTIPLE_SCROLL_DPAD 1
|
||||
#define LIST_MULTIPLE_SCROLL_L_R 2
|
||||
enum {
|
||||
LIST_NO_MULTIPLE_SCROLL,
|
||||
LIST_MULTIPLE_SCROLL_DPAD,
|
||||
LIST_MULTIPLE_SCROLL_L_R,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
CURSOR_BLACK_ARROW,
|
||||
CURSOR_INVISIBLE,
|
||||
CURSOR_RED_OUTLINE,
|
||||
CURSOR_RED_ARROW,
|
||||
};
|
||||
|
||||
enum {
|
||||
SCROLL_ARROW_LEFT,
|
||||
SCROLL_ARROW_RIGHT,
|
||||
SCROLL_ARROW_UP,
|
||||
|
@ -294,7 +294,7 @@ struct BattlePokemon
|
||||
/*0x55*/ u32 otId;
|
||||
};
|
||||
|
||||
struct BaseStats
|
||||
struct SpeciesInfo
|
||||
{
|
||||
/* 0x00 */ u8 baseHP;
|
||||
/* 0x01 */ u8 baseAttack;
|
||||
@ -396,7 +396,7 @@ extern struct SpriteTemplate gMultiuseSpriteTemplate;
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
extern const u8 gFacilityClassToPicIndex[];
|
||||
extern const u8 gFacilityClassToTrainerClass[];
|
||||
extern const struct BaseStats gBaseStats[];
|
||||
extern const struct SpeciesInfo gSpeciesInfo[];
|
||||
extern const u8 *const gItemEffectTable[];
|
||||
extern const u32 gExperienceTables[][MAX_LEVEL + 1];
|
||||
extern const struct LevelUpMove *const gLevelUpLearnsets[];
|
||||
|
@ -209,9 +209,9 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
|
||||
|
||||
species = GetMonData(&party[i], MON_DATA_SPECIES);
|
||||
if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0)
|
||||
monAbility = gBaseStats[species].abilities[1];
|
||||
monAbility = gSpeciesInfo[species].abilities[1];
|
||||
else
|
||||
monAbility = gBaseStats[species].abilities[0];
|
||||
monAbility = gSpeciesInfo[species].abilities[0];
|
||||
|
||||
if (absorbingTypeAbility == monAbility && Random() & 1)
|
||||
{
|
||||
@ -583,9 +583,9 @@ static bool8 FindMonWithFlagsAndSuperEffective(u16 flags, u8 moduloPercent)
|
||||
|
||||
species = GetMonData(&party[i], MON_DATA_SPECIES);
|
||||
if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0)
|
||||
monAbility = gBaseStats[species].abilities[1];
|
||||
monAbility = gSpeciesInfo[species].abilities[1];
|
||||
else
|
||||
monAbility = gBaseStats[species].abilities[0];
|
||||
monAbility = gSpeciesInfo[species].abilities[0];
|
||||
|
||||
CalcPartyMonTypeEffectivenessMultiplier(gLastLandedMoves[gActiveBattler], species, monAbility);
|
||||
if (gMoveResultFlags & flags)
|
||||
@ -832,8 +832,8 @@ static u32 GetBestMonTypeMatchup(struct Pokemon *party, int firstId, int lastId,
|
||||
|
||||
u8 atkType1 = gBattleMons[opposingBattler].type1;
|
||||
u8 atkType2 = gBattleMons[opposingBattler].type2;
|
||||
u8 defType1 = gBaseStats[species].type1;
|
||||
u8 defType2 = gBaseStats[species].type2;
|
||||
u8 defType1 = gSpeciesInfo[species].type1;
|
||||
u8 defType2 = gSpeciesInfo[species].type2;
|
||||
|
||||
typeEffectiveness *= GetTypeModifier(atkType1, defType1);
|
||||
if (atkType2 != atkType1)
|
||||
|
@ -552,9 +552,9 @@ void SetBattlerData(u8 battlerId)
|
||||
if (BATTLE_HISTORY->abilities[battlerId] != ABILITY_NONE)
|
||||
gBattleMons[battlerId].ability = BATTLE_HISTORY->abilities[battlerId];
|
||||
// Check if mon can only have one ability.
|
||||
else if (gBaseStats[gBattleMons[battlerId].species].abilities[1] == ABILITY_NONE
|
||||
|| gBaseStats[gBattleMons[battlerId].species].abilities[1] == gBaseStats[gBattleMons[battlerId].species].abilities[0])
|
||||
gBattleMons[battlerId].ability = gBaseStats[gBattleMons[battlerId].species].abilities[0];
|
||||
else if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[1] == ABILITY_NONE
|
||||
|| gSpeciesInfo[gBattleMons[battlerId].species].abilities[1] == gSpeciesInfo[gBattleMons[battlerId].species].abilities[0])
|
||||
gBattleMons[battlerId].ability = gSpeciesInfo[gBattleMons[battlerId].species].abilities[0];
|
||||
// The ability is unknown.
|
||||
else
|
||||
gBattleMons[battlerId].ability = ABILITY_NONE;
|
||||
@ -628,12 +628,12 @@ bool32 IsBattlerTrapped(u8 battler, bool8 checkSwitch)
|
||||
|
||||
u32 GetTotalBaseStat(u32 species)
|
||||
{
|
||||
return gBaseStats[species].baseHP
|
||||
+ gBaseStats[species].baseAttack
|
||||
+ gBaseStats[species].baseDefense
|
||||
+ gBaseStats[species].baseSpeed
|
||||
+ gBaseStats[species].baseSpAttack
|
||||
+ gBaseStats[species].baseSpDefense;
|
||||
return gSpeciesInfo[species].baseHP
|
||||
+ gSpeciesInfo[species].baseAttack
|
||||
+ gSpeciesInfo[species].baseDefense
|
||||
+ gSpeciesInfo[species].baseSpeed
|
||||
+ gSpeciesInfo[species].baseSpAttack
|
||||
+ gSpeciesInfo[species].baseSpDefense;
|
||||
}
|
||||
|
||||
bool32 IsTruantMonVulnerable(u32 battlerAI, u32 opposingBattler)
|
||||
@ -1183,12 +1183,12 @@ s32 AI_GetAbility(u32 battlerId)
|
||||
return knownAbility;
|
||||
|
||||
// Else, guess the ability
|
||||
if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE)
|
||||
if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE)
|
||||
{
|
||||
u16 abilityGuess = ABILITY_NONE;
|
||||
while (abilityGuess == ABILITY_NONE)
|
||||
{
|
||||
abilityGuess = gBaseStats[gBattleMons[battlerId].species].abilities[Random() % NUM_ABILITY_SLOTS];
|
||||
abilityGuess = gSpeciesInfo[gBattleMons[battlerId].species].abilities[Random() % NUM_ABILITY_SLOTS];
|
||||
}
|
||||
|
||||
return abilityGuess;
|
||||
|
@ -5667,11 +5667,11 @@ static void AnimTipMon_Step(struct Sprite *sprite)
|
||||
|
||||
void AnimTask_SkullBashPosition(u8 taskId)
|
||||
{
|
||||
u8 a;
|
||||
u8 side;
|
||||
|
||||
gTasks[taskId].data[0] = gBattlerSpriteIds[gBattleAnimAttacker];
|
||||
a = GetBattlerSide(gBattleAnimAttacker);
|
||||
gTasks[taskId].data[1] = a;
|
||||
side = GetBattlerSide(gBattleAnimAttacker);
|
||||
gTasks[taskId].data[1] = side;
|
||||
gTasks[taskId].data[2] = 0;
|
||||
switch (gBattleAnimArgs[0])
|
||||
{
|
||||
@ -5683,7 +5683,7 @@ void AnimTask_SkullBashPosition(u8 taskId)
|
||||
gTasks[taskId].data[3] = 8;
|
||||
gTasks[taskId].data[4] = 0;
|
||||
gTasks[taskId].data[5] = 3;
|
||||
if (a == 0)
|
||||
if (side == B_SIDE_PLAYER)
|
||||
gTasks[taskId].data[5] *= -1;
|
||||
|
||||
gTasks[taskId].func = AnimTask_SkullBashPositionSet;
|
||||
@ -5692,7 +5692,7 @@ void AnimTask_SkullBashPosition(u8 taskId)
|
||||
gTasks[taskId].data[3] = 8;
|
||||
gTasks[taskId].data[4] = 0x600;
|
||||
gTasks[taskId].data[5] = 0xC0;
|
||||
if (a == 0)
|
||||
if (side == B_SIDE_PLAYER)
|
||||
{
|
||||
gTasks[taskId].data[4] = -gTasks[taskId].data[4];
|
||||
gTasks[taskId].data[5] = -gTasks[taskId].data[5];
|
||||
|
@ -1385,7 +1385,7 @@ static void Task_GiveExpToMon(u8 taskId)
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
||||
u32 currExp = GetMonData(mon, MON_DATA_EXP);
|
||||
u32 nextLvlExp = gExperienceTables[gBaseStats[species].growthRate][level + 1];
|
||||
u32 nextLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1];
|
||||
|
||||
if (currExp + gainedExp >= nextLvlExp)
|
||||
{
|
||||
@ -1428,11 +1428,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId)
|
||||
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||
u32 exp = GetMonData(mon, MON_DATA_EXP);
|
||||
u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level];
|
||||
u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level];
|
||||
u32 expToNextLvl;
|
||||
|
||||
exp -= currLvlExp;
|
||||
expToNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLvlExp;
|
||||
expToNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLvlExp;
|
||||
SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp);
|
||||
PlaySE(SE_EXP);
|
||||
gTasks[taskId].func = Task_GiveExpWithExpBar;
|
||||
@ -1464,7 +1464,7 @@ static void Task_GiveExpWithExpBar(u8 taskId)
|
||||
level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
|
||||
currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP);
|
||||
species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES);
|
||||
expOnNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1];
|
||||
expOnNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1];
|
||||
|
||||
if (currExp + gainedExp >= expOnNextLvl)
|
||||
{
|
||||
|
@ -325,7 +325,7 @@ static void Task_GiveExpToMon(u8 taskId)
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
||||
u32 currExp = GetMonData(mon, MON_DATA_EXP);
|
||||
u32 nextLvlExp = gExperienceTables[gBaseStats[species].growthRate][level + 1];
|
||||
u32 nextLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1];
|
||||
|
||||
if (currExp + gainedExp >= nextLvlExp)
|
||||
{
|
||||
@ -368,11 +368,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId)
|
||||
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||
u32 exp = GetMonData(mon, MON_DATA_EXP);
|
||||
u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level];
|
||||
u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level];
|
||||
u32 expToNextLvl;
|
||||
|
||||
exp -= currLvlExp;
|
||||
expToNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLvlExp;
|
||||
expToNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLvlExp;
|
||||
SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp);
|
||||
PlaySE(SE_EXP);
|
||||
gTasks[taskId].func = Task_GiveExpWithExpBar;
|
||||
@ -404,7 +404,7 @@ static void Task_GiveExpWithExpBar(u8 taskId)
|
||||
level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
|
||||
currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP);
|
||||
species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES);
|
||||
expOnNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1];
|
||||
expOnNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1];
|
||||
|
||||
if (currExp + gainedExp >= expOnNextLvl)
|
||||
{
|
||||
|
@ -2348,8 +2348,8 @@ static void InitDomeTrainers(void)
|
||||
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_SPDEF, NULL);
|
||||
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_SPEED, NULL);
|
||||
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_MAX_HP, NULL);
|
||||
monTypesBits |= gBitTable[gBaseStats[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type1];
|
||||
monTypesBits |= gBitTable[gBaseStats[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type2];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type1];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type2];
|
||||
}
|
||||
|
||||
// Count the number of types in the players party, to factor into the ranking
|
||||
@ -2383,8 +2383,8 @@ static void InitDomeTrainers(void)
|
||||
rankingScores[i] += statValues[STAT_SPDEF];
|
||||
rankingScores[i] += statValues[STAT_SPEED];
|
||||
rankingScores[i] += statValues[STAT_HP];
|
||||
monTypesBits |= gBitTable[gBaseStats[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
|
||||
monTypesBits |= gBitTable[gBaseStats[gFacilityTrainerMons[DOME_MONS[i][j]].species].type2];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type2];
|
||||
}
|
||||
|
||||
for (monTypesCount = 0, j = 0; j < 32; j++)
|
||||
@ -2448,7 +2448,7 @@ static void InitDomeTrainers(void)
|
||||
|
||||
#define CALC_STAT(base, statIndex) \
|
||||
{ \
|
||||
u8 baseStat = gBaseStats[species].base; \
|
||||
u8 baseStat = gSpeciesInfo[species].base; \
|
||||
stats[statIndex] = (((2 * baseStat + ivs + evs[statIndex] / 4) * level) / 100) + 5; \
|
||||
stats[statIndex] = (u8) ModifyStatByNature(nature, stats[statIndex], statIndex); \
|
||||
}
|
||||
@ -2481,7 +2481,7 @@ static void CalcDomeMonStats(u16 species, int level, int ivs, u8 evBits, u8 natu
|
||||
}
|
||||
else
|
||||
{
|
||||
int n = 2 * gBaseStats[species].baseHP;
|
||||
int n = 2 * gSpeciesInfo[species].baseHP;
|
||||
stats[STAT_HP] = (((n + ivs + evs[STAT_HP] / 4) * level) / 100) + level + 10;
|
||||
}
|
||||
|
||||
@ -2750,9 +2750,9 @@ static int GetTypeEffectivenessPoints(int move, int targetSpecies, int mode)
|
||||
if (move == MOVE_NONE || move == MOVE_UNAVAILABLE || IS_MOVE_STATUS(move))
|
||||
return 0;
|
||||
|
||||
defType1 = gBaseStats[targetSpecies].type1;
|
||||
defType2 = gBaseStats[targetSpecies].type2;
|
||||
defAbility = gBaseStats[targetSpecies].abilities[0];
|
||||
defType1 = gSpeciesInfo[targetSpecies].type1;
|
||||
defType2 = gSpeciesInfo[targetSpecies].type2;
|
||||
defAbility = gSpeciesInfo[targetSpecies].abilities[0];
|
||||
moveType = gBattleMoves[move].type;
|
||||
|
||||
if (defAbility == ABILITY_LEVITATE && moveType == TYPE_GROUND)
|
||||
@ -5188,9 +5188,9 @@ static u16 GetWinningMove(int winnerTournamentId, int loserTournamentId, u8 roun
|
||||
targetSpecies = gFacilityTrainerMons[DOME_MONS[loserTournamentId][k]].species;
|
||||
|
||||
if (personality & 1)
|
||||
targetAbility = gBaseStats[targetSpecies].abilities[1];
|
||||
targetAbility = gSpeciesInfo[targetSpecies].abilities[1];
|
||||
else
|
||||
targetAbility = gBaseStats[targetSpecies].abilities[0];
|
||||
targetAbility = gSpeciesInfo[targetSpecies].abilities[0];
|
||||
|
||||
typeMultiplier = CalcPartyMonTypeEffectivenessMultiplier(moveIds[i * 4 + j], targetSpecies, targetAbility);
|
||||
if (typeMultiplier == UQ_4_12(0))
|
||||
@ -5865,8 +5865,8 @@ static void InitRandomTourneyTreeResults(void)
|
||||
statSums[i] += statValues[STAT_SPDEF];
|
||||
statSums[i] += statValues[STAT_SPEED];
|
||||
statSums[i] += statValues[STAT_HP];
|
||||
monTypesBits |= gBitTable[gBaseStats[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
|
||||
monTypesBits |= gBitTable[gBaseStats[gFacilityTrainerMons[DOME_MONS[i][j]].species].type2];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type2];
|
||||
}
|
||||
|
||||
// Because GF hates temporary vars, trainerId acts like monTypesCount here.
|
||||
@ -5992,12 +5992,12 @@ static void DecideRoundWinners(u8 roundId)
|
||||
}
|
||||
}
|
||||
species = gFacilityTrainerMons[DOME_MONS[tournamentId1][monId1]].species;
|
||||
points1 += ( gBaseStats[species].baseHP
|
||||
+ gBaseStats[species].baseAttack
|
||||
+ gBaseStats[species].baseDefense
|
||||
+ gBaseStats[species].baseSpeed
|
||||
+ gBaseStats[species].baseSpAttack
|
||||
+ gBaseStats[species].baseSpDefense) / 10;
|
||||
points1 += ( gSpeciesInfo[species].baseHP
|
||||
+ gSpeciesInfo[species].baseAttack
|
||||
+ gSpeciesInfo[species].baseDefense
|
||||
+ gSpeciesInfo[species].baseSpeed
|
||||
+ gSpeciesInfo[species].baseSpAttack
|
||||
+ gSpeciesInfo[species].baseSpDefense) / 10;
|
||||
}
|
||||
// Random part of the formula.
|
||||
points1 += (Random() & 0x1F);
|
||||
@ -6015,12 +6015,12 @@ static void DecideRoundWinners(u8 roundId)
|
||||
}
|
||||
}
|
||||
species = gFacilityTrainerMons[DOME_MONS[tournamentId2][monId1]].species;
|
||||
points2 += ( gBaseStats[species].baseHP
|
||||
+ gBaseStats[species].baseAttack
|
||||
+ gBaseStats[species].baseDefense
|
||||
+ gBaseStats[species].baseSpeed
|
||||
+ gBaseStats[species].baseSpAttack
|
||||
+ gBaseStats[species].baseSpDefense) / 10;
|
||||
points2 += ( gSpeciesInfo[species].baseHP
|
||||
+ gSpeciesInfo[species].baseAttack
|
||||
+ gSpeciesInfo[species].baseDefense
|
||||
+ gSpeciesInfo[species].baseSpeed
|
||||
+ gSpeciesInfo[species].baseSpAttack
|
||||
+ gSpeciesInfo[species].baseSpDefense) / 10;
|
||||
}
|
||||
// Random part of the formula.
|
||||
points2 += (Random() & 0x1F);
|
||||
|
@ -618,9 +618,9 @@ static void GetOpponentMostCommonMonType(void)
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
{
|
||||
u32 species = gFacilityTrainerMons[gFrontierTempParty[i]].species;
|
||||
typeCounts[gBaseStats[species].type1]++;
|
||||
if (gBaseStats[species].type1 != gBaseStats[species].type2)
|
||||
typeCounts[gBaseStats[species].type2]++;
|
||||
typeCounts[gSpeciesInfo[species].type1]++;
|
||||
if (gSpeciesInfo[species].type1 != gSpeciesInfo[species].type2)
|
||||
typeCounts[gSpeciesInfo[species].type2]++;
|
||||
}
|
||||
|
||||
// Determine which are the two most-common types.
|
||||
|
@ -2394,9 +2394,9 @@ void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elem
|
||||
species = GetMonData(mon, MON_DATA_SPECIES);
|
||||
level = GetMonData(mon, MON_DATA_LEVEL);
|
||||
exp = GetMonData(mon, MON_DATA_EXP);
|
||||
currLevelExp = gExperienceTables[gBaseStats[species].growthRate][level];
|
||||
currLevelExp = gExperienceTables[gSpeciesInfo[species].growthRate][level];
|
||||
currExpBarValue = exp - currLevelExp;
|
||||
maxExpBarValue = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLevelExp;
|
||||
maxExpBarValue = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLevelExp;
|
||||
SetBattleBarStruct(battlerId, healthboxSpriteId, maxExpBarValue, currExpBarValue, isDoubles);
|
||||
MoveBattleBar(battlerId, healthboxSpriteId, EXP_BAR, 0);
|
||||
}
|
||||
|
@ -194,8 +194,8 @@ EWRAM_DATA u16 gMoveResultFlags = 0;
|
||||
EWRAM_DATA u32 gHitMarker = 0;
|
||||
EWRAM_DATA u8 gTakenDmgByBattler[MAX_BATTLERS_COUNT] = {0};
|
||||
EWRAM_DATA u8 gUnusedFirstBattleVar2 = 0; // Never read
|
||||
EWRAM_DATA u32 gSideStatuses[2] = {0};
|
||||
EWRAM_DATA struct SideTimer gSideTimers[2] = {0};
|
||||
EWRAM_DATA u32 gSideStatuses[NUM_BATTLE_SIDES] = {0};
|
||||
EWRAM_DATA struct SideTimer gSideTimers[NUM_BATTLE_SIDES] = {0};
|
||||
EWRAM_DATA u32 gStatuses3[MAX_BATTLERS_COUNT] = {0};
|
||||
EWRAM_DATA u32 gStatuses4[MAX_BATTLERS_COUNT] = {0};
|
||||
EWRAM_DATA struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT] = {0};
|
||||
@ -3021,7 +3021,7 @@ static void BattleStartClearSetData(void)
|
||||
gBattleStruct->runTries = 0;
|
||||
gBattleStruct->safariGoNearCounter = 0;
|
||||
gBattleStruct->safariPkblThrowCounter = 0;
|
||||
gBattleStruct->safariCatchFactor = gBaseStats[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].catchRate * 100 / 1275;
|
||||
gBattleStruct->safariCatchFactor = gSpeciesInfo[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].catchRate * 100 / 1275;
|
||||
gBattleStruct->safariEscapeFactor = 3;
|
||||
gBattleStruct->wildVictorySong = 0;
|
||||
gBattleStruct->moneyMultiplier = 1;
|
||||
@ -3255,8 +3255,8 @@ void FaintClearSetData(void)
|
||||
|
||||
gBattleResources->flags->flags[gActiveBattler] = 0;
|
||||
|
||||
gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1;
|
||||
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
|
||||
gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type1;
|
||||
gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type2;
|
||||
gBattleMons[gActiveBattler].type3 = TYPE_MYSTERY;
|
||||
|
||||
Ai_UpdateFaintData(gActiveBattler);
|
||||
@ -3358,8 +3358,8 @@ static void DoBattleIntro(void)
|
||||
else
|
||||
{
|
||||
memcpy(&gBattleMons[gActiveBattler], &gBattleResources->bufferB[gActiveBattler][4], sizeof(struct BattlePokemon));
|
||||
gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1;
|
||||
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
|
||||
gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type1;
|
||||
gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type2;
|
||||
gBattleMons[gActiveBattler].type3 = TYPE_MYSTERY;
|
||||
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum);
|
||||
gBattleStruct->hpOnSwitchout[GetBattlerSide(gActiveBattler)] = gBattleMons[gActiveBattler].hp;
|
||||
|
@ -849,24 +849,24 @@ static bool8 DoesTypePreventStatus(u16 species, u32 status)
|
||||
switch (status)
|
||||
{
|
||||
case STATUS1_TOXIC_POISON:
|
||||
if (gBaseStats[species].type1 == TYPE_STEEL || gBaseStats[species].type1 == TYPE_POISON
|
||||
|| gBaseStats[species].type2 == TYPE_STEEL || gBaseStats[species].type2 == TYPE_POISON)
|
||||
if (gSpeciesInfo[species].type1 == TYPE_STEEL || gSpeciesInfo[species].type1 == TYPE_POISON
|
||||
|| gSpeciesInfo[species].type2 == TYPE_STEEL || gSpeciesInfo[species].type2 == TYPE_POISON)
|
||||
ret = TRUE;
|
||||
break;
|
||||
case STATUS1_FREEZE:
|
||||
if (gBaseStats[species].type1 == TYPE_ICE || gBaseStats[species].type2 == TYPE_ICE)
|
||||
if (gSpeciesInfo[species].type1 == TYPE_ICE || gSpeciesInfo[species].type2 == TYPE_ICE)
|
||||
ret = TRUE;
|
||||
break;
|
||||
case STATUS1_PARALYSIS:
|
||||
if (gBaseStats[species].type1 == TYPE_GROUND || gBaseStats[species].type2 == TYPE_GROUND
|
||||
if (gSpeciesInfo[species].type1 == TYPE_GROUND || gSpeciesInfo[species].type2 == TYPE_GROUND
|
||||
#if B_PARALYZE_ELECTRIC >= GEN_6
|
||||
|| gBaseStats[species].type1 == TYPE_ELECTRIC || gBaseStats[species].type2 == TYPE_ELECTRIC
|
||||
|| gSpeciesInfo[species].type1 == TYPE_ELECTRIC || gSpeciesInfo[species].type2 == TYPE_ELECTRIC
|
||||
#endif
|
||||
)
|
||||
ret = TRUE;
|
||||
break;
|
||||
case STATUS1_BURN:
|
||||
if (gBaseStats[species].type1 == TYPE_FIRE || gBaseStats[species].type2 == TYPE_FIRE)
|
||||
if (gSpeciesInfo[species].type1 == TYPE_FIRE || gSpeciesInfo[species].type2 == TYPE_FIRE)
|
||||
ret = TRUE;
|
||||
break;
|
||||
case STATUS1_SLEEP:
|
||||
@ -1145,9 +1145,9 @@ bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate)
|
||||
|
||||
SetMonData(&gEnemyParty[0],
|
||||
MON_DATA_EXP,
|
||||
&gExperienceTables[gBaseStats[wildMons[headerId][pikeMonId].species].growthRate][monLevel]);
|
||||
&gExperienceTables[gSpeciesInfo[wildMons[headerId][pikeMonId].species].growthRate][monLevel]);
|
||||
|
||||
if (gBaseStats[wildMons[headerId][pikeMonId].species].abilities[1])
|
||||
if (gSpeciesInfo[wildMons[headerId][pikeMonId].species].abilities[1])
|
||||
abilityNum = Random() % 2;
|
||||
else
|
||||
abilityNum = 0;
|
||||
|
@ -1371,7 +1371,7 @@ void GenerateBattlePyramidWildMon(void)
|
||||
}
|
||||
SetMonData(&gEnemyParty[0],
|
||||
MON_DATA_EXP,
|
||||
&gExperienceTables[gBaseStats[wildMons[id].species].growthRate][lvl]);
|
||||
&gExperienceTables[gSpeciesInfo[wildMons[id].species].growthRate][lvl]);
|
||||
|
||||
switch (wildMons[id].abilityNum)
|
||||
{
|
||||
@ -1381,7 +1381,7 @@ void GenerateBattlePyramidWildMon(void)
|
||||
break;
|
||||
case ABILITY_RANDOM:
|
||||
default:
|
||||
if (gBaseStats[wildMons[id].species].abilities[1])
|
||||
if (gSpeciesInfo[wildMons[id].species].abilities[1])
|
||||
{
|
||||
i = GetMonData(&gEnemyParty[0], MON_DATA_PERSONALITY, NULL) % 2;
|
||||
SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &i);
|
||||
|
@ -160,7 +160,7 @@ static const struct ListMenuTemplate sListMenuTemplate =
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NARROW,
|
||||
.cursorKind = 0
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -4037,9 +4037,9 @@ static void Cmd_getexp(void)
|
||||
viaExpShare++;
|
||||
}
|
||||
#if (B_SCALED_EXP >= GEN_5) && (B_SCALED_EXP != GEN_6)
|
||||
calculatedExp = gBaseStats[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 5;
|
||||
calculatedExp = gSpeciesInfo[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 5;
|
||||
#else
|
||||
calculatedExp = gBaseStats[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 7;
|
||||
calculatedExp = gSpeciesInfo[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 7;
|
||||
#endif
|
||||
|
||||
#if B_SPLIT_EXP < GEN_6
|
||||
@ -6055,8 +6055,8 @@ static void Cmd_switchindataupdate(void)
|
||||
for (i = 0; i < sizeof(struct BattlePokemon); i++)
|
||||
monData[i] = gBattleResources->bufferB[gActiveBattler][4 + i];
|
||||
|
||||
gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1;
|
||||
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
|
||||
gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type1;
|
||||
gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type2;
|
||||
gBattleMons[gActiveBattler].type3 = TYPE_MYSTERY;
|
||||
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum);
|
||||
|
||||
@ -8095,8 +8095,8 @@ static void RecalcBattlerStats(u32 battler, struct Pokemon *mon)
|
||||
gBattleMons[battler].spAttack = GetMonData(mon, MON_DATA_SPATK);
|
||||
gBattleMons[battler].spDefense = GetMonData(mon, MON_DATA_SPDEF);
|
||||
gBattleMons[battler].ability = GetMonAbility(mon);
|
||||
gBattleMons[battler].type1 = gBaseStats[gBattleMons[battler].species].type1;
|
||||
gBattleMons[battler].type2 = gBaseStats[gBattleMons[battler].species].type2;
|
||||
gBattleMons[battler].type1 = gSpeciesInfo[gBattleMons[battler].species].type1;
|
||||
gBattleMons[battler].type2 = gSpeciesInfo[gBattleMons[battler].species].type2;
|
||||
}
|
||||
|
||||
static u32 GetHighestStatId(u32 battlerId)
|
||||
@ -12855,10 +12855,10 @@ static void Cmd_trydobeatup(void)
|
||||
|
||||
gBattlescriptCurrInstr += 9;
|
||||
|
||||
gBattleMoveDamage = gBaseStats[GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES)].baseAttack;
|
||||
gBattleMoveDamage = gSpeciesInfo[GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES)].baseAttack;
|
||||
gBattleMoveDamage *= gBattleMoves[gCurrentMove].power;
|
||||
gBattleMoveDamage *= (GetMonData(&party[gBattleCommunication[0]], MON_DATA_LEVEL) * 2 / 5 + 2);
|
||||
gBattleMoveDamage /= gBaseStats[gBattleMons[gBattlerTarget].species].baseDefense;
|
||||
gBattleMoveDamage /= gSpeciesInfo[gBattleMons[gBattlerTarget].species].baseDefense;
|
||||
gBattleMoveDamage = (gBattleMoveDamage / 50) + 2;
|
||||
if (gProtectStructs[gBattlerAttacker].helpingHand)
|
||||
gBattleMoveDamage = gBattleMoveDamage * 15 / 10;
|
||||
@ -13720,7 +13720,7 @@ static void Cmd_pickup(void)
|
||||
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
|
||||
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||
|
||||
ability = gBaseStats[species].abilities[GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM)];
|
||||
ability = gSpeciesInfo[species].abilities[GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM)];
|
||||
|
||||
if (ability == ABILITY_PICKUP
|
||||
&& species != SPECIES_NONE
|
||||
@ -13756,7 +13756,7 @@ static void Cmd_pickup(void)
|
||||
if (lvlDivBy10 > 9)
|
||||
lvlDivBy10 = 9;
|
||||
|
||||
ability = gBaseStats[species].abilities[GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM)];
|
||||
ability = gSpeciesInfo[species].abilities[GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM)];
|
||||
|
||||
if (ability == ABILITY_PICKUP
|
||||
&& species != SPECIES_NONE
|
||||
@ -14095,9 +14095,9 @@ static void Cmd_handleballthrow(void)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_SAFARI)
|
||||
catchRate = gBattleStruct->safariCatchFactor * 1275 / 100;
|
||||
else
|
||||
catchRate = gBaseStats[gBattleMons[gBattlerTarget].species].catchRate;
|
||||
catchRate = gSpeciesInfo[gBattleMons[gBattlerTarget].species].catchRate;
|
||||
|
||||
if (gBaseStats[gBattleMons[gBattlerTarget].species].flags & SPECIES_FLAG_ULTRA_BEAST)
|
||||
if (gSpeciesInfo[gBattleMons[gBattlerTarget].species].flags & SPECIES_FLAG_ULTRA_BEAST)
|
||||
{
|
||||
if (gLastUsedItem == ITEM_BEAST_BALL)
|
||||
ballMultiplier = 500;
|
||||
@ -14222,7 +14222,7 @@ static void Cmd_handleballthrow(void)
|
||||
}
|
||||
break;
|
||||
case ITEM_FAST_BALL:
|
||||
if (gBaseStats[gBattleMons[gBattlerTarget].species].baseSpeed >= 100)
|
||||
if (gSpeciesInfo[gBattleMons[gBattlerTarget].species].baseSpeed >= 100)
|
||||
ballMultiplier = 400;
|
||||
break;
|
||||
case ITEM_HEAVY_BALL:
|
||||
|
@ -79,72 +79,71 @@ static void FillPartnerParty(u16 trainerId);
|
||||
static void SetEReaderTrainerChecksum(struct BattleTowerEReaderTrainer *ereaderTrainer);
|
||||
static u8 SetTentPtrsGetLevel(void);
|
||||
|
||||
// Const rom data.
|
||||
const u16 gBattleFrontierHeldItems[] =
|
||||
{
|
||||
ITEM_NONE,
|
||||
ITEM_KINGS_ROCK,
|
||||
ITEM_SITRUS_BERRY,
|
||||
ITEM_ORAN_BERRY,
|
||||
ITEM_CHESTO_BERRY,
|
||||
ITEM_HARD_STONE,
|
||||
ITEM_FOCUS_BAND,
|
||||
ITEM_PERSIM_BERRY,
|
||||
ITEM_MIRACLE_SEED,
|
||||
ITEM_BERRY_JUICE,
|
||||
ITEM_MACHO_BRACE,
|
||||
ITEM_SILVER_POWDER,
|
||||
ITEM_CHERI_BERRY,
|
||||
ITEM_BLACK_GLASSES,
|
||||
ITEM_BLACK_BELT,
|
||||
ITEM_SOUL_DEW,
|
||||
ITEM_CHOICE_BAND,
|
||||
ITEM_MAGNET,
|
||||
ITEM_SILK_SCARF,
|
||||
ITEM_WHITE_HERB,
|
||||
ITEM_DEEP_SEA_SCALE,
|
||||
ITEM_DEEP_SEA_TOOTH,
|
||||
ITEM_MYSTIC_WATER,
|
||||
ITEM_SHARP_BEAK,
|
||||
ITEM_QUICK_CLAW,
|
||||
ITEM_LEFTOVERS,
|
||||
ITEM_RAWST_BERRY,
|
||||
ITEM_LIGHT_BALL,
|
||||
ITEM_POISON_BARB,
|
||||
ITEM_NEVER_MELT_ICE,
|
||||
ITEM_ASPEAR_BERRY,
|
||||
ITEM_SPELL_TAG,
|
||||
ITEM_BRIGHT_POWDER,
|
||||
ITEM_LEPPA_BERRY,
|
||||
ITEM_SCOPE_LENS,
|
||||
ITEM_TWISTED_SPOON,
|
||||
ITEM_METAL_COAT,
|
||||
ITEM_MENTAL_HERB,
|
||||
ITEM_CHARCOAL,
|
||||
ITEM_PECHA_BERRY,
|
||||
ITEM_SOFT_SAND,
|
||||
ITEM_LUM_BERRY,
|
||||
ITEM_DRAGON_SCALE,
|
||||
ITEM_DRAGON_FANG,
|
||||
ITEM_IAPAPA_BERRY,
|
||||
ITEM_WIKI_BERRY,
|
||||
ITEM_SEA_INCENSE,
|
||||
ITEM_SHELL_BELL,
|
||||
ITEM_SALAC_BERRY,
|
||||
ITEM_LANSAT_BERRY,
|
||||
ITEM_APICOT_BERRY,
|
||||
ITEM_STARF_BERRY,
|
||||
ITEM_LIECHI_BERRY,
|
||||
ITEM_LEEK,
|
||||
ITEM_LAX_INCENSE,
|
||||
ITEM_AGUAV_BERRY,
|
||||
ITEM_FIGY_BERRY,
|
||||
ITEM_THICK_CLUB,
|
||||
ITEM_MAGO_BERRY,
|
||||
ITEM_METAL_POWDER,
|
||||
ITEM_PETAYA_BERRY,
|
||||
ITEM_LUCKY_PUNCH,
|
||||
ITEM_GANLON_BERRY
|
||||
[BATTLE_FRONTIER_ITEM_NONE] = ITEM_NONE,
|
||||
[BATTLE_FRONTIER_ITEM_KINGS_ROCK] = ITEM_KINGS_ROCK,
|
||||
[BATTLE_FRONTIER_ITEM_SITRUS_BERRY] = ITEM_SITRUS_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_ORAN_BERRY] = ITEM_ORAN_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_CHESTO_BERRY] = ITEM_CHESTO_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_HARD_STONE] = ITEM_HARD_STONE,
|
||||
[BATTLE_FRONTIER_ITEM_FOCUS_BAND] = ITEM_FOCUS_BAND,
|
||||
[BATTLE_FRONTIER_ITEM_PERSIM_BERRY] = ITEM_PERSIM_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_MIRACLE_SEED] = ITEM_MIRACLE_SEED,
|
||||
[BATTLE_FRONTIER_ITEM_BERRY_JUICE] = ITEM_BERRY_JUICE,
|
||||
[BATTLE_FRONTIER_ITEM_MACHO_BRACE] = ITEM_MACHO_BRACE,
|
||||
[BATTLE_FRONTIER_ITEM_SILVER_POWDER] = ITEM_SILVER_POWDER,
|
||||
[BATTLE_FRONTIER_ITEM_CHERI_BERRY] = ITEM_CHERI_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_BLACK_GLASSES] = ITEM_BLACK_GLASSES,
|
||||
[BATTLE_FRONTIER_ITEM_BLACK_BELT] = ITEM_BLACK_BELT,
|
||||
[BATTLE_FRONTIER_ITEM_SOUL_DEW] = ITEM_SOUL_DEW,
|
||||
[BATTLE_FRONTIER_ITEM_CHOICE_BAND] = ITEM_CHOICE_BAND,
|
||||
[BATTLE_FRONTIER_ITEM_MAGNET] = ITEM_MAGNET,
|
||||
[BATTLE_FRONTIER_ITEM_SILK_SCARF] = ITEM_SILK_SCARF,
|
||||
[BATTLE_FRONTIER_ITEM_WHITE_HERB] = ITEM_WHITE_HERB,
|
||||
[BATTLE_FRONTIER_ITEM_DEEP_SEA_SCALE] = ITEM_DEEP_SEA_SCALE,
|
||||
[BATTLE_FRONTIER_ITEM_DEEP_SEA_TOOTH] = ITEM_DEEP_SEA_TOOTH,
|
||||
[BATTLE_FRONTIER_ITEM_MYSTIC_WATER] = ITEM_MYSTIC_WATER,
|
||||
[BATTLE_FRONTIER_ITEM_SHARP_BEAK] = ITEM_SHARP_BEAK,
|
||||
[BATTLE_FRONTIER_ITEM_QUICK_CLAW] = ITEM_QUICK_CLAW,
|
||||
[BATTLE_FRONTIER_ITEM_LEFTOVERS] = ITEM_LEFTOVERS,
|
||||
[BATTLE_FRONTIER_ITEM_RAWST_BERRY] = ITEM_RAWST_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_LIGHT_BALL] = ITEM_LIGHT_BALL,
|
||||
[BATTLE_FRONTIER_ITEM_POISON_BARB] = ITEM_POISON_BARB,
|
||||
[BATTLE_FRONTIER_ITEM_NEVER_MELT_ICE] = ITEM_NEVER_MELT_ICE,
|
||||
[BATTLE_FRONTIER_ITEM_ASPEAR_BERRY] = ITEM_ASPEAR_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_SPELL_TAG] = ITEM_SPELL_TAG,
|
||||
[BATTLE_FRONTIER_ITEM_BRIGHT_POWDER] = ITEM_BRIGHT_POWDER,
|
||||
[BATTLE_FRONTIER_ITEM_LEPPA_BERRY] = ITEM_LEPPA_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_SCOPE_LENS] = ITEM_SCOPE_LENS,
|
||||
[BATTLE_FRONTIER_ITEM_TWISTED_SPOON] = ITEM_TWISTED_SPOON,
|
||||
[BATTLE_FRONTIER_ITEM_METAL_COAT] = ITEM_METAL_COAT,
|
||||
[BATTLE_FRONTIER_ITEM_MENTAL_HERB] = ITEM_MENTAL_HERB,
|
||||
[BATTLE_FRONTIER_ITEM_CHARCOAL] = ITEM_CHARCOAL,
|
||||
[BATTLE_FRONTIER_ITEM_PECHA_BERRY] = ITEM_PECHA_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_SOFT_SAND] = ITEM_SOFT_SAND,
|
||||
[BATTLE_FRONTIER_ITEM_LUM_BERRY] = ITEM_LUM_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_DRAGON_SCALE] = ITEM_DRAGON_SCALE,
|
||||
[BATTLE_FRONTIER_ITEM_DRAGON_FANG] = ITEM_DRAGON_FANG,
|
||||
[BATTLE_FRONTIER_ITEM_IAPAPA_BERRY] = ITEM_IAPAPA_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_WIKI_BERRY] = ITEM_WIKI_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_SEA_INCENSE] = ITEM_SEA_INCENSE,
|
||||
[BATTLE_FRONTIER_ITEM_SHELL_BELL] = ITEM_SHELL_BELL,
|
||||
[BATTLE_FRONTIER_ITEM_SALAC_BERRY] = ITEM_SALAC_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_LANSAT_BERRY] = ITEM_LANSAT_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_APICOT_BERRY] = ITEM_APICOT_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_STARF_BERRY] = ITEM_STARF_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_LIECHI_BERRY] = ITEM_LIECHI_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_LEEK] = ITEM_LEEK,
|
||||
[BATTLE_FRONTIER_ITEM_LAX_INCENSE] = ITEM_LAX_INCENSE,
|
||||
[BATTLE_FRONTIER_ITEM_AGUAV_BERRY] = ITEM_AGUAV_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_FIGY_BERRY] = ITEM_FIGY_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_THICK_CLUB] = ITEM_THICK_CLUB,
|
||||
[BATTLE_FRONTIER_ITEM_MAGO_BERRY] = ITEM_MAGO_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_METAL_POWDER] = ITEM_METAL_POWDER,
|
||||
[BATTLE_FRONTIER_ITEM_PETAYA_BERRY] = ITEM_PETAYA_BERRY,
|
||||
[BATTLE_FRONTIER_ITEM_LUCKY_PUNCH] = ITEM_LUCKY_PUNCH,
|
||||
[BATTLE_FRONTIER_ITEM_GANLON_BERRY] = ITEM_GANLON_BERRY,
|
||||
};
|
||||
|
||||
#include "data/battle_frontier/battle_frontier_trainer_mons.h"
|
||||
@ -3650,7 +3649,7 @@ void TrySetLinkBattleTowerEnemyPartyLevel(void)
|
||||
u32 species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES, NULL);
|
||||
if (species)
|
||||
{
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_EXP, &gExperienceTables[gBaseStats[species].growthRate][enemyLevel]);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_EXP, &gExperienceTables[gSpeciesInfo[species].growthRate][enemyLevel]);
|
||||
CalculateMonStats(&gEnemyParty[i]);
|
||||
}
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ static u8 CalcBeatUpPower(void)
|
||||
party = gEnemyParty;
|
||||
// Party slot is set in the battle script for Beat Up
|
||||
species = GetMonData(&party[gBattleCommunication[0] - 1], MON_DATA_SPECIES);
|
||||
basePower = (gBaseStats[species].baseAttack / 10) + 5;
|
||||
basePower = (gSpeciesInfo[species].baseAttack / 10) + 5;
|
||||
|
||||
return basePower;
|
||||
}
|
||||
@ -2076,8 +2076,8 @@ u8 GetImprisonedMovesCount(u8 battlerId, u16 move)
|
||||
|
||||
void RestoreBattlerOriginalTypes(u8 battlerId)
|
||||
{
|
||||
gBattleMons[battlerId].type1 = gBaseStats[gBattleMons[battlerId].species].type1;
|
||||
gBattleMons[battlerId].type2 = gBaseStats[gBattleMons[battlerId].species].type2;
|
||||
gBattleMons[battlerId].type1 = gSpeciesInfo[gBattleMons[battlerId].species].type1;
|
||||
gBattleMons[battlerId].type2 = gSpeciesInfo[gBattleMons[battlerId].species].type2;
|
||||
}
|
||||
|
||||
void TryToApplyMimicry(u8 battlerId, bool8 various)
|
||||
@ -2133,7 +2133,7 @@ u32 GetBattlerFriendshipScore(u8 battlerId)
|
||||
|
||||
if (side != B_SIDE_PLAYER)
|
||||
return FRIENDSHIP_NONE;
|
||||
else if (gBaseStats[species].flags & SPECIES_FLAG_MEGA_EVOLUTION
|
||||
else if (gSpeciesInfo[species].flags & SPECIES_FLAG_MEGA_EVOLUTION
|
||||
|| (gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER
|
||||
| BATTLE_TYPE_FRONTIER
|
||||
| BATTLE_TYPE_LINK
|
||||
@ -9613,9 +9613,9 @@ u16 CalcPartyMonTypeEffectivenessMultiplier(u16 move, u16 speciesDef, u16 abilit
|
||||
|
||||
if (move != MOVE_STRUGGLE && moveType != TYPE_MYSTERY)
|
||||
{
|
||||
MulByTypeEffectiveness(&modifier, move, moveType, 0, gBaseStats[speciesDef].type1, 0, FALSE);
|
||||
if (gBaseStats[speciesDef].type2 != gBaseStats[speciesDef].type1)
|
||||
MulByTypeEffectiveness(&modifier, move, moveType, 0, gBaseStats[speciesDef].type2, 0, FALSE);
|
||||
MulByTypeEffectiveness(&modifier, move, moveType, 0, gSpeciesInfo[speciesDef].type1, 0, FALSE);
|
||||
if (gSpeciesInfo[speciesDef].type2 != gSpeciesInfo[speciesDef].type1)
|
||||
MulByTypeEffectiveness(&modifier, move, moveType, 0, gSpeciesInfo[speciesDef].type2, 0, FALSE);
|
||||
|
||||
if (moveType == TYPE_GROUND && abilityDef == ABILITY_LEVITATE && !(gFieldStatuses & STATUS_FIELD_GRAVITY))
|
||||
modifier = UQ_4_12(0.0);
|
||||
|
@ -2676,7 +2676,7 @@ static void CB2_EndBlenderGame(void)
|
||||
switch (Menu_ProcessInputNoWrapClearOnChoose())
|
||||
{
|
||||
case 1:
|
||||
case -1:
|
||||
case MENU_B_PRESSED:
|
||||
sBerryBlender->yesNoAnswer = 1;
|
||||
sBerryBlender->gameEndState++;
|
||||
for (i = 0; i < BLENDER_MAX_PLAYERS; i++)
|
||||
|
@ -88,7 +88,7 @@ u16 FontFunc_Braille(struct TextPrinter *textPrinter)
|
||||
subStruct->fontId = *textPrinter->printerTemplate.currentChar;
|
||||
textPrinter->printerTemplate.currentChar++;
|
||||
return RENDER_REPEAT;
|
||||
case EXT_CTRL_CODE_RESET_SIZE:
|
||||
case EXT_CTRL_CODE_RESET_FONT:
|
||||
return RENDER_REPEAT;
|
||||
case EXT_CTRL_CODE_PAUSE:
|
||||
textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar++;
|
||||
@ -109,7 +109,7 @@ u16 FontFunc_Braille(struct TextPrinter *textPrinter)
|
||||
case EXT_CTRL_CODE_ESCAPE:
|
||||
char_ = *++textPrinter->printerTemplate.currentChar;
|
||||
break;
|
||||
case EXT_CTRL_CODE_SHIFT_TEXT:
|
||||
case EXT_CTRL_CODE_SHIFT_RIGHT:
|
||||
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar++;
|
||||
return RENDER_REPEAT;
|
||||
case EXT_CTRL_CODE_SHIFT_DOWN:
|
||||
|
@ -95,7 +95,7 @@ static void Task_ClearSaveDataScreenYesNoChoice(u8 taskId)
|
||||
gTasks[taskId].func = Task_ClearSaveData;
|
||||
break;
|
||||
case 1:
|
||||
case -1:
|
||||
case MENU_B_PRESSED:
|
||||
PlaySE(SE_SELECT);
|
||||
DestroyTask(taskId);
|
||||
SetMainCallback2(CB2_FadeAndDoReset);
|
||||
|
@ -5317,7 +5317,7 @@ static void SetMoveSpecificAnimData(u8 contestant)
|
||||
switch (move)
|
||||
{
|
||||
case MOVE_CURSE:
|
||||
if (gBaseStats[species].type1 == TYPE_GHOST || gBaseStats[species].type2 == TYPE_GHOST)
|
||||
if (gSpeciesInfo[species].type1 == TYPE_GHOST || gSpeciesInfo[species].type2 == TYPE_GHOST)
|
||||
gAnimMoveTurn = 0;
|
||||
else
|
||||
gAnimMoveTurn = 1;
|
||||
|
@ -717,9 +717,9 @@ static const struct ListMenuTemplate sListMenuTemplate_PossibleGroupMembers = {
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.fontId = 1,
|
||||
.cursorKind = 1
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = CURSOR_INVISIBLE
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sWindowTemplate_GroupList = {
|
||||
@ -777,9 +777,9 @@ static const struct ListMenuTemplate sListMenuTemplate_UnionRoomGroups = {
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 1,
|
||||
.fontId = 1,
|
||||
.cursorKind = 0
|
||||
.scrollMultiple = LIST_MULTIPLE_SCROLL_DPAD,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sWindowTemplate_InviteToActivity = {
|
||||
@ -815,9 +815,9 @@ static const struct ListMenuTemplate sListMenuTemplate_InviteToActivity = {
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.fontId = 1,
|
||||
.cursorKind = 0
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sWindowTemplate_RegisterForTrade = {
|
||||
@ -852,9 +852,9 @@ static const struct ListMenuTemplate sListMenuTemplate_RegisterForTrade = {
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.fontId = 1,
|
||||
.cursorKind = 0
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sWindowTemplate_TradingBoardRequestType = {
|
||||
@ -905,9 +905,9 @@ static const struct ListMenuTemplate sMenuTemplate_TradingBoardRequestType = {
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.fontId = 1,
|
||||
.cursorKind = 0
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sWindowTemplate_TradingBoardHeader = {
|
||||
@ -931,7 +931,7 @@ static const struct WindowTemplate sWindowTemplate_TradingBoardMain = {
|
||||
};
|
||||
|
||||
static const struct ListMenuItem sTradeBoardListMenuItems[] = {
|
||||
{ sText_EmptyString, -3 },
|
||||
{ sText_EmptyString, LIST_HEADER },
|
||||
{ sText_EmptyString, 0 },
|
||||
{ sText_EmptyString, 1 },
|
||||
{ sText_EmptyString, 2 },
|
||||
@ -959,9 +959,9 @@ static const struct ListMenuTemplate sTradeBoardListMenuTemplate = {
|
||||
.cursorShadowPal = 13,
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.fontId = 1,
|
||||
.cursorKind = 0
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
// Unused
|
||||
@ -1011,9 +1011,9 @@ static const struct ListMenuTemplate sEmptyListMenuTemplate = {
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 1,
|
||||
.fontId = 1,
|
||||
.cursorKind = 0
|
||||
.scrollMultiple = LIST_MULTIPLE_SCROLL_DPAD,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
static const struct RfuPlayerData sUnionRoomPlayer_DummyRfu = {0};
|
||||
|
@ -80,7 +80,7 @@ static const struct ListMenuTemplate sDaycareListMenuLevelTemplate =
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
static const u8 *const sCompatibilityMessages[] =
|
||||
@ -886,7 +886,7 @@ void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation)
|
||||
language = LANGUAGE_JAPANESE;
|
||||
SetMonData(mon, MON_DATA_POKEBALL, &ball);
|
||||
SetMonData(mon, MON_DATA_NICKNAME, sJapaneseEggNickname);
|
||||
SetMonData(mon, MON_DATA_FRIENDSHIP, &gBaseStats[species].eggCycles);
|
||||
SetMonData(mon, MON_DATA_FRIENDSHIP, &gSpeciesInfo[species].eggCycles);
|
||||
SetMonData(mon, MON_DATA_MET_LEVEL, &metLevel);
|
||||
SetMonData(mon, MON_DATA_LANGUAGE, &language);
|
||||
if (setHotSpringsLocation)
|
||||
@ -913,7 +913,7 @@ static void SetInitialEggData(struct Pokemon *mon, u16 species, struct DayCare *
|
||||
language = LANGUAGE_JAPANESE;
|
||||
SetMonData(mon, MON_DATA_POKEBALL, &ball);
|
||||
SetMonData(mon, MON_DATA_NICKNAME, sJapaneseEggNickname);
|
||||
SetMonData(mon, MON_DATA_FRIENDSHIP, &gBaseStats[species].eggCycles);
|
||||
SetMonData(mon, MON_DATA_FRIENDSHIP, &gSpeciesInfo[species].eggCycles);
|
||||
SetMonData(mon, MON_DATA_MET_LEVEL, &metLevel);
|
||||
SetMonData(mon, MON_DATA_LANGUAGE, &language);
|
||||
}
|
||||
@ -1075,8 +1075,8 @@ static u8 GetDaycareCompatibilityScore(struct DayCare *daycare)
|
||||
trainerIds[i] = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_OT_ID);
|
||||
personality = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_PERSONALITY);
|
||||
genders[i] = GetGenderFromSpeciesAndPersonality(species[i], personality);
|
||||
eggGroups[i][0] = gBaseStats[species[i]].eggGroup1;
|
||||
eggGroups[i][1] = gBaseStats[species[i]].eggGroup2;
|
||||
eggGroups[i][0] = gSpeciesInfo[species[i]].eggGroup1;
|
||||
eggGroups[i][1] = gSpeciesInfo[species[i]].eggGroup2;
|
||||
}
|
||||
|
||||
// check unbreedable egg group
|
||||
|
@ -314,8 +314,9 @@ static const struct ListMenuTemplate sDecorationItemsListMenuTemplate =
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = FALSE,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = FALSE,
|
||||
.fontId = FONT_NARROW
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NARROW,
|
||||
.cursorKind = CURSOR_BLACK_ARROW,
|
||||
};
|
||||
|
||||
#include "data/decoration/icon.h"
|
||||
@ -890,7 +891,7 @@ static void PrintDecorationItemMenuItems(u8 taskId)
|
||||
|
||||
StringCopy(sDecorationItemsMenu->names[i], gText_Cancel);
|
||||
sDecorationItemsMenu->items[i].name = sDecorationItemsMenu->names[i];
|
||||
sDecorationItemsMenu->items[i].id = -2;
|
||||
sDecorationItemsMenu->items[i].id = LIST_CANCEL;
|
||||
gMultiuseListMenuTemplate = sDecorationItemsListMenuTemplate;
|
||||
gMultiuseListMenuTemplate.windowId = sDecorMenuWindowIds[WINDOW_DECORATION_CATEGORIES];
|
||||
gMultiuseListMenuTemplate.totalItems = sDecorationItemsMenu->numMenuItems;
|
||||
|
@ -1202,7 +1202,7 @@ void IsGrassTypeInParty(void)
|
||||
if (GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES) && !GetMonData(pokemon, MON_DATA_IS_EGG))
|
||||
{
|
||||
species = GetMonData(pokemon, MON_DATA_SPECIES);
|
||||
if (gBaseStats[species].type1 == TYPE_GRASS || gBaseStats[species].type2 == TYPE_GRASS)
|
||||
if (gSpeciesInfo[species].type1 == TYPE_GRASS || gSpeciesInfo[species].type2 == TYPE_GRASS)
|
||||
{
|
||||
gSpecialVar_Result = TRUE;
|
||||
return;
|
||||
@ -2542,9 +2542,9 @@ static void InitScrollableMultichoice(void)
|
||||
gScrollableMultichoice_ListMenuTemplate.cursorShadowPal = 3;
|
||||
gScrollableMultichoice_ListMenuTemplate.lettersSpacing = 0;
|
||||
gScrollableMultichoice_ListMenuTemplate.itemVerticalPadding = 0;
|
||||
gScrollableMultichoice_ListMenuTemplate.scrollMultiple = 0;
|
||||
gScrollableMultichoice_ListMenuTemplate.scrollMultiple = LIST_NO_MULTIPLE_SCROLL;
|
||||
gScrollableMultichoice_ListMenuTemplate.fontId = FONT_NORMAL;
|
||||
gScrollableMultichoice_ListMenuTemplate.cursorKind = 0;
|
||||
gScrollableMultichoice_ListMenuTemplate.cursorKind = CURSOR_BLACK_ARROW;
|
||||
}
|
||||
|
||||
static void ScrollableMultichoice_MoveCursor(s32 itemIndex, bool8 onInit, struct ListMenu *list)
|
||||
|
@ -133,7 +133,7 @@ void PadNameString(u8 *dest, u8 padChar)
|
||||
while (length < PLAYER_NAME_LENGTH - 1)
|
||||
{
|
||||
dest[length] = EXT_CTRL_CODE_BEGIN;
|
||||
dest[length + 1] = EXT_CTRL_CODE_RESET_SIZE;
|
||||
dest[length + 1] = EXT_CTRL_CODE_RESET_FONT;
|
||||
length += 2;
|
||||
}
|
||||
}
|
||||
|
@ -259,9 +259,9 @@ static const struct ListMenuTemplate sItemListMenu =
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NARROW,
|
||||
.cursorKind = 0
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
static const struct MenuAction sItemMenuActions[] = {
|
||||
|
@ -2525,9 +2525,8 @@ u8 RfuGetStatus(void)
|
||||
|
||||
bool32 RfuHasErrored(void)
|
||||
{
|
||||
// RFU_STATUS_OK will underflow here intentionally
|
||||
u32 var = RfuGetStatus() - 1;
|
||||
if (var < RFU_STATUS_CONNECTION_ERROR)
|
||||
u32 status = RfuGetStatus();
|
||||
if (status == RFU_STATUS_FATAL_ERROR || status == RFU_STATUS_CONNECTION_ERROR)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
@ -2656,7 +2655,7 @@ static u8 GetPartnerIndexByNameAndTrainerID(const u8 *name, u16 id)
|
||||
|
||||
for (i = 0; i < RFU_CHILD_MAX; i++)
|
||||
{
|
||||
u16 trainerId = ReadU16(gRfuLinkStatus->partner[i].gname + 2);
|
||||
u16 trainerId = ReadU16(((struct RfuGameData *)gRfuLinkStatus->partner[i].gname)->compatibility.playerTrainerId);
|
||||
if (IsRfuSerialNumberValid(gRfuLinkStatus->partner[i].serialNo)
|
||||
&& !StringCompare(name, gRfuLinkStatus->partner[i].uname)
|
||||
&& id == trainerId)
|
||||
@ -2682,9 +2681,9 @@ static void RfuReqDisconnectSlot(u32 slot)
|
||||
|
||||
void RequestDisconnectSlotByTrainerNameAndId(const u8 *name, u16 id)
|
||||
{
|
||||
u8 var = GetPartnerIndexByNameAndTrainerID(name, id);
|
||||
if (var != 0xFF)
|
||||
RfuReqDisconnectSlot(1 << var);
|
||||
u8 index = GetPartnerIndexByNameAndTrainerID(name, id);
|
||||
if (index != 0xFF)
|
||||
RfuReqDisconnectSlot(1 << index);
|
||||
}
|
||||
|
||||
void Rfu_DisconnectPlayerById(u32 playerIdx)
|
||||
|
@ -13,6 +13,10 @@
|
||||
#include "sound.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
// Cursors after this point are created using a sprite with their own task.
|
||||
// This allows them to have idle animations. Cursors prior to this are simply printed text.
|
||||
#define CURSOR_OBJECT_START CURSOR_RED_OUTLINE
|
||||
|
||||
struct UnkIndicatorsStruct
|
||||
{
|
||||
u8 field_0;
|
||||
@ -70,7 +74,7 @@ static bool8 ListMenuChangeSelection(struct ListMenu *list, bool8 updateCursorAn
|
||||
static void ListMenuPrintEntries(struct ListMenu *list, u16 startIndex, u16 yOffset, u16 count);
|
||||
static void ListMenuDrawCursor(struct ListMenu *list);
|
||||
static void ListMenuCallSelectionChangedCallback(struct ListMenu *list, u8 onInit);
|
||||
static u8 ListMenuAddCursorObject(struct ListMenu *list, u32 cursorKind);
|
||||
static u8 ListMenuAddCursorObject(struct ListMenu *list, u32 cursorObjId);
|
||||
static void Task_ScrollIndicatorArrowPair(u8 taskId);
|
||||
static u8 ListMenuAddRedOutlineCursorObject(struct CursorStruct *cursor);
|
||||
static u8 ListMenuAddRedArrowCursorObject(struct CursorStruct *cursor);
|
||||
@ -78,9 +82,9 @@ static void ListMenuUpdateRedOutlineCursorObject(u8 taskId, u16 x, u16 y);
|
||||
static void ListMenuUpdateRedArrowCursorObject(u8 taskId, u16 x, u16 y);
|
||||
static void ListMenuRemoveRedOutlineCursorObject(u8 taskId);
|
||||
static void ListMenuRemoveRedArrowCursorObject(u8 taskId);
|
||||
static u8 ListMenuAddCursorObjectInternal(struct CursorStruct *cursor, u32 cursorKind);
|
||||
static void ListMenuUpdateCursorObject(u8 taskId, u16 x, u16 y, u32 cursorKind);
|
||||
static void ListMenuRemoveCursorObject(u8 taskId, u32 cursorKind);
|
||||
static u8 ListMenuAddCursorObjectInternal(struct CursorStruct *cursor, u32 cursorObjId);
|
||||
static void ListMenuUpdateCursorObject(u8 taskId, u16 x, u16 y, u32 cursorObjId);
|
||||
static void ListMenuRemoveCursorObject(u8 taskId, u32 cursorObjId);
|
||||
static void SpriteCallback_ScrollIndicatorArrow(struct Sprite *sprite);
|
||||
static void SpriteCallback_RedArrowCursor(struct Sprite *sprite);
|
||||
|
||||
@ -301,10 +305,10 @@ static const struct SpriteTemplate sSpriteTemplate_RedArrowCursor =
|
||||
.callback = SpriteCallback_RedArrowCursor,
|
||||
};
|
||||
|
||||
static const u16 sRedArrowPal[] = INCBIN_U16("graphics/interface/red_arrow.gbapal");
|
||||
static const u32 sRedArrowOtherGfx[] = INCBIN_U32("graphics/interface/red_arrow_other.4bpp.lz");
|
||||
static const u32 sSelectorOutlineGfx[] = INCBIN_U32("graphics/interface/selector_outline.4bpp.lz");
|
||||
static const u32 sRedArrowGfx[] = INCBIN_U32("graphics/interface/red_arrow.4bpp.lz");
|
||||
static const u16 sRedInterface_Pal[] = INCBIN_U16("graphics/interface/red.gbapal"); // Shared by all of the below gfx
|
||||
static const u32 sScrollIndicator_Gfx[] = INCBIN_U32("graphics/interface/scroll_indicator.4bpp.lz");
|
||||
static const u32 sOutlineCursor_Gfx[] = INCBIN_U32("graphics/interface/outline_cursor.4bpp.lz");
|
||||
static const u32 sArrowCursor_Gfx[] = INCBIN_U32("graphics/interface/arrow_cursor.4bpp.lz");
|
||||
|
||||
// code
|
||||
static void ListMenuDummyTask(u8 taskId)
|
||||
@ -477,7 +481,7 @@ void DestroyListMenuTask(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow)
|
||||
*selectedRow = list->selectedRow;
|
||||
|
||||
if (list->taskId != TASK_NONE)
|
||||
ListMenuRemoveCursorObject(list->taskId, list->template.cursorKind - 2);
|
||||
ListMenuRemoveCursorObject(list->taskId, list->template.cursorKind - CURSOR_OBJECT_START);
|
||||
|
||||
DestroyTask(listTaskId);
|
||||
}
|
||||
@ -650,31 +654,33 @@ static void ListMenuDrawCursor(struct ListMenu *list)
|
||||
u8 y = list->selectedRow * yMultiplier + list->template.upText_Y;
|
||||
switch (list->template.cursorKind)
|
||||
{
|
||||
case 0:
|
||||
case CURSOR_BLACK_ARROW:
|
||||
ListMenuPrint(list, gText_SelectorArrow2, x, y);
|
||||
break;
|
||||
case 1:
|
||||
case CURSOR_INVISIBLE:
|
||||
break;
|
||||
case 2:
|
||||
case CURSOR_RED_OUTLINE:
|
||||
if (list->taskId == TASK_NONE)
|
||||
list->taskId = ListMenuAddCursorObject(list, 0);
|
||||
list->taskId = ListMenuAddCursorObject(list, CURSOR_RED_OUTLINE - CURSOR_OBJECT_START);
|
||||
ListMenuUpdateCursorObject(list->taskId,
|
||||
GetWindowAttribute(list->template.windowId, WINDOW_TILEMAP_LEFT) * 8 - 1,
|
||||
GetWindowAttribute(list->template.windowId, WINDOW_TILEMAP_TOP) * 8 + y - 1, 0);
|
||||
GetWindowAttribute(list->template.windowId, WINDOW_TILEMAP_TOP) * 8 + y - 1,
|
||||
CURSOR_RED_OUTLINE - CURSOR_OBJECT_START);
|
||||
break;
|
||||
case 3:
|
||||
case CURSOR_RED_ARROW:
|
||||
if (list->taskId == TASK_NONE)
|
||||
list->taskId = ListMenuAddCursorObject(list, 1);
|
||||
list->taskId = ListMenuAddCursorObject(list, CURSOR_RED_ARROW - CURSOR_OBJECT_START);
|
||||
ListMenuUpdateCursorObject(list->taskId,
|
||||
GetWindowAttribute(list->template.windowId, WINDOW_TILEMAP_LEFT) * 8 + x,
|
||||
GetWindowAttribute(list->template.windowId, WINDOW_TILEMAP_TOP) * 8 + y, 1);
|
||||
GetWindowAttribute(list->template.windowId, WINDOW_TILEMAP_TOP) * 8 + y,
|
||||
CURSOR_RED_ARROW - CURSOR_OBJECT_START);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#undef TASK_NONE
|
||||
|
||||
static u8 ListMenuAddCursorObject(struct ListMenu *list, u32 cursorKind)
|
||||
static u8 ListMenuAddCursorObject(struct ListMenu *list, u32 cursorObjId)
|
||||
{
|
||||
struct CursorStruct cursor;
|
||||
|
||||
@ -686,13 +692,13 @@ static u8 ListMenuAddCursorObject(struct ListMenu *list, u32 cursorKind)
|
||||
cursor.palTag = TAG_NONE;
|
||||
cursor.palNum = 15;
|
||||
|
||||
return ListMenuAddCursorObjectInternal(&cursor, cursorKind);
|
||||
return ListMenuAddCursorObjectInternal(&cursor, cursorObjId);
|
||||
}
|
||||
|
||||
static void ListMenuErasePrintedCursor(struct ListMenu *list, u16 selectedRow)
|
||||
{
|
||||
u8 cursorKind = list->template.cursorKind;
|
||||
if (cursorKind == 0)
|
||||
if (cursorKind == CURSOR_BLACK_ARROW)
|
||||
{
|
||||
u8 yMultiplier = GetFontAttribute(list->template.fontId, FONTATTR_MAX_LETTER_HEIGHT) + list->template.itemVerticalPadding;
|
||||
u8 width = GetMenuCursorDimensionByFont(list->template.fontId, 0);
|
||||
@ -1071,18 +1077,18 @@ u8 AddScrollIndicatorArrowPair(const struct ScrollArrowsTemplate *arrowInfo, u16
|
||||
struct ScrollIndicatorPair *data;
|
||||
u8 taskId;
|
||||
|
||||
spriteSheet.data = sRedArrowOtherGfx;
|
||||
spriteSheet.data = sScrollIndicator_Gfx;
|
||||
spriteSheet.size = 0x100;
|
||||
spriteSheet.tag = arrowInfo->tileTag;
|
||||
LoadCompressedSpriteSheet(&spriteSheet);
|
||||
|
||||
if (arrowInfo->palTag == TAG_NONE)
|
||||
{
|
||||
LoadPalette(sRedArrowPal, (16 * arrowInfo->palNum) + 0x100, 0x20);
|
||||
LoadPalette(sRedInterface_Pal, (16 * arrowInfo->palNum) + 0x100, 0x20);
|
||||
}
|
||||
else
|
||||
{
|
||||
spritePal.data = sRedArrowPal;
|
||||
spritePal.data = sRedInterface_Pal;
|
||||
spritePal.tag = arrowInfo->palTag;
|
||||
LoadSpritePalette(&spritePal);
|
||||
}
|
||||
@ -1190,39 +1196,39 @@ void RemoveScrollIndicatorArrowPair(u8 taskId)
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
|
||||
static u8 ListMenuAddCursorObjectInternal(struct CursorStruct *cursor, u32 cursorKind)
|
||||
static u8 ListMenuAddCursorObjectInternal(struct CursorStruct *cursor, u32 cursorObjId)
|
||||
{
|
||||
switch (cursorKind)
|
||||
switch (cursorObjId)
|
||||
{
|
||||
case 0:
|
||||
case CURSOR_RED_OUTLINE - CURSOR_OBJECT_START:
|
||||
default:
|
||||
return ListMenuAddRedOutlineCursorObject(cursor);
|
||||
case 1:
|
||||
case CURSOR_RED_ARROW - CURSOR_OBJECT_START:
|
||||
return ListMenuAddRedArrowCursorObject(cursor);
|
||||
}
|
||||
}
|
||||
|
||||
static void ListMenuUpdateCursorObject(u8 taskId, u16 x, u16 y, u32 cursorKind)
|
||||
static void ListMenuUpdateCursorObject(u8 taskId, u16 x, u16 y, u32 cursorObjId)
|
||||
{
|
||||
switch (cursorKind)
|
||||
switch (cursorObjId)
|
||||
{
|
||||
case 0:
|
||||
case CURSOR_RED_OUTLINE - CURSOR_OBJECT_START:
|
||||
ListMenuUpdateRedOutlineCursorObject(taskId, x, y);
|
||||
break;
|
||||
case 1:
|
||||
case CURSOR_RED_ARROW - CURSOR_OBJECT_START:
|
||||
ListMenuUpdateRedArrowCursorObject(taskId, x, y);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void ListMenuRemoveCursorObject(u8 taskId, u32 cursorKind)
|
||||
static void ListMenuRemoveCursorObject(u8 taskId, u32 cursorObjId)
|
||||
{
|
||||
switch (cursorKind)
|
||||
switch (cursorObjId)
|
||||
{
|
||||
case 0:
|
||||
case CURSOR_RED_OUTLINE - CURSOR_OBJECT_START:
|
||||
ListMenuRemoveRedOutlineCursorObject(taskId);
|
||||
break;
|
||||
case 1:
|
||||
case CURSOR_RED_ARROW - CURSOR_OBJECT_START:
|
||||
ListMenuRemoveRedArrowCursorObject(taskId);
|
||||
break;
|
||||
}
|
||||
@ -1317,18 +1323,18 @@ static u8 ListMenuAddRedOutlineCursorObject(struct CursorStruct *cursor)
|
||||
struct SpriteTemplate spriteTemplate;
|
||||
u8 taskId;
|
||||
|
||||
spriteSheet.data = sSelectorOutlineGfx;
|
||||
spriteSheet.data = sOutlineCursor_Gfx;
|
||||
spriteSheet.size = 0x100;
|
||||
spriteSheet.tag = cursor->tileTag;
|
||||
LoadCompressedSpriteSheet(&spriteSheet);
|
||||
|
||||
if (cursor->palTag == TAG_NONE)
|
||||
{
|
||||
LoadPalette(sRedArrowPal, (16 * cursor->palNum) + 0x100, 0x20);
|
||||
LoadPalette(sRedInterface_Pal, (16 * cursor->palNum) + 0x100, 0x20);
|
||||
}
|
||||
else
|
||||
{
|
||||
spritePal.data = sRedArrowPal;
|
||||
spritePal.data = sRedInterface_Pal;
|
||||
spritePal.tag = cursor->palTag;
|
||||
LoadSpritePalette(&spritePal);
|
||||
}
|
||||
@ -1402,18 +1408,18 @@ static u8 ListMenuAddRedArrowCursorObject(struct CursorStruct *cursor)
|
||||
struct SpriteTemplate spriteTemplate;
|
||||
u8 taskId;
|
||||
|
||||
spriteSheet.data = sRedArrowGfx;
|
||||
spriteSheet.data = sArrowCursor_Gfx;
|
||||
spriteSheet.size = 0x80;
|
||||
spriteSheet.tag = cursor->tileTag;
|
||||
LoadCompressedSpriteSheet(&spriteSheet);
|
||||
|
||||
if (cursor->palTag == TAG_NONE)
|
||||
{
|
||||
LoadPalette(sRedArrowPal, (16 * cursor->palNum) + 0x100, 0x20);
|
||||
LoadPalette(sRedInterface_Pal, (16 * cursor->palNum) + 0x100, 0x20);
|
||||
}
|
||||
else
|
||||
{
|
||||
spritePal.data = sRedArrowPal;
|
||||
spritePal.data = sRedInterface_Pal;
|
||||
spritePal.tag = cursor->palTag;
|
||||
LoadSpritePalette(&spritePal);
|
||||
}
|
||||
|
@ -1631,7 +1631,7 @@ static void Task_NewGameBirchSpeech_ProcessNameYesNoMenu(u8 taskId)
|
||||
NewGameBirchSpeech_StartFadePlatformIn(taskId, 1);
|
||||
gTasks[taskId].func = Task_NewGameBirchSpeech_SlidePlatformAway2;
|
||||
break;
|
||||
case -1:
|
||||
case MENU_B_PRESSED:
|
||||
case 1:
|
||||
PlaySE(SE_SELECT);
|
||||
gTasks[taskId].func = Task_NewGameBirchSpeech_BoyOrGirl;
|
||||
|
@ -188,7 +188,7 @@ static const struct ListMenuTemplate sMoveRelearnerMovesListTemplate =
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
//--------------
|
||||
@ -285,7 +285,7 @@ u8 MailboxMenu_CreateList(struct PlayerPCItemPageStruct *page)
|
||||
gMultiuseListMenuTemplate.moveCursorFunc = MailboxMenu_MoveCursorFunc;
|
||||
gMultiuseListMenuTemplate.itemPrintFunc = MailboxMenu_ItemPrintFunc;
|
||||
gMultiuseListMenuTemplate.fontId = FONT_NORMAL;
|
||||
gMultiuseListMenuTemplate.cursorKind = 0;
|
||||
gMultiuseListMenuTemplate.cursorKind = CURSOR_BLACK_ARROW;
|
||||
gMultiuseListMenuTemplate.lettersSpacing = 0;
|
||||
gMultiuseListMenuTemplate.itemVerticalPadding = 0;
|
||||
gMultiuseListMenuTemplate.scrollMultiple = LIST_NO_MULTIPLE_SCROLL;
|
||||
@ -1543,7 +1543,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg
|
||||
0,
|
||||
15 * i,
|
||||
color,
|
||||
-1,
|
||||
TEXT_SKIP_DRAW,
|
||||
sLvlUpStatStrings[i]);
|
||||
|
||||
StringCopy(text, (statsDiff[i] >= 0) ? gText_Plus : gText_Dash);
|
||||
@ -1552,7 +1552,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg
|
||||
56,
|
||||
15 * i,
|
||||
color,
|
||||
-1,
|
||||
TEXT_SKIP_DRAW,
|
||||
text);
|
||||
if (abs(statsDiff[i]) <= 9)
|
||||
x = 18;
|
||||
@ -1565,7 +1565,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg
|
||||
56 + x,
|
||||
15 * i,
|
||||
color,
|
||||
-1,
|
||||
TEXT_SKIP_DRAW,
|
||||
text);
|
||||
}
|
||||
}
|
||||
@ -1607,7 +1607,7 @@ void DrawLevelUpWindowPg2(u16 windowId, u16 *currStats, u8 bgClr, u8 fgClr, u8 s
|
||||
0,
|
||||
15 * i,
|
||||
color,
|
||||
-1,
|
||||
TEXT_SKIP_DRAW,
|
||||
sLvlUpStatStrings[i]);
|
||||
|
||||
AddTextPrinterParameterized3(windowId,
|
||||
@ -1615,7 +1615,7 @@ void DrawLevelUpWindowPg2(u16 windowId, u16 *currStats, u8 bgClr, u8 fgClr, u8 s
|
||||
56 + x,
|
||||
15 * i,
|
||||
color,
|
||||
-1,
|
||||
TEXT_SKIP_DRAW,
|
||||
text);
|
||||
}
|
||||
}
|
||||
|
@ -553,7 +553,7 @@ static void DoMoveRelearnerMain(void)
|
||||
gSpecialVar_0x8004 = FALSE;
|
||||
sMoveRelearnerStruct->state = MENU_STATE_FADE_AND_RETURN;
|
||||
}
|
||||
else if (selection == -1 || selection == 1)
|
||||
else if (selection == MENU_B_PRESSED || selection == 1)
|
||||
{
|
||||
if (sMoveRelearnerMenuSate.showContestInfo == FALSE)
|
||||
{
|
||||
@ -579,14 +579,14 @@ static void DoMoveRelearnerMain(void)
|
||||
break;
|
||||
case MENU_STATE_CONFIRM_DELETE_OLD_MOVE:
|
||||
{
|
||||
s8 var = Menu_ProcessInputNoWrapClearOnChoose();
|
||||
s8 selection = Menu_ProcessInputNoWrapClearOnChoose();
|
||||
|
||||
if (var == 0)
|
||||
if (selection == 0)
|
||||
{
|
||||
FormatAndPrintText(gText_MoveRelearnerWhichMoveToForget);
|
||||
sMoveRelearnerStruct->state = MENU_STATE_PRINT_WHICH_MOVE_PROMPT;
|
||||
}
|
||||
else if (var == -1 || var == 1)
|
||||
else if (selection == MENU_B_PRESSED || selection == 1)
|
||||
{
|
||||
sMoveRelearnerStruct->state = MENU_STATE_PRINT_STOP_TEACHING;
|
||||
}
|
||||
@ -606,13 +606,13 @@ static void DoMoveRelearnerMain(void)
|
||||
break;
|
||||
case MENU_STATE_CONFIRM_STOP_TEACHING:
|
||||
{
|
||||
s8 var = Menu_ProcessInputNoWrapClearOnChoose();
|
||||
s8 selection = Menu_ProcessInputNoWrapClearOnChoose();
|
||||
|
||||
if (var == 0)
|
||||
if (selection == 0)
|
||||
{
|
||||
sMoveRelearnerStruct->state = MENU_STATE_CHOOSE_SETUP_STATE;
|
||||
}
|
||||
else if (var == MENU_B_PRESSED || var == 1)
|
||||
else if (selection == MENU_B_PRESSED || selection == 1)
|
||||
{
|
||||
// What's the point? It gets set to MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT, anyway.
|
||||
if (sMoveRelearnerMenuSate.showContestInfo == FALSE)
|
||||
|
@ -234,9 +234,9 @@ static const struct ListMenuTemplate sListMenuTemplate_ThreeOptions = {
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
static const struct ListMenuItem sListMenuItems_ReceiveSendToss[] = {
|
||||
@ -279,9 +279,9 @@ static const struct ListMenuTemplate sListMenu_ReceiveSendToss = {
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
static const struct ListMenuTemplate sListMenu_ReceiveToss = {
|
||||
@ -300,9 +300,9 @@ static const struct ListMenuTemplate sListMenu_ReceiveToss = {
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
static const struct ListMenuTemplate sListMenu_ReceiveSend = {
|
||||
@ -321,9 +321,9 @@ static const struct ListMenuTemplate sListMenu_ReceiveSend = {
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
static const struct ListMenuTemplate sListMenu_Receive = {
|
||||
@ -342,9 +342,9 @@ static const struct ListMenuTemplate sListMenu_Receive = {
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = 0,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
static const u8 *const sUnusedMenuTexts[] = {
|
||||
|
@ -4466,8 +4466,8 @@ void Task_AbilityCapsule(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
// Can't use.
|
||||
if (gBaseStats[tSpecies].abilities[0] == gBaseStats[tSpecies].abilities[1]
|
||||
|| gBaseStats[tSpecies].abilities[1] == 0
|
||||
if (gSpeciesInfo[tSpecies].abilities[0] == gSpeciesInfo[tSpecies].abilities[1]
|
||||
|| gSpeciesInfo[tSpecies].abilities[1] == 0
|
||||
|| tAbilityNum > 1
|
||||
|| !tSpecies)
|
||||
{
|
||||
@ -4554,7 +4554,7 @@ void Task_AbilityPatch(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
// Can't use.
|
||||
if (gBaseStats[tSpecies].abilities[tAbilityNum] == 0
|
||||
if (gSpeciesInfo[tSpecies].abilities[tAbilityNum] == 0
|
||||
|| !tSpecies
|
||||
|| GetMonData(&gPlayerParty[tMonId], MON_DATA_ABILITY_NUM, NULL) > 1
|
||||
)
|
||||
|
@ -290,8 +290,9 @@ static const struct ListMenuTemplate sListMenuTemplate_ItemStorage =
|
||||
.cursorShadowPal = 3,
|
||||
.lettersSpacing = FALSE,
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = FALSE,
|
||||
.fontId = FONT_NARROW
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NARROW,
|
||||
.cursorKind = CURSOR_BLACK_ARROW,
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sWindowTemplates_ItemStorage[ITEMPC_WIN_COUNT] =
|
||||
|
@ -440,7 +440,7 @@ static const struct ListMenuTemplate sPokeblockListMenuTemplate =
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = LIST_MULTIPLE_SCROLL_DPAD,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 1
|
||||
.cursorKind = CURSOR_INVISIBLE
|
||||
};
|
||||
|
||||
void OpenPokeblockCase(u8 caseId, void (*callback)(void))
|
||||
|
@ -4379,7 +4379,7 @@ bool16 HasAllMons(void)
|
||||
|
||||
for (i = 1; i < NATIONAL_DEX_COUNT + 1; i++)
|
||||
{
|
||||
if (!(gBaseStats[i].flags & SPECIES_FLAG_MYTHICAL) && !GetSetPokedexFlag(i, FLAG_GET_CAUGHT))
|
||||
if (!(gSpeciesInfo[i].flags & SPECIES_FLAG_MYTHICAL) && !GetSetPokedexFlag(i, FLAG_GET_CAUGHT))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -4660,7 +4660,7 @@ static int DoPokedexSearch(u8 dexMode, u8 order, u8 abcGroup, u8 bodyColor, u8 t
|
||||
{
|
||||
species = NationalPokedexNumToSpecies(sPokedexView->pokedexList[i].dexNum);
|
||||
|
||||
if (bodyColor == gBaseStats[species].bodyColor)
|
||||
if (bodyColor == gSpeciesInfo[species].bodyColor)
|
||||
{
|
||||
sPokedexView->pokedexList[resultsCount] = sPokedexView->pokedexList[i];
|
||||
resultsCount++;
|
||||
@ -4686,8 +4686,8 @@ static int DoPokedexSearch(u8 dexMode, u8 order, u8 abcGroup, u8 bodyColor, u8 t
|
||||
{
|
||||
species = NationalPokedexNumToSpecies(sPokedexView->pokedexList[i].dexNum);
|
||||
|
||||
types[0] = gBaseStats[species].type1;
|
||||
types[1] = gBaseStats[species].type2;
|
||||
types[0] = gSpeciesInfo[species].type1;
|
||||
types[1] = gSpeciesInfo[species].type2;
|
||||
if (types[0] == type1 || types[1] == type1)
|
||||
{
|
||||
sPokedexView->pokedexList[resultsCount] = sPokedexView->pokedexList[i];
|
||||
@ -4704,8 +4704,8 @@ static int DoPokedexSearch(u8 dexMode, u8 order, u8 abcGroup, u8 bodyColor, u8 t
|
||||
{
|
||||
species = NationalPokedexNumToSpecies(sPokedexView->pokedexList[i].dexNum);
|
||||
|
||||
types[0] = gBaseStats[species].type1;
|
||||
types[1] = gBaseStats[species].type2;
|
||||
types[0] = gSpeciesInfo[species].type1;
|
||||
types[1] = gSpeciesInfo[species].type2;
|
||||
if ((types[0] == type1 && types[1] == type2) || (types[0] == type2 && types[1] == type1))
|
||||
{
|
||||
sPokedexView->pokedexList[resultsCount] = sPokedexView->pokedexList[i];
|
||||
|
100
src/pokemon.c
@ -1950,7 +1950,7 @@ const s8 gNatureStatTable[NUM_NATURES][NUM_NATURE_STATS] =
|
||||
|
||||
#include "data/pokemon/trainer_class_lookups.h"
|
||||
#include "data/pokemon/experience_tables.h"
|
||||
#include "data/pokemon/base_stats.h"
|
||||
#include "data/pokemon/species_info.h"
|
||||
#include "data/pokemon/level_up_learnsets.h"
|
||||
#include "data/pokemon/teachable_learnsets.h"
|
||||
#include "data/pokemon/evolution.h"
|
||||
@ -3465,7 +3465,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
||||
| (gSaveBlock2Ptr->playerTrainerId[2] << 16)
|
||||
| (gSaveBlock2Ptr->playerTrainerId[3] << 24);
|
||||
|
||||
if (gBaseStats[species].flags & SPECIES_FLAG_SHINY_LOCKED)
|
||||
if (gSpeciesInfo[species].flags & SPECIES_FLAG_SHINY_LOCKED)
|
||||
{
|
||||
while (GET_SHINY_VALUE(value, personality) < SHINY_ODDS)
|
||||
{
|
||||
@ -3499,8 +3499,8 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
||||
SetBoxMonData(boxMon, MON_DATA_LANGUAGE, &gGameLanguage);
|
||||
SetBoxMonData(boxMon, MON_DATA_OT_NAME, gSaveBlock2Ptr->playerName);
|
||||
SetBoxMonData(boxMon, MON_DATA_SPECIES, &species);
|
||||
SetBoxMonData(boxMon, MON_DATA_EXP, &gExperienceTables[gBaseStats[species].growthRate][level]);
|
||||
SetBoxMonData(boxMon, MON_DATA_FRIENDSHIP, &gBaseStats[species].friendship);
|
||||
SetBoxMonData(boxMon, MON_DATA_EXP, &gExperienceTables[gSpeciesInfo[species].growthRate][level]);
|
||||
SetBoxMonData(boxMon, MON_DATA_FRIENDSHIP, &gSpeciesInfo[species].friendship);
|
||||
value = GetCurrentRegionMapSectionId();
|
||||
SetBoxMonData(boxMon, MON_DATA_MET_LOCATION, &value);
|
||||
SetBoxMonData(boxMon, MON_DATA_MET_LEVEL, &level);
|
||||
@ -3539,7 +3539,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
||||
iv = (value & (MAX_IV_MASK << 10)) >> 10;
|
||||
SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv);
|
||||
|
||||
if (gBaseStats[species].flags & SPECIES_FLAG_ALL_PERFECT_IVS)
|
||||
if (gSpeciesInfo[species].flags & SPECIES_FLAG_ALL_PERFECT_IVS)
|
||||
{
|
||||
iv = MAX_PER_STAT_IVS;
|
||||
SetBoxMonData(boxMon, MON_DATA_HP_IV, &iv);
|
||||
@ -3550,7 +3550,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
||||
SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv);
|
||||
}
|
||||
#if P_LEGENDARY_PERFECT_IVS >= GEN_6
|
||||
else if (gBaseStats[species].flags & (SPECIES_FLAG_LEGENDARY | SPECIES_FLAG_MYTHICAL | SPECIES_FLAG_ULTRA_BEAST))
|
||||
else if (gSpeciesInfo[species].flags & (SPECIES_FLAG_LEGENDARY | SPECIES_FLAG_MYTHICAL | SPECIES_FLAG_ULTRA_BEAST))
|
||||
{
|
||||
iv = MAX_PER_STAT_IVS;
|
||||
// Initialize a list of IV indices.
|
||||
@ -3594,7 +3594,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
||||
#endif
|
||||
}
|
||||
|
||||
if (gBaseStats[species].abilities[1])
|
||||
if (gSpeciesInfo[species].abilities[1])
|
||||
{
|
||||
value = personality & 1;
|
||||
SetBoxMonData(boxMon, MON_DATA_ABILITY_NUM, &value);
|
||||
@ -4069,7 +4069,7 @@ static u16 CalculateBoxMonChecksum(struct BoxPokemon *boxMon)
|
||||
|
||||
#define CALC_STAT(base, iv, ev, statIndex, field) \
|
||||
{ \
|
||||
u8 baseStat = gBaseStats[species].base; \
|
||||
u8 baseStat = gSpeciesInfo[species].base; \
|
||||
s32 n = (((2 * baseStat + iv + ev / 4) * level) / 100) + 5; \
|
||||
u8 nature = GetNature(mon); \
|
||||
n = ModifyStatByNature(nature, n, statIndex); \
|
||||
@ -4104,7 +4104,7 @@ void CalculateMonStats(struct Pokemon *mon)
|
||||
}
|
||||
else
|
||||
{
|
||||
s32 n = 2 * gBaseStats[species].baseHP + hpIV;
|
||||
s32 n = 2 * gSpeciesInfo[species].baseHP + hpIV;
|
||||
newMaxHP = (((n + hpEV / 4) * level) / 100) + level + 10;
|
||||
}
|
||||
|
||||
@ -4164,7 +4164,7 @@ u8 GetLevelFromMonExp(struct Pokemon *mon)
|
||||
u32 exp = GetMonData(mon, MON_DATA_EXP, NULL);
|
||||
s32 level = 1;
|
||||
|
||||
while (level <= MAX_LEVEL && gExperienceTables[gBaseStats[species].growthRate][level] <= exp)
|
||||
while (level <= MAX_LEVEL && gExperienceTables[gSpeciesInfo[species].growthRate][level] <= exp)
|
||||
level++;
|
||||
|
||||
return level - 1;
|
||||
@ -4176,7 +4176,7 @@ u8 GetLevelFromBoxMonExp(struct BoxPokemon *boxMon)
|
||||
u32 exp = GetBoxMonData(boxMon, MON_DATA_EXP, NULL);
|
||||
s32 level = 1;
|
||||
|
||||
while (level <= MAX_LEVEL && gExperienceTables[gBaseStats[species].growthRate][level] <= exp)
|
||||
while (level <= MAX_LEVEL && gExperienceTables[gSpeciesInfo[species].growthRate][level] <= exp)
|
||||
level++;
|
||||
|
||||
return level - 1;
|
||||
@ -4418,15 +4418,15 @@ u8 GetBoxMonGender(struct BoxPokemon *boxMon)
|
||||
u16 species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL);
|
||||
u32 personality = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL);
|
||||
|
||||
switch (gBaseStats[species].genderRatio)
|
||||
switch (gSpeciesInfo[species].genderRatio)
|
||||
{
|
||||
case MON_MALE:
|
||||
case MON_FEMALE:
|
||||
case MON_GENDERLESS:
|
||||
return gBaseStats[species].genderRatio;
|
||||
return gSpeciesInfo[species].genderRatio;
|
||||
}
|
||||
|
||||
if (gBaseStats[species].genderRatio > (personality & 0xFF))
|
||||
if (gSpeciesInfo[species].genderRatio > (personality & 0xFF))
|
||||
return MON_FEMALE;
|
||||
else
|
||||
return MON_MALE;
|
||||
@ -4434,15 +4434,15 @@ u8 GetBoxMonGender(struct BoxPokemon *boxMon)
|
||||
|
||||
u8 GetGenderFromSpeciesAndPersonality(u16 species, u32 personality)
|
||||
{
|
||||
switch (gBaseStats[species].genderRatio)
|
||||
switch (gSpeciesInfo[species].genderRatio)
|
||||
{
|
||||
case MON_MALE:
|
||||
case MON_FEMALE:
|
||||
case MON_GENDERLESS:
|
||||
return gBaseStats[species].genderRatio;
|
||||
return gSpeciesInfo[species].genderRatio;
|
||||
}
|
||||
|
||||
if (gBaseStats[species].genderRatio > (personality & 0xFF))
|
||||
if (gSpeciesInfo[species].genderRatio > (personality & 0xFF))
|
||||
return MON_FEMALE;
|
||||
else
|
||||
return MON_MALE;
|
||||
@ -5472,7 +5472,7 @@ u16 GetAbilityBySpecies(u16 species, u8 abilityNum)
|
||||
int i;
|
||||
|
||||
if (abilityNum < NUM_ABILITY_SLOTS)
|
||||
gLastUsedAbility = gBaseStats[species].abilities[abilityNum];
|
||||
gLastUsedAbility = gSpeciesInfo[species].abilities[abilityNum];
|
||||
else
|
||||
gLastUsedAbility = ABILITY_NONE;
|
||||
|
||||
@ -5480,13 +5480,13 @@ u16 GetAbilityBySpecies(u16 species, u8 abilityNum)
|
||||
{
|
||||
for (i = NUM_NORMAL_ABILITY_SLOTS; i < NUM_ABILITY_SLOTS && gLastUsedAbility == ABILITY_NONE; i++)
|
||||
{
|
||||
gLastUsedAbility = gBaseStats[species].abilities[i];
|
||||
gLastUsedAbility = gSpeciesInfo[species].abilities[i];
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < NUM_ABILITY_SLOTS && gLastUsedAbility == ABILITY_NONE; i++) // look for any non-empty ability
|
||||
{
|
||||
gLastUsedAbility = gBaseStats[species].abilities[i];
|
||||
gLastUsedAbility = gSpeciesInfo[species].abilities[i];
|
||||
}
|
||||
|
||||
return gLastUsedAbility;
|
||||
@ -5638,8 +5638,8 @@ void PokemonToBattleMon(struct Pokemon *src, struct BattlePokemon *dst)
|
||||
dst->spDefense = GetMonData(src, MON_DATA_SPDEF, NULL);
|
||||
dst->abilityNum = GetMonData(src, MON_DATA_ABILITY_NUM, NULL);
|
||||
dst->otId = GetMonData(src, MON_DATA_OT_ID, NULL);
|
||||
dst->type1 = gBaseStats[dst->species].type1;
|
||||
dst->type2 = gBaseStats[dst->species].type2;
|
||||
dst->type1 = gSpeciesInfo[dst->species].type1;
|
||||
dst->type2 = gSpeciesInfo[dst->species].type2;
|
||||
dst->type3 = TYPE_MYSTERY;
|
||||
dst->ability = GetAbilityBySpecies(dst->species, dst->abilityNum);
|
||||
GetMonData(src, MON_DATA_NICKNAME, nickname);
|
||||
@ -5891,14 +5891,14 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
|
||||
if (param == 0) // Rare Candy
|
||||
{
|
||||
dataUnsigned = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1];
|
||||
dataUnsigned = gExperienceTables[gSpeciesInfo[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1];
|
||||
}
|
||||
else if (param - 1 < ARRAY_COUNT(sExpCandyExperienceTable)) // EXP Candies
|
||||
{
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL);
|
||||
dataUnsigned = sExpCandyExperienceTable[param - 1] + GetMonData(mon, MON_DATA_EXP, NULL);
|
||||
if (dataUnsigned > gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL])
|
||||
dataUnsigned = gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL];
|
||||
if (dataUnsigned > gExperienceTables[gSpeciesInfo[species].growthRate][MAX_LEVEL])
|
||||
dataUnsigned = gExperienceTables[gSpeciesInfo[species].growthRate][MAX_LEVEL];
|
||||
}
|
||||
|
||||
if (dataUnsigned != 0) // Failsafe
|
||||
@ -6692,8 +6692,8 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s
|
||||
for (j = 0; j < PARTY_SIZE; j++)
|
||||
{
|
||||
u16 currSpecies = GetMonData(&gPlayerParty[j], MON_DATA_SPECIES, NULL);
|
||||
if (gBaseStats[currSpecies].type1 == TYPE_DARK
|
||||
|| gBaseStats[currSpecies].type2 == TYPE_DARK)
|
||||
if (gSpeciesInfo[currSpecies].type1 == TYPE_DARK
|
||||
|| gSpeciesInfo[currSpecies].type2 == TYPE_DARK)
|
||||
{
|
||||
targetSpecies = gEvolutionTable[species][i].targetSpecies;
|
||||
break;
|
||||
@ -7241,39 +7241,39 @@ void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies)
|
||||
{
|
||||
case STAT_HP:
|
||||
if (holdEffect == HOLD_EFFECT_POWER_ITEM && stat == STAT_HP)
|
||||
evIncrease = (gBaseStats[defeatedSpecies].evYield_HP + bonus) * multiplier;
|
||||
evIncrease = (gSpeciesInfo[defeatedSpecies].evYield_HP + bonus) * multiplier;
|
||||
else
|
||||
evIncrease = gBaseStats[defeatedSpecies].evYield_HP * multiplier;
|
||||
evIncrease = gSpeciesInfo[defeatedSpecies].evYield_HP * multiplier;
|
||||
break;
|
||||
case STAT_ATK:
|
||||
if (holdEffect == HOLD_EFFECT_POWER_ITEM && stat == STAT_ATK)
|
||||
evIncrease = (gBaseStats[defeatedSpecies].evYield_Attack + bonus) * multiplier;
|
||||
evIncrease = (gSpeciesInfo[defeatedSpecies].evYield_Attack + bonus) * multiplier;
|
||||
else
|
||||
evIncrease = gBaseStats[defeatedSpecies].evYield_Attack * multiplier;
|
||||
evIncrease = gSpeciesInfo[defeatedSpecies].evYield_Attack * multiplier;
|
||||
break;
|
||||
case STAT_DEF:
|
||||
if (holdEffect == HOLD_EFFECT_POWER_ITEM && stat == STAT_DEF)
|
||||
evIncrease = (gBaseStats[defeatedSpecies].evYield_Defense + bonus) * multiplier;
|
||||
evIncrease = (gSpeciesInfo[defeatedSpecies].evYield_Defense + bonus) * multiplier;
|
||||
else
|
||||
evIncrease = gBaseStats[defeatedSpecies].evYield_Defense * multiplier;
|
||||
evIncrease = gSpeciesInfo[defeatedSpecies].evYield_Defense * multiplier;
|
||||
break;
|
||||
case STAT_SPEED:
|
||||
if (holdEffect == HOLD_EFFECT_POWER_ITEM && stat == STAT_SPEED)
|
||||
evIncrease = (gBaseStats[defeatedSpecies].evYield_Speed + bonus) * multiplier;
|
||||
evIncrease = (gSpeciesInfo[defeatedSpecies].evYield_Speed + bonus) * multiplier;
|
||||
else
|
||||
evIncrease = gBaseStats[defeatedSpecies].evYield_Speed * multiplier;
|
||||
evIncrease = gSpeciesInfo[defeatedSpecies].evYield_Speed * multiplier;
|
||||
break;
|
||||
case STAT_SPATK:
|
||||
if (holdEffect == HOLD_EFFECT_POWER_ITEM && stat == STAT_SPATK)
|
||||
evIncrease = (gBaseStats[defeatedSpecies].evYield_SpAttack + bonus) * multiplier;
|
||||
evIncrease = (gSpeciesInfo[defeatedSpecies].evYield_SpAttack + bonus) * multiplier;
|
||||
else
|
||||
evIncrease = gBaseStats[defeatedSpecies].evYield_SpAttack * multiplier;
|
||||
evIncrease = gSpeciesInfo[defeatedSpecies].evYield_SpAttack * multiplier;
|
||||
break;
|
||||
case STAT_SPDEF:
|
||||
if (holdEffect == HOLD_EFFECT_POWER_ITEM && stat == STAT_SPDEF)
|
||||
evIncrease = (gBaseStats[defeatedSpecies].evYield_SpDefense + bonus) * multiplier;
|
||||
evIncrease = (gSpeciesInfo[defeatedSpecies].evYield_SpDefense + bonus) * multiplier;
|
||||
else
|
||||
evIncrease = gBaseStats[defeatedSpecies].evYield_SpDefense * multiplier;
|
||||
evIncrease = gSpeciesInfo[defeatedSpecies].evYield_SpDefense * multiplier;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -7462,12 +7462,12 @@ bool8 TryIncrementMonLevel(struct Pokemon *mon)
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES, 0);
|
||||
u8 nextLevel = GetMonData(mon, MON_DATA_LEVEL, 0) + 1;
|
||||
u32 expPoints = GetMonData(mon, MON_DATA_EXP, 0);
|
||||
if (expPoints > gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL])
|
||||
if (expPoints > gExperienceTables[gSpeciesInfo[species].growthRate][MAX_LEVEL])
|
||||
{
|
||||
expPoints = gExperienceTables[gBaseStats[species].growthRate][MAX_LEVEL];
|
||||
expPoints = gExperienceTables[gSpeciesInfo[species].growthRate][MAX_LEVEL];
|
||||
SetMonData(mon, MON_DATA_EXP, &expPoints);
|
||||
}
|
||||
if (nextLevel > MAX_LEVEL || expPoints < gExperienceTables[gBaseStats[species].growthRate][nextLevel])
|
||||
if (nextLevel > MAX_LEVEL || expPoints < gExperienceTables[gSpeciesInfo[species].growthRate][nextLevel])
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -7824,7 +7824,7 @@ bool32 IsHMMove2(u16 move)
|
||||
|
||||
bool8 IsMonSpriteNotFlipped(u16 species)
|
||||
{
|
||||
return gBaseStats[species].noFlip;
|
||||
return gSpeciesInfo[species].noFlip;
|
||||
}
|
||||
|
||||
s8 GetMonFlavorRelation(struct Pokemon *mon, u8 flavor)
|
||||
@ -7957,26 +7957,26 @@ void SetWildMonHeldItem(void)
|
||||
if (rnd < chanceNoItem)
|
||||
continue;
|
||||
if (rnd < chanceNotRare)
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBaseStats[species].itemCommon);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemCommon);
|
||||
else
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBaseStats[species].itemRare);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemRare);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gBaseStats[species].itemCommon == gBaseStats[species].itemRare && gBaseStats[species].itemCommon != ITEM_NONE)
|
||||
if (gSpeciesInfo[species].itemCommon == gSpeciesInfo[species].itemRare && gSpeciesInfo[species].itemCommon != ITEM_NONE)
|
||||
{
|
||||
// Both held items are the same, 100% chance to hold item
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBaseStats[species].itemCommon);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemCommon);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rnd < chanceNoItem)
|
||||
continue;
|
||||
if (rnd < chanceNotRare)
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBaseStats[species].itemCommon);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemCommon);
|
||||
else
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBaseStats[species].itemRare);
|
||||
SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemRare);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -8610,7 +8610,7 @@ void TrySpecialOverworldEvo(void)
|
||||
|
||||
bool32 ShouldShowFemaleDifferences(u16 species, u32 personality)
|
||||
{
|
||||
return (gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE;
|
||||
return (gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE;
|
||||
}
|
||||
|
||||
void TryToSetBattleFormChangeMoves(struct Pokemon *mon)
|
||||
|
@ -417,21 +417,21 @@ static void PrintInstructionsOnWindow(struct PokemonDebugMenu *data)
|
||||
FillWindowPixelBuffer(WIN_INSTRUCTIONS, 0x11);
|
||||
if (data->currentSubmenu == 0)
|
||||
{
|
||||
if (gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE)
|
||||
if (gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE)
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsGender, x, 0, 0, NULL);
|
||||
else
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructions, x, 0, 0, NULL);
|
||||
}
|
||||
else if (data->currentSubmenu == 1)
|
||||
{
|
||||
if (gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE)
|
||||
if (gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE)
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuOneGender, x, 0, 0, NULL);
|
||||
else
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuOne, x, 0, 0, NULL);
|
||||
}
|
||||
else if (data->currentSubmenu == 2)
|
||||
{
|
||||
if (gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE)
|
||||
if (gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE)
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuTwoGender, x, 0, 0, NULL);
|
||||
else
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuTwo, x, 0, 0, NULL);
|
||||
@ -485,7 +485,7 @@ static void PrintDigitChars(struct PokemonDebugMenu *data)
|
||||
text[i++] = CHAR_SPACE;
|
||||
text[i++] = CHAR_HYPHEN;
|
||||
|
||||
if (gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE)
|
||||
if (gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE)
|
||||
{
|
||||
if (data->isFemale)
|
||||
text[i++] = CHAR_FEMALE;
|
||||
@ -688,14 +688,14 @@ static const struct CompressedSpritePalette *GetMonSpritePalStructCustom(u16 spe
|
||||
{
|
||||
if (isShiny)
|
||||
{
|
||||
if ((gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
if ((gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
return &gMonShinyPaletteTableFemale[species];
|
||||
else
|
||||
return &gMonShinyPaletteTable[species];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
if ((gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
return &gMonPaletteTableFemale[species];
|
||||
else
|
||||
return &gMonPaletteTable[species];
|
||||
@ -714,14 +714,14 @@ static void BattleLoadOpponentMonSpriteGfxCustom(u16 species, bool8 isFemale, bo
|
||||
|
||||
if (isShiny)
|
||||
{
|
||||
if ((gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
if ((gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
lzPaletteData = gMonShinyPaletteTableFemale[species].data;
|
||||
else
|
||||
lzPaletteData = gMonShinyPaletteTable[species].data;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
if ((gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
lzPaletteData = gMonPaletteTableFemale[species].data;
|
||||
else
|
||||
lzPaletteData = gMonPaletteTable[species].data;
|
||||
@ -1493,7 +1493,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId)
|
||||
ReloadPokemonSprites(data);
|
||||
ApplyOffsetSpriteValues(data);
|
||||
}
|
||||
if (JOY_NEW(SELECT_BUTTON) && (gBaseStats[data->currentmonId].flags & SPECIES_FLAG_GENDER_DIFFERENCE))
|
||||
if (JOY_NEW(SELECT_BUTTON) && (gSpeciesInfo[data->currentmonId].flags & SPECIES_FLAG_GENDER_DIFFERENCE))
|
||||
{
|
||||
data->isFemale = !data->isFemale;
|
||||
PrintDigitChars(data);
|
||||
|
@ -2714,8 +2714,8 @@ static void DrawExperienceProgressBar(struct Pokemon *unused)
|
||||
|
||||
if (summary->level < MAX_LEVEL)
|
||||
{
|
||||
u32 expBetweenLevels = gExperienceTables[gBaseStats[summary->species].growthRate][summary->level + 1] - gExperienceTables[gBaseStats[summary->species].growthRate][summary->level];
|
||||
u32 expSinceLastLevel = summary->exp - gExperienceTables[gBaseStats[summary->species].growthRate][summary->level];
|
||||
u32 expBetweenLevels = gExperienceTables[gSpeciesInfo[summary->species].growthRate][summary->level + 1] - gExperienceTables[gSpeciesInfo[summary->species].growthRate][summary->level];
|
||||
u32 expSinceLastLevel = summary->exp - gExperienceTables[gSpeciesInfo[summary->species].growthRate][summary->level];
|
||||
|
||||
// Calculate the number of 1-pixel "ticks" to illuminate in the experience progress bar.
|
||||
// There are 8 tiles that make up the bar, and each tile has 8 "ticks". Hence, the numerator
|
||||
@ -3518,7 +3518,7 @@ static void PrintExpPointsNextLevel(void)
|
||||
PrintTextOnWindow(windowId, gStringVar1, x, 1, 0, 0);
|
||||
|
||||
if (sum->level < MAX_LEVEL)
|
||||
expToNextLevel = gExperienceTables[gBaseStats[sum->species].growthRate][sum->level + 1] - sum->exp;
|
||||
expToNextLevel = gExperienceTables[gSpeciesInfo[sum->species].growthRate][sum->level + 1] - sum->exp;
|
||||
else
|
||||
expToNextLevel = 0;
|
||||
|
||||
@ -3903,10 +3903,10 @@ static void SetMonTypeIcons(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
SetTypeSpritePosAndPal(gBaseStats[summary->species].type1, 120, 48, SPRITE_ARR_ID_TYPE);
|
||||
if (gBaseStats[summary->species].type1 != gBaseStats[summary->species].type2)
|
||||
SetTypeSpritePosAndPal(gSpeciesInfo[summary->species].type1, 120, 48, SPRITE_ARR_ID_TYPE);
|
||||
if (gSpeciesInfo[summary->species].type1 != gSpeciesInfo[summary->species].type2)
|
||||
{
|
||||
SetTypeSpritePosAndPal(gBaseStats[summary->species].type2, 160, 48, SPRITE_ARR_ID_TYPE + 1);
|
||||
SetTypeSpritePosAndPal(gSpeciesInfo[summary->species].type2, 160, 48, SPRITE_ARR_ID_TYPE + 1);
|
||||
SetSpriteInvisibility(SPRITE_ARR_ID_TYPE + 1, FALSE);
|
||||
}
|
||||
else
|
||||
|
@ -69,7 +69,7 @@ struct GFRomHeader
|
||||
u32 externalEventFlagsOffset;
|
||||
u32 externalEventDataOffset;
|
||||
u32 unk18;
|
||||
const struct BaseStats * baseStats;
|
||||
const struct SpeciesInfo * speciesInfo;
|
||||
const u8 (* abilityNames)[];
|
||||
const u8 *const * abilityDescriptions;
|
||||
const struct Item * items;
|
||||
@ -150,7 +150,7 @@ static const struct GFRomHeader sGFRomHeader = {
|
||||
.externalEventFlagsOffset = offsetof(struct SaveBlock1, externalEventFlags),
|
||||
.externalEventDataOffset = offsetof(struct SaveBlock1, externalEventData),
|
||||
.unk18 = 0x00000000,
|
||||
.baseStats = gBaseStats,
|
||||
.speciesInfo = gSpeciesInfo,
|
||||
.abilityNames = gAbilityNames,
|
||||
.abilityDescriptions = gAbilityDescriptionPointers,
|
||||
.items = gItems,
|
||||
|
@ -214,7 +214,7 @@ static const struct ListMenuTemplate sRegistryListMenuTemplate =
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NORMAL,
|
||||
.cursorKind = 0,
|
||||
.cursorKind = CURSOR_BLACK_ARROW,
|
||||
};
|
||||
|
||||
static void ClearSecretBase(struct SecretBase *secretBase)
|
||||
@ -953,7 +953,7 @@ static void BuildRegistryMenuItems(u8 taskId)
|
||||
}
|
||||
|
||||
sRegistryMenu->items[count].name = gText_Cancel;
|
||||
sRegistryMenu->items[count].id = -2;
|
||||
sRegistryMenu->items[count].id = LIST_CANCEL;
|
||||
tNumBases = count + 1;
|
||||
if (tNumBases < 8)
|
||||
tMaxShownItems = tNumBases;
|
||||
|
@ -216,7 +216,7 @@ static const struct ListMenuTemplate sShopBuyMenuListTemplate =
|
||||
.itemVerticalPadding = 0,
|
||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||
.fontId = FONT_NARROW,
|
||||
.cursorKind = 0
|
||||
.cursorKind = CURSOR_BLACK_ARROW
|
||||
};
|
||||
|
||||
static const struct BgTemplate sShopBuyMenuBgTemplates[] =
|
||||
|
@ -1044,7 +1044,7 @@ static u8 SaveConfirmInputCallback(void)
|
||||
sSaveDialogCallback = SaveFileExistsCallback;
|
||||
return SAVE_IN_PROGRESS;
|
||||
}
|
||||
case -1: // B Button
|
||||
case MENU_B_PRESSED:
|
||||
case 1: // No
|
||||
HideSaveInfoWindow();
|
||||
HideSaveMessageWindow();
|
||||
@ -1090,7 +1090,7 @@ static u8 SaveOverwriteInputCallback(void)
|
||||
case 0: // Yes
|
||||
sSaveDialogCallback = SaveSavingMessageCallback;
|
||||
return SAVE_IN_PROGRESS;
|
||||
case -1: // B Button
|
||||
case MENU_B_PRESSED:
|
||||
case 1: // No
|
||||
HideSaveInfoWindow();
|
||||
HideSaveMessageWindow();
|
||||
@ -1209,7 +1209,7 @@ static u8 BattlePyramidRetireInputCallback(void)
|
||||
{
|
||||
case 0: // Yes
|
||||
return SAVE_CANCELED;
|
||||
case -1: // B Button
|
||||
case MENU_B_PRESSED:
|
||||
case 1: // No
|
||||
HideSaveMessageWindow();
|
||||
return SAVE_SUCCESS;
|
||||
|
12
src/trade.c
@ -1505,7 +1505,7 @@ static u8 CheckValidityOfTradeMons(u8 *aliveMons, u8 playerPartyCount, u8 player
|
||||
}
|
||||
|
||||
// Can't trade specific species
|
||||
if (gBaseStats[partnerSpecies].flags & SPECIES_FLAG_CANNOT_BE_TRADED)
|
||||
if (gSpeciesInfo[partnerSpecies].flags & SPECIES_FLAG_CANNOT_BE_TRADED)
|
||||
return PARTNER_MON_INVALID;
|
||||
|
||||
// Partner cant trade Egg or non-Hoenn mon if player doesn't have National Dex
|
||||
@ -2365,7 +2365,7 @@ static u32 CanTradeSelectedMon(struct Pokemon *playerParty, int partyCount, int
|
||||
}
|
||||
|
||||
// Can't trade specific species
|
||||
if (gBaseStats[species[monIdx]].flags & SPECIES_FLAG_CANNOT_BE_TRADED)
|
||||
if (gSpeciesInfo[species[monIdx]].flags & SPECIES_FLAG_CANNOT_BE_TRADED)
|
||||
return CANT_TRADE_INVALID_MON;
|
||||
|
||||
// Make Eggs not count for numMonsLeft
|
||||
@ -2461,7 +2461,7 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf
|
||||
return UR_TRADE_MSG_MON_CANT_BE_TRADED;
|
||||
|
||||
// Can't trade specific species
|
||||
if (gBaseStats[playerSpecies].flags & SPECIES_FLAG_CANNOT_BE_TRADED)
|
||||
if (gSpeciesInfo[playerSpecies].flags & SPECIES_FLAG_CANNOT_BE_TRADED)
|
||||
return UR_TRADE_MSG_MON_CANT_BE_TRADED;
|
||||
|
||||
if (partnerSpecies == SPECIES_EGG)
|
||||
@ -2473,8 +2473,8 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf
|
||||
else
|
||||
{
|
||||
// Player's Pokémon must be of the type the partner requested
|
||||
if (gBaseStats[playerSpecies2].type1 != requestedType
|
||||
&& gBaseStats[playerSpecies2].type2 != requestedType)
|
||||
if (gSpeciesInfo[playerSpecies2].type1 != requestedType
|
||||
&& gSpeciesInfo[playerSpecies2].type2 != requestedType)
|
||||
return UR_TRADE_MSG_NOT_MON_PARTNER_WANTS;
|
||||
}
|
||||
|
||||
@ -2512,7 +2512,7 @@ int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 sp
|
||||
return CANT_REGISTER_MON_NOW;
|
||||
|
||||
// Can't trade specific species
|
||||
if (gBaseStats[species].flags & SPECIES_FLAG_CANNOT_BE_TRADED)
|
||||
if (gSpeciesInfo[species].flags & SPECIES_FLAG_CANNOT_BE_TRADED)
|
||||
return CANT_REGISTER_MON;
|
||||
|
||||
if (hasNationalDex)
|
||||
|
@ -924,7 +924,7 @@ u8 GetTrainerEncounterMusicIdInTrainerHill(u16 trainerId)
|
||||
static void SetTrainerHillMonLevel(struct Pokemon *mon, u8 level)
|
||||
{
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL);
|
||||
u32 exp = gExperienceTables[gBaseStats[species].growthRate][level];
|
||||
u32 exp = gExperienceTables[gSpeciesInfo[species].growthRate][level];
|
||||
|
||||
SetMonData(mon, MON_DATA_EXP, &exp);
|
||||
SetMonData(mon, MON_DATA_LEVEL, &level);
|
||||
|
@ -271,7 +271,7 @@ static void GetURoomActivityRejectMsg(u8 *, s32, u32);
|
||||
static u32 ConvPartnerUnameAndGetWhetherMetAlready(struct RfuPlayer *);
|
||||
static void GetURoomActivityStartMsg(u8 *, u8);
|
||||
static void UR_ClearBg0(void);
|
||||
static s32 IsRequestedTypeOrEggInPlayerParty(u32, u32);
|
||||
static s32 IsRequestedTradeInPlayerParty(u32, u32);
|
||||
static bool32 UR_PrintFieldMessage(const u8 *);
|
||||
static s32 GetChatLeaderActionRequestMessage(u8 *, u32, u16 *, struct WirelessLink_URoom *);
|
||||
static void Task_InitUnionRoom(u8 taskId);
|
||||
@ -319,9 +319,9 @@ static void PrintPlayerNameAndIdOnWindow(u8 windowId)
|
||||
PrintUnionRoomText(windowId, FONT_NORMAL, text, 0, 17, UR_COLOR_DEFAULT);
|
||||
}
|
||||
|
||||
static void GetAwaitingCommunicationText(u8 *dst, u8 caseId)
|
||||
static void GetAwaitingCommunicationText(u8 *dst, u8 activity)
|
||||
{
|
||||
switch (caseId)
|
||||
switch (activity)
|
||||
{
|
||||
case ACTIVITY_BATTLE_SINGLE:
|
||||
case ACTIVITY_BATTLE_DOUBLE:
|
||||
@ -352,9 +352,9 @@ static void GetAwaitingCommunicationText(u8 *dst, u8 caseId)
|
||||
}
|
||||
}
|
||||
|
||||
static bool32 IsActivityWithVariableGroupSize(u32 caseId)
|
||||
static bool32 IsActivityWithVariableGroupSize(u32 activity)
|
||||
{
|
||||
switch (caseId)
|
||||
switch (activity)
|
||||
{
|
||||
case ACTIVITY_POKEMON_JUMP:
|
||||
case ACTIVITY_BERRY_CRUSH:
|
||||
@ -559,6 +559,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId)
|
||||
{
|
||||
if (data->joinRequestAnswer == RFU_STATUS_JOIN_GROUP_OK)
|
||||
{
|
||||
// Sent "OK"
|
||||
data->playerList->players[data->playerCount].newPlayerCountdown = 0;
|
||||
RedrawListMenu(data->listTaskId);
|
||||
data->playerCount++;
|
||||
@ -596,6 +597,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId)
|
||||
}
|
||||
else if (val == 2)
|
||||
{
|
||||
// Disconnect
|
||||
RfuSetStatus(RFU_STATUS_OK, 0);
|
||||
data->state = LL_STATE_GET_AWAITING_PLAYERS_TEXT;
|
||||
}
|
||||
@ -734,9 +736,9 @@ static void Leader_DestroyResources(struct WirelessLink_Leader *data)
|
||||
Free(data->incomingPlayerList);
|
||||
}
|
||||
|
||||
static void Leader_GetAcceptNewMemberPrompt(u8 *dst, u8 caseId)
|
||||
static void Leader_GetAcceptNewMemberPrompt(u8 *dst, u8 activity)
|
||||
{
|
||||
switch (caseId)
|
||||
switch (activity)
|
||||
{
|
||||
case ACTIVITY_BATTLE_SINGLE:
|
||||
case ACTIVITY_BATTLE_DOUBLE:
|
||||
@ -765,9 +767,9 @@ static void Leader_GetAcceptNewMemberPrompt(u8 *dst, u8 caseId)
|
||||
}
|
||||
}
|
||||
|
||||
static void GetYouDeclinedTheOfferMessage(u8 *dst, u8 caseId)
|
||||
static void GetYouDeclinedTheOfferMessage(u8 *dst, u8 activity)
|
||||
{
|
||||
switch (caseId)
|
||||
switch (activity)
|
||||
{
|
||||
case ACTIVITY_BATTLE_SINGLE | IN_UNION_ROOM:
|
||||
case ACTIVITY_TRADE | IN_UNION_ROOM:
|
||||
@ -780,9 +782,9 @@ static void GetYouDeclinedTheOfferMessage(u8 *dst, u8 caseId)
|
||||
}
|
||||
}
|
||||
|
||||
static void GetYouAskedToJoinGroupPleaseWaitMessage(u8 *dst, u8 caseId)
|
||||
static void GetYouAskedToJoinGroupPleaseWaitMessage(u8 *dst, u8 activity)
|
||||
{
|
||||
switch (caseId)
|
||||
switch (activity)
|
||||
{
|
||||
case ACTIVITY_BATTLE_SINGLE:
|
||||
case ACTIVITY_BATTLE_DOUBLE:
|
||||
@ -809,9 +811,9 @@ static void GetYouAskedToJoinGroupPleaseWaitMessage(u8 *dst, u8 caseId)
|
||||
}
|
||||
}
|
||||
|
||||
static void GetGroupLeaderSentAnOKMessage(u8 *dst, u8 caseId)
|
||||
static void GetGroupLeaderSentAnOKMessage(u8 *dst, u8 activity)
|
||||
{
|
||||
switch (caseId)
|
||||
switch (activity)
|
||||
{
|
||||
case ACTIVITY_BATTLE_SINGLE:
|
||||
case ACTIVITY_BATTLE_DOUBLE:
|
||||
@ -1039,7 +1041,7 @@ static void Task_TryJoinLinkGroup(u8 taskId)
|
||||
break;
|
||||
case 0:
|
||||
id = ListMenu_ProcessInput(data->listTaskId);
|
||||
if (JOY_NEW(A_BUTTON) && id != MENU_B_PRESSED)
|
||||
if (JOY_NEW(A_BUTTON) && id != LIST_NOTHING_CHOSEN)
|
||||
{
|
||||
// this unused variable along with the assignment is needed to match
|
||||
u32 activity = data->playerList->players[id].rfu.data.activity;
|
||||
@ -1469,9 +1471,7 @@ static void Task_CreateTradeMenu(u8 taskId)
|
||||
|
||||
u8 CreateTask_CreateTradeMenu(void)
|
||||
{
|
||||
u8 taskId = CreateTask(Task_CreateTradeMenu, 0);
|
||||
|
||||
return taskId;
|
||||
return CreateTask(Task_CreateTradeMenu, 0);
|
||||
}
|
||||
|
||||
static void Task_StartUnionRoomTrade(u8 taskId)
|
||||
@ -2147,11 +2147,10 @@ static void Task_CardOrNewsWithFriend(u8 taskId)
|
||||
break;
|
||||
case 0:
|
||||
id = ListMenu_ProcessInput(data->listTaskId);
|
||||
if (JOY_NEW(A_BUTTON) && id != -1)
|
||||
if (JOY_NEW(A_BUTTON) && id != LIST_NOTHING_CHOSEN)
|
||||
{
|
||||
// this unused variable along with the assignment is needed to match
|
||||
u32 unusedVar;
|
||||
unusedVar = data->playerList->players[id].rfu.data.activity;
|
||||
u32 activity = data->playerList->players[id].rfu.data.activity;
|
||||
|
||||
if (data->playerList->players[id].groupScheduledAnim == UNION_ROOM_SPAWN_IN && !data->playerList->players[id].rfu.data.startedActivity)
|
||||
{
|
||||
@ -2504,7 +2503,7 @@ static void Task_RunUnionRoom(u8 taskId)
|
||||
break;
|
||||
case UR_STATE_INIT_OBJECTS:
|
||||
CreateUnionRoomPlayerSprites(uroom->spriteIds, taskData[0]);
|
||||
if (++taskData[0] == 8)
|
||||
if (++taskData[0] == MAX_UNION_ROOM_LEADERS)
|
||||
uroom->state = UR_STATE_INIT_LINK;
|
||||
break;
|
||||
case UR_STATE_INIT_LINK:
|
||||
@ -2711,7 +2710,7 @@ static void Task_RunUnionRoom(u8 taskId)
|
||||
&uroom->topListMenuId,
|
||||
&sWindowTemplate_InviteToActivity,
|
||||
&sListMenuTemplate_InviteToActivity);
|
||||
if (input != -1)
|
||||
if (input != LIST_NOTHING_CHOSEN)
|
||||
{
|
||||
if (!gReceivedRemoteLinkPlayers)
|
||||
{
|
||||
@ -2721,7 +2720,7 @@ static void Task_RunUnionRoom(u8 taskId)
|
||||
{
|
||||
uroom->partnerYesNoResponse = 0;
|
||||
playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->playerList);
|
||||
if (input == -2 || input == IN_UNION_ROOM)
|
||||
if (input == LIST_CANCEL || input == IN_UNION_ROOM)
|
||||
{
|
||||
uroom->playerSendBuffer[0] = IN_UNION_ROOM;
|
||||
Rfu_SendPacket(uroom->playerSendBuffer);
|
||||
@ -3068,9 +3067,9 @@ static void Task_RunUnionRoom(u8 taskId)
|
||||
&uroom->tradeBoardHeaderWindowId,
|
||||
&sWindowTemplate_RegisterForTrade,
|
||||
&sListMenuTemplate_RegisterForTrade);
|
||||
if (input != -1)
|
||||
if (input != LIST_NOTHING_CHOSEN)
|
||||
{
|
||||
if (input == -2 || input == 3)
|
||||
if (input == LIST_CANCEL || input == 3) // Exit
|
||||
{
|
||||
uroom->state = UR_STATE_MAIN;
|
||||
HandleCancelActivity(TRUE);
|
||||
@ -3090,7 +3089,7 @@ static void Task_RunUnionRoom(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case UR_STATE_REGISTER_SELECT_MON_FADE:
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
uroom->state = UR_STATE_REGISTER_SELECT_MON;
|
||||
break;
|
||||
case UR_STATE_REGISTER_SELECT_MON:
|
||||
@ -3107,11 +3106,11 @@ static void Task_RunUnionRoom(u8 taskId)
|
||||
&uroom->tradeBoardHeaderWindowId,
|
||||
&sWindowTemplate_TradingBoardRequestType,
|
||||
&sMenuTemplate_TradingBoardRequestType);
|
||||
if (input != -1)
|
||||
if (input != LIST_NOTHING_CHOSEN)
|
||||
{
|
||||
switch (input)
|
||||
{
|
||||
case -2:
|
||||
case LIST_CANCEL:
|
||||
case NUMBER_OF_MON_TYPES: // Exit
|
||||
ResetUnionRoomTrade(&sUnionRoomTrade);
|
||||
SetTradeBoardRegisteredMonInfo(TYPE_NORMAL, SPECIES_NONE, 0);
|
||||
@ -3166,18 +3165,18 @@ static void Task_RunUnionRoom(u8 taskId)
|
||||
&sWindowTemplate_TradingBoardMain,
|
||||
&sTradeBoardListMenuTemplate,
|
||||
uroom->playerList);
|
||||
if (input != -1)
|
||||
if (input != LIST_NOTHING_CHOSEN)
|
||||
{
|
||||
switch (input)
|
||||
{
|
||||
case -2:
|
||||
case LIST_CANCEL:
|
||||
case 8: // EXIT
|
||||
HandleCancelActivity(TRUE);
|
||||
uroom->state = UR_STATE_MAIN;
|
||||
break;
|
||||
default:
|
||||
UR_ClearBg0();
|
||||
switch (IsRequestedTypeOrEggInPlayerParty(uroom->playerList->players[input].rfu.data.tradeType, uroom->playerList->players[input].rfu.data.tradeSpecies))
|
||||
switch (IsRequestedTradeInPlayerParty(uroom->playerList->players[input].rfu.data.tradeType, uroom->playerList->players[input].rfu.data.tradeSpecies))
|
||||
{
|
||||
case UR_TRADE_MATCH:
|
||||
CopyAndTranslatePlayerName(gStringVar1, &uroom->playerList->players[input]);
|
||||
@ -3707,12 +3706,12 @@ static s32 ListMenuHandler_AllItemsAvailable(u8 *state, u8 *windowId, u8 *listMe
|
||||
ClearStdWindowAndFrame(*windowId, TRUE);
|
||||
RemoveWindow(*windowId);
|
||||
*state = 0;
|
||||
return -2;
|
||||
return LIST_CANCEL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return -1;
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
static s32 TradeBoardMenuHandler(u8 *state, u8 *mainWindowId, u8 *listMenuId, u8 *headerWindowId,
|
||||
@ -3742,13 +3741,14 @@ static s32 TradeBoardMenuHandler(u8 *state, u8 *mainWindowId, u8 *listMenuId, u8
|
||||
input = ListMenu_ProcessInput(*listMenuId);
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
// Exit or B button
|
||||
if (input == 8 || JOY_NEW(B_BUTTON))
|
||||
{
|
||||
DestroyListMenuTask(*listMenuId, NULL, NULL);
|
||||
RemoveWindow(*mainWindowId);
|
||||
DeleteTradeBoardWindow(*headerWindowId);
|
||||
*state = 0;
|
||||
return -2;
|
||||
return LIST_CANCEL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3770,7 +3770,7 @@ static s32 TradeBoardMenuHandler(u8 *state, u8 *mainWindowId, u8 *listMenuId, u8
|
||||
break;
|
||||
}
|
||||
|
||||
return -1;
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
static void UR_ClearBg0(void)
|
||||
@ -4090,7 +4090,7 @@ static s32 UnionRoomGetPlayerInteractionResponse(struct RfuPlayerList *list, boo
|
||||
}
|
||||
}
|
||||
|
||||
void ItemPrintFunc_EmptyList(u8 windowId, u32 itemId, u8 y)
|
||||
static void ItemPrintFunc_EmptyList(u8 windowId, u32 itemId, u8 y)
|
||||
{
|
||||
}
|
||||
|
||||
@ -4120,7 +4120,7 @@ static void TradeBoardListMenuItemPrintFunc(u8 windowId, u32 itemId, u8 y)
|
||||
struct WirelessLink_Leader *leader = sWirelessLinkMain.leader;
|
||||
struct RfuGameData *gameData;
|
||||
s32 i, j;
|
||||
u8 playerName[11];
|
||||
u8 playerName[RFU_USER_NAME_LENGTH + 1];
|
||||
|
||||
if (itemId == LIST_HEADER && y == sTradeBoardListMenuTemplate.upText_Y)
|
||||
{
|
||||
@ -4168,7 +4168,7 @@ static s32 GetUnionRoomPlayerGender(s32 playerIdx, struct RfuPlayerList *list)
|
||||
return list->players[playerIdx].rfu.data.playerGender;
|
||||
}
|
||||
|
||||
static s32 IsRequestedTypeOrEggInPlayerParty(u32 type, u32 species)
|
||||
static s32 IsRequestedTradeInPlayerParty(u32 type, u32 species)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
@ -4187,7 +4187,7 @@ static s32 IsRequestedTypeOrEggInPlayerParty(u32 type, u32 species)
|
||||
for (i = 0; i < gPlayerPartyCount; i++)
|
||||
{
|
||||
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
|
||||
if (gBaseStats[species].type1 == type || gBaseStats[species].type2 == type)
|
||||
if (gSpeciesInfo[species].type1 == type || gSpeciesInfo[species].type2 == type)
|
||||
return UR_TRADE_MATCH;
|
||||
}
|
||||
return UR_TRADE_NOTYPE;
|
||||
|
@ -1171,7 +1171,7 @@ static void Chat_AskQuitChatting(void)
|
||||
input = ProcessMenuInput();
|
||||
switch (input)
|
||||
{
|
||||
case -1:
|
||||
case MENU_B_PRESSED:
|
||||
case 1:
|
||||
StartDisplaySubtask(CHATDISPLAY_FUNC_DESTROY_YESNO, 0);
|
||||
sChat->funcState = 3;
|
||||
@ -1210,7 +1210,7 @@ static void Chat_AskQuitChatting(void)
|
||||
input = ProcessMenuInput();
|
||||
switch (input)
|
||||
{
|
||||
case -1:
|
||||
case MENU_B_PRESSED:
|
||||
case 1:
|
||||
StartDisplaySubtask(CHATDISPLAY_FUNC_DESTROY_YESNO, 0);
|
||||
sChat->funcState = 3;
|
||||
@ -1512,7 +1512,7 @@ static void Chat_SaveAndExit(void)
|
||||
input = ProcessMenuInput();
|
||||
switch (input)
|
||||
{
|
||||
case -1:
|
||||
case MENU_B_PRESSED:
|
||||
case 1:
|
||||
sChat->funcState = 12;
|
||||
break;
|
||||
@ -1537,7 +1537,7 @@ static void Chat_SaveAndExit(void)
|
||||
input = ProcessMenuInput();
|
||||
switch (input)
|
||||
{
|
||||
case -1:
|
||||
case MENU_B_PRESSED:
|
||||
case 1:
|
||||
sChat->funcState = 12;
|
||||
break;
|
||||
|
@ -340,15 +340,10 @@ static void AnimateUnionRoomPlayer(u32 leaderId, struct UnionRoomObject * object
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (object->schedAnim == UNION_ROOM_SPAWN_OUT)
|
||||
{
|
||||
if (object->schedAnim != UNION_ROOM_SPAWN_OUT)
|
||||
break;
|
||||
object->state = 3;
|
||||
object->animState = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
// fallthrough
|
||||
case 3:
|
||||
if (AnimateUnionRoomPlayerDespawn(&object->animState, leaderId, object) == 1)
|
||||
|
@ -434,7 +434,7 @@ static void CreateWildMon(u16 species, u8 level)
|
||||
ZeroEnemyPartyMons();
|
||||
checkCuteCharm = TRUE;
|
||||
|
||||
switch (gBaseStats[species].genderRatio)
|
||||
switch (gSpeciesInfo[species].genderRatio)
|
||||
{
|
||||
case MON_MALE:
|
||||
case MON_FEMALE:
|
||||
@ -1031,7 +1031,7 @@ static bool8 TryGetRandomWildMonIndexByType(const struct WildPokemon *wildMon, u
|
||||
|
||||
for (validMonCount = 0, i = 0; i < numMon; i++)
|
||||
{
|
||||
if (gBaseStats[wildMon[i].species].type1 == type || gBaseStats[wildMon[i].species].type2 == type)
|
||||
if (gSpeciesInfo[wildMon[i].species].type1 == type || gSpeciesInfo[wildMon[i].species].type2 == type)
|
||||
validIndexes[validMonCount++] = i;
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "union_room.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/union_room.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
enum {
|
||||
COLORMODE_NORMAL,
|
||||
@ -51,9 +52,26 @@ static void Task_WirelessCommunicationScreen(u8);
|
||||
static void WCSS_AddTextPrinterParameterized(u8, u8, const u8 *, u8, u8, u8);
|
||||
static bool32 UpdateCommunicationCounts(u32 *, u32 *, u32 *, u8);
|
||||
|
||||
static const u16 sBgTiles_Pal[] = INCBIN_U16("graphics/link/wireless_info_screen.gbapal");
|
||||
static const u32 sBgTiles_Gfx[] = INCBIN_U32("graphics/link/wireless_info_screen.4bpp.lz");
|
||||
static const u32 sBgTiles_Tilemap[] = INCBIN_U32("graphics/link/wireless_info_screen.bin.lz");
|
||||
static const u16 sPalettes[][16] = {
|
||||
INCBIN_U16("graphics/wireless_status_screen/default.gbapal"),
|
||||
{}, // All black. Never read
|
||||
INCBIN_U16("graphics/wireless_status_screen/anim_00.gbapal"),
|
||||
INCBIN_U16("graphics/wireless_status_screen/anim_01.gbapal"),
|
||||
INCBIN_U16("graphics/wireless_status_screen/anim_02.gbapal"),
|
||||
INCBIN_U16("graphics/wireless_status_screen/anim_03.gbapal"),
|
||||
INCBIN_U16("graphics/wireless_status_screen/anim_04.gbapal"),
|
||||
INCBIN_U16("graphics/wireless_status_screen/anim_05.gbapal"),
|
||||
INCBIN_U16("graphics/wireless_status_screen/anim_06.gbapal"),
|
||||
INCBIN_U16("graphics/wireless_status_screen/anim_07.gbapal"),
|
||||
INCBIN_U16("graphics/wireless_status_screen/anim_08.gbapal"),
|
||||
INCBIN_U16("graphics/wireless_status_screen/anim_09.gbapal"),
|
||||
INCBIN_U16("graphics/wireless_status_screen/anim_10.gbapal"),
|
||||
INCBIN_U16("graphics/wireless_status_screen/anim_11.gbapal"),
|
||||
INCBIN_U16("graphics/wireless_status_screen/anim_12.gbapal"),
|
||||
INCBIN_U16("graphics/wireless_status_screen/anim_13.gbapal")
|
||||
};
|
||||
static const u32 sBgTiles_Gfx[] = INCBIN_U32("graphics/wireless_status_screen/bg.4bpp.lz");
|
||||
static const u32 sBgTiles_Tilemap[] = INCBIN_U32("graphics/wireless_status_screen/bg.bin.lz");
|
||||
|
||||
static const struct BgTemplate sBgTemplates[] = {
|
||||
{
|
||||
@ -193,7 +211,7 @@ static void CB2_InitWirelessCommunicationScreen(void)
|
||||
ChangeBgY(0, 0, BG_COORD_SET);
|
||||
ChangeBgX(1, 0, BG_COORD_SET);
|
||||
ChangeBgY(1, 0, BG_COORD_SET);
|
||||
LoadPalette(sBgTiles_Pal, 0x00, 0x20);
|
||||
LoadPalette(sPalettes, 0x00, 0x20);
|
||||
Menu_LoadStdPalAt(0xF0);
|
||||
DynamicPlaceholderTextUtil_Reset();
|
||||
FillBgTilemapBufferRect(0, 0, 0, 0, 32, 32, 0x0F);
|
||||
@ -218,16 +236,19 @@ static void CB2_ExitWirelessCommunicationStatusScreen(void)
|
||||
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
}
|
||||
|
||||
static void WCSS_CyclePalette(s16 * counter, s16 * palIdx)
|
||||
// Cycle through palettes that relocate various shades of blue to create the wave effect at the bottom of the screen.
|
||||
static void CyclePalette(s16 * counter, s16 * palIdx)
|
||||
{
|
||||
s32 idx;
|
||||
if (++(*counter) > 5)
|
||||
{
|
||||
if (++(*palIdx) == 14)
|
||||
if (++(*palIdx) == (int)ARRAY_COUNT(sPalettes) - 2)
|
||||
*palIdx = 0;
|
||||
|
||||
*counter = 0;
|
||||
}
|
||||
LoadPalette(sBgTiles_Pal + 16 * (*palIdx + 2), 0, 0x10);
|
||||
idx = *palIdx + 2; // +2 skips over default.pal and the empty black palette after it
|
||||
LoadPalette(sPalettes[idx], 0, 16);
|
||||
}
|
||||
|
||||
static void PrintHeaderTexts(void)
|
||||
@ -236,12 +257,17 @@ static void PrintHeaderTexts(void)
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(0));
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(0));
|
||||
FillWindowPixelBuffer(2, PIXEL_FILL(0));
|
||||
|
||||
// Print title
|
||||
WCSS_AddTextPrinterParameterized(0, FONT_NORMAL, sHeaderTexts[0], GetStringCenterAlignXOffset(FONT_NORMAL, sHeaderTexts[0], 0xC0), 6, COLORMODE_GREEN);
|
||||
for (i = 0; i < (int)ARRAY_COUNT(*sHeaderTexts) - 1; i++)
|
||||
{
|
||||
|
||||
// Print label for each group (excluding total)
|
||||
for (i = 0; i < NUM_GROUPTYPES - 1; i++)
|
||||
WCSS_AddTextPrinterParameterized(1, FONT_NORMAL, sHeaderTexts[i + 1], 0, 30 * i + 8, COLORMODE_WHITE_LGRAY);
|
||||
}
|
||||
|
||||
// Print label for total
|
||||
WCSS_AddTextPrinterParameterized(1, FONT_NORMAL, sHeaderTexts[i + 1], 0, 30 * i + 8, COLORMODE_RED);
|
||||
|
||||
PutWindowTilemap(0);
|
||||
CopyWindowToVram(0, COPYWIN_GFX);
|
||||
PutWindowTilemap(1);
|
||||
@ -260,7 +286,7 @@ static void Task_WirelessCommunicationScreen(u8 taskId)
|
||||
gTasks[taskId].tState++;
|
||||
break;
|
||||
case 1:
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, 0);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
ShowBg(1);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
ShowBg(0);
|
||||
@ -268,9 +294,7 @@ static void Task_WirelessCommunicationScreen(u8 taskId)
|
||||
break;
|
||||
case 2:
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
gTasks[taskId].tState++;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (UpdateCommunicationCounts(sStatusScreen->groupCounts, sStatusScreen->prevGroupCounts, sStatusScreen->activities, sStatusScreen->rfuTaskId))
|
||||
@ -293,10 +317,10 @@ static void Task_WirelessCommunicationScreen(u8 taskId)
|
||||
gTasks[sStatusScreen->rfuTaskId].data[15] = 0xFF;
|
||||
gTasks[taskId].tState++;
|
||||
}
|
||||
WCSS_CyclePalette(&gTasks[taskId].data[7], &gTasks[taskId].data[8]);
|
||||
CyclePalette(&gTasks[taskId].data[7], &gTasks[taskId].data[8]);
|
||||
break;
|
||||
case 4:
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, 0);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].tState++;
|
||||
break;
|
||||
case 5:
|
||||
|