Merge branch 'master' into doc-wnews
@@ -1,5 +1,11 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
# calcrom.pl <mapfile> [--data]
|
||||||
|
#
|
||||||
|
# mapfile: path to .map file output by LD
|
||||||
|
# data: set to output % breakdown of data
|
||||||
|
|
||||||
use IPC::Cmd qw[ run ];
|
use IPC::Cmd qw[ run ];
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
|
|
||||||
@@ -65,12 +71,13 @@ my $base_cmd = "nm $elffname | awk '{print \$3}' | grep '^[^_].\\{4\\}' | uniq";
|
|||||||
|
|
||||||
# This looks for Unknown_, Unknown_, or sub_, followed by an address. Note that
|
# This looks for Unknown_, Unknown_, or sub_, followed by an address. Note that
|
||||||
# it matches even if stuff precedes the unknown, like sUnknown/gUnknown.
|
# it matches even if stuff precedes the unknown, like sUnknown/gUnknown.
|
||||||
my $undoc_cmd = "grep '[Uu]nknown_[0-9a-fA-F]\\{5,7\\}\\|sub_[0-9a-fA-F]\\{5,7\\}'";
|
my $undoc_regex = "'[Uu]nknown_[0-9a-fA-F]\\{5,7\\}\\|sub_[0-9a-fA-F]\\{5,7\\}'";
|
||||||
|
|
||||||
# This looks for every symbol with an address at the end of it. Some things are
|
# This looks for every symbol with an address at the end of it. Some things are
|
||||||
# given a name based on their type / location, but still have an unknown purpose.
|
# given a name based on their type / location, but still have an unknown purpose.
|
||||||
# For example, FooMap_EventScript_FFFFFFF.
|
# For example, FooMap_EventScript_FFFFFFF.
|
||||||
my $partial_doc_cmd = "grep '_[0-28][0-9a-fA-F]\\{5,7\\}'";
|
# The above may be double counted here, and will need to be filtered out.
|
||||||
|
my $partial_doc_regex = "'_[0-28][0-9a-fA-F]\\{5,7\\}'";
|
||||||
|
|
||||||
my $count_cmd = "wc -l";
|
my $count_cmd = "wc -l";
|
||||||
|
|
||||||
@@ -87,7 +94,7 @@ my $total_syms_as_string;
|
|||||||
|
|
||||||
my $undocumented_as_string;
|
my $undocumented_as_string;
|
||||||
(run (
|
(run (
|
||||||
command => "$base_cmd | $undoc_cmd | $count_cmd",
|
command => "$base_cmd | grep $undoc_regex | $count_cmd",
|
||||||
buffer => \$undocumented_as_string,
|
buffer => \$undocumented_as_string,
|
||||||
timeout => 60
|
timeout => 60
|
||||||
))
|
))
|
||||||
@@ -95,7 +102,7 @@ my $undocumented_as_string;
|
|||||||
|
|
||||||
my $partial_documented_as_string;
|
my $partial_documented_as_string;
|
||||||
(run (
|
(run (
|
||||||
command => "$base_cmd | $partial_doc_cmd | $count_cmd",
|
command => "$base_cmd | grep $partial_doc_regex | grep -v $undoc_regex | $count_cmd",
|
||||||
buffer => \$partial_documented_as_string,
|
buffer => \$partial_documented_as_string,
|
||||||
timeout => 60
|
timeout => 60
|
||||||
))
|
))
|
||||||
@@ -112,7 +119,7 @@ my $undocumented = $undocumented_as_string + 0;
|
|||||||
$partial_documented_as_string =~ s/^\s+|\s+$//g;
|
$partial_documented_as_string =~ s/^\s+|\s+$//g;
|
||||||
my $partial_documented = $partial_documented_as_string + 0;
|
my $partial_documented = $partial_documented_as_string + 0;
|
||||||
(($partial_documented != 0) or (($partial_documented == 0) and ($partial_documented_as_string eq "0")))
|
(($partial_documented != 0) or (($partial_documented == 0) and ($partial_documented_as_string eq "0")))
|
||||||
or die "ERROR: Cannot convert string to num: '$partial_documented_as_string'";
|
or die "ERROR: Cannot convert string to num: '$partial_documented_as_string'";
|
||||||
|
|
||||||
$total_syms_as_string =~ s/^\s+|\s+$//g;
|
$total_syms_as_string =~ s/^\s+|\s+$//g;
|
||||||
my $total_syms = $total_syms_as_string + 0;
|
my $total_syms = $total_syms_as_string + 0;
|
||||||
@@ -126,9 +133,6 @@ my $total = $src + $asm;
|
|||||||
my $srcPct = sprintf("%.4f", 100 * $src / $total);
|
my $srcPct = sprintf("%.4f", 100 * $src / $total);
|
||||||
my $asmPct = sprintf("%.4f", 100 * $asm / $total);
|
my $asmPct = sprintf("%.4f", 100 * $asm / $total);
|
||||||
|
|
||||||
# partial_documented is double-counting the unknown_* and sub_* symbols.
|
|
||||||
$partial_documented = $partial_documented - $undocumented;
|
|
||||||
|
|
||||||
my $documented = $total_syms - ($undocumented + $partial_documented);
|
my $documented = $total_syms - ($undocumented + $partial_documented);
|
||||||
my $docPct = sprintf("%.4f", 100 * $documented / $total_syms);
|
my $docPct = sprintf("%.4f", 100 * $documented / $total_syms);
|
||||||
my $partialPct = sprintf("%.4f", 100 * $partial_documented / $total_syms);
|
my $partialPct = sprintf("%.4f", 100 * $partial_documented / $total_syms);
|
||||||
|
|||||||
@@ -416,13 +416,13 @@ SHADOW = FC 03 @ same as fc 01
|
|||||||
COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes
|
COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes
|
||||||
PALETTE = FC 05 @ used in credits
|
PALETTE = FC 05 @ used in credits
|
||||||
FONT = FC 06 @ Given a font id, or use font constants below instead
|
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 = FC 08 @ manually print the wait byte after this, havent mapped them
|
||||||
PAUSE_UNTIL_PRESS = FC 09
|
PAUSE_UNTIL_PRESS = FC 09
|
||||||
WAIT_SE = FC 0A
|
WAIT_SE = FC 0A
|
||||||
PLAY_BGM = FC 0B
|
PLAY_BGM = FC 0B
|
||||||
ESCAPE = FC 0C
|
ESCAPE = FC 0C
|
||||||
SHIFT_TEXT = FC 0D
|
SHIFT_RIGHT = FC 0D
|
||||||
SHIFT_DOWN = FC 0E
|
SHIFT_DOWN = FC 0E
|
||||||
FILL_WINDOW = FC 0F
|
FILL_WINDOW = FC 0F
|
||||||
PLAY_SE = FC 10
|
PLAY_SE = FC 10
|
||||||
|
|||||||
@@ -1053,7 +1053,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt
|
|||||||
for (x16 = x; x16 < (x + width); x16++)
|
for (x16 = x; x16 < (x + width); x16++)
|
||||||
{
|
{
|
||||||
CopyTileMapEntry(&firstTileNum, &((u16 *)sGpuBgConfigs2[bg].tilemap)[(u16)GetTileMapIndexFromCoords(x16, y16, attribute, mode, mode2)], paletteSlot, 0, 0);
|
CopyTileMapEntry(&firstTileNum, &((u16 *)sGpuBgConfigs2[bg].tilemap)[(u16)GetTileMapIndexFromCoords(x16, y16, attribute, mode, mode2)], paletteSlot, 0, 0);
|
||||||
firstTileNum = (firstTileNum & (MAPGRID_COLLISION_MASK | MAPGRID_ELEVATION_MASK)) + ((firstTileNum + tileNumDelta) & MAPGRID_METATILE_ID_MASK);
|
firstTileNum = (firstTileNum & 0xFC00) + ((firstTileNum + tileNumDelta) & 0x3FF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1064,7 +1064,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt
|
|||||||
for (x16 = x; x16 < (x + width); x16++)
|
for (x16 = x; x16 < (x + width); x16++)
|
||||||
{
|
{
|
||||||
((u8 *)sGpuBgConfigs2[bg].tilemap)[(y16 * mode3) + x16] = firstTileNum;
|
((u8 *)sGpuBgConfigs2[bg].tilemap)[(y16 * mode3) + x16] = firstTileNum;
|
||||||
firstTileNum = (firstTileNum & (MAPGRID_COLLISION_MASK | MAPGRID_ELEVATION_MASK)) + ((firstTileNum + tileNumDelta) & MAPGRID_METATILE_ID_MASK);
|
firstTileNum = (firstTileNum & 0xFC00) + ((firstTileNum + tileNumDelta) & 0x3FF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -212,13 +212,13 @@
|
|||||||
#define EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW 0x04
|
#define EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW 0x04
|
||||||
#define EXT_CTRL_CODE_PALETTE 0x05
|
#define EXT_CTRL_CODE_PALETTE 0x05
|
||||||
#define EXT_CTRL_CODE_FONT 0x06
|
#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 0x08
|
||||||
#define EXT_CTRL_CODE_PAUSE_UNTIL_PRESS 0x09
|
#define EXT_CTRL_CODE_PAUSE_UNTIL_PRESS 0x09
|
||||||
#define EXT_CTRL_CODE_WAIT_SE 0x0A
|
#define EXT_CTRL_CODE_WAIT_SE 0x0A
|
||||||
#define EXT_CTRL_CODE_PLAY_BGM 0x0B
|
#define EXT_CTRL_CODE_PLAY_BGM 0x0B
|
||||||
#define EXT_CTRL_CODE_ESCAPE 0x0C
|
#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_SHIFT_DOWN 0x0E
|
||||||
#define EXT_CTRL_CODE_FILL_WINDOW 0x0F
|
#define EXT_CTRL_CODE_FILL_WINDOW 0x0F
|
||||||
#define EXT_CTRL_CODE_PLAY_SE 0x10
|
#define EXT_CTRL_CODE_PLAY_SE 0x10
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ u8 *StringExpandPlaceholders(u8 *dest, const u8 *src)
|
|||||||
|
|
||||||
switch (c)
|
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_PAUSE_UNTIL_PRESS:
|
||||||
case EXT_CTRL_CODE_FILL_WINDOW:
|
case EXT_CTRL_CODE_FILL_WINDOW:
|
||||||
case EXT_CTRL_CODE_JPN:
|
case EXT_CTRL_CODE_JPN:
|
||||||
@@ -665,13 +665,13 @@ u8 GetExtCtrlCodeLength(u8 code)
|
|||||||
[EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW] = 4,
|
[EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW] = 4,
|
||||||
[EXT_CTRL_CODE_PALETTE] = 2,
|
[EXT_CTRL_CODE_PALETTE] = 2,
|
||||||
[EXT_CTRL_CODE_FONT] = 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] = 2,
|
||||||
[EXT_CTRL_CODE_PAUSE_UNTIL_PRESS] = 1,
|
[EXT_CTRL_CODE_PAUSE_UNTIL_PRESS] = 1,
|
||||||
[EXT_CTRL_CODE_WAIT_SE] = 1,
|
[EXT_CTRL_CODE_WAIT_SE] = 1,
|
||||||
[EXT_CTRL_CODE_PLAY_BGM] = 3,
|
[EXT_CTRL_CODE_PLAY_BGM] = 3,
|
||||||
[EXT_CTRL_CODE_ESCAPE] = 2,
|
[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_SHIFT_DOWN] = 2,
|
||||||
[EXT_CTRL_CODE_FILL_WINDOW] = 1,
|
[EXT_CTRL_CODE_FILL_WINDOW] = 1,
|
||||||
[EXT_CTRL_CODE_PLAY_SE] = 3,
|
[EXT_CTRL_CODE_PLAY_SE] = 3,
|
||||||
|
|||||||
@@ -1009,7 +1009,7 @@ static u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
subStruct->fontId = *textPrinter->printerTemplate.currentChar;
|
subStruct->fontId = *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
return RENDER_REPEAT;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_RESET_SIZE:
|
case EXT_CTRL_CODE_RESET_FONT:
|
||||||
return RENDER_REPEAT;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_PAUSE:
|
case EXT_CTRL_CODE_PAUSE:
|
||||||
textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar;
|
textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar;
|
||||||
@@ -1042,7 +1042,7 @@ static u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
PlaySE(currChar);
|
PlaySE(currChar);
|
||||||
return RENDER_REPEAT;
|
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.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
return RENDER_REPEAT;
|
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_FONT:
|
||||||
case EXT_CTRL_CODE_PAUSE:
|
case EXT_CTRL_CODE_PAUSE:
|
||||||
case EXT_CTRL_CODE_ESCAPE:
|
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_SHIFT_DOWN:
|
||||||
case EXT_CTRL_CODE_CLEAR:
|
case EXT_CTRL_CODE_CLEAR:
|
||||||
case EXT_CTRL_CODE_SKIP:
|
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:
|
case EXT_CTRL_CODE_MIN_LETTER_SPACING:
|
||||||
++strPos;
|
++strPos;
|
||||||
break;
|
break;
|
||||||
case EXT_CTRL_CODE_RESET_SIZE:
|
case EXT_CTRL_CODE_RESET_FONT:
|
||||||
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
||||||
case EXT_CTRL_CODE_WAIT_SE:
|
case EXT_CTRL_CODE_WAIT_SE:
|
||||||
case EXT_CTRL_CODE_FILL_WINDOW:
|
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_PALETTE:
|
||||||
case EXT_CTRL_CODE_PAUSE:
|
case EXT_CTRL_CODE_PAUSE:
|
||||||
case EXT_CTRL_CODE_ESCAPE:
|
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_SHIFT_DOWN:
|
||||||
++str;
|
++str;
|
||||||
break;
|
break;
|
||||||
@@ -1444,7 +1444,7 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
|||||||
case EXT_CTRL_CODE_ENG:
|
case EXT_CTRL_CODE_ENG:
|
||||||
isJapanese = 0;
|
isJapanese = 0;
|
||||||
break;
|
break;
|
||||||
case EXT_CTRL_CODE_RESET_SIZE:
|
case EXT_CTRL_CODE_RESET_FONT:
|
||||||
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
||||||
case EXT_CTRL_CODE_WAIT_SE:
|
case EXT_CTRL_CODE_WAIT_SE:
|
||||||
case EXT_CTRL_CODE_FILL_WINDOW:
|
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_PALETTE:
|
||||||
case EXT_CTRL_CODE_PAUSE:
|
case EXT_CTRL_CODE_PAUSE:
|
||||||
case EXT_CTRL_CODE_ESCAPE:
|
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_SHIFT_DOWN:
|
||||||
case EXT_CTRL_CODE_CLEAR:
|
case EXT_CTRL_CODE_CLEAR:
|
||||||
case EXT_CTRL_CODE_SKIP:
|
case EXT_CTRL_CODE_SKIP:
|
||||||
@@ -1564,7 +1564,7 @@ u8 RenderTextHandleBold(u8 *pixels, u8 fontId, u8 *str)
|
|||||||
case EXT_CTRL_CODE_MIN_LETTER_SPACING:
|
case EXT_CTRL_CODE_MIN_LETTER_SPACING:
|
||||||
++strPos;
|
++strPos;
|
||||||
break;
|
break;
|
||||||
case EXT_CTRL_CODE_RESET_SIZE:
|
case EXT_CTRL_CODE_RESET_FONT:
|
||||||
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
||||||
case EXT_CTRL_CODE_WAIT_SE:
|
case EXT_CTRL_CODE_WAIT_SE:
|
||||||
case EXT_CTRL_CODE_FILL_WINDOW:
|
case EXT_CTRL_CODE_FILL_WINDOW:
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 103 B After Width: | Height: | Size: 103 B |
|
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 167 B |
|
Before Width: | Height: | Size: 156 B After Width: | Height: | Size: 156 B |
@@ -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 |
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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 |
|
After Width: | Height: | Size: 490 B |
@@ -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
|
||||||
@@ -90,40 +90,6 @@ $(TILESETGFXDIR)/secondary/pacifidlog/tiles.4bpp: %.4bpp: %.png
|
|||||||
$(TILESETGFXDIR)/secondary/sootopolis/tiles.4bpp: %.4bpp: %.png
|
$(TILESETGFXDIR)/secondary/sootopolis/tiles.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -num_tiles 328 -Wnum_tiles
|
$(GFX) $< $@ -num_tiles 328 -Wnum_tiles
|
||||||
|
|
||||||
SOOTOPOLISANIMDIR := $(TILESETGFXDIR)/secondary/sootopolis/anim
|
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/0.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/0_kyogre.4bpp \
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/0_groudon.4bpp
|
|
||||||
@cat $^ >$@
|
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/1.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/1_kyogre.4bpp \
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/1_groudon.4bpp
|
|
||||||
@cat $^ >$@
|
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/2.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/2_kyogre.4bpp \
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/2_groudon.4bpp
|
|
||||||
@cat $^ >$@
|
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/3.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/3_kyogre.4bpp \
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/3_groudon.4bpp
|
|
||||||
@cat $^ >$@
|
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/4.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/4_kyogre.4bpp \
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/4_groudon.4bpp
|
|
||||||
@cat $^ >$@
|
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/5.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/5_kyogre.4bpp \
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/5_groudon.4bpp
|
|
||||||
@cat $^ >$@
|
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/6.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/6_kyogre.4bpp \
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/6_groudon.4bpp
|
|
||||||
@cat $^ >$@
|
|
||||||
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/7.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/7_kyogre.4bpp \
|
|
||||||
$(SOOTOPOLISANIMDIR)/stormy_water/7_groudon.4bpp
|
|
||||||
@cat $^ >$@
|
|
||||||
|
|
||||||
$(TILESETGFXDIR)/secondary/battle_frontier_outside_west/tiles.4bpp: %.4bpp: %.png
|
$(TILESETGFXDIR)/secondary/battle_frontier_outside_west/tiles.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -num_tiles 508 -Wnum_tiles
|
$(GFX) $< $@ -num_tiles 508 -Wnum_tiles
|
||||||
|
|
||||||
@@ -669,7 +635,7 @@ $(WALLPAPERGFXDIR)/whiscash/tiles.4bpp: $(WALLPAPERGFXDIR)/friends_frame2.4bpp $
|
|||||||
$(OBJEVENTGFXDIR)/pics/effects/unknown_4F6D38/0.4bpp: %.4bpp: %.png
|
$(OBJEVENTGFXDIR)/pics/effects/unknown_4F6D38/0.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -num_tiles 11 -Wnum_tiles
|
$(GFX) $< $@ -num_tiles 11 -Wnum_tiles
|
||||||
|
|
||||||
$(INTERFACEGFXDIR)/selector_outline.4bpp: %.4bpp: %.png
|
$(INTERFACEGFXDIR)/outline_cursor.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -num_tiles 8 -Wnum_tiles
|
$(GFX) $< $@ -num_tiles 8 -Wnum_tiles
|
||||||
|
|
||||||
$(BATTRANSGFXDIR)/frontier_logo_center.4bpp: %.4bpp: %.png
|
$(BATTRANSGFXDIR)/frontier_logo_center.4bpp: %.4bpp: %.png
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ struct WishFutureKnock
|
|||||||
u8 wishCounter[MAX_BATTLERS_COUNT];
|
u8 wishCounter[MAX_BATTLERS_COUNT];
|
||||||
u8 wishMonId[MAX_BATTLERS_COUNT];
|
u8 wishMonId[MAX_BATTLERS_COUNT];
|
||||||
u8 weatherDuration;
|
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_ThinkingStruct
|
struct AI_ThinkingStruct
|
||||||
@@ -326,9 +326,9 @@ struct BattleTv_Mon
|
|||||||
|
|
||||||
struct BattleTv
|
struct BattleTv
|
||||||
{
|
{
|
||||||
struct BattleTv_Mon mon[2][PARTY_SIZE]; // [side][partyId]
|
struct BattleTv_Mon mon[NUM_BATTLE_SIDES][PARTY_SIZE];
|
||||||
struct BattleTv_Position pos[2][2]; // [side][flank]
|
struct BattleTv_Position pos[NUM_BATTLE_SIDES][2]; // [side][flank]
|
||||||
struct BattleTv_Side side[2]; // [side]
|
struct BattleTv_Side side[NUM_BATTLE_SIDES];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BattleTvMovePoints
|
struct BattleTvMovePoints
|
||||||
@@ -399,7 +399,7 @@ struct BattleStruct
|
|||||||
u8 wallyWaitFrames;
|
u8 wallyWaitFrames;
|
||||||
u8 wallyMoveFrames;
|
u8 wallyMoveFrames;
|
||||||
u8 lastTakenMove[MAX_BATTLERS_COUNT * 2 * 2]; // Last move that a battler was hit with. This field seems to erroneously take 16 bytes instead of 8.
|
u8 lastTakenMove[MAX_BATTLERS_COUNT * 2 * 2]; // Last move that a battler was hit with. This field seems to erroneously take 16 bytes instead of 8.
|
||||||
u16 hpOnSwitchout[2];
|
u16 hpOnSwitchout[NUM_BATTLE_SIDES];
|
||||||
u32 savedBattleTypeFlags;
|
u32 savedBattleTypeFlags;
|
||||||
u8 abilityPreventingSwitchout;
|
u8 abilityPreventingSwitchout;
|
||||||
u8 hpScale;
|
u8 hpScale;
|
||||||
@@ -670,8 +670,8 @@ extern u8 gMoveResultFlags;
|
|||||||
extern u32 gHitMarker;
|
extern u32 gHitMarker;
|
||||||
extern u8 gTakenDmgByBattler[MAX_BATTLERS_COUNT];
|
extern u8 gTakenDmgByBattler[MAX_BATTLERS_COUNT];
|
||||||
extern u8 gUnusedFirstBattleVar2;
|
extern u8 gUnusedFirstBattleVar2;
|
||||||
extern u16 gSideStatuses[2];
|
extern u16 gSideStatuses[NUM_BATTLE_SIDES];
|
||||||
extern struct SideTimer gSideTimers[2];
|
extern struct SideTimer gSideTimers[NUM_BATTLE_SIDES];
|
||||||
extern u32 gStatuses3[MAX_BATTLERS_COUNT];
|
extern u32 gStatuses3[MAX_BATTLERS_COUNT];
|
||||||
extern struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT];
|
extern struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT];
|
||||||
extern u16 gPauseCounterBattle;
|
extern u16 gPauseCounterBattle;
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#define B_SIDE_PLAYER 0
|
#define B_SIDE_PLAYER 0
|
||||||
#define B_SIDE_OPPONENT 1
|
#define B_SIDE_OPPONENT 1
|
||||||
|
#define NUM_BATTLE_SIDES 2
|
||||||
|
|
||||||
#define B_FLANK_LEFT 0
|
#define B_FLANK_LEFT 0
|
||||||
#define B_FLANK_RIGHT 1
|
#define B_FLANK_RIGHT 1
|
||||||
|
|||||||
@@ -684,8 +684,6 @@
|
|||||||
#define METATILE_SecretBase_BigPlant_TopRight 0x2E6
|
#define METATILE_SecretBase_BigPlant_TopRight 0x2E6
|
||||||
#define METATILE_SecretBase_BigPlant_BaseLeft1 0x2EC
|
#define METATILE_SecretBase_BigPlant_BaseLeft1 0x2EC
|
||||||
#define METATILE_SecretBase_BigPlant_BaseRight1 0x2ED
|
#define METATILE_SecretBase_BigPlant_BaseRight1 0x2ED
|
||||||
#define METATILE_SecretBase_BigPlant_TopLeftWall 0x2E5
|
|
||||||
#define METATILE_SecretBase_BigPlant_TopRightWall 0x2E6
|
|
||||||
#define METATILE_SecretBase_BigPlant_BaseLeft2 0x2EE
|
#define METATILE_SecretBase_BigPlant_BaseLeft2 0x2EE
|
||||||
#define METATILE_SecretBase_BigPlant_BaseRight2 0x2EF
|
#define METATILE_SecretBase_BigPlant_BaseRight2 0x2EF
|
||||||
#define METATILE_SecretBase_GorgeousPlant_TopLeft 0x2F0
|
#define METATILE_SecretBase_GorgeousPlant_TopLeft 0x2F0
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
#define NUM_PALS_TOTAL 13
|
#define NUM_PALS_TOTAL 13
|
||||||
#define MAX_MAP_DATA_SIZE 10240
|
#define MAX_MAP_DATA_SIZE 10240
|
||||||
|
|
||||||
|
#define NUM_TILES_PER_METATILE 8
|
||||||
|
|
||||||
// Map coordinates are offset by 7 when using the map
|
// Map coordinates are offset by 7 when using the map
|
||||||
// buffer because it needs to load sufficient border
|
// buffer because it needs to load sufficient border
|
||||||
// metatiles to fill the player's view (the player has
|
// metatiles to fill the player's view (the player has
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
#define DebugPrintf(pBuf, ...)
|
#define DebugPrintf(pBuf, ...)
|
||||||
|
#define DebugPrintfLevel(level, pBuf, ...)
|
||||||
#define MgbaOpen()
|
#define MgbaOpen()
|
||||||
#define MgbaClose()
|
#define MgbaClose()
|
||||||
#define AGBPrintInit()
|
#define AGBPrintInit()
|
||||||
@@ -29,18 +30,21 @@ void AGBPrintInit(void);
|
|||||||
|
|
||||||
#if (LOG_HANDLER == LOG_HANDLER_MGBA_PRINT)
|
#if (LOG_HANDLER == LOG_HANDLER_MGBA_PRINT)
|
||||||
|
|
||||||
#define DebugPrintf(pBuf, ...) MgbaPrintf(MGBA_LOG_INFO, pBuf, __VA_ARGS__)
|
#define DebugPrintf(pBuf, ...) MgbaPrintf(MGBA_LOG_INFO, pBuf, ## __VA_ARGS__)
|
||||||
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) MgbaAssert(pFile, nLine, pExpression, nStopProgram)
|
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) MgbaAssert(pFile, nLine, pExpression, nStopProgram)
|
||||||
|
#define DebugPrintfLevel(level, pBuf, ...) MgbaPrintf(level, pBuf, ## __VA_ARGS__)
|
||||||
|
|
||||||
#elif (LOG_HANDLER == LOG_HANDLER_NOCASH_PRINT)
|
#elif (LOG_HANDLER == LOG_HANDLER_NOCASH_PRINT)
|
||||||
|
|
||||||
#define DebugPrintf(pBuf, ...) NoCashGBAPrintf(pBuf, __VA_ARGS__)
|
#define DebugPrintf(pBuf, ...) NoCashGBAPrintf(pBuf, ## __VA_ARGS__)
|
||||||
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) NoCashGBAAssert(pFile, nLine, pExpression, nStopProgram)
|
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) NoCashGBAAssert(pFile, nLine, pExpression, nStopProgram)
|
||||||
|
#define DebugPrintfLevel(level, pBuf, ...) NoCashGBAPrintf(pBuf, ## __VA_ARGS__)
|
||||||
|
|
||||||
#else // Default to AGBPrint
|
#else // Default to AGBPrint
|
||||||
|
|
||||||
#define DebugPrintf(pBuf, ...) AGBPrintf(const char *pBuf, ...)
|
#define DebugPrintf(pBuf, ...) AGBPrintf(pBuf, ## __VA_ARGS__)
|
||||||
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) AGBAssert(pFile, nLine, pExpression, nStopProgram)
|
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) AGBAssert(pFile, nLine, pExpression, nStopProgram)
|
||||||
|
#define DebugPrintfLevel(level, pBuf, ...) AGBPrintf(pBuf, ## __VA_ARGS__)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ struct MultiBootParam
|
|||||||
{
|
{
|
||||||
u32 system_work[5]; // 00
|
u32 system_work[5]; // 00
|
||||||
u8 handshake_data; // 14
|
u8 handshake_data; // 14
|
||||||
u8 padding; // 15
|
//u8 padding; // 15
|
||||||
u16 handshake_timeout; // 16
|
u16 handshake_timeout; // 16
|
||||||
u8 probe_count; // 18
|
u8 probe_count; // 18
|
||||||
u8 client_data[MULTIBOOT_NCHILD]; // 19
|
u8 client_data[MULTIBOOT_NCHILD]; // 19
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ struct Berry2
|
|||||||
u8 bitter;
|
u8 bitter;
|
||||||
u8 sour;
|
u8 sour;
|
||||||
u8 smoothness;
|
u8 smoothness;
|
||||||
|
//u8 padding;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct EnigmaBerry
|
struct EnigmaBerry
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ struct Tileset
|
|||||||
/*0x01*/ bool8 isSecondary;
|
/*0x01*/ bool8 isSecondary;
|
||||||
/*0x04*/ const u32 *tiles;
|
/*0x04*/ const u32 *tiles;
|
||||||
/*0x08*/ const u16 (*palettes)[16];
|
/*0x08*/ const u16 (*palettes)[16];
|
||||||
/*0x0c*/ const u16 *metatiles;
|
/*0x0C*/ const u16 *metatiles;
|
||||||
/*0x10*/ const u16 *metatileAttributes;
|
/*0x10*/ const u16 *metatileAttributes;
|
||||||
/*0x14*/ TilesetCB callback;
|
/*0x14*/ TilesetCB callback;
|
||||||
};
|
};
|
||||||
@@ -51,7 +51,7 @@ struct MapLayout
|
|||||||
/*0x00*/ s32 width;
|
/*0x00*/ s32 width;
|
||||||
/*0x04*/ s32 height;
|
/*0x04*/ s32 height;
|
||||||
/*0x08*/ u16 *border;
|
/*0x08*/ u16 *border;
|
||||||
/*0x0c*/ u16 *map;
|
/*0x0C*/ u16 *map;
|
||||||
/*0x10*/ struct Tileset *primaryTileset;
|
/*0x10*/ struct Tileset *primaryTileset;
|
||||||
/*0x14*/ struct Tileset *secondaryTileset;
|
/*0x14*/ struct Tileset *secondaryTileset;
|
||||||
};
|
};
|
||||||
@@ -68,16 +68,19 @@ struct ObjectEventTemplate
|
|||||||
/*0x00*/ u8 localId;
|
/*0x00*/ u8 localId;
|
||||||
/*0x01*/ u8 graphicsId;
|
/*0x01*/ u8 graphicsId;
|
||||||
/*0x02*/ u8 inConnection; // Leftover from FRLG
|
/*0x02*/ u8 inConnection; // Leftover from FRLG
|
||||||
|
/*0x03*/ //u8 padding1;
|
||||||
/*0x04*/ s16 x;
|
/*0x04*/ s16 x;
|
||||||
/*0x06*/ s16 y;
|
/*0x06*/ s16 y;
|
||||||
/*0x08*/ u8 elevation;
|
/*0x08*/ u8 elevation;
|
||||||
/*0x09*/ u8 movementType;
|
/*0x09*/ u8 movementType;
|
||||||
/*0x0A*/ u16 movementRangeX:4;
|
/*0x0A*/ u16 movementRangeX:4;
|
||||||
u16 movementRangeY:4;
|
u16 movementRangeY:4;
|
||||||
|
//u16 padding2:8;
|
||||||
/*0x0C*/ u16 trainerType;
|
/*0x0C*/ u16 trainerType;
|
||||||
/*0x0E*/ u16 trainerRange_berryTreeId;
|
/*0x0E*/ u16 trainerRange_berryTreeId;
|
||||||
/*0x10*/ const u8 *script;
|
/*0x10*/ const u8 *script;
|
||||||
/*0x14*/ u16 flagId;
|
/*0x14*/ u16 flagId;
|
||||||
|
/*0x16*/ //u8 padding3[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct WarpEvent
|
struct WarpEvent
|
||||||
@@ -192,6 +195,7 @@ struct ObjectEvent
|
|||||||
u32 disableJumpLandingGroundEffect:1;
|
u32 disableJumpLandingGroundEffect:1;
|
||||||
u32 fixedPriority:1;
|
u32 fixedPriority:1;
|
||||||
u32 hideReflection:1;
|
u32 hideReflection:1;
|
||||||
|
//u32 padding:4;
|
||||||
/*0x04*/ u8 spriteId;
|
/*0x04*/ u8 spriteId;
|
||||||
/*0x05*/ u8 graphicsId;
|
/*0x05*/ u8 graphicsId;
|
||||||
/*0x06*/ u8 movementType;
|
/*0x06*/ u8 movementType;
|
||||||
@@ -217,6 +221,7 @@ struct ObjectEvent
|
|||||||
/*0x20*/ u8 previousMovementDirection;
|
/*0x20*/ u8 previousMovementDirection;
|
||||||
/*0x21*/ u8 directionSequenceIndex;
|
/*0x21*/ u8 directionSequenceIndex;
|
||||||
/*0x22*/ u8 playerCopyableMovement; // COPY_MOVE_*
|
/*0x22*/ u8 playerCopyableMovement; // COPY_MOVE_*
|
||||||
|
/*0x23*/ //u8 padding2;
|
||||||
/*size = 0x24*/
|
/*size = 0x24*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -246,9 +246,11 @@ struct ApprenticeMon
|
|||||||
struct Apprentice
|
struct Apprentice
|
||||||
{
|
{
|
||||||
u8 id:5;
|
u8 id:5;
|
||||||
u8 lvlMode:2; // + 1
|
u8 lvlMode:2;
|
||||||
|
//u8 padding1:1;
|
||||||
u8 numQuestions;
|
u8 numQuestions;
|
||||||
u8 number;
|
u8 number;
|
||||||
|
//u8 padding2;
|
||||||
struct ApprenticeMon party[MULTI_PARTY_SIZE];
|
struct ApprenticeMon party[MULTI_PARTY_SIZE];
|
||||||
u16 speechWon[EASY_CHAT_BATTLE_WORDS_COUNT];
|
u16 speechWon[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||||
u8 playerId[TRAINER_ID_LENGTH];
|
u8 playerId[TRAINER_ID_LENGTH];
|
||||||
@@ -296,6 +298,7 @@ struct EmeraldBattleTowerRecord
|
|||||||
/*0x28*/ u16 speechLost[EASY_CHAT_BATTLE_WORDS_COUNT];
|
/*0x28*/ u16 speechLost[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||||
/*0x34*/ struct BattleTowerPokemon party[MAX_FRONTIER_PARTY_SIZE];
|
/*0x34*/ struct BattleTowerPokemon party[MAX_FRONTIER_PARTY_SIZE];
|
||||||
/*0xE4*/ u8 language;
|
/*0xE4*/ u8 language;
|
||||||
|
/*0xE7*/ //u8 padding[3];
|
||||||
/*0xE8*/ u32 checksum;
|
/*0xE8*/ u32 checksum;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -328,14 +331,17 @@ struct DomeMonData
|
|||||||
u16 moves[MAX_MON_MOVES];
|
u16 moves[MAX_MON_MOVES];
|
||||||
u8 evs[NUM_STATS];
|
u8 evs[NUM_STATS];
|
||||||
u8 nature;
|
u8 nature;
|
||||||
|
//u8 padding;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RentalMon
|
struct RentalMon
|
||||||
{
|
{
|
||||||
u16 monId;
|
u16 monId;
|
||||||
|
//u8 padding1[2];
|
||||||
u32 personality;
|
u32 personality;
|
||||||
u8 ivs;
|
u8 ivs;
|
||||||
u8 abilityNum;
|
u8 abilityNum;
|
||||||
|
//u8 padding2[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BattleDomeTrainer
|
struct BattleDomeTrainer
|
||||||
@@ -357,8 +363,9 @@ struct BattleFrontier
|
|||||||
/*0xBEC*/ struct BattleTowerEReaderTrainer ereaderTrainer;
|
/*0xBEC*/ struct BattleTowerEReaderTrainer ereaderTrainer;
|
||||||
/*0xCA8*/ u8 challengeStatus;
|
/*0xCA8*/ u8 challengeStatus;
|
||||||
/*0xCA9*/ u8 lvlMode:2;
|
/*0xCA9*/ u8 lvlMode:2;
|
||||||
/*0xCA9*/ u8 challengePaused:1;
|
u8 challengePaused:1;
|
||||||
/*0xCA9*/ u8 disableRecordBattle:1;
|
u8 disableRecordBattle:1;
|
||||||
|
//u8 padding1:4;
|
||||||
/*0xCAA*/ u16 selectedPartyMons[MAX_FRONTIER_PARTY_SIZE];
|
/*0xCAA*/ u16 selectedPartyMons[MAX_FRONTIER_PARTY_SIZE];
|
||||||
/*0xCB2*/ u16 curChallengeBattleNum; // Battle number / room number (Pike) / floor number (Pyramid)
|
/*0xCB2*/ u16 curChallengeBattleNum; // Battle number / room number (Pike) / floor number (Pyramid)
|
||||||
/*0xCB4*/ u16 trainerIds[20];
|
/*0xCB4*/ u16 trainerIds[20];
|
||||||
@@ -402,16 +409,19 @@ struct BattleFrontier
|
|||||||
/*0xE08*/ u16 pikeRecordStreaks[FRONTIER_LVL_MODE_COUNT];
|
/*0xE08*/ u16 pikeRecordStreaks[FRONTIER_LVL_MODE_COUNT];
|
||||||
/*0xE0C*/ u16 pikeTotalStreaks[FRONTIER_LVL_MODE_COUNT];
|
/*0xE0C*/ u16 pikeTotalStreaks[FRONTIER_LVL_MODE_COUNT];
|
||||||
/*0xE10*/ u8 pikeHintedRoomIndex:3;
|
/*0xE10*/ u8 pikeHintedRoomIndex:3;
|
||||||
/*0xE10*/ u8 pikeHintedRoomType:4;
|
u8 pikeHintedRoomType:4;
|
||||||
/*0xE10*/ u8 pikeHealingRoomsDisabled:1;
|
u8 pikeHealingRoomsDisabled:1;
|
||||||
|
/*0xE11*/ //u8 padding2;
|
||||||
/*0xE12*/ u16 pikeHeldItemsBackup[FRONTIER_PARTY_SIZE];
|
/*0xE12*/ u16 pikeHeldItemsBackup[FRONTIER_PARTY_SIZE];
|
||||||
/*0xE18*/ u16 pyramidPrize;
|
/*0xE18*/ u16 pyramidPrize;
|
||||||
/*0xE1A*/ u16 pyramidWinStreaks[FRONTIER_LVL_MODE_COUNT];
|
/*0xE1A*/ u16 pyramidWinStreaks[FRONTIER_LVL_MODE_COUNT];
|
||||||
/*0xE1E*/ u16 pyramidRecordStreaks[FRONTIER_LVL_MODE_COUNT];
|
/*0xE1E*/ u16 pyramidRecordStreaks[FRONTIER_LVL_MODE_COUNT];
|
||||||
/*0xE22*/ u16 pyramidRandoms[4];
|
/*0xE22*/ u16 pyramidRandoms[4];
|
||||||
/*0xE2A*/ u8 pyramidTrainerFlags; // 1 bit for each trainer (MAX_PYRAMID_TRAINERS)
|
/*0xE2A*/ u8 pyramidTrainerFlags; // 1 bit for each trainer (MAX_PYRAMID_TRAINERS)
|
||||||
|
/*0xE2B*/ //u8 padding3;
|
||||||
/*0xE2C*/ struct PyramidBag pyramidBag;
|
/*0xE2C*/ struct PyramidBag pyramidBag;
|
||||||
/*0xE68*/ u8 pyramidLightRadius;
|
/*0xE68*/ u8 pyramidLightRadius;
|
||||||
|
/*0xE69*/ //u8 padding4;
|
||||||
/*0xE6A*/ u16 verdanturfTentPrize;
|
/*0xE6A*/ u16 verdanturfTentPrize;
|
||||||
/*0xE6C*/ u16 fallarborTentPrize;
|
/*0xE6C*/ u16 fallarborTentPrize;
|
||||||
/*0xE6E*/ u16 slateportTentPrize;
|
/*0xE6E*/ u16 slateportTentPrize;
|
||||||
@@ -436,6 +446,7 @@ struct ApprenticeQuestion
|
|||||||
u8 monId:2;
|
u8 monId:2;
|
||||||
u8 moveSlot:2;
|
u8 moveSlot:2;
|
||||||
u8 suggestedChange:2; // TRUE if told to use held item or second move, FALSE if told to use no item or first move
|
u8 suggestedChange:2; // TRUE if told to use held item or second move, FALSE if told to use no item or first move
|
||||||
|
//u8 padding;
|
||||||
u16 data; // used both as an itemId and a moveId
|
u16 data; // used both as an itemId and a moveId
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -446,9 +457,11 @@ struct PlayersApprentice
|
|||||||
/*0xB1*/ u8 questionsAnswered:4;
|
/*0xB1*/ u8 questionsAnswered:4;
|
||||||
/*0xB1*/ u8 leadMonId:2;
|
/*0xB1*/ u8 leadMonId:2;
|
||||||
/*0xB2*/ u8 party:3;
|
/*0xB2*/ u8 party:3;
|
||||||
/*0xB2*/ u8 saveId:2;
|
u8 saveId:2;
|
||||||
|
//u8 padding1:3;
|
||||||
/*0xB3*/ u8 unused;
|
/*0xB3*/ u8 unused;
|
||||||
/*0xB4*/ u8 speciesIds[MULTI_PARTY_SIZE];
|
/*0xB4*/ u8 speciesIds[MULTI_PARTY_SIZE];
|
||||||
|
/*0xB7*/ //u8 padding2;
|
||||||
/*0xB8*/ struct ApprenticeQuestion questions[APPRENTICE_MAX_QUESTIONS];
|
/*0xB8*/ struct ApprenticeQuestion questions[APPRENTICE_MAX_QUESTIONS];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -458,6 +471,7 @@ struct RankingHall1P
|
|||||||
u16 winStreak;
|
u16 winStreak;
|
||||||
u8 name[PLAYER_NAME_LENGTH + 1];
|
u8 name[PLAYER_NAME_LENGTH + 1];
|
||||||
u8 language;
|
u8 language;
|
||||||
|
//u8 padding;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RankingHall2P
|
struct RankingHall2P
|
||||||
@@ -468,6 +482,7 @@ struct RankingHall2P
|
|||||||
u8 name1[PLAYER_NAME_LENGTH + 1];
|
u8 name1[PLAYER_NAME_LENGTH + 1];
|
||||||
u8 name2[PLAYER_NAME_LENGTH + 1];
|
u8 name2[PLAYER_NAME_LENGTH + 1];
|
||||||
u8 language;
|
u8 language;
|
||||||
|
//u8 padding;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SaveBlock2
|
struct SaveBlock2
|
||||||
@@ -487,6 +502,8 @@ struct SaveBlock2
|
|||||||
u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET]
|
u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET]
|
||||||
u16 optionsBattleSceneOff:1; // whether battle animations are disabled
|
u16 optionsBattleSceneOff:1; // whether battle animations are disabled
|
||||||
u16 regionMapZoom:1; // whether the map is zoomed in
|
u16 regionMapZoom:1; // whether the map is zoomed in
|
||||||
|
//u16 padding1:4;
|
||||||
|
//u16 padding2;
|
||||||
/*0x18*/ struct Pokedex pokedex;
|
/*0x18*/ struct Pokedex pokedex;
|
||||||
/*0x90*/ u8 filler_90[0x8];
|
/*0x90*/ u8 filler_90[0x8];
|
||||||
/*0x98*/ struct Time localTimeOffset;
|
/*0x98*/ struct Time localTimeOffset;
|
||||||
@@ -531,6 +548,7 @@ struct SecretBase
|
|||||||
/*0x1AAD*/ u8 unused;
|
/*0x1AAD*/ u8 unused;
|
||||||
/*0x1AAE*/ u8 decorations[DECOR_MAX_SECRET_BASE];
|
/*0x1AAE*/ u8 decorations[DECOR_MAX_SECRET_BASE];
|
||||||
/*0x1ABE*/ u8 decorationPositions[DECOR_MAX_SECRET_BASE];
|
/*0x1ABE*/ u8 decorationPositions[DECOR_MAX_SECRET_BASE];
|
||||||
|
/*0x1ACE*/ //u8 padding[2];
|
||||||
/*0x1AD0*/ struct SecretBaseParty party;
|
/*0x1AD0*/ struct SecretBaseParty party;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -545,6 +563,7 @@ struct WarpData
|
|||||||
s8 mapGroup;
|
s8 mapGroup;
|
||||||
s8 mapNum;
|
s8 mapNum;
|
||||||
s8 warpId;
|
s8 warpId;
|
||||||
|
//u8 padding;
|
||||||
s16 x, y;
|
s16 x, y;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -589,6 +608,7 @@ struct RamScriptData
|
|||||||
u8 mapNum;
|
u8 mapNum;
|
||||||
u8 objectId;
|
u8 objectId;
|
||||||
u8 script[995];
|
u8 script[995];
|
||||||
|
//u8 padding;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RamScript
|
struct RamScript
|
||||||
@@ -603,6 +623,7 @@ struct DewfordTrend
|
|||||||
u16 trendiness:7;
|
u16 trendiness:7;
|
||||||
u16 maxTrendiness:7;
|
u16 maxTrendiness:7;
|
||||||
u16 gainingTrendiness:1;
|
u16 gainingTrendiness:1;
|
||||||
|
//u16 padding:1;
|
||||||
u16 rand;
|
u16 rand;
|
||||||
u16 words[2];
|
u16 words[2];
|
||||||
}; /*size = 0x8*/
|
}; /*size = 0x8*/
|
||||||
@@ -615,6 +636,7 @@ struct MauvilleManCommon
|
|||||||
struct MauvilleManBard
|
struct MauvilleManBard
|
||||||
{
|
{
|
||||||
/*0x00*/ u8 id;
|
/*0x00*/ u8 id;
|
||||||
|
/*0x01*/ //u8 padding1;
|
||||||
/*0x02*/ u16 songLyrics[BARD_SONG_LENGTH];
|
/*0x02*/ u16 songLyrics[BARD_SONG_LENGTH];
|
||||||
/*0x0E*/ u16 temporaryLyrics[BARD_SONG_LENGTH];
|
/*0x0E*/ u16 temporaryLyrics[BARD_SONG_LENGTH];
|
||||||
/*0x1A*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x1A*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
@@ -622,6 +644,7 @@ struct MauvilleManBard
|
|||||||
/*0x25*/ u8 playerTrainerId[TRAINER_ID_LENGTH];
|
/*0x25*/ u8 playerTrainerId[TRAINER_ID_LENGTH];
|
||||||
/*0x29*/ bool8 hasChangedSong;
|
/*0x29*/ bool8 hasChangedSong;
|
||||||
/*0x2A*/ u8 language;
|
/*0x2A*/ u8 language;
|
||||||
|
/*0x2B*/ //u8 padding2;
|
||||||
}; /*size = 0x2C*/
|
}; /*size = 0x2C*/
|
||||||
|
|
||||||
struct MauvilleManStoryteller
|
struct MauvilleManStoryteller
|
||||||
@@ -640,9 +663,11 @@ struct MauvilleManGiddy
|
|||||||
/*0x00*/ u8 id;
|
/*0x00*/ u8 id;
|
||||||
/*0x01*/ u8 taleCounter;
|
/*0x01*/ u8 taleCounter;
|
||||||
/*0x02*/ u8 questionNum;
|
/*0x02*/ u8 questionNum;
|
||||||
|
/*0x03*/ //u8 padding1;
|
||||||
/*0x04*/ u16 randomWords[GIDDY_MAX_TALES];
|
/*0x04*/ u16 randomWords[GIDDY_MAX_TALES];
|
||||||
/*0x18*/ u8 questionList[GIDDY_MAX_QUESTIONS];
|
/*0x18*/ u8 questionList[GIDDY_MAX_QUESTIONS];
|
||||||
/*0x20*/ u8 language;
|
/*0x20*/ u8 language;
|
||||||
|
/*0x21*/ //u8 padding2;
|
||||||
}; /*size = 0x2C*/
|
}; /*size = 0x2C*/
|
||||||
|
|
||||||
struct MauvilleManHipster
|
struct MauvilleManHipster
|
||||||
@@ -687,6 +712,7 @@ struct LinkBattleRecords
|
|||||||
{
|
{
|
||||||
struct LinkBattleRecord entries[LINK_B_RECORDS_COUNT];
|
struct LinkBattleRecord entries[LINK_B_RECORDS_COUNT];
|
||||||
u8 languages[LINK_B_RECORDS_COUNT];
|
u8 languages[LINK_B_RECORDS_COUNT];
|
||||||
|
//u8 padding;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RecordMixingGiftData
|
struct RecordMixingGiftData
|
||||||
@@ -712,6 +738,7 @@ struct ContestWinner
|
|||||||
u8 monName[POKEMON_NAME_LENGTH + 1];
|
u8 monName[POKEMON_NAME_LENGTH + 1];
|
||||||
u8 trainerName[PLAYER_NAME_LENGTH + 1];
|
u8 trainerName[PLAYER_NAME_LENGTH + 1];
|
||||||
u8 contestRank;
|
u8 contestRank;
|
||||||
|
//u8 padding;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Mail
|
struct Mail
|
||||||
@@ -744,6 +771,7 @@ struct DayCare
|
|||||||
struct DaycareMon mons[DAYCARE_MON_COUNT];
|
struct DaycareMon mons[DAYCARE_MON_COUNT];
|
||||||
u32 offspringPersonality;
|
u32 offspringPersonality;
|
||||||
u8 stepCounter;
|
u8 stepCounter;
|
||||||
|
//u8 padding[3];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LilycoveLadyQuiz
|
struct LilycoveLadyQuiz
|
||||||
@@ -756,10 +784,10 @@ struct LilycoveLadyQuiz
|
|||||||
/*0x018*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x018*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x020*/ u16 playerTrainerId[TRAINER_ID_LENGTH];
|
/*0x020*/ u16 playerTrainerId[TRAINER_ID_LENGTH];
|
||||||
/*0x028*/ u16 prize;
|
/*0x028*/ u16 prize;
|
||||||
/*0x02a*/ bool8 waitingForChallenger;
|
/*0x02A*/ bool8 waitingForChallenger;
|
||||||
/*0x02b*/ u8 questionId;
|
/*0x02B*/ u8 questionId;
|
||||||
/*0x02c*/ u8 prevQuestionId;
|
/*0x02C*/ u8 prevQuestionId;
|
||||||
/*0x02d*/ u8 language;
|
/*0x02D*/ u8 language;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LilycoveLadyFavor
|
struct LilycoveLadyFavor
|
||||||
@@ -769,10 +797,12 @@ struct LilycoveLadyFavor
|
|||||||
/*0x002*/ bool8 likedItem;
|
/*0x002*/ bool8 likedItem;
|
||||||
/*0x003*/ u8 numItemsGiven;
|
/*0x003*/ u8 numItemsGiven;
|
||||||
/*0x004*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x004*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x00c*/ u8 favorId;
|
/*0x00C*/ u8 favorId;
|
||||||
/*0x00e*/ u16 itemId;
|
/*0x00D*/ //u8 padding1;
|
||||||
|
/*0x00E*/ u16 itemId;
|
||||||
/*0x010*/ u16 bestItem;
|
/*0x010*/ u16 bestItem;
|
||||||
/*0x012*/ u8 language;
|
/*0x012*/ u8 language;
|
||||||
|
/*0x013*/ //u8 padding2;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LilycoveLadyContest
|
struct LilycoveLadyContest
|
||||||
@@ -782,9 +812,9 @@ struct LilycoveLadyContest
|
|||||||
/*0x002*/ u8 numGoodPokeblocksGiven;
|
/*0x002*/ u8 numGoodPokeblocksGiven;
|
||||||
/*0x003*/ u8 numOtherPokeblocksGiven;
|
/*0x003*/ u8 numOtherPokeblocksGiven;
|
||||||
/*0x004*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x004*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x00c*/ u8 maxSheen;
|
/*0x00C*/ u8 maxSheen;
|
||||||
/*0x00d*/ u8 category;
|
/*0x00D*/ u8 category;
|
||||||
/*0x00e*/ u8 language;
|
/*0x00E*/ u8 language;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef union // 3b58
|
typedef union // 3b58
|
||||||
@@ -793,7 +823,7 @@ typedef union // 3b58
|
|||||||
struct LilycoveLadyFavor favor;
|
struct LilycoveLadyFavor favor;
|
||||||
struct LilycoveLadyContest contest;
|
struct LilycoveLadyContest contest;
|
||||||
u8 id;
|
u8 id;
|
||||||
u8 pad[0x40];
|
u8 filler[0x40];
|
||||||
} LilycoveLady;
|
} LilycoveLady;
|
||||||
|
|
||||||
struct WaldaPhrase
|
struct WaldaPhrase
|
||||||
@@ -803,6 +833,7 @@ struct WaldaPhrase
|
|||||||
u8 iconId;
|
u8 iconId;
|
||||||
u8 patternId;
|
u8 patternId;
|
||||||
bool8 patternUnlocked;
|
bool8 patternUnlocked;
|
||||||
|
//u8 padding;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrainerNameRecord
|
struct TrainerNameRecord
|
||||||
@@ -818,12 +849,13 @@ struct TrainerHillSave
|
|||||||
/*0x3D6C*/ u8 unk_3D6C;
|
/*0x3D6C*/ u8 unk_3D6C;
|
||||||
/*0x3D6D*/ u8 unused;
|
/*0x3D6D*/ u8 unused;
|
||||||
/*0x3D6E*/ u16 receivedPrize:1;
|
/*0x3D6E*/ u16 receivedPrize:1;
|
||||||
/*0x3D6E*/ u16 checkedFinalTime:1;
|
u16 checkedFinalTime:1;
|
||||||
/*0x3D6E*/ u16 spokeToOwner:1;
|
u16 spokeToOwner:1;
|
||||||
/*0x3D6E*/ u16 hasLost:1;
|
u16 hasLost:1;
|
||||||
/*0x3D6E*/ u16 maybeECardScanDuringChallenge:1;
|
u16 maybeECardScanDuringChallenge:1;
|
||||||
/*0x3D6E*/ u16 field_3D6E_0f:1;
|
u16 field_3D6E_0f:1;
|
||||||
/*0x3D6E*/ u16 mode:2; // HILL_MODE_*
|
u16 mode:2; // HILL_MODE_*
|
||||||
|
//u16 padding:8;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct WonderNewsMetadata
|
struct WonderNewsMetadata
|
||||||
@@ -832,6 +864,7 @@ struct WonderNewsMetadata
|
|||||||
u8 sentRewardCounter:3;
|
u8 sentRewardCounter:3;
|
||||||
u8 rewardCounter:3;
|
u8 rewardCounter:3;
|
||||||
u8 berry;
|
u8 berry;
|
||||||
|
//u8 padding[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct WonderNews
|
struct WonderNews
|
||||||
@@ -857,6 +890,7 @@ struct WonderCard
|
|||||||
u8 bodyText[WONDER_CARD_BODY_TEXT_LINES][WONDER_CARD_TEXT_LENGTH];
|
u8 bodyText[WONDER_CARD_BODY_TEXT_LINES][WONDER_CARD_TEXT_LENGTH];
|
||||||
u8 footerLine1Text[WONDER_CARD_TEXT_LENGTH];
|
u8 footerLine1Text[WONDER_CARD_TEXT_LENGTH];
|
||||||
u8 footerLine2Text[WONDER_CARD_TEXT_LENGTH];
|
u8 footerLine2Text[WONDER_CARD_TEXT_LENGTH];
|
||||||
|
//u8 padding[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct WonderCardMetadata
|
struct WonderCardMetadata
|
||||||
@@ -903,7 +937,7 @@ struct ExternalEventFlags
|
|||||||
{
|
{
|
||||||
u8 usedBoxRS:1; // Set by Pokémon Box: Ruby & Sapphire; denotes whether this save has connected to it and triggered the free False Swipe Swablu Egg giveaway.
|
u8 usedBoxRS:1; // Set by Pokémon Box: Ruby & Sapphire; denotes whether this save has connected to it and triggered the free False Swipe Swablu Egg giveaway.
|
||||||
u8 boxRSEggsUnlocked:2; // Set by Pokémon Box: Ruby & Sapphire; denotes the number of Eggs unlocked from deposits; 1 for ExtremeSpeed Zigzagoon (at 100 deposited), 2 for Pay Day Skitty (at 500 deposited), 3 for Surf Pichu (at 1499 deposited)
|
u8 boxRSEggsUnlocked:2; // Set by Pokémon Box: Ruby & Sapphire; denotes the number of Eggs unlocked from deposits; 1 for ExtremeSpeed Zigzagoon (at 100 deposited), 2 for Pay Day Skitty (at 500 deposited), 3 for Surf Pichu (at 1499 deposited)
|
||||||
u8 padding:5;
|
//u8 padding:5;
|
||||||
u8 unknownFlag1;
|
u8 unknownFlag1;
|
||||||
u8 receivedGCNJirachi; // Both the US Colosseum Bonus Disc and PAL/AUS Pokémon Channel use this field. One cannot receive a WISHMKR Jirachi and CHANNEL Jirachi with the same savefile.
|
u8 receivedGCNJirachi; // Both the US Colosseum Bonus Disc and PAL/AUS Pokémon Channel use this field. One cannot receive a WISHMKR Jirachi and CHANNEL Jirachi with the same savefile.
|
||||||
u8 unknownFlag3;
|
u8 unknownFlag3;
|
||||||
@@ -939,9 +973,11 @@ struct SaveBlock1
|
|||||||
/*0x2E*/ u8 weather;
|
/*0x2E*/ u8 weather;
|
||||||
/*0x2F*/ u8 weatherCycleStage;
|
/*0x2F*/ u8 weatherCycleStage;
|
||||||
/*0x30*/ u8 flashLevel;
|
/*0x30*/ u8 flashLevel;
|
||||||
|
/*0x31*/ //u8 padding1;
|
||||||
/*0x32*/ u16 mapLayoutId;
|
/*0x32*/ u16 mapLayoutId;
|
||||||
/*0x34*/ u16 mapView[0x100];
|
/*0x34*/ u16 mapView[0x100];
|
||||||
/*0x234*/ u8 playerPartyCount;
|
/*0x234*/ u8 playerPartyCount;
|
||||||
|
/*0x235*/ //u8 padding2[3];
|
||||||
/*0x238*/ struct Pokemon playerParty[PARTY_SIZE];
|
/*0x238*/ struct Pokemon playerParty[PARTY_SIZE];
|
||||||
/*0x490*/ u32 money;
|
/*0x490*/ u32 money;
|
||||||
/*0x494*/ u16 coins;
|
/*0x494*/ u16 coins;
|
||||||
@@ -958,6 +994,7 @@ struct SaveBlock1
|
|||||||
/*0x9C2*/ u8 unused_9C2[6];
|
/*0x9C2*/ u8 unused_9C2[6];
|
||||||
/*0x9C8*/ u16 trainerRematchStepCounter;
|
/*0x9C8*/ u16 trainerRematchStepCounter;
|
||||||
/*0x9CA*/ u8 trainerRematches[MAX_REMATCH_ENTRIES];
|
/*0x9CA*/ u8 trainerRematches[MAX_REMATCH_ENTRIES];
|
||||||
|
/*0xA2E*/ //u8 padding3[2];
|
||||||
/*0xA30*/ struct ObjectEvent objectEvents[OBJECT_EVENTS_COUNT];
|
/*0xA30*/ struct ObjectEvent objectEvents[OBJECT_EVENTS_COUNT];
|
||||||
/*0xC70*/ struct ObjectEventTemplate objectEventTemplates[OBJECT_EVENT_TEMPLATES_COUNT];
|
/*0xC70*/ struct ObjectEventTemplate objectEventTemplates[OBJECT_EVENT_TEMPLATES_COUNT];
|
||||||
/*0x1270*/ u8 flags[NUM_FLAG_BYTES];
|
/*0x1270*/ u8 flags[NUM_FLAG_BYTES];
|
||||||
@@ -975,6 +1012,7 @@ struct SaveBlock1
|
|||||||
/*0x278E*/ u8 decorationPosters[10];
|
/*0x278E*/ u8 decorationPosters[10];
|
||||||
/*0x2798*/ u8 decorationDolls[40];
|
/*0x2798*/ u8 decorationDolls[40];
|
||||||
/*0x27C0*/ u8 decorationCushions[10];
|
/*0x27C0*/ u8 decorationCushions[10];
|
||||||
|
/*0x27CA*/ //u8 padding4[2];
|
||||||
/*0x27CC*/ TVShow tvShows[TV_SHOWS_COUNT];
|
/*0x27CC*/ TVShow tvShows[TV_SHOWS_COUNT];
|
||||||
/*0x2B50*/ PokeNews pokeNews[POKE_NEWS_COUNT];
|
/*0x2B50*/ PokeNews pokeNews[POKE_NEWS_COUNT];
|
||||||
/*0x2B90*/ u16 outbreakPokemonSpecies;
|
/*0x2B90*/ u16 outbreakPokemonSpecies;
|
||||||
@@ -994,6 +1032,7 @@ struct SaveBlock1
|
|||||||
/*0x2BD4*/ u16 easyChatBattleLost[EASY_CHAT_BATTLE_WORDS_COUNT];
|
/*0x2BD4*/ u16 easyChatBattleLost[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||||
/*0x2BE0*/ struct Mail mail[MAIL_COUNT];
|
/*0x2BE0*/ struct Mail mail[MAIL_COUNT];
|
||||||
/*0x2E20*/ u8 additionalPhrases[NUM_ADDITIONAL_PHRASE_BYTES]; // bitfield for 33 additional phrases in easy chat system
|
/*0x2E20*/ u8 additionalPhrases[NUM_ADDITIONAL_PHRASE_BYTES]; // bitfield for 33 additional phrases in easy chat system
|
||||||
|
/*0x2E25*/ //u8 padding5[3];
|
||||||
/*0x2E28*/ OldMan oldMan;
|
/*0x2E28*/ OldMan oldMan;
|
||||||
/*0x2e64*/ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT];
|
/*0x2e64*/ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT];
|
||||||
/*0x2e90*/ struct ContestWinner contestWinners[NUM_CONTEST_WINNERS]; // see CONTEST_WINNER_*
|
/*0x2e90*/ struct ContestWinner contestWinners[NUM_CONTEST_WINNERS]; // see CONTEST_WINNER_*
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ typedef union // size = 0x24
|
|||||||
/*0x04*/ u16 words[6];
|
/*0x04*/ u16 words[6];
|
||||||
/*0x10*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x10*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x18*/ u8 language;
|
/*0x18*/ u8 language;
|
||||||
|
/*0x19*/ //u8 padding;
|
||||||
} fanclubLetter;
|
} fanclubLetter;
|
||||||
|
|
||||||
// TVSHOW_RECENT_HAPPENINGS
|
// TVSHOW_RECENT_HAPPENINGS
|
||||||
@@ -46,6 +47,7 @@ typedef union // size = 0x24
|
|||||||
/*0x04*/ u16 words[6];
|
/*0x04*/ u16 words[6];
|
||||||
/*0x10*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x10*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x18*/ u8 language;
|
/*0x18*/ u8 language;
|
||||||
|
/*0x19*/ //u8 padding;
|
||||||
} recentHappenings;
|
} recentHappenings;
|
||||||
|
|
||||||
// TVSHOW_PKMN_FAN_CLUB_OPINIONS
|
// TVSHOW_PKMN_FAN_CLUB_OPINIONS
|
||||||
@@ -54,7 +56,7 @@ typedef union // size = 0x24
|
|||||||
/*0x01*/ bool8 active;
|
/*0x01*/ bool8 active;
|
||||||
/*0x02*/ u16 species;
|
/*0x02*/ u16 species;
|
||||||
/*0x04*/ u8 friendshipHighNybble:4;
|
/*0x04*/ u8 friendshipHighNybble:4;
|
||||||
/*0x04*/ u8 questionAsked:4;
|
u8 questionAsked:4;
|
||||||
/*0x05*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x05*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x0D*/ u8 language;
|
/*0x0D*/ u8 language;
|
||||||
/*0x0E*/ u8 pokemonNameLanguage;
|
/*0x0E*/ u8 pokemonNameLanguage;
|
||||||
@@ -70,8 +72,8 @@ typedef union // size = 0x24
|
|||||||
/*0x01*/ bool8 active;
|
/*0x01*/ bool8 active;
|
||||||
/*0x02*/ u16 words[2];
|
/*0x02*/ u16 words[2];
|
||||||
/*0x06*/ u16 species;
|
/*0x06*/ u16 species;
|
||||||
/*0x08*/ u8 pad_08[3];
|
/*0x08*/ u8 filler_08[3];
|
||||||
/*0x0b*/ u8 name[12];
|
/*0x0B*/ u8 name[12];
|
||||||
/*0x17*/ u8 language;
|
/*0x17*/ u8 language;
|
||||||
} dummy;
|
} dummy;
|
||||||
|
|
||||||
@@ -98,8 +100,9 @@ typedef union // size = 0x24
|
|||||||
/*0x04*/ u16 words[2];
|
/*0x04*/ u16 words[2];
|
||||||
/*0x08*/ u8 pokemonNickname[POKEMON_NAME_LENGTH + 1];
|
/*0x08*/ u8 pokemonNickname[POKEMON_NAME_LENGTH + 1];
|
||||||
/*0x13*/ u8 contestCategory:3;
|
/*0x13*/ u8 contestCategory:3;
|
||||||
/*0x13*/ u8 contestRank:2;
|
u8 contestRank:2;
|
||||||
/*0x13*/ u8 contestResult:2;
|
u8 contestResult:2;
|
||||||
|
//u8 padding:1;
|
||||||
/*0x14*/ u16 move;
|
/*0x14*/ u16 move;
|
||||||
/*0x16*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x16*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x1E*/ u8 language;
|
/*0x1E*/ u8 language;
|
||||||
@@ -121,6 +124,7 @@ typedef union // size = 0x24
|
|||||||
/*0x1C*/ bool8 wonTheChallenge;
|
/*0x1C*/ bool8 wonTheChallenge;
|
||||||
/*0x1D*/ u8 language;
|
/*0x1D*/ u8 language;
|
||||||
/*0x1E*/ u8 pokemonNameLanguage;
|
/*0x1E*/ u8 pokemonNameLanguage;
|
||||||
|
/*0x1F*/ //u8 padding;
|
||||||
} bravoTrainerTower;
|
} bravoTrainerTower;
|
||||||
|
|
||||||
// TVSHOW_CONTEST_LIVE_UPDATES
|
// TVSHOW_CONTEST_LIVE_UPDATES
|
||||||
@@ -131,14 +135,15 @@ typedef union // size = 0x24
|
|||||||
/*0x04*/ u8 losingTrainerName[PLAYER_NAME_LENGTH + 1];
|
/*0x04*/ u8 losingTrainerName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x0C*/ u8 loserAppealFlag;
|
/*0x0C*/ u8 loserAppealFlag;
|
||||||
/*0x0D*/ u8 round1Placing;
|
/*0x0D*/ u8 round1Placing;
|
||||||
/*0x0e*/ u8 round2Placing;
|
/*0x0E*/ u8 round2Placing;
|
||||||
/*0x0f*/ u8 winnerAppealFlag;
|
/*0x0F*/ u8 winnerAppealFlag;
|
||||||
/*0x10*/ u16 move;
|
/*0x10*/ u16 move;
|
||||||
/*0x12*/ u16 winningSpecies;
|
/*0x12*/ u16 winningSpecies;
|
||||||
/*0x14*/ u8 winningTrainerName[PLAYER_NAME_LENGTH + 1];
|
/*0x14*/ u8 winningTrainerName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x1C*/ u8 category;
|
/*0x1C*/ u8 category;
|
||||||
/*0x1D*/ u8 winningTrainerLanguage;
|
/*0x1D*/ u8 winningTrainerLanguage;
|
||||||
/*0x1E*/ u8 losingTrainerLanguage;
|
/*0x1E*/ u8 losingTrainerLanguage;
|
||||||
|
/*0x1F*/ //u8 padding;
|
||||||
} contestLiveUpdates;
|
} contestLiveUpdates;
|
||||||
|
|
||||||
// TVSHOW_3_CHEERS_FOR_POKEBLOCKS
|
// TVSHOW_3_CHEERS_FOR_POKEBLOCKS
|
||||||
@@ -147,7 +152,8 @@ typedef union // size = 0x24
|
|||||||
/*0x01*/ bool8 active;
|
/*0x01*/ bool8 active;
|
||||||
/*0x02*/ u8 sheen;
|
/*0x02*/ u8 sheen;
|
||||||
/*0x03*/ u8 flavor:3;
|
/*0x03*/ u8 flavor:3;
|
||||||
/*0x03*/ u8 color:2;
|
u8 color:2;
|
||||||
|
//u8 padding:3;
|
||||||
/*0x04*/ u8 worstBlenderName[PLAYER_NAME_LENGTH + 1];
|
/*0x04*/ u8 worstBlenderName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x0C*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x0C*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x14*/ u8 language;
|
/*0x14*/ u8 language;
|
||||||
@@ -166,6 +172,7 @@ typedef union // size = 0x24
|
|||||||
/*0x18*/ u8 battleType;
|
/*0x18*/ u8 battleType;
|
||||||
/*0x19*/ u8 language;
|
/*0x19*/ u8 language;
|
||||||
/*0x1A*/ u8 linkOpponentLanguage;
|
/*0x1A*/ u8 linkOpponentLanguage;
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} battleUpdate;
|
} battleUpdate;
|
||||||
|
|
||||||
// TVSHOW_FAN_CLUB_SPECIAL
|
// TVSHOW_FAN_CLUB_SPECIAL
|
||||||
@@ -173,13 +180,14 @@ typedef union // size = 0x24
|
|||||||
/*0x00*/ u8 kind;
|
/*0x00*/ u8 kind;
|
||||||
/*0x01*/ bool8 active;
|
/*0x01*/ bool8 active;
|
||||||
/*0x02*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x02*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x0a*/ u8 idLo;
|
/*0x0A*/ u8 idLo;
|
||||||
/*0x0b*/ u8 idHi;
|
/*0x0B*/ u8 idHi;
|
||||||
/*0x0c*/ u8 idolName[PLAYER_NAME_LENGTH + 1];
|
/*0x0C*/ u8 idolName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x14*/ u16 words[1];
|
/*0x14*/ u16 words[1];
|
||||||
/*0x16*/ u8 score;
|
/*0x16*/ u8 score;
|
||||||
/*0x17*/ u8 language;
|
/*0x17*/ u8 language;
|
||||||
/*0x18*/ u8 idolNameLanguage;
|
/*0x18*/ u8 idolNameLanguage;
|
||||||
|
/*0x19*/ //u8 padding;
|
||||||
} fanClubSpecial;
|
} fanClubSpecial;
|
||||||
|
|
||||||
// TVSHOW_LILYCOVE_CONTEST_LADY
|
// TVSHOW_LILYCOVE_CONTEST_LADY
|
||||||
@@ -187,8 +195,8 @@ typedef union // size = 0x24
|
|||||||
/*0x00*/ u8 kind;
|
/*0x00*/ u8 kind;
|
||||||
/*0x01*/ bool8 active;
|
/*0x01*/ bool8 active;
|
||||||
/*0x02*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x02*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x0a*/ u8 contestCategory;
|
/*0x0A*/ u8 contestCategory;
|
||||||
/*0x0b*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
|
/*0x0B*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
|
||||||
/*0x16*/ u8 pokeblockState;
|
/*0x16*/ u8 pokeblockState;
|
||||||
/*0x17*/ u8 language;
|
/*0x17*/ u8 language;
|
||||||
/*0x18*/ u8 pokemonNameLanguage;
|
/*0x18*/ u8 pokemonNameLanguage;
|
||||||
@@ -206,6 +214,7 @@ typedef union // size = 0x24
|
|||||||
/*0x10*/ u16 species;
|
/*0x10*/ u16 species;
|
||||||
/*0x12*/ u8 nBallsUsed;
|
/*0x12*/ u8 nBallsUsed;
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} pokemonToday;
|
} pokemonToday;
|
||||||
|
|
||||||
// TVSHOW_SMART_SHOPPER
|
// TVSHOW_SMART_SHOPPER
|
||||||
@@ -214,11 +223,12 @@ typedef union // size = 0x24
|
|||||||
/*0x01*/ bool8 active;
|
/*0x01*/ bool8 active;
|
||||||
/*0x02*/ u8 priceReduced;
|
/*0x02*/ u8 priceReduced;
|
||||||
/*0x03*/ u8 language;
|
/*0x03*/ u8 language;
|
||||||
/*0x04*/ u8 pad04[2];
|
/*0x04*/ u8 filler_04[2];
|
||||||
/*0x06*/ u16 itemIds[SMARTSHOPPER_NUM_ITEMS];
|
/*0x06*/ u16 itemIds[SMARTSHOPPER_NUM_ITEMS];
|
||||||
/*0x0C*/ u16 itemAmounts[SMARTSHOPPER_NUM_ITEMS];
|
/*0x0C*/ u16 itemAmounts[SMARTSHOPPER_NUM_ITEMS];
|
||||||
/*0x12*/ u8 shopLocation;
|
/*0x12*/ u8 shopLocation;
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} smartshopperShow;
|
} smartshopperShow;
|
||||||
|
|
||||||
// TVSHOW_POKEMON_TODAY_FAILED
|
// TVSHOW_POKEMON_TODAY_FAILED
|
||||||
@@ -226,13 +236,14 @@ typedef union // size = 0x24
|
|||||||
/*0x00*/ u8 kind;
|
/*0x00*/ u8 kind;
|
||||||
/*0x01*/ bool8 active;
|
/*0x01*/ bool8 active;
|
||||||
/*0x02*/ u8 language;
|
/*0x02*/ u8 language;
|
||||||
/*0x03*/ u8 pad03[9];
|
/*0x03*/ u8 filler_03[9];
|
||||||
/*0x0c*/ u16 species;
|
/*0x0C*/ u16 species;
|
||||||
/*0x0e*/ u16 species2;
|
/*0x0E*/ u16 species2;
|
||||||
/*0x10*/ u8 nBallsUsed;
|
/*0x10*/ u8 nBallsUsed;
|
||||||
/*0x11*/ u8 outcome;
|
/*0x11*/ u8 outcome;
|
||||||
/*0x12*/ u8 location;
|
/*0x12*/ u8 location;
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} pokemonTodayFailed;
|
} pokemonTodayFailed;
|
||||||
|
|
||||||
// TVSHOW_FISHING_ADVICE
|
// TVSHOW_FISHING_ADVICE
|
||||||
@@ -243,8 +254,9 @@ typedef union // size = 0x24
|
|||||||
/*0x03*/ u8 nFails;
|
/*0x03*/ u8 nFails;
|
||||||
/*0x04*/ u16 species;
|
/*0x04*/ u16 species;
|
||||||
/*0x06*/ u8 language;
|
/*0x06*/ u8 language;
|
||||||
/*0x07*/ u8 pad07[12];
|
/*0x07*/ u8 filler_07[12];
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} pokemonAngler;
|
} pokemonAngler;
|
||||||
|
|
||||||
// TVSHOW_WORLD_OF_MASTERS
|
// TVSHOW_WORLD_OF_MASTERS
|
||||||
@@ -255,10 +267,11 @@ typedef union // size = 0x24
|
|||||||
/*0x04*/ u16 caughtPoke;
|
/*0x04*/ u16 caughtPoke;
|
||||||
/*0x06*/ u16 steps;
|
/*0x06*/ u16 steps;
|
||||||
/*0x08*/ u16 species;
|
/*0x08*/ u16 species;
|
||||||
/*0x0a*/ u8 location;
|
/*0x0A*/ u8 location;
|
||||||
/*0x0b*/ u8 language;
|
/*0x0B*/ u8 language;
|
||||||
/*0x0c*/ u8 pad0c[7];
|
/*0x0C*/ u8 filler_0C[7];
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding2;
|
||||||
} worldOfMasters;
|
} worldOfMasters;
|
||||||
|
|
||||||
// TVSHOW_TODAYS_RIVAL_TRAINER
|
// TVSHOW_TODAYS_RIVAL_TRAINER
|
||||||
@@ -271,10 +284,11 @@ typedef union // size = 0x24
|
|||||||
/*0x06*/ u8 nGoldSymbols;
|
/*0x06*/ u8 nGoldSymbols;
|
||||||
/*0x07*/ u8 location;
|
/*0x07*/ u8 location;
|
||||||
/*0x08*/ u16 battlePoints;
|
/*0x08*/ u16 battlePoints;
|
||||||
/*0x0a*/ u16 mapLayoutId;
|
/*0x0A*/ u16 mapLayoutId;
|
||||||
/*0x0c*/ u8 language;
|
/*0x0C*/ u8 language;
|
||||||
/*0x0d*/ u8 filler_0d[6];
|
/*0x0D*/ u8 filler_0D[6];
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding2;
|
||||||
} rivalTrainer;
|
} rivalTrainer;
|
||||||
|
|
||||||
// TVSHOW_TREND_WATCHER
|
// TVSHOW_TREND_WATCHER
|
||||||
@@ -285,8 +299,9 @@ typedef union // size = 0x24
|
|||||||
/*0x04*/ u16 words[2];
|
/*0x04*/ u16 words[2];
|
||||||
/*0x08*/ u8 gender;
|
/*0x08*/ u8 gender;
|
||||||
/*0x09*/ u8 language;
|
/*0x09*/ u8 language;
|
||||||
/*0x0a*/ u8 filler_0a[9];
|
/*0x0A*/ u8 filler_0a[9];
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} trendWatcher;
|
} trendWatcher;
|
||||||
|
|
||||||
// TVSHOW_TREASURE_INVESTIGATORS
|
// TVSHOW_TREASURE_INVESTIGATORS
|
||||||
@@ -299,6 +314,7 @@ typedef union // size = 0x24
|
|||||||
/*0x06*/ u16 mapLayoutId;
|
/*0x06*/ u16 mapLayoutId;
|
||||||
/*0x08*/ u8 filler_08[11];
|
/*0x08*/ u8 filler_08[11];
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} treasureInvestigators;
|
} treasureInvestigators;
|
||||||
|
|
||||||
// TVSHOW_FIND_THAT_GAMER
|
// TVSHOW_FIND_THAT_GAMER
|
||||||
@@ -312,6 +328,7 @@ typedef union // size = 0x24
|
|||||||
/*0x08*/ u8 language;
|
/*0x08*/ u8 language;
|
||||||
/*0x09*/ u8 filler_09[10];
|
/*0x09*/ u8 filler_09[10];
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} findThatGamer;
|
} findThatGamer;
|
||||||
|
|
||||||
// TVSHOW_BREAKING_NEWS
|
// TVSHOW_BREAKING_NEWS
|
||||||
@@ -323,11 +340,12 @@ typedef union // size = 0x24
|
|||||||
/*0x05*/ u8 outcome;
|
/*0x05*/ u8 outcome;
|
||||||
/*0x06*/ u16 caughtMonBall;
|
/*0x06*/ u16 caughtMonBall;
|
||||||
/*0x08*/ u16 balls;
|
/*0x08*/ u16 balls;
|
||||||
/*0x0a*/ u16 poke1Species;
|
/*0x0A*/ u16 poke1Species;
|
||||||
/*0x0c*/ u16 lastUsedMove;
|
/*0x0C*/ u16 lastUsedMove;
|
||||||
/*0x0e*/ u8 language;
|
/*0x0E*/ u8 language;
|
||||||
/*0x0f*/ u8 filler_0f[4];
|
/*0x0F*/ u8 filler_0f[4];
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} breakingNews;
|
} breakingNews;
|
||||||
|
|
||||||
// TVSHOW_SECRET_BASE_VISIT
|
// TVSHOW_SECRET_BASE_VISIT
|
||||||
@@ -338,10 +356,11 @@ typedef union // size = 0x24
|
|||||||
/*0x03*/ u8 numDecorations;
|
/*0x03*/ u8 numDecorations;
|
||||||
/*0x04*/ u8 decorations[4];
|
/*0x04*/ u8 decorations[4];
|
||||||
/*0x08*/ u16 species;
|
/*0x08*/ u16 species;
|
||||||
/*0x0a*/ u16 move;
|
/*0x0A*/ u16 move;
|
||||||
/*0x0c*/ u8 language;
|
/*0x0C*/ u8 language;
|
||||||
/*0x0d*/ u8 filler_0d[6];
|
/*0x0D*/ u8 filler_0d[6];
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} secretBaseVisit;
|
} secretBaseVisit;
|
||||||
|
|
||||||
// TVSHOW_LOTTO_WINNER
|
// TVSHOW_LOTTO_WINNER
|
||||||
@@ -353,6 +372,7 @@ typedef union // size = 0x24
|
|||||||
/*0x05*/ u8 language;
|
/*0x05*/ u8 language;
|
||||||
/*0x06*/ u8 filler_06[13];
|
/*0x06*/ u8 filler_06[13];
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} lottoWinner;
|
} lottoWinner;
|
||||||
|
|
||||||
// TVSHOW_BATTLE_SEMINAR
|
// TVSHOW_BATTLE_SEMINAR
|
||||||
@@ -363,11 +383,12 @@ typedef union // size = 0x24
|
|||||||
/*0x04*/ u16 foeSpecies;
|
/*0x04*/ u16 foeSpecies;
|
||||||
/*0x06*/ u16 species;
|
/*0x06*/ u16 species;
|
||||||
/*0x08*/ u16 otherMoves[3];
|
/*0x08*/ u16 otherMoves[3];
|
||||||
/*0x0e*/ u16 betterMove;
|
/*0x0E*/ u16 betterMove;
|
||||||
/*0x10*/ u8 nOtherMoves;
|
/*0x10*/ u8 nOtherMoves;
|
||||||
/*0x11*/ u8 language;
|
/*0x11*/ u8 language;
|
||||||
/*0x12*/ u8 filler_12[1];
|
/*0x12*/ u8 filler_12[1];
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} battleSeminar;
|
} battleSeminar;
|
||||||
|
|
||||||
// TVSHOW_TRAINER_FAN_CLUB
|
// TVSHOW_TRAINER_FAN_CLUB
|
||||||
@@ -379,6 +400,7 @@ typedef union // size = 0x24
|
|||||||
/*0x08*/ u8 language;
|
/*0x08*/ u8 language;
|
||||||
/*0x09*/ u8 filler_09[10];
|
/*0x09*/ u8 filler_09[10];
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} trainerFanClub;
|
} trainerFanClub;
|
||||||
|
|
||||||
// TVSHOW_CUTIES
|
// TVSHOW_CUTIES
|
||||||
@@ -388,7 +410,7 @@ typedef union // size = 0x24
|
|||||||
/*0x02*/ u8 nRibbons;
|
/*0x02*/ u8 nRibbons;
|
||||||
/*0x03*/ u8 selectedRibbon;
|
/*0x03*/ u8 selectedRibbon;
|
||||||
/*0x04*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
|
/*0x04*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
|
||||||
/*0x0f*/ u8 language;
|
/*0x0F*/ u8 language;
|
||||||
/*0x10*/ u8 pokemonNameLanguage;
|
/*0x10*/ u8 pokemonNameLanguage;
|
||||||
/*0x11*/ u8 filler_12[2];
|
/*0x11*/ u8 filler_12[2];
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
@@ -402,11 +424,12 @@ typedef union // size = 0x24
|
|||||||
/*0x04*/ u16 species1;
|
/*0x04*/ u16 species1;
|
||||||
/*0x06*/ u16 species2;
|
/*0x06*/ u16 species2;
|
||||||
/*0x08*/ u16 species3;
|
/*0x08*/ u16 species3;
|
||||||
/*0x0a*/ u16 species4;
|
/*0x0A*/ u16 species4;
|
||||||
/*0x0c*/ u8 language;
|
/*0x0C*/ u8 language;
|
||||||
/*0x0d*/ u8 facilityAndMode;
|
/*0x0D*/ u8 facilityAndMode;
|
||||||
/*0x0e*/ u8 filler_0e[5];
|
/*0x0E*/ u8 filler_0e[5];
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} frontier;
|
} frontier;
|
||||||
|
|
||||||
// TVSHOW_NUMBER_ONE
|
// TVSHOW_NUMBER_ONE
|
||||||
@@ -418,6 +441,7 @@ typedef union // size = 0x24
|
|||||||
/*0x05*/ u8 language;
|
/*0x05*/ u8 language;
|
||||||
/*0x06*/ u8 filler_06[13];
|
/*0x06*/ u8 filler_06[13];
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
|
/*0x1B*/ //u8 padding;
|
||||||
} numberOne;
|
} numberOne;
|
||||||
|
|
||||||
// TVSHOW_SECRET_BASE_SECRETS
|
// TVSHOW_SECRET_BASE_SECRETS
|
||||||
@@ -426,12 +450,13 @@ typedef union // size = 0x24
|
|||||||
/*0x01*/ bool8 active;
|
/*0x01*/ bool8 active;
|
||||||
/*0x02*/ u16 stepsInBase;
|
/*0x02*/ u16 stepsInBase;
|
||||||
/*0x04*/ u8 baseOwnersName[PLAYER_NAME_LENGTH + 1];
|
/*0x04*/ u8 baseOwnersName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x0c*/ u32 flags;
|
/*0x0C*/ u32 flags;
|
||||||
/*0x10*/ u16 item;
|
/*0x10*/ u16 item;
|
||||||
/*0x12*/ u8 savedState;
|
/*0x12*/ u8 savedState;
|
||||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||||
/*0x1b*/ u8 language;
|
/*0x1B*/ u8 language;
|
||||||
/*0x1c*/ u8 baseOwnersNameLanguage;
|
/*0x1C*/ u8 baseOwnersNameLanguage;
|
||||||
|
/*0x1D*/ //u8 padding[3];
|
||||||
} secretBaseSecrets;
|
} secretBaseSecrets;
|
||||||
|
|
||||||
// TVSHOW_SAFARI_FAN_CLUB
|
// TVSHOW_SAFARI_FAN_CLUB
|
||||||
@@ -463,6 +488,7 @@ typedef union // size = 0x24
|
|||||||
/*0x15*/ u8 unused5;
|
/*0x15*/ u8 unused5;
|
||||||
/*0x16*/ u16 daysLeft;
|
/*0x16*/ u16 daysLeft;
|
||||||
/*0x18*/ u8 language;
|
/*0x18*/ u8 language;
|
||||||
|
/*0x19*/ //u8 padding;
|
||||||
} massOutbreak;
|
} massOutbreak;
|
||||||
} TVShow;
|
} TVShow;
|
||||||
|
|
||||||
@@ -475,23 +501,23 @@ typedef struct
|
|||||||
|
|
||||||
struct GabbyAndTyData
|
struct GabbyAndTyData
|
||||||
{
|
{
|
||||||
/*2ba4*/ u16 mon1;
|
/*2BA4*/ u16 mon1;
|
||||||
/*2ba6*/ u16 mon2;
|
/*2BA6*/ u16 mon2;
|
||||||
/*2ba8*/ u16 lastMove;
|
/*2BA8*/ u16 lastMove;
|
||||||
/*2baa*/ u16 quote[1];
|
/*2BAA*/ u16 quote[1];
|
||||||
/*2bac*/ u8 mapnum;
|
/*2BAC*/ u8 mapnum;
|
||||||
/*2bad*/ u8 battleNum;
|
/*2BAD*/ u8 battleNum;
|
||||||
/*2bae*/ u8 battleTookMoreThanOneTurn:1;
|
/*2BAE*/ u8 battleTookMoreThanOneTurn:1;
|
||||||
/*2bae*/ u8 playerLostAMon:1;
|
u8 playerLostAMon:1;
|
||||||
/*2bae*/ u8 playerUsedHealingItem:1;
|
u8 playerUsedHealingItem:1;
|
||||||
/*2bae*/ u8 playerThrewABall:1;
|
u8 playerThrewABall:1;
|
||||||
/*2bae*/ u8 onAir:1;
|
u8 onAir:1;
|
||||||
/*2bae*/ u8 valA_5:3;
|
u8 valA_5:3;
|
||||||
/*2baf*/ u8 battleTookMoreThanOneTurn2:1;
|
/*2BAF*/ u8 battleTookMoreThanOneTurn2:1;
|
||||||
/*2baf*/ u8 playerLostAMon2:1;
|
u8 playerLostAMon2:1;
|
||||||
/*2baf*/ u8 playerUsedHealingItem2:1;
|
u8 playerUsedHealingItem2:1;
|
||||||
/*2baf*/ u8 playerThrewABall2:1;
|
u8 playerThrewABall2:1;
|
||||||
/*2baf*/ u8 valB_4:4;
|
u8 valB_4:4;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //GUARD_GLOBAL_TV_H
|
#endif //GUARD_GLOBAL_TV_H
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ struct __attribute__((packed, aligned(2))) RfuGameData
|
|||||||
u8 startedActivity:1;
|
u8 startedActivity:1;
|
||||||
u8 playerGender:1;
|
u8 playerGender:1;
|
||||||
u8 tradeLevel:7;
|
u8 tradeLevel:7;
|
||||||
u8 padding;
|
u8 filler;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Constants for getting/setting information in 'partnerInfo' of RfuGameData.
|
// Constants for getting/setting information in 'partnerInfo' of RfuGameData.
|
||||||
|
|||||||
@@ -7,12 +7,20 @@
|
|||||||
#define LIST_CANCEL -2
|
#define LIST_CANCEL -2
|
||||||
#define LIST_HEADER -3
|
#define LIST_HEADER -3
|
||||||
|
|
||||||
#define LIST_NO_MULTIPLE_SCROLL 0
|
enum {
|
||||||
#define LIST_MULTIPLE_SCROLL_DPAD 1
|
LIST_NO_MULTIPLE_SCROLL,
|
||||||
#define LIST_MULTIPLE_SCROLL_L_R 2
|
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_LEFT,
|
||||||
SCROLL_ARROW_RIGHT,
|
SCROLL_ARROW_RIGHT,
|
||||||
SCROLL_ARROW_UP,
|
SCROLL_ARROW_UP,
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ struct BattlePokemon
|
|||||||
/*0x54*/ u32 otId;
|
/*0x54*/ u32 otId;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BaseStats
|
struct SpeciesInfo
|
||||||
{
|
{
|
||||||
/* 0x00 */ u8 baseHP;
|
/* 0x00 */ u8 baseHP;
|
||||||
/* 0x01 */ u8 baseAttack;
|
/* 0x01 */ u8 baseAttack;
|
||||||
@@ -374,7 +374,7 @@ extern struct SpriteTemplate gMultiuseSpriteTemplate;
|
|||||||
extern const struct BattleMove gBattleMoves[];
|
extern const struct BattleMove gBattleMoves[];
|
||||||
extern const u8 gFacilityClassToPicIndex[];
|
extern const u8 gFacilityClassToPicIndex[];
|
||||||
extern const u8 gFacilityClassToTrainerClass[];
|
extern const u8 gFacilityClassToTrainerClass[];
|
||||||
extern const struct BaseStats gBaseStats[];
|
extern const struct SpeciesInfo gSpeciesInfo[];
|
||||||
extern const u8 *const gItemEffectTable[];
|
extern const u8 *const gItemEffectTable[];
|
||||||
extern const u32 gExperienceTables[][MAX_LEVEL + 1];
|
extern const u32 gExperienceTables[][MAX_LEVEL + 1];
|
||||||
extern const u16 *const gLevelUpLearnsets[];
|
extern const u16 *const gLevelUpLearnsets[];
|
||||||
|
|||||||
@@ -1379,24 +1379,24 @@ static void Cmd_get_ability(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE)
|
if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE)
|
||||||
{
|
{
|
||||||
if (gBaseStats[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE)
|
if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE)
|
||||||
{
|
{
|
||||||
// AI has no knowledge of opponent, so it guesses which ability.
|
// AI has no knowledge of opponent, so it guesses which ability.
|
||||||
if (Random() & 1)
|
if (Random() & 1)
|
||||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[0];
|
AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[0];
|
||||||
else
|
else
|
||||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[1];
|
AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[1];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[0]; // It's definitely ability 1.
|
AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[0]; // It's definitely ability 1.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[1]; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1.
|
AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[1]; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1427,15 +1427,15 @@ static void Cmd_check_ability(void)
|
|||||||
{
|
{
|
||||||
ability = gBattleMons[battlerId].ability;
|
ability = gBattleMons[battlerId].ability;
|
||||||
}
|
}
|
||||||
else if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE)
|
else if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE)
|
||||||
{
|
{
|
||||||
if (gBaseStats[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE)
|
if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE)
|
||||||
{
|
{
|
||||||
u8 abilityDummyVariable = ability; // Needed to match.
|
u8 abilityDummyVariable = ability; // Needed to match.
|
||||||
if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != abilityDummyVariable
|
if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[0] != abilityDummyVariable
|
||||||
&& gBaseStats[gBattleMons[battlerId].species].abilities[1] != abilityDummyVariable)
|
&& gSpeciesInfo[gBattleMons[battlerId].species].abilities[1] != abilityDummyVariable)
|
||||||
{
|
{
|
||||||
ability = gBaseStats[gBattleMons[battlerId].species].abilities[0];
|
ability = gSpeciesInfo[gBattleMons[battlerId].species].abilities[0];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1444,12 +1444,12 @@ static void Cmd_check_ability(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ability = gBaseStats[gBattleMons[battlerId].species].abilities[0];
|
ability = gSpeciesInfo[gBattleMons[battlerId].species].abilities[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ability = gBaseStats[gBattleMons[battlerId].species].abilities[1]; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1.
|
ability = gSpeciesInfo[gBattleMons[battlerId].species].abilities[1]; // AI can't actually reach this part since no pokemon has ability 2 and no ability 1.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -199,9 +199,9 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
|
|||||||
|
|
||||||
species = GetMonData(&party[i], MON_DATA_SPECIES);
|
species = GetMonData(&party[i], MON_DATA_SPECIES);
|
||||||
if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0)
|
if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0)
|
||||||
monAbility = gBaseStats[species].abilities[1];
|
monAbility = gSpeciesInfo[species].abilities[1];
|
||||||
else
|
else
|
||||||
monAbility = gBaseStats[species].abilities[0];
|
monAbility = gSpeciesInfo[species].abilities[0];
|
||||||
|
|
||||||
if (absorbingTypeAbility == monAbility && Random() & 1)
|
if (absorbingTypeAbility == monAbility && Random() & 1)
|
||||||
{
|
{
|
||||||
@@ -397,9 +397,9 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent)
|
|||||||
|
|
||||||
species = GetMonData(&party[i], MON_DATA_SPECIES);
|
species = GetMonData(&party[i], MON_DATA_SPECIES);
|
||||||
if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0)
|
if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0)
|
||||||
monAbility = gBaseStats[species].abilities[1];
|
monAbility = gSpeciesInfo[species].abilities[1];
|
||||||
else
|
else
|
||||||
monAbility = gBaseStats[species].abilities[0];
|
monAbility = gSpeciesInfo[species].abilities[0];
|
||||||
|
|
||||||
moveFlags = AI_TypeCalc(gLastLandedMoves[gActiveBattler], species, monAbility);
|
moveFlags = AI_TypeCalc(gLastLandedMoves[gActiveBattler], species, monAbility);
|
||||||
if (moveFlags & flags)
|
if (moveFlags & flags)
|
||||||
@@ -703,8 +703,8 @@ u8 GetMostSuitableMonToSwitchInto(void)
|
|||||||
&& i != *(gBattleStruct->monToSwitchIntoId + battlerIn1)
|
&& i != *(gBattleStruct->monToSwitchIntoId + battlerIn1)
|
||||||
&& i != *(gBattleStruct->monToSwitchIntoId + battlerIn2))
|
&& i != *(gBattleStruct->monToSwitchIntoId + battlerIn2))
|
||||||
{
|
{
|
||||||
u8 type1 = gBaseStats[species].type1;
|
u8 type1 = gSpeciesInfo[species].type1;
|
||||||
u8 type2 = gBaseStats[species].type2;
|
u8 type2 = gSpeciesInfo[species].type2;
|
||||||
u8 typeDmg = TYPE_MUL_NORMAL;
|
u8 typeDmg = TYPE_MUL_NORMAL;
|
||||||
ModulateByTypeEffectiveness(gBattleMons[opposingBattler].type1, type1, type2, &typeDmg);
|
ModulateByTypeEffectiveness(gBattleMons[opposingBattler].type1, type1, type2, &typeDmg);
|
||||||
ModulateByTypeEffectiveness(gBattleMons[opposingBattler].type2, type1, type2, &typeDmg);
|
ModulateByTypeEffectiveness(gBattleMons[opposingBattler].type2, type1, type2, &typeDmg);
|
||||||
|
|||||||
@@ -4561,11 +4561,11 @@ static void AnimTipMon_Step(struct Sprite *sprite)
|
|||||||
|
|
||||||
void AnimTask_SkullBashPosition(u8 taskId)
|
void AnimTask_SkullBashPosition(u8 taskId)
|
||||||
{
|
{
|
||||||
u8 a;
|
u8 side;
|
||||||
|
|
||||||
gTasks[taskId].data[0] = gBattlerSpriteIds[gBattleAnimAttacker];
|
gTasks[taskId].data[0] = gBattlerSpriteIds[gBattleAnimAttacker];
|
||||||
a = GetBattlerSide(gBattleAnimAttacker);
|
side = GetBattlerSide(gBattleAnimAttacker);
|
||||||
gTasks[taskId].data[1] = a;
|
gTasks[taskId].data[1] = side;
|
||||||
gTasks[taskId].data[2] = 0;
|
gTasks[taskId].data[2] = 0;
|
||||||
switch (gBattleAnimArgs[0])
|
switch (gBattleAnimArgs[0])
|
||||||
{
|
{
|
||||||
@@ -4577,7 +4577,7 @@ void AnimTask_SkullBashPosition(u8 taskId)
|
|||||||
gTasks[taskId].data[3] = 8;
|
gTasks[taskId].data[3] = 8;
|
||||||
gTasks[taskId].data[4] = 0;
|
gTasks[taskId].data[4] = 0;
|
||||||
gTasks[taskId].data[5] = 3;
|
gTasks[taskId].data[5] = 3;
|
||||||
if (a == 0)
|
if (side == B_SIDE_PLAYER)
|
||||||
gTasks[taskId].data[5] *= -1;
|
gTasks[taskId].data[5] *= -1;
|
||||||
|
|
||||||
gTasks[taskId].func = AnimTask_SkullBashPositionSet;
|
gTasks[taskId].func = AnimTask_SkullBashPositionSet;
|
||||||
@@ -4586,7 +4586,7 @@ void AnimTask_SkullBashPosition(u8 taskId)
|
|||||||
gTasks[taskId].data[3] = 8;
|
gTasks[taskId].data[3] = 8;
|
||||||
gTasks[taskId].data[4] = 0x600;
|
gTasks[taskId].data[4] = 0x600;
|
||||||
gTasks[taskId].data[5] = 0xC0;
|
gTasks[taskId].data[5] = 0xC0;
|
||||||
if (a == 0)
|
if (side == B_SIDE_PLAYER)
|
||||||
{
|
{
|
||||||
gTasks[taskId].data[4] = -gTasks[taskId].data[4];
|
gTasks[taskId].data[4] = -gTasks[taskId].data[4];
|
||||||
gTasks[taskId].data[5] = -gTasks[taskId].data[5];
|
gTasks[taskId].data[5] = -gTasks[taskId].data[5];
|
||||||
|
|||||||
@@ -1163,7 +1163,7 @@ static void Task_GiveExpToMon(u8 taskId)
|
|||||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||||
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
||||||
u32 currExp = GetMonData(mon, MON_DATA_EXP);
|
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)
|
if (currExp + gainedExp >= nextLvlExp)
|
||||||
{
|
{
|
||||||
@@ -1206,11 +1206,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId)
|
|||||||
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
||||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||||
u32 exp = GetMonData(mon, MON_DATA_EXP);
|
u32 exp = GetMonData(mon, MON_DATA_EXP);
|
||||||
u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level];
|
u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level];
|
||||||
u32 expToNextLvl;
|
u32 expToNextLvl;
|
||||||
|
|
||||||
exp -= currLvlExp;
|
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);
|
SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp);
|
||||||
PlaySE(SE_EXP);
|
PlaySE(SE_EXP);
|
||||||
gTasks[taskId].func = Task_GiveExpWithExpBar;
|
gTasks[taskId].func = Task_GiveExpWithExpBar;
|
||||||
@@ -1242,7 +1242,7 @@ static void Task_GiveExpWithExpBar(u8 taskId)
|
|||||||
level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
|
level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
|
||||||
currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP);
|
currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP);
|
||||||
species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES);
|
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)
|
if (currExp + gainedExp >= expOnNextLvl)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ static void Task_GiveExpToMon(u8 taskId)
|
|||||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||||
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
||||||
u32 currExp = GetMonData(mon, MON_DATA_EXP);
|
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)
|
if (currExp + gainedExp >= nextLvlExp)
|
||||||
{
|
{
|
||||||
@@ -364,11 +364,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId)
|
|||||||
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
||||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||||
u32 exp = GetMonData(mon, MON_DATA_EXP);
|
u32 exp = GetMonData(mon, MON_DATA_EXP);
|
||||||
u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level];
|
u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level];
|
||||||
u32 expToNextLvl;
|
u32 expToNextLvl;
|
||||||
|
|
||||||
exp -= currLvlExp;
|
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);
|
SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp);
|
||||||
PlaySE(SE_EXP);
|
PlaySE(SE_EXP);
|
||||||
gTasks[taskId].func = Task_GiveExpWithExpBar;
|
gTasks[taskId].func = Task_GiveExpWithExpBar;
|
||||||
@@ -400,7 +400,7 @@ static void Task_GiveExpWithExpBar(u8 taskId)
|
|||||||
level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
|
level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
|
||||||
currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP);
|
currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP);
|
||||||
species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES);
|
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)
|
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_SPDEF, NULL);
|
||||||
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_SPEED, NULL);
|
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_SPEED, NULL);
|
||||||
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_MAX_HP, NULL);
|
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_MAX_HP, NULL);
|
||||||
monTypesBits |= gBitTable[gBaseStats[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type1];
|
monTypesBits |= gBitTable[gSpeciesInfo[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)].type2];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Count the number of types in the players party, to factor into the ranking
|
// 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_SPDEF];
|
||||||
rankingScores[i] += statValues[STAT_SPEED];
|
rankingScores[i] += statValues[STAT_SPEED];
|
||||||
rankingScores[i] += statValues[STAT_HP];
|
rankingScores[i] += statValues[STAT_HP];
|
||||||
monTypesBits |= gBitTable[gBaseStats[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
|
monTypesBits |= gBitTable[gSpeciesInfo[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].type2];
|
||||||
}
|
}
|
||||||
|
|
||||||
for (monTypesCount = 0, j = 0; j < 32; j++)
|
for (monTypesCount = 0, j = 0; j < 32; j++)
|
||||||
@@ -2448,7 +2448,7 @@ static void InitDomeTrainers(void)
|
|||||||
|
|
||||||
#define CALC_STAT(base, statIndex) \
|
#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] = (((2 * baseStat + ivs + evs[statIndex] / 4) * level) / 100) + 5; \
|
||||||
stats[statIndex] = (u8) ModifyStatByNature(nature, stats[statIndex], statIndex); \
|
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
|
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;
|
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 || gBattleMoves[move].power == 0)
|
if (move == MOVE_NONE || move == MOVE_UNAVAILABLE || gBattleMoves[move].power == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
defType1 = gBaseStats[targetSpecies].type1;
|
defType1 = gSpeciesInfo[targetSpecies].type1;
|
||||||
defType2 = gBaseStats[targetSpecies].type2;
|
defType2 = gSpeciesInfo[targetSpecies].type2;
|
||||||
defAbility = gBaseStats[targetSpecies].abilities[0];
|
defAbility = gSpeciesInfo[targetSpecies].abilities[0];
|
||||||
moveType = gBattleMoves[move].type;
|
moveType = gBattleMoves[move].type;
|
||||||
|
|
||||||
if (defAbility == ABILITY_LEVITATE && moveType == TYPE_GROUND)
|
if (defAbility == ABILITY_LEVITATE && moveType == TYPE_GROUND)
|
||||||
@@ -5204,9 +5204,9 @@ static u16 GetWinningMove(int winnerTournamentId, int loserTournamentId, u8 roun
|
|||||||
|
|
||||||
targetSpecies = gFacilityTrainerMons[DOME_MONS[loserTournamentId][k]].species;
|
targetSpecies = gFacilityTrainerMons[DOME_MONS[loserTournamentId][k]].species;
|
||||||
if (var & 1)
|
if (var & 1)
|
||||||
targetAbility = gBaseStats[targetSpecies].abilities[1];
|
targetAbility = gSpeciesInfo[targetSpecies].abilities[1];
|
||||||
else
|
else
|
||||||
targetAbility = gBaseStats[targetSpecies].abilities[0];
|
targetAbility = gSpeciesInfo[targetSpecies].abilities[0];
|
||||||
|
|
||||||
var = AI_TypeCalc(moveIds[i * MAX_MON_MOVES + j], targetSpecies, targetAbility);
|
var = AI_TypeCalc(moveIds[i * MAX_MON_MOVES + j], targetSpecies, targetAbility);
|
||||||
if (var & MOVE_RESULT_NOT_VERY_EFFECTIVE && var & MOVE_RESULT_SUPER_EFFECTIVE)
|
if (var & MOVE_RESULT_NOT_VERY_EFFECTIVE && var & MOVE_RESULT_SUPER_EFFECTIVE)
|
||||||
@@ -5883,8 +5883,8 @@ static void InitRandomTourneyTreeResults(void)
|
|||||||
statSums[i] += statValues[STAT_SPDEF];
|
statSums[i] += statValues[STAT_SPDEF];
|
||||||
statSums[i] += statValues[STAT_SPEED];
|
statSums[i] += statValues[STAT_SPEED];
|
||||||
statSums[i] += statValues[STAT_HP];
|
statSums[i] += statValues[STAT_HP];
|
||||||
monTypesBits |= gBitTable[gBaseStats[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
|
monTypesBits |= gBitTable[gSpeciesInfo[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].type2];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Because GF hates temporary vars, trainerId acts like monTypesCount here.
|
// Because GF hates temporary vars, trainerId acts like monTypesCount here.
|
||||||
@@ -6010,12 +6010,12 @@ static void DecideRoundWinners(u8 roundId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
species = gFacilityTrainerMons[DOME_MONS[tournamentId1][monId1]].species;
|
species = gFacilityTrainerMons[DOME_MONS[tournamentId1][monId1]].species;
|
||||||
points1 += ( gBaseStats[species].baseHP
|
points1 += ( gSpeciesInfo[species].baseHP
|
||||||
+ gBaseStats[species].baseAttack
|
+ gSpeciesInfo[species].baseAttack
|
||||||
+ gBaseStats[species].baseDefense
|
+ gSpeciesInfo[species].baseDefense
|
||||||
+ gBaseStats[species].baseSpeed
|
+ gSpeciesInfo[species].baseSpeed
|
||||||
+ gBaseStats[species].baseSpAttack
|
+ gSpeciesInfo[species].baseSpAttack
|
||||||
+ gBaseStats[species].baseSpDefense) / 10;
|
+ gSpeciesInfo[species].baseSpDefense) / 10;
|
||||||
}
|
}
|
||||||
// Random part of the formula.
|
// Random part of the formula.
|
||||||
points1 += (Random() & 0x1F);
|
points1 += (Random() & 0x1F);
|
||||||
@@ -6033,12 +6033,12 @@ static void DecideRoundWinners(u8 roundId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
species = gFacilityTrainerMons[DOME_MONS[tournamentId2][monId1]].species;
|
species = gFacilityTrainerMons[DOME_MONS[tournamentId2][monId1]].species;
|
||||||
points2 += ( gBaseStats[species].baseHP
|
points2 += ( gSpeciesInfo[species].baseHP
|
||||||
+ gBaseStats[species].baseAttack
|
+ gSpeciesInfo[species].baseAttack
|
||||||
+ gBaseStats[species].baseDefense
|
+ gSpeciesInfo[species].baseDefense
|
||||||
+ gBaseStats[species].baseSpeed
|
+ gSpeciesInfo[species].baseSpeed
|
||||||
+ gBaseStats[species].baseSpAttack
|
+ gSpeciesInfo[species].baseSpAttack
|
||||||
+ gBaseStats[species].baseSpDefense) / 10;
|
+ gSpeciesInfo[species].baseSpDefense) / 10;
|
||||||
}
|
}
|
||||||
// Random part of the formula.
|
// Random part of the formula.
|
||||||
points2 += (Random() & 0x1F);
|
points2 += (Random() & 0x1F);
|
||||||
|
|||||||
@@ -618,9 +618,9 @@ static void GetOpponentMostCommonMonType(void)
|
|||||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||||
{
|
{
|
||||||
u32 species = gFacilityTrainerMons[gFrontierTempParty[i]].species;
|
u32 species = gFacilityTrainerMons[gFrontierTempParty[i]].species;
|
||||||
typeCounts[gBaseStats[species].type1]++;
|
typeCounts[gSpeciesInfo[species].type1]++;
|
||||||
if (gBaseStats[species].type1 != gBaseStats[species].type2)
|
if (gSpeciesInfo[species].type1 != gSpeciesInfo[species].type2)
|
||||||
typeCounts[gBaseStats[species].type2]++;
|
typeCounts[gSpeciesInfo[species].type2]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine which are the two most-common types.
|
// Determine which are the two most-common types.
|
||||||
|
|||||||
@@ -2199,9 +2199,9 @@ void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elem
|
|||||||
species = GetMonData(mon, MON_DATA_SPECIES);
|
species = GetMonData(mon, MON_DATA_SPECIES);
|
||||||
level = GetMonData(mon, MON_DATA_LEVEL);
|
level = GetMonData(mon, MON_DATA_LEVEL);
|
||||||
exp = GetMonData(mon, MON_DATA_EXP);
|
exp = GetMonData(mon, MON_DATA_EXP);
|
||||||
currLevelExp = gExperienceTables[gBaseStats[species].growthRate][level];
|
currLevelExp = gExperienceTables[gSpeciesInfo[species].growthRate][level];
|
||||||
currExpBarValue = exp - currLevelExp;
|
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);
|
SetBattleBarStruct(battlerId, healthboxSpriteId, maxExpBarValue, currExpBarValue, isDoubles);
|
||||||
MoveBattleBar(battlerId, healthboxSpriteId, EXP_BAR, 0);
|
MoveBattleBar(battlerId, healthboxSpriteId, EXP_BAR, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -199,8 +199,8 @@ EWRAM_DATA u32 gHitMarker = 0;
|
|||||||
EWRAM_DATA static u8 sUnusedBattlersArray[MAX_BATTLERS_COUNT] = {0};
|
EWRAM_DATA static u8 sUnusedBattlersArray[MAX_BATTLERS_COUNT] = {0};
|
||||||
EWRAM_DATA u8 gTakenDmgByBattler[MAX_BATTLERS_COUNT] = {0};
|
EWRAM_DATA u8 gTakenDmgByBattler[MAX_BATTLERS_COUNT] = {0};
|
||||||
EWRAM_DATA u8 gUnusedFirstBattleVar2 = 0; // Never read
|
EWRAM_DATA u8 gUnusedFirstBattleVar2 = 0; // Never read
|
||||||
EWRAM_DATA u16 gSideStatuses[2] = {0};
|
EWRAM_DATA u16 gSideStatuses[NUM_BATTLE_SIDES] = {0};
|
||||||
EWRAM_DATA struct SideTimer gSideTimers[2] = {0};
|
EWRAM_DATA struct SideTimer gSideTimers[NUM_BATTLE_SIDES] = {0};
|
||||||
EWRAM_DATA u32 gStatuses3[MAX_BATTLERS_COUNT] = {0};
|
EWRAM_DATA u32 gStatuses3[MAX_BATTLERS_COUNT] = {0};
|
||||||
EWRAM_DATA struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT] = {0};
|
EWRAM_DATA struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT] = {0};
|
||||||
EWRAM_DATA u16 gPauseCounterBattle = 0;
|
EWRAM_DATA u16 gPauseCounterBattle = 0;
|
||||||
@@ -3097,7 +3097,7 @@ static void BattleStartClearSetData(void)
|
|||||||
gBattleStruct->runTries = 0;
|
gBattleStruct->runTries = 0;
|
||||||
gBattleStruct->safariGoNearCounter = 0;
|
gBattleStruct->safariGoNearCounter = 0;
|
||||||
gBattleStruct->safariPkblThrowCounter = 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->safariEscapeFactor = 3;
|
||||||
gBattleStruct->wildVictorySong = 0;
|
gBattleStruct->wildVictorySong = 0;
|
||||||
gBattleStruct->moneyMultiplier = 1;
|
gBattleStruct->moneyMultiplier = 1;
|
||||||
@@ -3332,8 +3332,8 @@ void FaintClearSetData(void)
|
|||||||
|
|
||||||
gBattleResources->flags->flags[gActiveBattler] = 0;
|
gBattleResources->flags->flags[gActiveBattler] = 0;
|
||||||
|
|
||||||
gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1;
|
gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type1;
|
||||||
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
|
gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type2;
|
||||||
|
|
||||||
ClearBattlerMoveHistory(gActiveBattler);
|
ClearBattlerMoveHistory(gActiveBattler);
|
||||||
ClearBattlerAbilityHistory(gActiveBattler);
|
ClearBattlerAbilityHistory(gActiveBattler);
|
||||||
@@ -3400,8 +3400,8 @@ static void BattleIntroDrawTrainersOrMonsSprites(void)
|
|||||||
for (i = 0; i < sizeof(struct BattlePokemon); i++)
|
for (i = 0; i < sizeof(struct BattlePokemon); i++)
|
||||||
ptr[i] = gBattleBufferB[gActiveBattler][4 + i];
|
ptr[i] = gBattleBufferB[gActiveBattler][4 + i];
|
||||||
|
|
||||||
gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1;
|
gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type1;
|
||||||
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
|
gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type2;
|
||||||
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum);
|
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum);
|
||||||
hpOnSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(gActiveBattler)];
|
hpOnSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(gActiveBattler)];
|
||||||
*hpOnSwitchout = gBattleMons[gActiveBattler].hp;
|
*hpOnSwitchout = gBattleMons[gActiveBattler].hp;
|
||||||
|
|||||||
@@ -845,21 +845,21 @@ static bool8 DoesTypePreventStatus(u16 species, u32 status)
|
|||||||
switch (status)
|
switch (status)
|
||||||
{
|
{
|
||||||
case STATUS1_TOXIC_POISON:
|
case STATUS1_TOXIC_POISON:
|
||||||
if (gBaseStats[species].type1 == TYPE_STEEL || gBaseStats[species].type1 == TYPE_POISON
|
if (gSpeciesInfo[species].type1 == TYPE_STEEL || gSpeciesInfo[species].type1 == TYPE_POISON
|
||||||
|| gBaseStats[species].type2 == TYPE_STEEL || gBaseStats[species].type2 == TYPE_POISON)
|
|| gSpeciesInfo[species].type2 == TYPE_STEEL || gSpeciesInfo[species].type2 == TYPE_POISON)
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
break;
|
break;
|
||||||
case STATUS1_FREEZE:
|
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;
|
ret = TRUE;
|
||||||
break;
|
break;
|
||||||
case STATUS1_PARALYSIS:
|
case STATUS1_PARALYSIS:
|
||||||
if (gBaseStats[species].type1 == TYPE_GROUND || gBaseStats[species].type1 == TYPE_ELECTRIC
|
if (gSpeciesInfo[species].type1 == TYPE_GROUND || gSpeciesInfo[species].type1 == TYPE_ELECTRIC
|
||||||
|| gBaseStats[species].type2 == TYPE_GROUND || gBaseStats[species].type2 == TYPE_ELECTRIC)
|
|| gSpeciesInfo[species].type2 == TYPE_GROUND || gSpeciesInfo[species].type2 == TYPE_ELECTRIC)
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
break;
|
break;
|
||||||
case STATUS1_BURN:
|
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;
|
ret = TRUE;
|
||||||
break;
|
break;
|
||||||
case STATUS1_SLEEP:
|
case STATUS1_SLEEP:
|
||||||
@@ -1138,9 +1138,9 @@ bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate)
|
|||||||
|
|
||||||
SetMonData(&gEnemyParty[0],
|
SetMonData(&gEnemyParty[0],
|
||||||
MON_DATA_EXP,
|
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;
|
abilityNum = Random() % 2;
|
||||||
else
|
else
|
||||||
abilityNum = 0;
|
abilityNum = 0;
|
||||||
|
|||||||
@@ -1371,7 +1371,7 @@ void GenerateBattlePyramidWildMon(void)
|
|||||||
}
|
}
|
||||||
SetMonData(&gEnemyParty[0],
|
SetMonData(&gEnemyParty[0],
|
||||||
MON_DATA_EXP,
|
MON_DATA_EXP,
|
||||||
&gExperienceTables[gBaseStats[wildMons[id].species].growthRate][lvl]);
|
&gExperienceTables[gSpeciesInfo[wildMons[id].species].growthRate][lvl]);
|
||||||
|
|
||||||
switch (wildMons[id].abilityNum)
|
switch (wildMons[id].abilityNum)
|
||||||
{
|
{
|
||||||
@@ -1381,7 +1381,7 @@ void GenerateBattlePyramidWildMon(void)
|
|||||||
break;
|
break;
|
||||||
case ABILITY_RANDOM:
|
case ABILITY_RANDOM:
|
||||||
default:
|
default:
|
||||||
if (gBaseStats[wildMons[id].species].abilities[1])
|
if (gSpeciesInfo[wildMons[id].species].abilities[1])
|
||||||
{
|
{
|
||||||
i = GetMonData(&gEnemyParty[0], MON_DATA_PERSONALITY, NULL) % 2;
|
i = GetMonData(&gEnemyParty[0], MON_DATA_PERSONALITY, NULL) % 2;
|
||||||
SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &i);
|
SetMonData(&gEnemyParty[0], MON_DATA_ABILITY_NUM, &i);
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ static const struct ListMenuTemplate sListMenuTemplate =
|
|||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = FONT_NARROW,
|
.fontId = FONT_NARROW,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
|||||||
@@ -1595,7 +1595,7 @@ u8 AI_TypeCalc(u16 move, u16 targetSpecies, u8 targetAbility)
|
|||||||
{
|
{
|
||||||
s32 i = 0;
|
s32 i = 0;
|
||||||
u8 flags = 0;
|
u8 flags = 0;
|
||||||
u8 type1 = gBaseStats[targetSpecies].type1, type2 = gBaseStats[targetSpecies].type2;
|
u8 type1 = gSpeciesInfo[targetSpecies].type1, type2 = gSpeciesInfo[targetSpecies].type2;
|
||||||
u8 moveType;
|
u8 moveType;
|
||||||
|
|
||||||
if (move == MOVE_STRUGGLE)
|
if (move == MOVE_STRUGGLE)
|
||||||
@@ -3274,7 +3274,7 @@ static void Cmd_getexp(void)
|
|||||||
viaExpShare++;
|
viaExpShare++;
|
||||||
}
|
}
|
||||||
|
|
||||||
calculatedExp = gBaseStats[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 7;
|
calculatedExp = gSpeciesInfo[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 7;
|
||||||
|
|
||||||
if (viaExpShare) // at least one mon is getting exp via exp share
|
if (viaExpShare) // at least one mon is getting exp via exp share
|
||||||
{
|
{
|
||||||
@@ -4604,8 +4604,8 @@ static void Cmd_switchindataupdate(void)
|
|||||||
for (i = 0; i < sizeof(struct BattlePokemon); i++)
|
for (i = 0; i < sizeof(struct BattlePokemon); i++)
|
||||||
monData[i] = gBattleBufferB[gActiveBattler][4 + i];
|
monData[i] = gBattleBufferB[gActiveBattler][4 + i];
|
||||||
|
|
||||||
gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1;
|
gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type1;
|
||||||
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
|
gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type2;
|
||||||
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum);
|
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum);
|
||||||
|
|
||||||
// check knocked off item
|
// check knocked off item
|
||||||
@@ -8888,10 +8888,10 @@ static void Cmd_trydobeatup(void)
|
|||||||
|
|
||||||
gBattlescriptCurrInstr += 9;
|
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 *= gBattleMoves[gCurrentMove].power;
|
||||||
gBattleMoveDamage *= (GetMonData(&party[gBattleCommunication[0]], MON_DATA_LEVEL) * 2 / 5 + 2);
|
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;
|
gBattleMoveDamage = (gBattleMoveDamage / 50) + 2;
|
||||||
if (gProtectStructs[gBattlerAttacker].helpingHand)
|
if (gProtectStructs[gBattlerAttacker].helpingHand)
|
||||||
gBattleMoveDamage = gBattleMoveDamage * 15 / 10;
|
gBattleMoveDamage = gBattleMoveDamage * 15 / 10;
|
||||||
@@ -9568,9 +9568,9 @@ static void Cmd_pickup(void)
|
|||||||
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||||
|
|
||||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))
|
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))
|
||||||
ability = gBaseStats[species].abilities[1];
|
ability = gSpeciesInfo[species].abilities[1];
|
||||||
else
|
else
|
||||||
ability = gBaseStats[species].abilities[0];
|
ability = gSpeciesInfo[species].abilities[0];
|
||||||
|
|
||||||
if (ability == ABILITY_PICKUP
|
if (ability == ABILITY_PICKUP
|
||||||
&& species != SPECIES_NONE
|
&& species != SPECIES_NONE
|
||||||
@@ -9591,9 +9591,9 @@ static void Cmd_pickup(void)
|
|||||||
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||||
|
|
||||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))
|
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))
|
||||||
ability = gBaseStats[species].abilities[1];
|
ability = gSpeciesInfo[species].abilities[1];
|
||||||
else
|
else
|
||||||
ability = gBaseStats[species].abilities[0];
|
ability = gSpeciesInfo[species].abilities[0];
|
||||||
|
|
||||||
if (ability == ABILITY_PICKUP
|
if (ability == ABILITY_PICKUP
|
||||||
&& species != SPECIES_NONE
|
&& species != SPECIES_NONE
|
||||||
@@ -9831,7 +9831,7 @@ static void Cmd_handleballthrow(void)
|
|||||||
if (gLastUsedItem == ITEM_SAFARI_BALL)
|
if (gLastUsedItem == ITEM_SAFARI_BALL)
|
||||||
catchRate = gBattleStruct->safariCatchFactor * 1275 / 100;
|
catchRate = gBattleStruct->safariCatchFactor * 1275 / 100;
|
||||||
else
|
else
|
||||||
catchRate = gBaseStats[gBattleMons[gBattlerTarget].species].catchRate;
|
catchRate = gSpeciesInfo[gBattleMons[gBattlerTarget].species].catchRate;
|
||||||
|
|
||||||
if (gLastUsedItem > ITEM_SAFARI_BALL)
|
if (gLastUsedItem > ITEM_SAFARI_BALL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3539,7 +3539,7 @@ void TrySetLinkBattleTowerEnemyPartyLevel(void)
|
|||||||
u32 species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES, NULL);
|
u32 species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES, NULL);
|
||||||
if (species)
|
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]);
|
CalculateMonStats(&gEnemyParty[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2676,7 +2676,7 @@ static void CB2_EndBlenderGame(void)
|
|||||||
switch (Menu_ProcessInputNoWrapClearOnChoose())
|
switch (Menu_ProcessInputNoWrapClearOnChoose())
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
case -1:
|
case MENU_B_PRESSED:
|
||||||
sBerryBlender->yesNoAnswer = 1;
|
sBerryBlender->yesNoAnswer = 1;
|
||||||
sBerryBlender->gameEndState++;
|
sBerryBlender->gameEndState++;
|
||||||
for (i = 0; i < BLENDER_MAX_PLAYERS; i++)
|
for (i = 0; i < BLENDER_MAX_PLAYERS; i++)
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ u16 FontFunc_Braille(struct TextPrinter *textPrinter)
|
|||||||
subStruct->fontId = *textPrinter->printerTemplate.currentChar;
|
subStruct->fontId = *textPrinter->printerTemplate.currentChar;
|
||||||
textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentChar++;
|
||||||
return RENDER_REPEAT;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_RESET_SIZE:
|
case EXT_CTRL_CODE_RESET_FONT:
|
||||||
return RENDER_REPEAT;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_PAUSE:
|
case EXT_CTRL_CODE_PAUSE:
|
||||||
textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar++;
|
textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar++;
|
||||||
@@ -109,7 +109,7 @@ u16 FontFunc_Braille(struct TextPrinter *textPrinter)
|
|||||||
case EXT_CTRL_CODE_ESCAPE:
|
case EXT_CTRL_CODE_ESCAPE:
|
||||||
char_ = *++textPrinter->printerTemplate.currentChar;
|
char_ = *++textPrinter->printerTemplate.currentChar;
|
||||||
break;
|
break;
|
||||||
case EXT_CTRL_CODE_SHIFT_TEXT:
|
case EXT_CTRL_CODE_SHIFT_RIGHT:
|
||||||
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar++;
|
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar++;
|
||||||
return RENDER_REPEAT;
|
return RENDER_REPEAT;
|
||||||
case EXT_CTRL_CODE_SHIFT_DOWN:
|
case EXT_CTRL_CODE_SHIFT_DOWN:
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ static void Task_ClearSaveDataScreenYesNoChoice(u8 taskId)
|
|||||||
gTasks[taskId].func = Task_ClearSaveData;
|
gTasks[taskId].func = Task_ClearSaveData;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
case -1:
|
case MENU_B_PRESSED:
|
||||||
PlaySE(SE_SELECT);
|
PlaySE(SE_SELECT);
|
||||||
DestroyTask(taskId);
|
DestroyTask(taskId);
|
||||||
SetMainCallback2(CB2_FadeAndDoReset);
|
SetMainCallback2(CB2_FadeAndDoReset);
|
||||||
|
|||||||
@@ -5320,7 +5320,7 @@ static void SetMoveSpecificAnimData(u8 contestant)
|
|||||||
switch (move)
|
switch (move)
|
||||||
{
|
{
|
||||||
case MOVE_CURSE:
|
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;
|
gAnimMoveTurn = 0;
|
||||||
else
|
else
|
||||||
gAnimMoveTurn = 1;
|
gAnimMoveTurn = 1;
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ const union AnimCmd *const gAnims_MonPic[] =
|
|||||||
#define SPECIES_PAL(species, pal) [SPECIES_##species] = {pal, SPECIES_##species}
|
#define SPECIES_PAL(species, pal) [SPECIES_##species] = {pal, SPECIES_##species}
|
||||||
#define SPECIES_SHINY_PAL(species, pal) [SPECIES_##species] = {pal, SPECIES_##species + SPECIES_SHINY_TAG}
|
#define SPECIES_SHINY_PAL(species, pal) [SPECIES_##species] = {pal, SPECIES_##species + SPECIES_SHINY_TAG}
|
||||||
|
|
||||||
#include "data/pokemon_graphics/unknown_anims.h"
|
#include "data/pokemon_graphics/unused_anims.h"
|
||||||
#include "data/pokemon_graphics/front_pic_coordinates.h"
|
#include "data/pokemon_graphics/front_pic_coordinates.h"
|
||||||
#include "data/pokemon_graphics/still_front_pic_table.h"
|
#include "data/pokemon_graphics/still_front_pic_table.h"
|
||||||
#include "data/pokemon_graphics/back_pic_coordinates.h"
|
#include "data/pokemon_graphics/back_pic_coordinates.h"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// 255 (MON_GENDERLESS) is reserved for genderless Pokémon.
|
// 255 (MON_GENDERLESS) is reserved for genderless Pokémon.
|
||||||
#define PERCENT_FEMALE(percent) min(254, ((percent * 255) / 100))
|
#define PERCENT_FEMALE(percent) min(254, ((percent * 255) / 100))
|
||||||
|
|
||||||
#define OLD_UNOWN_BASE_STATS \
|
#define OLD_UNOWN_SPECIES_INFO \
|
||||||
{ \
|
{ \
|
||||||
.baseHP = 50, \
|
.baseHP = 50, \
|
||||||
.baseAttack = 150, \
|
.baseAttack = 150, \
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
.noFlip = FALSE, \
|
.noFlip = FALSE, \
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct BaseStats gBaseStats[] =
|
const struct SpeciesInfo gSpeciesInfo[] =
|
||||||
{
|
{
|
||||||
[SPECIES_NONE] = {0},
|
[SPECIES_NONE] = {0},
|
||||||
|
|
||||||
@@ -8070,55 +8070,55 @@ const struct BaseStats gBaseStats[] =
|
|||||||
.noFlip = FALSE,
|
.noFlip = FALSE,
|
||||||
},
|
},
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_B] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_B] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_C] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_C] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_D] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_D] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_E] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_E] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_F] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_F] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_G] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_G] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_H] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_H] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_I] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_I] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_J] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_J] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_K] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_K] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_L] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_L] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_M] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_M] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_N] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_N] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_O] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_O] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_P] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_P] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_Q] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_Q] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_R] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_R] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_S] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_S] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_T] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_T] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_U] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_U] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_V] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_V] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_W] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_W] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_X] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_X] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_Y] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_Y] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_OLD_UNOWN_Z] = OLD_UNOWN_BASE_STATS,
|
[SPECIES_OLD_UNOWN_Z] = OLD_UNOWN_SPECIES_INFO,
|
||||||
|
|
||||||
[SPECIES_TREECKO] =
|
[SPECIES_TREECKO] =
|
||||||
{
|
{
|
||||||
@@ -717,9 +717,9 @@ static const struct ListMenuTemplate sListMenuTemplate_PossibleGroupMembers = {
|
|||||||
.cursorShadowPal = 3,
|
.cursorShadowPal = 3,
|
||||||
.lettersSpacing = 0,
|
.lettersSpacing = 0,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = 0,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = 1,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 1
|
.cursorKind = CURSOR_INVISIBLE
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct WindowTemplate sWindowTemplate_GroupList = {
|
static const struct WindowTemplate sWindowTemplate_GroupList = {
|
||||||
@@ -777,9 +777,9 @@ static const struct ListMenuTemplate sListMenuTemplate_UnionRoomGroups = {
|
|||||||
.cursorShadowPal = 3,
|
.cursorShadowPal = 3,
|
||||||
.lettersSpacing = 0,
|
.lettersSpacing = 0,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = 1,
|
.scrollMultiple = LIST_MULTIPLE_SCROLL_DPAD,
|
||||||
.fontId = 1,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct WindowTemplate sWindowTemplate_InviteToActivity = {
|
static const struct WindowTemplate sWindowTemplate_InviteToActivity = {
|
||||||
@@ -815,9 +815,9 @@ static const struct ListMenuTemplate sListMenuTemplate_InviteToActivity = {
|
|||||||
.cursorShadowPal = 3,
|
.cursorShadowPal = 3,
|
||||||
.lettersSpacing = 0,
|
.lettersSpacing = 0,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = 0,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = 1,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct WindowTemplate sWindowTemplate_RegisterForTrade = {
|
static const struct WindowTemplate sWindowTemplate_RegisterForTrade = {
|
||||||
@@ -852,9 +852,9 @@ static const struct ListMenuTemplate sListMenuTemplate_RegisterForTrade = {
|
|||||||
.cursorShadowPal = 3,
|
.cursorShadowPal = 3,
|
||||||
.lettersSpacing = 0,
|
.lettersSpacing = 0,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = 0,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = 1,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct WindowTemplate sWindowTemplate_TradingBoardRequestType = {
|
static const struct WindowTemplate sWindowTemplate_TradingBoardRequestType = {
|
||||||
@@ -904,9 +904,9 @@ static const struct ListMenuTemplate sMenuTemplate_TradingBoardRequestType = {
|
|||||||
.cursorShadowPal = 3,
|
.cursorShadowPal = 3,
|
||||||
.lettersSpacing = 0,
|
.lettersSpacing = 0,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = 0,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = 1,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct WindowTemplate sWindowTemplate_TradingBoardHeader = {
|
static const struct WindowTemplate sWindowTemplate_TradingBoardHeader = {
|
||||||
@@ -930,7 +930,7 @@ static const struct WindowTemplate sWindowTemplate_TradingBoardMain = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct ListMenuItem sTradeBoardListMenuItems[] = {
|
static const struct ListMenuItem sTradeBoardListMenuItems[] = {
|
||||||
{ sText_EmptyString, -3 },
|
{ sText_EmptyString, LIST_HEADER },
|
||||||
{ sText_EmptyString, 0 },
|
{ sText_EmptyString, 0 },
|
||||||
{ sText_EmptyString, 1 },
|
{ sText_EmptyString, 1 },
|
||||||
{ sText_EmptyString, 2 },
|
{ sText_EmptyString, 2 },
|
||||||
@@ -958,9 +958,9 @@ static const struct ListMenuTemplate sTradeBoardListMenuTemplate = {
|
|||||||
.cursorShadowPal = 13,
|
.cursorShadowPal = 13,
|
||||||
.lettersSpacing = 0,
|
.lettersSpacing = 0,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = 0,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = 1,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
// Unused
|
// Unused
|
||||||
@@ -1010,9 +1010,9 @@ static const struct ListMenuTemplate sEmptyListMenuTemplate = {
|
|||||||
.cursorShadowPal = 3,
|
.cursorShadowPal = 3,
|
||||||
.lettersSpacing = 0,
|
.lettersSpacing = 0,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = 1,
|
.scrollMultiple = LIST_MULTIPLE_SCROLL_DPAD,
|
||||||
.fontId = 1,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct RfuPlayerData sUnionRoomPlayer_DummyRfu = {0};
|
static const struct RfuPlayerData sUnionRoomPlayer_DummyRfu = {0};
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ static const struct ListMenuTemplate sDaycareListMenuLevelTemplate =
|
|||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = FONT_NORMAL,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u8 *const sCompatibilityMessages[] =
|
static const u8 *const sCompatibilityMessages[] =
|
||||||
@@ -842,7 +842,7 @@ void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation)
|
|||||||
language = LANGUAGE_JAPANESE;
|
language = LANGUAGE_JAPANESE;
|
||||||
SetMonData(mon, MON_DATA_POKEBALL, &ball);
|
SetMonData(mon, MON_DATA_POKEBALL, &ball);
|
||||||
SetMonData(mon, MON_DATA_NICKNAME, sJapaneseEggNickname);
|
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_MET_LEVEL, &metLevel);
|
||||||
SetMonData(mon, MON_DATA_LANGUAGE, &language);
|
SetMonData(mon, MON_DATA_LANGUAGE, &language);
|
||||||
if (setHotSpringsLocation)
|
if (setHotSpringsLocation)
|
||||||
@@ -869,7 +869,7 @@ static void SetInitialEggData(struct Pokemon *mon, u16 species, struct DayCare *
|
|||||||
language = LANGUAGE_JAPANESE;
|
language = LANGUAGE_JAPANESE;
|
||||||
SetMonData(mon, MON_DATA_POKEBALL, &ball);
|
SetMonData(mon, MON_DATA_POKEBALL, &ball);
|
||||||
SetMonData(mon, MON_DATA_NICKNAME, sJapaneseEggNickname);
|
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_MET_LEVEL, &metLevel);
|
||||||
SetMonData(mon, MON_DATA_LANGUAGE, &language);
|
SetMonData(mon, MON_DATA_LANGUAGE, &language);
|
||||||
}
|
}
|
||||||
@@ -1031,8 +1031,8 @@ static u8 GetDaycareCompatibilityScore(struct DayCare *daycare)
|
|||||||
trainerIds[i] = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_OT_ID);
|
trainerIds[i] = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_OT_ID);
|
||||||
personality = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_PERSONALITY);
|
personality = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_PERSONALITY);
|
||||||
genders[i] = GetGenderFromSpeciesAndPersonality(species[i], personality);
|
genders[i] = GetGenderFromSpeciesAndPersonality(species[i], personality);
|
||||||
eggGroups[i][0] = gBaseStats[species[i]].eggGroup1;
|
eggGroups[i][0] = gSpeciesInfo[species[i]].eggGroup1;
|
||||||
eggGroups[i][1] = gBaseStats[species[i]].eggGroup2;
|
eggGroups[i][1] = gSpeciesInfo[species[i]].eggGroup2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check unbreedable egg group
|
// check unbreedable egg group
|
||||||
|
|||||||
@@ -314,8 +314,9 @@ static const struct ListMenuTemplate sDecorationItemsListMenuTemplate =
|
|||||||
.cursorShadowPal = 3,
|
.cursorShadowPal = 3,
|
||||||
.lettersSpacing = FALSE,
|
.lettersSpacing = FALSE,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = FALSE,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = FONT_NARROW
|
.fontId = FONT_NARROW,
|
||||||
|
.cursorKind = CURSOR_BLACK_ARROW,
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "data/decoration/icon.h"
|
#include "data/decoration/icon.h"
|
||||||
@@ -890,7 +891,7 @@ static void PrintDecorationItemMenuItems(u8 taskId)
|
|||||||
|
|
||||||
StringCopy(sDecorationItemsMenu->names[i], gText_Cancel);
|
StringCopy(sDecorationItemsMenu->names[i], gText_Cancel);
|
||||||
sDecorationItemsMenu->items[i].name = sDecorationItemsMenu->names[i];
|
sDecorationItemsMenu->items[i].name = sDecorationItemsMenu->names[i];
|
||||||
sDecorationItemsMenu->items[i].id = -2;
|
sDecorationItemsMenu->items[i].id = LIST_CANCEL;
|
||||||
gMultiuseListMenuTemplate = sDecorationItemsListMenuTemplate;
|
gMultiuseListMenuTemplate = sDecorationItemsListMenuTemplate;
|
||||||
gMultiuseListMenuTemplate.windowId = sDecorMenuWindowIds[WINDOW_DECORATION_CATEGORIES];
|
gMultiuseListMenuTemplate.windowId = sDecorMenuWindowIds[WINDOW_DECORATION_CATEGORIES];
|
||||||
gMultiuseListMenuTemplate.totalItems = sDecorationItemsMenu->numMenuItems;
|
gMultiuseListMenuTemplate.totalItems = sDecorationItemsMenu->numMenuItems;
|
||||||
@@ -1976,7 +1977,7 @@ static void SetDecorSelectionMetatiles(struct PlaceDecorationGraphicsDataBuffer
|
|||||||
shape = data->decoration->shape;
|
shape = data->decoration->shape;
|
||||||
for (i = 0; i < sDecorTilemaps[shape].size; i++)
|
for (i = 0; i < sDecorTilemaps[shape].size; i++)
|
||||||
{
|
{
|
||||||
data->tiles[sDecorTilemaps[shape].tiles[i]] = GetMetatile(data->decoration->tiles[sDecorTilemaps[shape].y[i]] * 8 + sDecorTilemaps[shape].x[i]);
|
data->tiles[sDecorTilemaps[shape].tiles[i]] = GetMetatile(data->decoration->tiles[sDecorTilemaps[shape].y[i]] * NUM_TILES_PER_METATILE + sDecorTilemaps[shape].x[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2036,7 +2037,7 @@ static u8 gpu_pal_decompress_alloc_tag_and_upload(struct PlaceDecorationGraphics
|
|||||||
SetDecorSelectionMetatiles(data);
|
SetDecorSelectionMetatiles(data);
|
||||||
SetDecorSelectionBoxOamAttributes(data->decoration->shape);
|
SetDecorSelectionBoxOamAttributes(data->decoration->shape);
|
||||||
SetDecorSelectionBoxTiles(data);
|
SetDecorSelectionBoxTiles(data);
|
||||||
CopyPalette(data->palette, ((u16 *)gTilesetPointer_SecretBaseRedCave->metatiles)[(data->decoration->tiles[0] * 8) + 7] >> 12);
|
CopyPalette(data->palette, ((u16 *)gTilesetPointer_SecretBaseRedCave->metatiles)[(data->decoration->tiles[0] * NUM_TILES_PER_METATILE) + 7] >> 12);
|
||||||
LoadSpritePalette(&sSpritePal_PlaceDecoration);
|
LoadSpritePalette(&sSpritePal_PlaceDecoration);
|
||||||
return CreateSprite(&sDecorationSelectorSpriteTemplate, 0, 0, 0);
|
return CreateSprite(&sDecorationSelectorSpriteTemplate, 0, 0, 0);
|
||||||
}
|
}
|
||||||
@@ -2092,7 +2093,7 @@ static u8 AddDecorationIconObjectFromObjectEvent(u16 tilesTag, u16 paletteTag, u
|
|||||||
SetDecorSelectionMetatiles(&sPlaceDecorationGraphicsDataBuffer);
|
SetDecorSelectionMetatiles(&sPlaceDecorationGraphicsDataBuffer);
|
||||||
SetDecorSelectionBoxOamAttributes(sPlaceDecorationGraphicsDataBuffer.decoration->shape);
|
SetDecorSelectionBoxOamAttributes(sPlaceDecorationGraphicsDataBuffer.decoration->shape);
|
||||||
SetDecorSelectionBoxTiles(&sPlaceDecorationGraphicsDataBuffer);
|
SetDecorSelectionBoxTiles(&sPlaceDecorationGraphicsDataBuffer);
|
||||||
CopyPalette(sPlaceDecorationGraphicsDataBuffer.palette, ((u16 *)gTilesetPointer_SecretBaseRedCave->metatiles)[(sPlaceDecorationGraphicsDataBuffer.decoration->tiles[0] * 8) + 7] >> 12);
|
CopyPalette(sPlaceDecorationGraphicsDataBuffer.palette, ((u16 *)gTilesetPointer_SecretBaseRedCave->metatiles)[(sPlaceDecorationGraphicsDataBuffer.decoration->tiles[0] * NUM_TILES_PER_METATILE) + 7] >> 12);
|
||||||
sheet.data = sPlaceDecorationGraphicsDataBuffer.image;
|
sheet.data = sPlaceDecorationGraphicsDataBuffer.image;
|
||||||
sheet.size = sDecorShapeSizes[sPlaceDecorationGraphicsDataBuffer.decoration->shape] * TILE_SIZE_4BPP;
|
sheet.size = sDecorShapeSizes[sPlaceDecorationGraphicsDataBuffer.decoration->shape] * TILE_SIZE_4BPP;
|
||||||
sheet.tag = tilesTag;
|
sheet.tag = tilesTag;
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ static void DrawMetatileAt(const struct MapLayout *mapLayout, u16 offset, int x,
|
|||||||
metatiles = mapLayout->secondaryTileset->metatiles;
|
metatiles = mapLayout->secondaryTileset->metatiles;
|
||||||
metatileId -= NUM_METATILES_IN_PRIMARY;
|
metatileId -= NUM_METATILES_IN_PRIMARY;
|
||||||
}
|
}
|
||||||
DrawMetatile(MapGridGetMetatileLayerTypeAt(x, y), metatiles + metatileId * 8, offset);
|
DrawMetatile(MapGridGetMetatileLayerTypeAt(x, y), metatiles + metatileId * NUM_TILES_PER_METATILE, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DrawMetatile(s32 metatileLayerType, const u16 *tiles, u16 offset)
|
static void DrawMetatile(s32 metatileLayerType, const u16 *tiles, u16 offset)
|
||||||
|
|||||||
@@ -1196,7 +1196,7 @@ void IsGrassTypeInParty(void)
|
|||||||
if (GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES) && !GetMonData(pokemon, MON_DATA_IS_EGG))
|
if (GetMonData(pokemon, MON_DATA_SANITY_HAS_SPECIES) && !GetMonData(pokemon, MON_DATA_IS_EGG))
|
||||||
{
|
{
|
||||||
species = GetMonData(pokemon, MON_DATA_SPECIES);
|
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;
|
gSpecialVar_Result = TRUE;
|
||||||
return;
|
return;
|
||||||
@@ -2536,9 +2536,9 @@ static void InitScrollableMultichoice(void)
|
|||||||
gScrollableMultichoice_ListMenuTemplate.cursorShadowPal = 3;
|
gScrollableMultichoice_ListMenuTemplate.cursorShadowPal = 3;
|
||||||
gScrollableMultichoice_ListMenuTemplate.lettersSpacing = 0;
|
gScrollableMultichoice_ListMenuTemplate.lettersSpacing = 0;
|
||||||
gScrollableMultichoice_ListMenuTemplate.itemVerticalPadding = 0;
|
gScrollableMultichoice_ListMenuTemplate.itemVerticalPadding = 0;
|
||||||
gScrollableMultichoice_ListMenuTemplate.scrollMultiple = 0;
|
gScrollableMultichoice_ListMenuTemplate.scrollMultiple = LIST_NO_MULTIPLE_SCROLL;
|
||||||
gScrollableMultichoice_ListMenuTemplate.fontId = FONT_NORMAL;
|
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)
|
static void ScrollableMultichoice_MoveCursor(s32 itemIndex, bool8 onInit, struct ListMenu *list)
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ const u8 gHealthboxElementsGfxTable[] = INCBIN_U8("graphics/battle_interface/hpb
|
|||||||
"graphics/battle_interface/hpbar_anim.4bpp",
|
"graphics/battle_interface/hpbar_anim.4bpp",
|
||||||
"graphics/battle_interface/misc_frameend.4bpp",
|
"graphics/battle_interface/misc_frameend.4bpp",
|
||||||
"graphics/battle_interface/ball_display.4bpp",
|
"graphics/battle_interface/ball_display.4bpp",
|
||||||
"graphics/battle_interface/ball_display_unused_extra.4bpp",
|
"graphics/battle_interface/ball_caught_indicator.4bpp",
|
||||||
"graphics/battle_interface/status2.4bpp", // these three duplicate sets of graphics are for the opponent pokemon
|
"graphics/battle_interface/status2.4bpp", // these three duplicate sets of graphics are for the opponent pokemon
|
||||||
"graphics/battle_interface/status3.4bpp", // and are also for use in double battles. they use dynamic palettes so
|
"graphics/battle_interface/status3.4bpp", // and are also for use in double battles. they use dynamic palettes so
|
||||||
"graphics/battle_interface/status4.4bpp", // coloring them is an extreme headache and wont be done for now
|
"graphics/battle_interface/status4.4bpp", // coloring them is an extreme headache and wont be done for now
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ void PadNameString(u8 *dest, u8 padChar)
|
|||||||
while (length < PLAYER_NAME_LENGTH - 1)
|
while (length < PLAYER_NAME_LENGTH - 1)
|
||||||
{
|
{
|
||||||
dest[length] = EXT_CTRL_CODE_BEGIN;
|
dest[length] = EXT_CTRL_CODE_BEGIN;
|
||||||
dest[length + 1] = EXT_CTRL_CODE_RESET_SIZE;
|
dest[length + 1] = EXT_CTRL_CODE_RESET_FONT;
|
||||||
length += 2;
|
length += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,9 +259,9 @@ static const struct ListMenuTemplate sItemListMenu =
|
|||||||
.cursorShadowPal = 3,
|
.cursorShadowPal = 3,
|
||||||
.lettersSpacing = 0,
|
.lettersSpacing = 0,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = 0,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = FONT_NARROW,
|
.fontId = FONT_NARROW,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct MenuAction sItemMenuActions[] = {
|
static const struct MenuAction sItemMenuActions[] = {
|
||||||
@@ -987,7 +987,7 @@ static void BagMenu_ItemPrintCallback(u8 windowId, u32 itemIndex, u8 y)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Print registered icon
|
// Print registered icon
|
||||||
if (gSaveBlock1Ptr->registeredItem && gSaveBlock1Ptr->registeredItem == itemId)
|
if (gSaveBlock1Ptr->registeredItem != ITEM_NONE && gSaveBlock1Ptr->registeredItem == itemId)
|
||||||
BlitBitmapToWindow(windowId, sRegisteredSelect_Gfx, 96, y - 1, 24, 16);
|
BlitBitmapToWindow(windowId, sRegisteredSelect_Gfx, 96, y - 1, 24, 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1909,7 +1909,7 @@ static void ItemMenu_Register(u8 taskId)
|
|||||||
u16 *cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
u16 *cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||||
|
|
||||||
if (gSaveBlock1Ptr->registeredItem == gSpecialVar_ItemId)
|
if (gSaveBlock1Ptr->registeredItem == gSpecialVar_ItemId)
|
||||||
gSaveBlock1Ptr->registeredItem = 0;
|
gSaveBlock1Ptr->registeredItem = ITEM_NONE;
|
||||||
else
|
else
|
||||||
gSaveBlock1Ptr->registeredItem = gSpecialVar_ItemId;
|
gSaveBlock1Ptr->registeredItem = gSpecialVar_ItemId;
|
||||||
DestroyListMenuTask(tListTaskId, scrollPos, cursorPos);
|
DestroyListMenuTask(tListTaskId, scrollPos, cursorPos);
|
||||||
|
|||||||
@@ -2525,9 +2525,8 @@ u8 RfuGetStatus(void)
|
|||||||
|
|
||||||
bool32 RfuHasErrored(void)
|
bool32 RfuHasErrored(void)
|
||||||
{
|
{
|
||||||
// RFU_STATUS_OK will underflow here intentionally
|
u32 status = RfuGetStatus();
|
||||||
u32 var = RfuGetStatus() - 1;
|
if (status == RFU_STATUS_FATAL_ERROR || status == RFU_STATUS_CONNECTION_ERROR)
|
||||||
if (var < RFU_STATUS_CONNECTION_ERROR)
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -2656,7 +2655,7 @@ static u8 GetPartnerIndexByNameAndTrainerID(const u8 *name, u16 id)
|
|||||||
|
|
||||||
for (i = 0; i < RFU_CHILD_MAX; i++)
|
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)
|
if (IsRfuSerialNumberValid(gRfuLinkStatus->partner[i].serialNo)
|
||||||
&& !StringCompare(name, gRfuLinkStatus->partner[i].uname)
|
&& !StringCompare(name, gRfuLinkStatus->partner[i].uname)
|
||||||
&& id == trainerId)
|
&& id == trainerId)
|
||||||
@@ -2682,9 +2681,9 @@ static void RfuReqDisconnectSlot(u32 slot)
|
|||||||
|
|
||||||
void RequestDisconnectSlotByTrainerNameAndId(const u8 *name, u16 id)
|
void RequestDisconnectSlotByTrainerNameAndId(const u8 *name, u16 id)
|
||||||
{
|
{
|
||||||
u8 var = GetPartnerIndexByNameAndTrainerID(name, id);
|
u8 index = GetPartnerIndexByNameAndTrainerID(name, id);
|
||||||
if (var != 0xFF)
|
if (index != 0xFF)
|
||||||
RfuReqDisconnectSlot(1 << var);
|
RfuReqDisconnectSlot(1 << index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rfu_DisconnectPlayerById(u32 playerIdx)
|
void Rfu_DisconnectPlayerById(u32 playerIdx)
|
||||||
|
|||||||
@@ -13,6 +13,10 @@
|
|||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "constants/songs.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
|
struct UnkIndicatorsStruct
|
||||||
{
|
{
|
||||||
u8 field_0;
|
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 ListMenuPrintEntries(struct ListMenu *list, u16 startIndex, u16 yOffset, u16 count);
|
||||||
static void ListMenuDrawCursor(struct ListMenu *list);
|
static void ListMenuDrawCursor(struct ListMenu *list);
|
||||||
static void ListMenuCallSelectionChangedCallback(struct ListMenu *list, u8 onInit);
|
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 void Task_ScrollIndicatorArrowPair(u8 taskId);
|
||||||
static u8 ListMenuAddRedOutlineCursorObject(struct CursorStruct *cursor);
|
static u8 ListMenuAddRedOutlineCursorObject(struct CursorStruct *cursor);
|
||||||
static u8 ListMenuAddRedArrowCursorObject(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 ListMenuUpdateRedArrowCursorObject(u8 taskId, u16 x, u16 y);
|
||||||
static void ListMenuRemoveRedOutlineCursorObject(u8 taskId);
|
static void ListMenuRemoveRedOutlineCursorObject(u8 taskId);
|
||||||
static void ListMenuRemoveRedArrowCursorObject(u8 taskId);
|
static void ListMenuRemoveRedArrowCursorObject(u8 taskId);
|
||||||
static u8 ListMenuAddCursorObjectInternal(struct CursorStruct *cursor, u32 cursorKind);
|
static u8 ListMenuAddCursorObjectInternal(struct CursorStruct *cursor, u32 cursorObjId);
|
||||||
static void ListMenuUpdateCursorObject(u8 taskId, u16 x, u16 y, u32 cursorKind);
|
static void ListMenuUpdateCursorObject(u8 taskId, u16 x, u16 y, u32 cursorObjId);
|
||||||
static void ListMenuRemoveCursorObject(u8 taskId, u32 cursorKind);
|
static void ListMenuRemoveCursorObject(u8 taskId, u32 cursorObjId);
|
||||||
static void SpriteCallback_ScrollIndicatorArrow(struct Sprite *sprite);
|
static void SpriteCallback_ScrollIndicatorArrow(struct Sprite *sprite);
|
||||||
static void SpriteCallback_RedArrowCursor(struct Sprite *sprite);
|
static void SpriteCallback_RedArrowCursor(struct Sprite *sprite);
|
||||||
|
|
||||||
@@ -301,10 +305,10 @@ static const struct SpriteTemplate sSpriteTemplate_RedArrowCursor =
|
|||||||
.callback = SpriteCallback_RedArrowCursor,
|
.callback = SpriteCallback_RedArrowCursor,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u16 sRedArrowPal[] = INCBIN_U16("graphics/interface/red_arrow.gbapal");
|
static const u16 sRedInterface_Pal[] = INCBIN_U16("graphics/interface/red.gbapal"); // Shared by all of the below gfx
|
||||||
static const u32 sRedArrowOtherGfx[] = INCBIN_U32("graphics/interface/red_arrow_other.4bpp.lz");
|
static const u32 sScrollIndicator_Gfx[] = INCBIN_U32("graphics/interface/scroll_indicator.4bpp.lz");
|
||||||
static const u32 sSelectorOutlineGfx[] = INCBIN_U32("graphics/interface/selector_outline.4bpp.lz");
|
static const u32 sOutlineCursor_Gfx[] = INCBIN_U32("graphics/interface/outline_cursor.4bpp.lz");
|
||||||
static const u32 sRedArrowGfx[] = INCBIN_U32("graphics/interface/red_arrow.4bpp.lz");
|
static const u32 sArrowCursor_Gfx[] = INCBIN_U32("graphics/interface/arrow_cursor.4bpp.lz");
|
||||||
|
|
||||||
// code
|
// code
|
||||||
static void ListMenuDummyTask(u8 taskId)
|
static void ListMenuDummyTask(u8 taskId)
|
||||||
@@ -477,7 +481,7 @@ void DestroyListMenuTask(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow)
|
|||||||
*selectedRow = list->selectedRow;
|
*selectedRow = list->selectedRow;
|
||||||
|
|
||||||
if (list->taskId != TASK_NONE)
|
if (list->taskId != TASK_NONE)
|
||||||
ListMenuRemoveCursorObject(list->taskId, list->template.cursorKind - 2);
|
ListMenuRemoveCursorObject(list->taskId, list->template.cursorKind - CURSOR_OBJECT_START);
|
||||||
|
|
||||||
DestroyTask(listTaskId);
|
DestroyTask(listTaskId);
|
||||||
}
|
}
|
||||||
@@ -650,31 +654,33 @@ static void ListMenuDrawCursor(struct ListMenu *list)
|
|||||||
u8 y = list->selectedRow * yMultiplier + list->template.upText_Y;
|
u8 y = list->selectedRow * yMultiplier + list->template.upText_Y;
|
||||||
switch (list->template.cursorKind)
|
switch (list->template.cursorKind)
|
||||||
{
|
{
|
||||||
case 0:
|
case CURSOR_BLACK_ARROW:
|
||||||
ListMenuPrint(list, gText_SelectorArrow2, x, y);
|
ListMenuPrint(list, gText_SelectorArrow2, x, y);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case CURSOR_INVISIBLE:
|
||||||
break;
|
break;
|
||||||
case 2:
|
case CURSOR_RED_OUTLINE:
|
||||||
if (list->taskId == TASK_NONE)
|
if (list->taskId == TASK_NONE)
|
||||||
list->taskId = ListMenuAddCursorObject(list, 0);
|
list->taskId = ListMenuAddCursorObject(list, CURSOR_RED_OUTLINE - CURSOR_OBJECT_START);
|
||||||
ListMenuUpdateCursorObject(list->taskId,
|
ListMenuUpdateCursorObject(list->taskId,
|
||||||
GetWindowAttribute(list->template.windowId, WINDOW_TILEMAP_LEFT) * 8 - 1,
|
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;
|
break;
|
||||||
case 3:
|
case CURSOR_RED_ARROW:
|
||||||
if (list->taskId == TASK_NONE)
|
if (list->taskId == TASK_NONE)
|
||||||
list->taskId = ListMenuAddCursorObject(list, 1);
|
list->taskId = ListMenuAddCursorObject(list, CURSOR_RED_ARROW - CURSOR_OBJECT_START);
|
||||||
ListMenuUpdateCursorObject(list->taskId,
|
ListMenuUpdateCursorObject(list->taskId,
|
||||||
GetWindowAttribute(list->template.windowId, WINDOW_TILEMAP_LEFT) * 8 + x,
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef TASK_NONE
|
#undef TASK_NONE
|
||||||
|
|
||||||
static u8 ListMenuAddCursorObject(struct ListMenu *list, u32 cursorKind)
|
static u8 ListMenuAddCursorObject(struct ListMenu *list, u32 cursorObjId)
|
||||||
{
|
{
|
||||||
struct CursorStruct cursor;
|
struct CursorStruct cursor;
|
||||||
|
|
||||||
@@ -686,13 +692,13 @@ static u8 ListMenuAddCursorObject(struct ListMenu *list, u32 cursorKind)
|
|||||||
cursor.palTag = TAG_NONE;
|
cursor.palTag = TAG_NONE;
|
||||||
cursor.palNum = 15;
|
cursor.palNum = 15;
|
||||||
|
|
||||||
return ListMenuAddCursorObjectInternal(&cursor, cursorKind);
|
return ListMenuAddCursorObjectInternal(&cursor, cursorObjId);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ListMenuErasePrintedCursor(struct ListMenu *list, u16 selectedRow)
|
static void ListMenuErasePrintedCursor(struct ListMenu *list, u16 selectedRow)
|
||||||
{
|
{
|
||||||
u8 cursorKind = list->template.cursorKind;
|
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 yMultiplier = GetFontAttribute(list->template.fontId, FONTATTR_MAX_LETTER_HEIGHT) + list->template.itemVerticalPadding;
|
||||||
u8 width = GetMenuCursorDimensionByFont(list->template.fontId, 0);
|
u8 width = GetMenuCursorDimensionByFont(list->template.fontId, 0);
|
||||||
@@ -1071,18 +1077,18 @@ u8 AddScrollIndicatorArrowPair(const struct ScrollArrowsTemplate *arrowInfo, u16
|
|||||||
struct ScrollIndicatorPair *data;
|
struct ScrollIndicatorPair *data;
|
||||||
u8 taskId;
|
u8 taskId;
|
||||||
|
|
||||||
spriteSheet.data = sRedArrowOtherGfx;
|
spriteSheet.data = sScrollIndicator_Gfx;
|
||||||
spriteSheet.size = 0x100;
|
spriteSheet.size = 0x100;
|
||||||
spriteSheet.tag = arrowInfo->tileTag;
|
spriteSheet.tag = arrowInfo->tileTag;
|
||||||
LoadCompressedSpriteSheet(&spriteSheet);
|
LoadCompressedSpriteSheet(&spriteSheet);
|
||||||
|
|
||||||
if (arrowInfo->palTag == TAG_NONE)
|
if (arrowInfo->palTag == TAG_NONE)
|
||||||
{
|
{
|
||||||
LoadPalette(sRedArrowPal, (16 * arrowInfo->palNum) + 0x100, 0x20);
|
LoadPalette(sRedInterface_Pal, (16 * arrowInfo->palNum) + 0x100, 0x20);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
spritePal.data = sRedArrowPal;
|
spritePal.data = sRedInterface_Pal;
|
||||||
spritePal.tag = arrowInfo->palTag;
|
spritePal.tag = arrowInfo->palTag;
|
||||||
LoadSpritePalette(&spritePal);
|
LoadSpritePalette(&spritePal);
|
||||||
}
|
}
|
||||||
@@ -1190,39 +1196,39 @@ void RemoveScrollIndicatorArrowPair(u8 taskId)
|
|||||||
DestroyTask(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:
|
default:
|
||||||
return ListMenuAddRedOutlineCursorObject(cursor);
|
return ListMenuAddRedOutlineCursorObject(cursor);
|
||||||
case 1:
|
case CURSOR_RED_ARROW - CURSOR_OBJECT_START:
|
||||||
return ListMenuAddRedArrowCursorObject(cursor);
|
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);
|
ListMenuUpdateRedOutlineCursorObject(taskId, x, y);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case CURSOR_RED_ARROW - CURSOR_OBJECT_START:
|
||||||
ListMenuUpdateRedArrowCursorObject(taskId, x, y);
|
ListMenuUpdateRedArrowCursorObject(taskId, x, y);
|
||||||
break;
|
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);
|
ListMenuRemoveRedOutlineCursorObject(taskId);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case CURSOR_RED_ARROW - CURSOR_OBJECT_START:
|
||||||
ListMenuRemoveRedArrowCursorObject(taskId);
|
ListMenuRemoveRedArrowCursorObject(taskId);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1317,18 +1323,18 @@ static u8 ListMenuAddRedOutlineCursorObject(struct CursorStruct *cursor)
|
|||||||
struct SpriteTemplate spriteTemplate;
|
struct SpriteTemplate spriteTemplate;
|
||||||
u8 taskId;
|
u8 taskId;
|
||||||
|
|
||||||
spriteSheet.data = sSelectorOutlineGfx;
|
spriteSheet.data = sOutlineCursor_Gfx;
|
||||||
spriteSheet.size = 0x100;
|
spriteSheet.size = 0x100;
|
||||||
spriteSheet.tag = cursor->tileTag;
|
spriteSheet.tag = cursor->tileTag;
|
||||||
LoadCompressedSpriteSheet(&spriteSheet);
|
LoadCompressedSpriteSheet(&spriteSheet);
|
||||||
|
|
||||||
if (cursor->palTag == TAG_NONE)
|
if (cursor->palTag == TAG_NONE)
|
||||||
{
|
{
|
||||||
LoadPalette(sRedArrowPal, (16 * cursor->palNum) + 0x100, 0x20);
|
LoadPalette(sRedInterface_Pal, (16 * cursor->palNum) + 0x100, 0x20);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
spritePal.data = sRedArrowPal;
|
spritePal.data = sRedInterface_Pal;
|
||||||
spritePal.tag = cursor->palTag;
|
spritePal.tag = cursor->palTag;
|
||||||
LoadSpritePalette(&spritePal);
|
LoadSpritePalette(&spritePal);
|
||||||
}
|
}
|
||||||
@@ -1402,18 +1408,18 @@ static u8 ListMenuAddRedArrowCursorObject(struct CursorStruct *cursor)
|
|||||||
struct SpriteTemplate spriteTemplate;
|
struct SpriteTemplate spriteTemplate;
|
||||||
u8 taskId;
|
u8 taskId;
|
||||||
|
|
||||||
spriteSheet.data = sRedArrowGfx;
|
spriteSheet.data = sArrowCursor_Gfx;
|
||||||
spriteSheet.size = 0x80;
|
spriteSheet.size = 0x80;
|
||||||
spriteSheet.tag = cursor->tileTag;
|
spriteSheet.tag = cursor->tileTag;
|
||||||
LoadCompressedSpriteSheet(&spriteSheet);
|
LoadCompressedSpriteSheet(&spriteSheet);
|
||||||
|
|
||||||
if (cursor->palTag == TAG_NONE)
|
if (cursor->palTag == TAG_NONE)
|
||||||
{
|
{
|
||||||
LoadPalette(sRedArrowPal, (16 * cursor->palNum) + 0x100, 0x20);
|
LoadPalette(sRedInterface_Pal, (16 * cursor->palNum) + 0x100, 0x20);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
spritePal.data = sRedArrowPal;
|
spritePal.data = sRedInterface_Pal;
|
||||||
spritePal.tag = cursor->palTag;
|
spritePal.tag = cursor->palTag;
|
||||||
LoadSpritePalette(&spritePal);
|
LoadSpritePalette(&spritePal);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1631,7 +1631,7 @@ static void Task_NewGameBirchSpeech_ProcessNameYesNoMenu(u8 taskId)
|
|||||||
NewGameBirchSpeech_StartFadePlatformIn(taskId, 1);
|
NewGameBirchSpeech_StartFadePlatformIn(taskId, 1);
|
||||||
gTasks[taskId].func = Task_NewGameBirchSpeech_SlidePlatformAway2;
|
gTasks[taskId].func = Task_NewGameBirchSpeech_SlidePlatformAway2;
|
||||||
break;
|
break;
|
||||||
case -1:
|
case MENU_B_PRESSED:
|
||||||
case 1:
|
case 1:
|
||||||
PlaySE(SE_SELECT);
|
PlaySE(SE_SELECT);
|
||||||
gTasks[taskId].func = Task_NewGameBirchSpeech_BoyOrGirl;
|
gTasks[taskId].func = Task_NewGameBirchSpeech_BoyOrGirl;
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ static const struct ListMenuTemplate sMoveRelearnerMovesListTemplate =
|
|||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = FONT_NORMAL,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
//--------------
|
//--------------
|
||||||
@@ -284,7 +284,7 @@ u8 MailboxMenu_CreateList(struct PlayerPCItemPageStruct *page)
|
|||||||
gMultiuseListMenuTemplate.moveCursorFunc = MailboxMenu_MoveCursorFunc;
|
gMultiuseListMenuTemplate.moveCursorFunc = MailboxMenu_MoveCursorFunc;
|
||||||
gMultiuseListMenuTemplate.itemPrintFunc = MailboxMenu_ItemPrintFunc;
|
gMultiuseListMenuTemplate.itemPrintFunc = MailboxMenu_ItemPrintFunc;
|
||||||
gMultiuseListMenuTemplate.fontId = FONT_NORMAL;
|
gMultiuseListMenuTemplate.fontId = FONT_NORMAL;
|
||||||
gMultiuseListMenuTemplate.cursorKind = 0;
|
gMultiuseListMenuTemplate.cursorKind = CURSOR_BLACK_ARROW;
|
||||||
gMultiuseListMenuTemplate.lettersSpacing = 0;
|
gMultiuseListMenuTemplate.lettersSpacing = 0;
|
||||||
gMultiuseListMenuTemplate.itemVerticalPadding = 0;
|
gMultiuseListMenuTemplate.itemVerticalPadding = 0;
|
||||||
gMultiuseListMenuTemplate.scrollMultiple = LIST_NO_MULTIPLE_SCROLL;
|
gMultiuseListMenuTemplate.scrollMultiple = LIST_NO_MULTIPLE_SCROLL;
|
||||||
@@ -1538,7 +1538,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg
|
|||||||
0,
|
0,
|
||||||
15 * i,
|
15 * i,
|
||||||
color,
|
color,
|
||||||
-1,
|
TEXT_SKIP_DRAW,
|
||||||
sLvlUpStatStrings[i]);
|
sLvlUpStatStrings[i]);
|
||||||
|
|
||||||
StringCopy(text, (statsDiff[i] >= 0) ? gText_Plus : gText_Dash);
|
StringCopy(text, (statsDiff[i] >= 0) ? gText_Plus : gText_Dash);
|
||||||
@@ -1547,7 +1547,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg
|
|||||||
56,
|
56,
|
||||||
15 * i,
|
15 * i,
|
||||||
color,
|
color,
|
||||||
-1,
|
TEXT_SKIP_DRAW,
|
||||||
text);
|
text);
|
||||||
if (abs(statsDiff[i]) <= 9)
|
if (abs(statsDiff[i]) <= 9)
|
||||||
x = 18;
|
x = 18;
|
||||||
@@ -1560,7 +1560,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg
|
|||||||
56 + x,
|
56 + x,
|
||||||
15 * i,
|
15 * i,
|
||||||
color,
|
color,
|
||||||
-1,
|
TEXT_SKIP_DRAW,
|
||||||
text);
|
text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1602,7 +1602,7 @@ void DrawLevelUpWindowPg2(u16 windowId, u16 *currStats, u8 bgClr, u8 fgClr, u8 s
|
|||||||
0,
|
0,
|
||||||
15 * i,
|
15 * i,
|
||||||
color,
|
color,
|
||||||
-1,
|
TEXT_SKIP_DRAW,
|
||||||
sLvlUpStatStrings[i]);
|
sLvlUpStatStrings[i]);
|
||||||
|
|
||||||
AddTextPrinterParameterized3(windowId,
|
AddTextPrinterParameterized3(windowId,
|
||||||
@@ -1610,7 +1610,7 @@ void DrawLevelUpWindowPg2(u16 windowId, u16 *currStats, u8 bgClr, u8 fgClr, u8 s
|
|||||||
56 + x,
|
56 + x,
|
||||||
15 * i,
|
15 * i,
|
||||||
color,
|
color,
|
||||||
-1,
|
TEXT_SKIP_DRAW,
|
||||||
text);
|
text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -553,7 +553,7 @@ static void DoMoveRelearnerMain(void)
|
|||||||
gSpecialVar_0x8004 = FALSE;
|
gSpecialVar_0x8004 = FALSE;
|
||||||
sMoveRelearnerStruct->state = MENU_STATE_FADE_AND_RETURN;
|
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)
|
if (sMoveRelearnerMenuSate.showContestInfo == FALSE)
|
||||||
{
|
{
|
||||||
@@ -579,14 +579,14 @@ static void DoMoveRelearnerMain(void)
|
|||||||
break;
|
break;
|
||||||
case MENU_STATE_CONFIRM_DELETE_OLD_MOVE:
|
case MENU_STATE_CONFIRM_DELETE_OLD_MOVE:
|
||||||
{
|
{
|
||||||
s8 var = Menu_ProcessInputNoWrapClearOnChoose();
|
s8 selection = Menu_ProcessInputNoWrapClearOnChoose();
|
||||||
|
|
||||||
if (var == 0)
|
if (selection == 0)
|
||||||
{
|
{
|
||||||
FormatAndPrintText(gText_MoveRelearnerWhichMoveToForget);
|
FormatAndPrintText(gText_MoveRelearnerWhichMoveToForget);
|
||||||
sMoveRelearnerStruct->state = MENU_STATE_PRINT_WHICH_MOVE_PROMPT;
|
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;
|
sMoveRelearnerStruct->state = MENU_STATE_PRINT_STOP_TEACHING;
|
||||||
}
|
}
|
||||||
@@ -606,13 +606,13 @@ static void DoMoveRelearnerMain(void)
|
|||||||
break;
|
break;
|
||||||
case MENU_STATE_CONFIRM_STOP_TEACHING:
|
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;
|
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.
|
// What's the point? It gets set to MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT, anyway.
|
||||||
if (sMoveRelearnerMenuSate.showContestInfo == FALSE)
|
if (sMoveRelearnerMenuSate.showContestInfo == FALSE)
|
||||||
|
|||||||
@@ -234,9 +234,9 @@ static const struct ListMenuTemplate sListMenuTemplate_ThreeOptions = {
|
|||||||
.cursorShadowPal = 3,
|
.cursorShadowPal = 3,
|
||||||
.lettersSpacing = 0,
|
.lettersSpacing = 0,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = 0,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = FONT_NORMAL,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct ListMenuItem sListMenuItems_ReceiveSendToss[] = {
|
static const struct ListMenuItem sListMenuItems_ReceiveSendToss[] = {
|
||||||
@@ -279,9 +279,9 @@ static const struct ListMenuTemplate sListMenu_ReceiveSendToss = {
|
|||||||
.cursorShadowPal = 3,
|
.cursorShadowPal = 3,
|
||||||
.lettersSpacing = 0,
|
.lettersSpacing = 0,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = 0,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = FONT_NORMAL,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct ListMenuTemplate sListMenu_ReceiveToss = {
|
static const struct ListMenuTemplate sListMenu_ReceiveToss = {
|
||||||
@@ -300,9 +300,9 @@ static const struct ListMenuTemplate sListMenu_ReceiveToss = {
|
|||||||
.cursorShadowPal = 3,
|
.cursorShadowPal = 3,
|
||||||
.lettersSpacing = 0,
|
.lettersSpacing = 0,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = 0,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = FONT_NORMAL,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct ListMenuTemplate sListMenu_ReceiveSend = {
|
static const struct ListMenuTemplate sListMenu_ReceiveSend = {
|
||||||
@@ -321,9 +321,9 @@ static const struct ListMenuTemplate sListMenu_ReceiveSend = {
|
|||||||
.cursorShadowPal = 3,
|
.cursorShadowPal = 3,
|
||||||
.lettersSpacing = 0,
|
.lettersSpacing = 0,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = 0,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = FONT_NORMAL,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct ListMenuTemplate sListMenu_Receive = {
|
static const struct ListMenuTemplate sListMenu_Receive = {
|
||||||
@@ -342,9 +342,9 @@ static const struct ListMenuTemplate sListMenu_Receive = {
|
|||||||
.cursorShadowPal = 3,
|
.cursorShadowPal = 3,
|
||||||
.lettersSpacing = 0,
|
.lettersSpacing = 0,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = 0,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = FONT_NORMAL,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u8 *const sUnusedMenuTexts[] = {
|
static const u8 *const sUnusedMenuTexts[] = {
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
#include "berry_powder.h"
|
#include "berry_powder.h"
|
||||||
#include "mystery_gift.h"
|
#include "mystery_gift.h"
|
||||||
#include "union_room_chat.h"
|
#include "union_room_chat.h"
|
||||||
|
#include "constants/items.h"
|
||||||
|
|
||||||
extern const u8 EventScript_ResetAllMapFlags[];
|
extern const u8 EventScript_ResetAllMapFlags[];
|
||||||
|
|
||||||
@@ -181,7 +182,7 @@ void NewGameInitData(void)
|
|||||||
ResetPokemonStorageSystem();
|
ResetPokemonStorageSystem();
|
||||||
ClearRoamerData();
|
ClearRoamerData();
|
||||||
ClearRoamerLocationData();
|
ClearRoamerLocationData();
|
||||||
gSaveBlock1Ptr->registeredItem = 0;
|
gSaveBlock1Ptr->registeredItem = ITEM_NONE;
|
||||||
ClearBag();
|
ClearBag();
|
||||||
NewGameInitPCItems();
|
NewGameInitPCItems();
|
||||||
ClearPokeblocks();
|
ClearPokeblocks();
|
||||||
|
|||||||
@@ -290,8 +290,9 @@ static const struct ListMenuTemplate sListMenuTemplate_ItemStorage =
|
|||||||
.cursorShadowPal = 3,
|
.cursorShadowPal = 3,
|
||||||
.lettersSpacing = FALSE,
|
.lettersSpacing = FALSE,
|
||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = FALSE,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = FONT_NARROW
|
.fontId = FONT_NARROW,
|
||||||
|
.cursorKind = CURSOR_BLACK_ARROW,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct WindowTemplate sWindowTemplates_ItemStorage[ITEMPC_WIN_COUNT] =
|
static const struct WindowTemplate sWindowTemplates_ItemStorage[ITEMPC_WIN_COUNT] =
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ static const struct ListMenuTemplate sPokeblockListMenuTemplate =
|
|||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = LIST_MULTIPLE_SCROLL_DPAD,
|
.scrollMultiple = LIST_MULTIPLE_SCROLL_DPAD,
|
||||||
.fontId = FONT_NORMAL,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 1
|
.cursorKind = CURSOR_INVISIBLE
|
||||||
};
|
};
|
||||||
|
|
||||||
void OpenPokeblockCase(u8 caseId, void (*callback)(void))
|
void OpenPokeblockCase(u8 caseId, void (*callback)(void))
|
||||||
|
|||||||
@@ -4701,7 +4701,7 @@ static int DoPokedexSearch(u8 dexMode, u8 order, u8 abcGroup, u8 bodyColor, u8 t
|
|||||||
{
|
{
|
||||||
species = NationalPokedexNumToSpecies(sPokedexView->pokedexList[i].dexNum);
|
species = NationalPokedexNumToSpecies(sPokedexView->pokedexList[i].dexNum);
|
||||||
|
|
||||||
if (bodyColor == gBaseStats[species].bodyColor)
|
if (bodyColor == gSpeciesInfo[species].bodyColor)
|
||||||
{
|
{
|
||||||
sPokedexView->pokedexList[resultsCount] = sPokedexView->pokedexList[i];
|
sPokedexView->pokedexList[resultsCount] = sPokedexView->pokedexList[i];
|
||||||
resultsCount++;
|
resultsCount++;
|
||||||
@@ -4727,8 +4727,8 @@ static int DoPokedexSearch(u8 dexMode, u8 order, u8 abcGroup, u8 bodyColor, u8 t
|
|||||||
{
|
{
|
||||||
species = NationalPokedexNumToSpecies(sPokedexView->pokedexList[i].dexNum);
|
species = NationalPokedexNumToSpecies(sPokedexView->pokedexList[i].dexNum);
|
||||||
|
|
||||||
types[0] = gBaseStats[species].type1;
|
types[0] = gSpeciesInfo[species].type1;
|
||||||
types[1] = gBaseStats[species].type2;
|
types[1] = gSpeciesInfo[species].type2;
|
||||||
if (types[0] == type1 || types[1] == type1)
|
if (types[0] == type1 || types[1] == type1)
|
||||||
{
|
{
|
||||||
sPokedexView->pokedexList[resultsCount] = sPokedexView->pokedexList[i];
|
sPokedexView->pokedexList[resultsCount] = sPokedexView->pokedexList[i];
|
||||||
@@ -4745,8 +4745,8 @@ static int DoPokedexSearch(u8 dexMode, u8 order, u8 abcGroup, u8 bodyColor, u8 t
|
|||||||
{
|
{
|
||||||
species = NationalPokedexNumToSpecies(sPokedexView->pokedexList[i].dexNum);
|
species = NationalPokedexNumToSpecies(sPokedexView->pokedexList[i].dexNum);
|
||||||
|
|
||||||
types[0] = gBaseStats[species].type1;
|
types[0] = gSpeciesInfo[species].type1;
|
||||||
types[1] = gBaseStats[species].type2;
|
types[1] = gSpeciesInfo[species].type2;
|
||||||
if ((types[0] == type1 && types[1] == type2) || (types[0] == type2 && types[1] == type1))
|
if ((types[0] == type1 && types[1] == type2) || (types[0] == type2 && types[1] == type1))
|
||||||
{
|
{
|
||||||
sPokedexView->pokedexList[resultsCount] = sPokedexView->pokedexList[i];
|
sPokedexView->pokedexList[resultsCount] = sPokedexView->pokedexList[i];
|
||||||
|
|||||||
@@ -1388,7 +1388,7 @@ const s8 gNatureStatTable[NUM_NATURES][NUM_NATURE_STATS] =
|
|||||||
#include "data/pokemon/trainer_class_lookups.h"
|
#include "data/pokemon/trainer_class_lookups.h"
|
||||||
#include "data/pokemon/cry_ids.h"
|
#include "data/pokemon/cry_ids.h"
|
||||||
#include "data/pokemon/experience_tables.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/level_up_learnsets.h"
|
||||||
#include "data/pokemon/evolution.h"
|
#include "data/pokemon/evolution.h"
|
||||||
#include "data/pokemon/level_up_learnset_pointers.h"
|
#include "data/pokemon/level_up_learnset_pointers.h"
|
||||||
@@ -2245,8 +2245,8 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
|||||||
SetBoxMonData(boxMon, MON_DATA_LANGUAGE, &gGameLanguage);
|
SetBoxMonData(boxMon, MON_DATA_LANGUAGE, &gGameLanguage);
|
||||||
SetBoxMonData(boxMon, MON_DATA_OT_NAME, gSaveBlock2Ptr->playerName);
|
SetBoxMonData(boxMon, MON_DATA_OT_NAME, gSaveBlock2Ptr->playerName);
|
||||||
SetBoxMonData(boxMon, MON_DATA_SPECIES, &species);
|
SetBoxMonData(boxMon, MON_DATA_SPECIES, &species);
|
||||||
SetBoxMonData(boxMon, MON_DATA_EXP, &gExperienceTables[gBaseStats[species].growthRate][level]);
|
SetBoxMonData(boxMon, MON_DATA_EXP, &gExperienceTables[gSpeciesInfo[species].growthRate][level]);
|
||||||
SetBoxMonData(boxMon, MON_DATA_FRIENDSHIP, &gBaseStats[species].friendship);
|
SetBoxMonData(boxMon, MON_DATA_FRIENDSHIP, &gSpeciesInfo[species].friendship);
|
||||||
value = GetCurrentRegionMapSectionId();
|
value = GetCurrentRegionMapSectionId();
|
||||||
SetBoxMonData(boxMon, MON_DATA_MET_LOCATION, &value);
|
SetBoxMonData(boxMon, MON_DATA_MET_LOCATION, &value);
|
||||||
SetBoxMonData(boxMon, MON_DATA_MET_LEVEL, &level);
|
SetBoxMonData(boxMon, MON_DATA_MET_LEVEL, &level);
|
||||||
@@ -2286,7 +2286,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
|||||||
SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv);
|
SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gBaseStats[species].abilities[1])
|
if (gSpeciesInfo[species].abilities[1])
|
||||||
{
|
{
|
||||||
value = personality & 1;
|
value = personality & 1;
|
||||||
SetBoxMonData(boxMon, MON_DATA_ABILITY_NUM, &value);
|
SetBoxMonData(boxMon, MON_DATA_ABILITY_NUM, &value);
|
||||||
@@ -2806,7 +2806,7 @@ static u16 CalculateBoxMonChecksum(struct BoxPokemon *boxMon)
|
|||||||
|
|
||||||
#define CALC_STAT(base, iv, ev, statIndex, field) \
|
#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; \
|
s32 n = (((2 * baseStat + iv + ev / 4) * level) / 100) + 5; \
|
||||||
u8 nature = GetNature(mon); \
|
u8 nature = GetNature(mon); \
|
||||||
n = ModifyStatByNature(nature, n, statIndex); \
|
n = ModifyStatByNature(nature, n, statIndex); \
|
||||||
@@ -2841,7 +2841,7 @@ void CalculateMonStats(struct Pokemon *mon)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
s32 n = 2 * gBaseStats[species].baseHP + hpIV;
|
s32 n = 2 * gSpeciesInfo[species].baseHP + hpIV;
|
||||||
newMaxHP = (((n + hpEV / 4) * level) / 100) + level + 10;
|
newMaxHP = (((n + hpEV / 4) * level) / 100) + level + 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2901,7 +2901,7 @@ u8 GetLevelFromMonExp(struct Pokemon *mon)
|
|||||||
u32 exp = GetMonData(mon, MON_DATA_EXP, NULL);
|
u32 exp = GetMonData(mon, MON_DATA_EXP, NULL);
|
||||||
s32 level = 1;
|
s32 level = 1;
|
||||||
|
|
||||||
while (level <= MAX_LEVEL && gExperienceTables[gBaseStats[species].growthRate][level] <= exp)
|
while (level <= MAX_LEVEL && gExperienceTables[gSpeciesInfo[species].growthRate][level] <= exp)
|
||||||
level++;
|
level++;
|
||||||
|
|
||||||
return level - 1;
|
return level - 1;
|
||||||
@@ -2913,7 +2913,7 @@ u8 GetLevelFromBoxMonExp(struct BoxPokemon *boxMon)
|
|||||||
u32 exp = GetBoxMonData(boxMon, MON_DATA_EXP, NULL);
|
u32 exp = GetBoxMonData(boxMon, MON_DATA_EXP, NULL);
|
||||||
s32 level = 1;
|
s32 level = 1;
|
||||||
|
|
||||||
while (level <= MAX_LEVEL && gExperienceTables[gBaseStats[species].growthRate][level] <= exp)
|
while (level <= MAX_LEVEL && gExperienceTables[gSpeciesInfo[species].growthRate][level] <= exp)
|
||||||
level++;
|
level++;
|
||||||
|
|
||||||
return level - 1;
|
return level - 1;
|
||||||
@@ -3442,15 +3442,15 @@ u8 GetBoxMonGender(struct BoxPokemon *boxMon)
|
|||||||
u16 species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL);
|
u16 species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL);
|
||||||
u32 personality = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL);
|
u32 personality = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL);
|
||||||
|
|
||||||
switch (gBaseStats[species].genderRatio)
|
switch (gSpeciesInfo[species].genderRatio)
|
||||||
{
|
{
|
||||||
case MON_MALE:
|
case MON_MALE:
|
||||||
case MON_FEMALE:
|
case MON_FEMALE:
|
||||||
case MON_GENDERLESS:
|
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;
|
return MON_FEMALE;
|
||||||
else
|
else
|
||||||
return MON_MALE;
|
return MON_MALE;
|
||||||
@@ -3458,15 +3458,15 @@ u8 GetBoxMonGender(struct BoxPokemon *boxMon)
|
|||||||
|
|
||||||
u8 GetGenderFromSpeciesAndPersonality(u16 species, u32 personality)
|
u8 GetGenderFromSpeciesAndPersonality(u16 species, u32 personality)
|
||||||
{
|
{
|
||||||
switch (gBaseStats[species].genderRatio)
|
switch (gSpeciesInfo[species].genderRatio)
|
||||||
{
|
{
|
||||||
case MON_MALE:
|
case MON_MALE:
|
||||||
case MON_FEMALE:
|
case MON_FEMALE:
|
||||||
case MON_GENDERLESS:
|
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;
|
return MON_FEMALE;
|
||||||
else
|
else
|
||||||
return MON_MALE;
|
return MON_MALE;
|
||||||
@@ -4495,9 +4495,9 @@ u8 GetMonsStateToDoubles_2(void)
|
|||||||
u8 GetAbilityBySpecies(u16 species, u8 abilityNum)
|
u8 GetAbilityBySpecies(u16 species, u8 abilityNum)
|
||||||
{
|
{
|
||||||
if (abilityNum)
|
if (abilityNum)
|
||||||
gLastUsedAbility = gBaseStats[species].abilities[1];
|
gLastUsedAbility = gSpeciesInfo[species].abilities[1];
|
||||||
else
|
else
|
||||||
gLastUsedAbility = gBaseStats[species].abilities[0];
|
gLastUsedAbility = gSpeciesInfo[species].abilities[0];
|
||||||
|
|
||||||
return gLastUsedAbility;
|
return gLastUsedAbility;
|
||||||
}
|
}
|
||||||
@@ -4651,8 +4651,8 @@ void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex)
|
|||||||
gBattleMons[battlerId].isEgg = GetMonData(&gPlayerParty[partyIndex], MON_DATA_IS_EGG, NULL);
|
gBattleMons[battlerId].isEgg = GetMonData(&gPlayerParty[partyIndex], MON_DATA_IS_EGG, NULL);
|
||||||
gBattleMons[battlerId].abilityNum = GetMonData(&gPlayerParty[partyIndex], MON_DATA_ABILITY_NUM, NULL);
|
gBattleMons[battlerId].abilityNum = GetMonData(&gPlayerParty[partyIndex], MON_DATA_ABILITY_NUM, NULL);
|
||||||
gBattleMons[battlerId].otId = GetMonData(&gPlayerParty[partyIndex], MON_DATA_OT_ID, NULL);
|
gBattleMons[battlerId].otId = GetMonData(&gPlayerParty[partyIndex], MON_DATA_OT_ID, NULL);
|
||||||
gBattleMons[battlerId].type1 = gBaseStats[gBattleMons[battlerId].species].type1;
|
gBattleMons[battlerId].type1 = gSpeciesInfo[gBattleMons[battlerId].species].type1;
|
||||||
gBattleMons[battlerId].type2 = gBaseStats[gBattleMons[battlerId].species].type2;
|
gBattleMons[battlerId].type2 = gSpeciesInfo[gBattleMons[battlerId].species].type2;
|
||||||
gBattleMons[battlerId].ability = GetAbilityBySpecies(gBattleMons[battlerId].species, gBattleMons[battlerId].abilityNum);
|
gBattleMons[battlerId].ability = GetAbilityBySpecies(gBattleMons[battlerId].species, gBattleMons[battlerId].abilityNum);
|
||||||
GetMonData(&gPlayerParty[partyIndex], MON_DATA_NICKNAME, nickname);
|
GetMonData(&gPlayerParty[partyIndex], MON_DATA_NICKNAME, nickname);
|
||||||
StringCopy_Nickname(gBattleMons[battlerId].nickname, nickname);
|
StringCopy_Nickname(gBattleMons[battlerId].nickname, nickname);
|
||||||
@@ -4869,7 +4869,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
|||||||
if ((itemEffect[i] & ITEM3_LEVEL_UP)
|
if ((itemEffect[i] & ITEM3_LEVEL_UP)
|
||||||
&& GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL)
|
&& GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL)
|
||||||
{
|
{
|
||||||
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];
|
||||||
SetMonData(mon, MON_DATA_EXP, &dataUnsigned);
|
SetMonData(mon, MON_DATA_EXP, &dataUnsigned);
|
||||||
CalculateMonStats(mon);
|
CalculateMonStats(mon);
|
||||||
retVal = FALSE;
|
retVal = FALSE;
|
||||||
@@ -5948,22 +5948,22 @@ void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies)
|
|||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case STAT_HP:
|
case STAT_HP:
|
||||||
evIncrease = gBaseStats[defeatedSpecies].evYield_HP * multiplier;
|
evIncrease = gSpeciesInfo[defeatedSpecies].evYield_HP * multiplier;
|
||||||
break;
|
break;
|
||||||
case STAT_ATK:
|
case STAT_ATK:
|
||||||
evIncrease = gBaseStats[defeatedSpecies].evYield_Attack * multiplier;
|
evIncrease = gSpeciesInfo[defeatedSpecies].evYield_Attack * multiplier;
|
||||||
break;
|
break;
|
||||||
case STAT_DEF:
|
case STAT_DEF:
|
||||||
evIncrease = gBaseStats[defeatedSpecies].evYield_Defense * multiplier;
|
evIncrease = gSpeciesInfo[defeatedSpecies].evYield_Defense * multiplier;
|
||||||
break;
|
break;
|
||||||
case STAT_SPEED:
|
case STAT_SPEED:
|
||||||
evIncrease = gBaseStats[defeatedSpecies].evYield_Speed * multiplier;
|
evIncrease = gSpeciesInfo[defeatedSpecies].evYield_Speed * multiplier;
|
||||||
break;
|
break;
|
||||||
case STAT_SPATK:
|
case STAT_SPATK:
|
||||||
evIncrease = gBaseStats[defeatedSpecies].evYield_SpAttack * multiplier;
|
evIncrease = gSpeciesInfo[defeatedSpecies].evYield_SpAttack * multiplier;
|
||||||
break;
|
break;
|
||||||
case STAT_SPDEF:
|
case STAT_SPDEF:
|
||||||
evIncrease = gBaseStats[defeatedSpecies].evYield_SpDefense * multiplier;
|
evIncrease = gSpeciesInfo[defeatedSpecies].evYield_SpDefense * multiplier;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6165,12 +6165,12 @@ bool8 TryIncrementMonLevel(struct Pokemon *mon)
|
|||||||
u16 species = GetMonData(mon, MON_DATA_SPECIES, 0);
|
u16 species = GetMonData(mon, MON_DATA_SPECIES, 0);
|
||||||
u8 nextLevel = GetMonData(mon, MON_DATA_LEVEL, 0) + 1;
|
u8 nextLevel = GetMonData(mon, MON_DATA_LEVEL, 0) + 1;
|
||||||
u32 expPoints = GetMonData(mon, MON_DATA_EXP, 0);
|
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);
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -6494,7 +6494,7 @@ bool32 IsHMMove2(u16 move)
|
|||||||
|
|
||||||
bool8 IsMonSpriteNotFlipped(u16 species)
|
bool8 IsMonSpriteNotFlipped(u16 species)
|
||||||
{
|
{
|
||||||
return gBaseStats[species].noFlip;
|
return gSpeciesInfo[species].noFlip;
|
||||||
}
|
}
|
||||||
|
|
||||||
s8 GetMonFlavorRelation(struct Pokemon *mon, u8 flavor)
|
s8 GetMonFlavorRelation(struct Pokemon *mon, u8 flavor)
|
||||||
@@ -6615,26 +6615,26 @@ void SetWildMonHeldItem(void)
|
|||||||
if (rnd < chanceNoItem)
|
if (rnd < chanceNoItem)
|
||||||
return;
|
return;
|
||||||
if (rnd < chanceNotRare)
|
if (rnd < chanceNotRare)
|
||||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemCommon);
|
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemCommon);
|
||||||
else
|
else
|
||||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemRare);
|
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemRare);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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
|
// Both held items are the same, 100% chance to hold item
|
||||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemCommon);
|
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemCommon);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (rnd < chanceNoItem)
|
if (rnd < chanceNoItem)
|
||||||
return;
|
return;
|
||||||
if (rnd < chanceNotRare)
|
if (rnd < chanceNotRare)
|
||||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemCommon);
|
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemCommon);
|
||||||
else
|
else
|
||||||
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].itemRare);
|
SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemRare);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -901,11 +901,11 @@ u8 GetSpeciesBackAnimSet(u16 species)
|
|||||||
// as 0xFFFFXXXX instead of the desired 0x02YYXXXX.
|
// as 0xFFFFXXXX instead of the desired 0x02YYXXXX.
|
||||||
// By dumb luck, this is not an issue in vanilla. However,
|
// By dumb luck, this is not an issue in vanilla. However,
|
||||||
// changing the link order revealed this bug.
|
// changing the link order revealed this bug.
|
||||||
#if MODERN
|
#if MODERN || defined(BUGFIX)
|
||||||
#define ANIM_SPRITE(taskId) ((struct Sprite *)((gTasks[taskId].tPtrHi << 16) | ((u16)gTasks[taskId].tPtrLo)))
|
#define ANIM_SPRITE(taskId) ((struct Sprite *)((gTasks[taskId].tPtrHi << 16) | ((u16)gTasks[taskId].tPtrLo)))
|
||||||
#else
|
#else
|
||||||
#define ANIM_SPRITE(taskId) ((struct Sprite *)((gTasks[taskId].tPtrHi << 16) | (gTasks[taskId].tPtrLo)))
|
#define ANIM_SPRITE(taskId) ((struct Sprite *)((gTasks[taskId].tPtrHi << 16) | (gTasks[taskId].tPtrLo)))
|
||||||
#endif //MODERN
|
#endif //MODERN || BUGFIX
|
||||||
|
|
||||||
static void Task_HandleMonAnimation(u8 taskId)
|
static void Task_HandleMonAnimation(u8 taskId)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ enum {
|
|||||||
#define PSS_DATA_WINDOW_MOVE_DESCRIPTION 2
|
#define PSS_DATA_WINDOW_MOVE_DESCRIPTION 2
|
||||||
|
|
||||||
#define MOVE_SELECTOR_SPRITES_COUNT 10
|
#define MOVE_SELECTOR_SPRITES_COUNT 10
|
||||||
|
#define TYPE_ICON_SPRITE_COUNT (MAX_MON_MOVES + 1)
|
||||||
// for the spriteIds field in PokemonSummaryScreenData
|
// for the spriteIds field in PokemonSummaryScreenData
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@@ -114,7 +115,7 @@ enum
|
|||||||
SPRITE_ARR_ID_BALL,
|
SPRITE_ARR_ID_BALL,
|
||||||
SPRITE_ARR_ID_STATUS,
|
SPRITE_ARR_ID_STATUS,
|
||||||
SPRITE_ARR_ID_TYPE, // 2 for mon types, 5 for move types(4 moves and 1 to learn), used interchangeably, because mon types and move types aren't shown on the same screen
|
SPRITE_ARR_ID_TYPE, // 2 for mon types, 5 for move types(4 moves and 1 to learn), used interchangeably, because mon types and move types aren't shown on the same screen
|
||||||
SPRITE_ARR_ID_MOVE_SELECTOR1 = SPRITE_ARR_ID_TYPE + 5, // 10 sprites that make up the selector
|
SPRITE_ARR_ID_MOVE_SELECTOR1 = SPRITE_ARR_ID_TYPE + TYPE_ICON_SPRITE_COUNT, // 10 sprites that make up the selector
|
||||||
SPRITE_ARR_ID_MOVE_SELECTOR2 = SPRITE_ARR_ID_MOVE_SELECTOR1 + MOVE_SELECTOR_SPRITES_COUNT,
|
SPRITE_ARR_ID_MOVE_SELECTOR2 = SPRITE_ARR_ID_MOVE_SELECTOR1 + MOVE_SELECTOR_SPRITES_COUNT,
|
||||||
SPRITE_ARR_ID_COUNT = SPRITE_ARR_ID_MOVE_SELECTOR2 + MOVE_SELECTOR_SPRITES_COUNT
|
SPRITE_ARR_ID_COUNT = SPRITE_ARR_ID_MOVE_SELECTOR2 + MOVE_SELECTOR_SPRITES_COUNT
|
||||||
};
|
};
|
||||||
@@ -2611,8 +2612,8 @@ static void DrawExperienceProgressBar(struct Pokemon *unused)
|
|||||||
|
|
||||||
if (summary->level < MAX_LEVEL)
|
if (summary->level < MAX_LEVEL)
|
||||||
{
|
{
|
||||||
u32 expBetweenLevels = gExperienceTables[gBaseStats[summary->species].growthRate][summary->level + 1] - 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[gBaseStats[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.
|
// 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
|
// There are 8 tiles that make up the bar, and each tile has 8 "ticks". Hence, the numerator
|
||||||
@@ -3412,7 +3413,7 @@ static void PrintExpPointsNextLevel(void)
|
|||||||
PrintTextOnWindow(windowId, gStringVar1, x, 1, 0, 0);
|
PrintTextOnWindow(windowId, gStringVar1, x, 1, 0, 0);
|
||||||
|
|
||||||
if (sum->level < MAX_LEVEL)
|
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
|
else
|
||||||
expToNextLevel = 0;
|
expToNextLevel = 0;
|
||||||
|
|
||||||
@@ -3759,7 +3760,7 @@ static void CreateMoveTypeIcons(void)
|
|||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
|
|
||||||
for (i = SPRITE_ARR_ID_TYPE; i < SPRITE_ARR_ID_TYPE + 5; i++)
|
for (i = SPRITE_ARR_ID_TYPE; i < SPRITE_ARR_ID_TYPE + TYPE_ICON_SPRITE_COUNT; i++)
|
||||||
{
|
{
|
||||||
if (sMonSummaryScreen->spriteIds[i] == SPRITE_NONE)
|
if (sMonSummaryScreen->spriteIds[i] == SPRITE_NONE)
|
||||||
sMonSummaryScreen->spriteIds[i] = CreateSprite(&sSpriteTemplate_MoveTypes, 0, 0, 2);
|
sMonSummaryScreen->spriteIds[i] = CreateSprite(&sSpriteTemplate_MoveTypes, 0, 0, 2);
|
||||||
@@ -3788,10 +3789,10 @@ static void SetMonTypeIcons(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetTypeSpritePosAndPal(gBaseStats[summary->species].type1, 120, 48, SPRITE_ARR_ID_TYPE);
|
SetTypeSpritePosAndPal(gSpeciesInfo[summary->species].type1, 120, 48, SPRITE_ARR_ID_TYPE);
|
||||||
if (gBaseStats[summary->species].type1 != gBaseStats[summary->species].type2)
|
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);
|
SetSpriteInvisibility(SPRITE_ARR_ID_TYPE + 1, FALSE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -59,23 +59,23 @@ struct PlayerRecordRS
|
|||||||
struct RecordMixingDaycareMail daycareMail;
|
struct RecordMixingDaycareMail daycareMail;
|
||||||
struct RSBattleTowerRecord battleTowerRecord;
|
struct RSBattleTowerRecord battleTowerRecord;
|
||||||
u16 giftItem;
|
u16 giftItem;
|
||||||
u16 padding[50];
|
u16 filler[50];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PlayerRecordEmerald
|
struct PlayerRecordEmerald
|
||||||
{
|
{
|
||||||
/* 0x0000 */ struct SecretBase secretBases[SECRET_BASES_COUNT];
|
/* 0x0000 */ struct SecretBase secretBases[SECRET_BASES_COUNT];
|
||||||
/* 0x0c80 */ TVShow tvShows[TV_SHOWS_COUNT];
|
/* 0x0C80 */ TVShow tvShows[TV_SHOWS_COUNT];
|
||||||
/* 0x1004 */ PokeNews pokeNews[POKE_NEWS_COUNT];
|
/* 0x1004 */ PokeNews pokeNews[POKE_NEWS_COUNT];
|
||||||
/* 0x1044 */ OldMan oldMan;
|
/* 0x1044 */ OldMan oldMan;
|
||||||
/* 0x1084 */ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT];
|
/* 0x1084 */ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT];
|
||||||
/* 0x10ac */ struct RecordMixingDaycareMail daycareMail;
|
/* 0x10AC */ struct RecordMixingDaycareMail daycareMail;
|
||||||
/* 0x1124 */ struct EmeraldBattleTowerRecord battleTowerRecord;
|
/* 0x1124 */ struct EmeraldBattleTowerRecord battleTowerRecord;
|
||||||
/* 0x1210 */ u16 giftItem;
|
/* 0x1210 */ u16 giftItem;
|
||||||
/* 0x1214 */ LilycoveLady lilycoveLady;
|
/* 0x1214 */ LilycoveLady lilycoveLady;
|
||||||
/* 0x1254 */ struct Apprentice apprentices[2];
|
/* 0x1254 */ struct Apprentice apprentices[2];
|
||||||
/* 0x12dc */ struct PlayerHallRecords hallRecords;
|
/* 0x12DC */ struct PlayerHallRecords hallRecords;
|
||||||
/* 0x1434 */ u8 padding[16];
|
/* 0x1434 */ u8 filler_1434[16];
|
||||||
}; // 0x1444
|
}; // 0x1444
|
||||||
|
|
||||||
union PlayerRecord
|
union PlayerRecord
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ struct GFRomHeader
|
|||||||
u32 externalEventFlagsOffset;
|
u32 externalEventFlagsOffset;
|
||||||
u32 externalEventDataOffset;
|
u32 externalEventDataOffset;
|
||||||
u32 unk18;
|
u32 unk18;
|
||||||
const struct BaseStats * baseStats;
|
const struct SpeciesInfo * speciesInfo;
|
||||||
const u8 (* abilityNames)[];
|
const u8 (* abilityNames)[];
|
||||||
const u8 * const * abilityDescriptions;
|
const u8 * const * abilityDescriptions;
|
||||||
const struct Item * items;
|
const struct Item * items;
|
||||||
@@ -150,7 +150,7 @@ static const struct GFRomHeader sGFRomHeader = {
|
|||||||
.externalEventFlagsOffset = offsetof(struct SaveBlock1, externalEventFlags),
|
.externalEventFlagsOffset = offsetof(struct SaveBlock1, externalEventFlags),
|
||||||
.externalEventDataOffset = offsetof(struct SaveBlock1, externalEventData),
|
.externalEventDataOffset = offsetof(struct SaveBlock1, externalEventData),
|
||||||
.unk18 = 0x00000000,
|
.unk18 = 0x00000000,
|
||||||
.baseStats = gBaseStats,
|
.speciesInfo = gSpeciesInfo,
|
||||||
.abilityNames = gAbilityNames,
|
.abilityNames = gAbilityNames,
|
||||||
.abilityDescriptions = gAbilityDescriptionPointers,
|
.abilityDescriptions = gAbilityDescriptionPointers,
|
||||||
.items = gItems,
|
.items = gItems,
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ static const struct ListMenuTemplate sRegistryListMenuTemplate =
|
|||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = FONT_NORMAL,
|
.fontId = FONT_NORMAL,
|
||||||
.cursorKind = 0,
|
.cursorKind = CURSOR_BLACK_ARROW,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void ClearSecretBase(struct SecretBase *secretBase)
|
static void ClearSecretBase(struct SecretBase *secretBase)
|
||||||
@@ -953,7 +953,7 @@ static void BuildRegistryMenuItems(u8 taskId)
|
|||||||
}
|
}
|
||||||
|
|
||||||
sRegistryMenu->items[count].name = gText_Cancel;
|
sRegistryMenu->items[count].name = gText_Cancel;
|
||||||
sRegistryMenu->items[count].id = -2;
|
sRegistryMenu->items[count].id = LIST_CANCEL;
|
||||||
tNumBases = count + 1;
|
tNumBases = count + 1;
|
||||||
if (tNumBases < 8)
|
if (tNumBases < 8)
|
||||||
tMaxShownItems = tNumBases;
|
tMaxShownItems = tNumBases;
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ static const struct ListMenuTemplate sShopBuyMenuListTemplate =
|
|||||||
.itemVerticalPadding = 0,
|
.itemVerticalPadding = 0,
|
||||||
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
.scrollMultiple = LIST_NO_MULTIPLE_SCROLL,
|
||||||
.fontId = FONT_NARROW,
|
.fontId = FONT_NARROW,
|
||||||
.cursorKind = 0
|
.cursorKind = CURSOR_BLACK_ARROW
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct BgTemplate sShopBuyMenuBgTemplates[] =
|
static const struct BgTemplate sShopBuyMenuBgTemplates[] =
|
||||||
@@ -808,9 +808,9 @@ static void BuyMenuDrawMapBg(void)
|
|||||||
metatileLayerType = METATILE_LAYER_TYPE_COVERED;
|
metatileLayerType = METATILE_LAYER_TYPE_COVERED;
|
||||||
|
|
||||||
if (metatile < NUM_METATILES_IN_PRIMARY)
|
if (metatile < NUM_METATILES_IN_PRIMARY)
|
||||||
BuyMenuDrawMapMetatile(i, j, mapLayout->primaryTileset->metatiles + metatile * 8, metatileLayerType);
|
BuyMenuDrawMapMetatile(i, j, mapLayout->primaryTileset->metatiles + metatile * NUM_TILES_PER_METATILE, metatileLayerType);
|
||||||
else
|
else
|
||||||
BuyMenuDrawMapMetatile(i, j, mapLayout->secondaryTileset->metatiles + ((metatile - NUM_METATILES_IN_PRIMARY) * 8), metatileLayerType);
|
BuyMenuDrawMapMetatile(i, j, mapLayout->secondaryTileset->metatiles + ((metatile - NUM_METATILES_IN_PRIMARY) * NUM_TILES_PER_METATILE), metatileLayerType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -996,7 +996,7 @@ static u8 SaveConfirmInputCallback(void)
|
|||||||
sSaveDialogCallback = SaveFileExistsCallback;
|
sSaveDialogCallback = SaveFileExistsCallback;
|
||||||
return SAVE_IN_PROGRESS;
|
return SAVE_IN_PROGRESS;
|
||||||
}
|
}
|
||||||
case -1: // B Button
|
case MENU_B_PRESSED:
|
||||||
case 1: // No
|
case 1: // No
|
||||||
HideSaveInfoWindow();
|
HideSaveInfoWindow();
|
||||||
HideSaveMessageWindow();
|
HideSaveMessageWindow();
|
||||||
@@ -1042,7 +1042,7 @@ static u8 SaveOverwriteInputCallback(void)
|
|||||||
case 0: // Yes
|
case 0: // Yes
|
||||||
sSaveDialogCallback = SaveSavingMessageCallback;
|
sSaveDialogCallback = SaveSavingMessageCallback;
|
||||||
return SAVE_IN_PROGRESS;
|
return SAVE_IN_PROGRESS;
|
||||||
case -1: // B Button
|
case MENU_B_PRESSED:
|
||||||
case 1: // No
|
case 1: // No
|
||||||
HideSaveInfoWindow();
|
HideSaveInfoWindow();
|
||||||
HideSaveMessageWindow();
|
HideSaveMessageWindow();
|
||||||
@@ -1161,7 +1161,7 @@ static u8 BattlePyramidRetireInputCallback(void)
|
|||||||
{
|
{
|
||||||
case 0: // Yes
|
case 0: // Yes
|
||||||
return SAVE_CANCELED;
|
return SAVE_CANCELED;
|
||||||
case -1: // B Button
|
case MENU_B_PRESSED:
|
||||||
case 1: // No
|
case 1: // No
|
||||||
HideSaveMessageWindow();
|
HideSaveMessageWindow();
|
||||||
return SAVE_SUCCESS;
|
return SAVE_SUCCESS;
|
||||||
|
|||||||
@@ -484,14 +484,14 @@ const u16 *const gTilesetAnims_BikeShop_BlinkingLights[] = {
|
|||||||
gTilesetAnims_BikeShop_BlinkingLights_Frame1
|
gTilesetAnims_BikeShop_BlinkingLights_Frame1
|
||||||
};
|
};
|
||||||
|
|
||||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame0[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/0.4bpp");
|
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame0[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/0_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/0_groudon.4bpp");
|
||||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame1[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/1.4bpp");
|
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame1[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/1_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/1_groudon.4bpp");
|
||||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame2[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/2.4bpp");
|
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame2[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/2_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/2_groudon.4bpp");
|
||||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame3[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/3.4bpp");
|
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame3[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/3_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/3_groudon.4bpp");
|
||||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/4.4bpp");
|
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/4_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/4_groudon.4bpp");
|
||||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame5[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/5.4bpp");
|
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame5[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/5_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/5_groudon.4bpp");
|
||||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame6[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/6.4bpp");
|
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame6[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/6_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/6_groudon.4bpp");
|
||||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame7[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/7.4bpp");
|
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame7[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/7_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/7_groudon.4bpp");
|
||||||
const u16 tileset_anims_space_8[16] = {};
|
const u16 tileset_anims_space_8[16] = {};
|
||||||
|
|
||||||
const u16 gTilesetAnims_Unused1_Frame0[] = INCBIN_U16("data/tilesets/secondary/unused_1/0.4bpp");
|
const u16 gTilesetAnims_Unused1_Frame0[] = INCBIN_U16("data/tilesets/secondary/unused_1/0.4bpp");
|
||||||
|
|||||||
@@ -2465,8 +2465,8 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Player's Pokémon must be of the type the partner requested
|
// Player's Pokémon must be of the type the partner requested
|
||||||
if (gBaseStats[playerSpecies2].type1 != requestedType
|
if (gSpeciesInfo[playerSpecies2].type1 != requestedType
|
||||||
&& gBaseStats[playerSpecies2].type2 != requestedType)
|
&& gSpeciesInfo[playerSpecies2].type2 != requestedType)
|
||||||
return UR_TRADE_MSG_NOT_MON_PARTNER_WANTS;
|
return UR_TRADE_MSG_NOT_MON_PARTNER_WANTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -924,7 +924,7 @@ u8 GetTrainerEncounterMusicIdInTrainerHill(u16 trainerId)
|
|||||||
static void SetTrainerHillMonLevel(struct Pokemon *mon, u8 level)
|
static void SetTrainerHillMonLevel(struct Pokemon *mon, u8 level)
|
||||||
{
|
{
|
||||||
u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL);
|
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_EXP, &exp);
|
||||||
SetMonData(mon, MON_DATA_LEVEL, &level);
|
SetMonData(mon, MON_DATA_LEVEL, &level);
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ static void GetURoomActivityRejectMsg(u8 *, s32, u32);
|
|||||||
static u32 ConvPartnerUnameAndGetWhetherMetAlready(struct RfuPlayer *);
|
static u32 ConvPartnerUnameAndGetWhetherMetAlready(struct RfuPlayer *);
|
||||||
static void GetURoomActivityStartMsg(u8 *, u8);
|
static void GetURoomActivityStartMsg(u8 *, u8);
|
||||||
static void UR_ClearBg0(void);
|
static void UR_ClearBg0(void);
|
||||||
static s32 IsRequestedTypeOrEggInPlayerParty(u32, u32);
|
static s32 IsRequestedTradeInPlayerParty(u32, u32);
|
||||||
static bool32 UR_PrintFieldMessage(const u8 *);
|
static bool32 UR_PrintFieldMessage(const u8 *);
|
||||||
static s32 GetChatLeaderActionRequestMessage(u8 *, u32, u16 *, struct WirelessLink_URoom *);
|
static s32 GetChatLeaderActionRequestMessage(u8 *, u32, u16 *, struct WirelessLink_URoom *);
|
||||||
static void Task_InitUnionRoom(u8 taskId);
|
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);
|
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_SINGLE:
|
||||||
case ACTIVITY_BATTLE_DOUBLE:
|
case ACTIVITY_BATTLE_DOUBLE:
|
||||||
@@ -343,18 +343,18 @@ static void GetAwaitingCommunicationText(u8 *dst, u8 caseId)
|
|||||||
case ACTIVITY_CONTEST_TOUGH:
|
case ACTIVITY_CONTEST_TOUGH:
|
||||||
// BUG: argument *dst isn't used, instead it always prints to gStringVar4
|
// BUG: argument *dst isn't used, instead it always prints to gStringVar4
|
||||||
// not an issue in practice since Gamefreak never used any other arguments here besides gStringVar4
|
// not an issue in practice since Gamefreak never used any other arguments here besides gStringVar4
|
||||||
#ifndef BUGFIX
|
#ifndef BUGFIX
|
||||||
StringExpandPlaceholders(gStringVar4, sText_AwaitingCommunication);
|
StringExpandPlaceholders(gStringVar4, sText_AwaitingCommunication);
|
||||||
#else
|
#else
|
||||||
StringExpandPlaceholders(dst, sText_AwaitingCommunication);
|
StringExpandPlaceholders(dst, sText_AwaitingCommunication);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool32 IsActivityWithVariableGroupSize(u32 caseId)
|
static bool32 IsActivityWithVariableGroupSize(u32 activity)
|
||||||
{
|
{
|
||||||
switch (caseId)
|
switch (activity)
|
||||||
{
|
{
|
||||||
case ACTIVITY_POKEMON_JUMP:
|
case ACTIVITY_POKEMON_JUMP:
|
||||||
case ACTIVITY_BERRY_CRUSH:
|
case ACTIVITY_BERRY_CRUSH:
|
||||||
@@ -507,11 +507,11 @@ static void Task_TryBecomeLinkLeader(u8 taskId)
|
|||||||
// BUG: sPlayerActivityGroupSize was meant below, not gPlayerCurrActivity
|
// BUG: sPlayerActivityGroupSize was meant below, not gPlayerCurrActivity
|
||||||
// This will be false for all but ACTIVITY_BATTLE_DOUBLE and ACTIVITY_DECLINE
|
// This will be false for all but ACTIVITY_BATTLE_DOUBLE and ACTIVITY_DECLINE
|
||||||
// All this changes is which of two texts gets printed
|
// All this changes is which of two texts gets printed
|
||||||
#ifdef BUGFIX
|
#ifdef BUGFIX
|
||||||
id = (GROUP_MAX(sPlayerActivityGroupSize) == 2) ? 0 : 1;
|
id = (GROUP_MAX(sPlayerActivityGroupSize) == 2) ? 0 : 1;
|
||||||
#else
|
#else
|
||||||
id = (GROUP_MAX(gPlayerCurrActivity) == 2) ? 1 : 0;
|
id = (GROUP_MAX(gPlayerCurrActivity) == 2) ? 1 : 0;
|
||||||
#endif
|
#endif
|
||||||
if (PrintOnTextbox(&data->textState, sPlayerUnavailableTexts[id]))
|
if (PrintOnTextbox(&data->textState, sPlayerUnavailableTexts[id]))
|
||||||
{
|
{
|
||||||
data->playerCount = LeaderPrunePlayerList(data->playerList);
|
data->playerCount = LeaderPrunePlayerList(data->playerList);
|
||||||
@@ -559,6 +559,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId)
|
|||||||
{
|
{
|
||||||
if (data->joinRequestAnswer == RFU_STATUS_JOIN_GROUP_OK)
|
if (data->joinRequestAnswer == RFU_STATUS_JOIN_GROUP_OK)
|
||||||
{
|
{
|
||||||
|
// Sent "OK"
|
||||||
data->playerList->players[data->playerCount].newPlayerCountdown = 0;
|
data->playerList->players[data->playerCount].newPlayerCountdown = 0;
|
||||||
RedrawListMenu(data->listTaskId);
|
RedrawListMenu(data->listTaskId);
|
||||||
data->playerCount++;
|
data->playerCount++;
|
||||||
@@ -596,6 +597,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId)
|
|||||||
}
|
}
|
||||||
else if (val == 2)
|
else if (val == 2)
|
||||||
{
|
{
|
||||||
|
// Disconnect
|
||||||
RfuSetStatus(RFU_STATUS_OK, 0);
|
RfuSetStatus(RFU_STATUS_OK, 0);
|
||||||
data->state = LL_STATE_GET_AWAITING_PLAYERS_TEXT;
|
data->state = LL_STATE_GET_AWAITING_PLAYERS_TEXT;
|
||||||
}
|
}
|
||||||
@@ -734,9 +736,9 @@ static void Leader_DestroyResources(struct WirelessLink_Leader *data)
|
|||||||
Free(data->incomingPlayerList);
|
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_SINGLE:
|
||||||
case ACTIVITY_BATTLE_DOUBLE:
|
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_BATTLE_SINGLE | IN_UNION_ROOM:
|
||||||
case ACTIVITY_TRADE | 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_SINGLE:
|
||||||
case ACTIVITY_BATTLE_DOUBLE:
|
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_SINGLE:
|
||||||
case ACTIVITY_BATTLE_DOUBLE:
|
case ACTIVITY_BATTLE_DOUBLE:
|
||||||
@@ -1039,7 +1041,7 @@ static void Task_TryJoinLinkGroup(u8 taskId)
|
|||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
id = ListMenu_ProcessInput(data->listTaskId);
|
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
|
// this unused variable along with the assignment is needed to match
|
||||||
u32 activity = data->playerList->players[id].rfu.data.activity;
|
u32 activity = data->playerList->players[id].rfu.data.activity;
|
||||||
@@ -1469,9 +1471,7 @@ static void Task_CreateTradeMenu(u8 taskId)
|
|||||||
|
|
||||||
u8 CreateTask_CreateTradeMenu(void)
|
u8 CreateTask_CreateTradeMenu(void)
|
||||||
{
|
{
|
||||||
u8 taskId = CreateTask(Task_CreateTradeMenu, 0);
|
return CreateTask(Task_CreateTradeMenu, 0);
|
||||||
|
|
||||||
return taskId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Task_StartUnionRoomTrade(u8 taskId)
|
static void Task_StartUnionRoomTrade(u8 taskId)
|
||||||
@@ -2147,11 +2147,10 @@ static void Task_CardOrNewsWithFriend(u8 taskId)
|
|||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
id = ListMenu_ProcessInput(data->listTaskId);
|
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
|
// this unused variable along with the assignment is needed to match
|
||||||
u32 unusedVar;
|
u32 activity = data->playerList->players[id].rfu.data.activity;
|
||||||
unusedVar = data->playerList->players[id].rfu.data.activity;
|
|
||||||
|
|
||||||
if (data->playerList->players[id].groupScheduledAnim == UNION_ROOM_SPAWN_IN && !data->playerList->players[id].rfu.data.startedActivity)
|
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;
|
break;
|
||||||
case UR_STATE_INIT_OBJECTS:
|
case UR_STATE_INIT_OBJECTS:
|
||||||
CreateUnionRoomPlayerSprites(uroom->spriteIds, taskData[0]);
|
CreateUnionRoomPlayerSprites(uroom->spriteIds, taskData[0]);
|
||||||
if (++taskData[0] == 8)
|
if (++taskData[0] == MAX_UNION_ROOM_LEADERS)
|
||||||
uroom->state = UR_STATE_INIT_LINK;
|
uroom->state = UR_STATE_INIT_LINK;
|
||||||
break;
|
break;
|
||||||
case UR_STATE_INIT_LINK:
|
case UR_STATE_INIT_LINK:
|
||||||
@@ -2711,7 +2710,7 @@ static void Task_RunUnionRoom(u8 taskId)
|
|||||||
&uroom->topListMenuId,
|
&uroom->topListMenuId,
|
||||||
&sWindowTemplate_InviteToActivity,
|
&sWindowTemplate_InviteToActivity,
|
||||||
&sListMenuTemplate_InviteToActivity);
|
&sListMenuTemplate_InviteToActivity);
|
||||||
if (input != -1)
|
if (input != LIST_NOTHING_CHOSEN)
|
||||||
{
|
{
|
||||||
if (!gReceivedRemoteLinkPlayers)
|
if (!gReceivedRemoteLinkPlayers)
|
||||||
{
|
{
|
||||||
@@ -2721,7 +2720,7 @@ static void Task_RunUnionRoom(u8 taskId)
|
|||||||
{
|
{
|
||||||
uroom->partnerYesNoResponse = 0;
|
uroom->partnerYesNoResponse = 0;
|
||||||
playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->playerList);
|
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;
|
uroom->playerSendBuffer[0] = IN_UNION_ROOM;
|
||||||
Rfu_SendPacket(uroom->playerSendBuffer);
|
Rfu_SendPacket(uroom->playerSendBuffer);
|
||||||
@@ -3068,9 +3067,9 @@ static void Task_RunUnionRoom(u8 taskId)
|
|||||||
&uroom->tradeBoardHeaderWindowId,
|
&uroom->tradeBoardHeaderWindowId,
|
||||||
&sWindowTemplate_RegisterForTrade,
|
&sWindowTemplate_RegisterForTrade,
|
||||||
&sListMenuTemplate_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;
|
uroom->state = UR_STATE_MAIN;
|
||||||
HandleCancelActivity(TRUE);
|
HandleCancelActivity(TRUE);
|
||||||
@@ -3090,7 +3089,7 @@ static void Task_RunUnionRoom(u8 taskId)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case UR_STATE_REGISTER_SELECT_MON_FADE:
|
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;
|
uroom->state = UR_STATE_REGISTER_SELECT_MON;
|
||||||
break;
|
break;
|
||||||
case UR_STATE_REGISTER_SELECT_MON:
|
case UR_STATE_REGISTER_SELECT_MON:
|
||||||
@@ -3107,11 +3106,11 @@ static void Task_RunUnionRoom(u8 taskId)
|
|||||||
&uroom->tradeBoardHeaderWindowId,
|
&uroom->tradeBoardHeaderWindowId,
|
||||||
&sWindowTemplate_TradingBoardRequestType,
|
&sWindowTemplate_TradingBoardRequestType,
|
||||||
&sMenuTemplate_TradingBoardRequestType);
|
&sMenuTemplate_TradingBoardRequestType);
|
||||||
if (input != -1)
|
if (input != LIST_NOTHING_CHOSEN)
|
||||||
{
|
{
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case -2:
|
case LIST_CANCEL:
|
||||||
case NUMBER_OF_MON_TYPES: // Exit
|
case NUMBER_OF_MON_TYPES: // Exit
|
||||||
ResetUnionRoomTrade(&sUnionRoomTrade);
|
ResetUnionRoomTrade(&sUnionRoomTrade);
|
||||||
SetTradeBoardRegisteredMonInfo(TYPE_NORMAL, SPECIES_NONE, 0);
|
SetTradeBoardRegisteredMonInfo(TYPE_NORMAL, SPECIES_NONE, 0);
|
||||||
@@ -3166,18 +3165,18 @@ static void Task_RunUnionRoom(u8 taskId)
|
|||||||
&sWindowTemplate_TradingBoardMain,
|
&sWindowTemplate_TradingBoardMain,
|
||||||
&sTradeBoardListMenuTemplate,
|
&sTradeBoardListMenuTemplate,
|
||||||
uroom->playerList);
|
uroom->playerList);
|
||||||
if (input != -1)
|
if (input != LIST_NOTHING_CHOSEN)
|
||||||
{
|
{
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case -2:
|
case LIST_CANCEL:
|
||||||
case 8: // EXIT
|
case 8: // EXIT
|
||||||
HandleCancelActivity(TRUE);
|
HandleCancelActivity(TRUE);
|
||||||
uroom->state = UR_STATE_MAIN;
|
uroom->state = UR_STATE_MAIN;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
UR_ClearBg0();
|
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:
|
case UR_TRADE_MATCH:
|
||||||
CopyAndTranslatePlayerName(gStringVar1, &uroom->playerList->players[input]);
|
CopyAndTranslatePlayerName(gStringVar1, &uroom->playerList->players[input]);
|
||||||
@@ -3707,12 +3706,12 @@ static s32 ListMenuHandler_AllItemsAvailable(u8 *state, u8 *windowId, u8 *listMe
|
|||||||
ClearStdWindowAndFrame(*windowId, TRUE);
|
ClearStdWindowAndFrame(*windowId, TRUE);
|
||||||
RemoveWindow(*windowId);
|
RemoveWindow(*windowId);
|
||||||
*state = 0;
|
*state = 0;
|
||||||
return -2;
|
return LIST_CANCEL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return LIST_NOTHING_CHOSEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
static s32 TradeBoardMenuHandler(u8 *state, u8 *mainWindowId, u8 *listMenuId, u8 *headerWindowId,
|
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);
|
input = ListMenu_ProcessInput(*listMenuId);
|
||||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||||
{
|
{
|
||||||
|
// Exit or B button
|
||||||
if (input == 8 || JOY_NEW(B_BUTTON))
|
if (input == 8 || JOY_NEW(B_BUTTON))
|
||||||
{
|
{
|
||||||
DestroyListMenuTask(*listMenuId, NULL, NULL);
|
DestroyListMenuTask(*listMenuId, NULL, NULL);
|
||||||
RemoveWindow(*mainWindowId);
|
RemoveWindow(*mainWindowId);
|
||||||
DeleteTradeBoardWindow(*headerWindowId);
|
DeleteTradeBoardWindow(*headerWindowId);
|
||||||
*state = 0;
|
*state = 0;
|
||||||
return -2;
|
return LIST_CANCEL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3770,7 +3770,7 @@ static s32 TradeBoardMenuHandler(u8 *state, u8 *mainWindowId, u8 *listMenuId, u8
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return LIST_NOTHING_CHOSEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UR_ClearBg0(void)
|
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 WirelessLink_Leader *leader = sWirelessLinkMain.leader;
|
||||||
struct RfuGameData *gameData;
|
struct RfuGameData *gameData;
|
||||||
s32 i, j;
|
s32 i, j;
|
||||||
u8 playerName[11];
|
u8 playerName[RFU_USER_NAME_LENGTH + 1];
|
||||||
|
|
||||||
if (itemId == LIST_HEADER && y == sTradeBoardListMenuTemplate.upText_Y)
|
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;
|
return list->players[playerIdx].rfu.data.playerGender;
|
||||||
}
|
}
|
||||||
|
|
||||||
static s32 IsRequestedTypeOrEggInPlayerParty(u32 type, u32 species)
|
static s32 IsRequestedTradeInPlayerParty(u32 type, u32 species)
|
||||||
{
|
{
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@@ -4187,7 +4187,7 @@ static s32 IsRequestedTypeOrEggInPlayerParty(u32 type, u32 species)
|
|||||||
for (i = 0; i < gPlayerPartyCount; i++)
|
for (i = 0; i < gPlayerPartyCount; i++)
|
||||||
{
|
{
|
||||||
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
|
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_MATCH;
|
||||||
}
|
}
|
||||||
return UR_TRADE_NOTYPE;
|
return UR_TRADE_NOTYPE;
|
||||||
|
|||||||
@@ -1171,7 +1171,7 @@ static void Chat_AskQuitChatting(void)
|
|||||||
input = ProcessMenuInput();
|
input = ProcessMenuInput();
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case -1:
|
case MENU_B_PRESSED:
|
||||||
case 1:
|
case 1:
|
||||||
StartDisplaySubtask(CHATDISPLAY_FUNC_DESTROY_YESNO, 0);
|
StartDisplaySubtask(CHATDISPLAY_FUNC_DESTROY_YESNO, 0);
|
||||||
sChat->funcState = 3;
|
sChat->funcState = 3;
|
||||||
@@ -1210,7 +1210,7 @@ static void Chat_AskQuitChatting(void)
|
|||||||
input = ProcessMenuInput();
|
input = ProcessMenuInput();
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case -1:
|
case MENU_B_PRESSED:
|
||||||
case 1:
|
case 1:
|
||||||
StartDisplaySubtask(CHATDISPLAY_FUNC_DESTROY_YESNO, 0);
|
StartDisplaySubtask(CHATDISPLAY_FUNC_DESTROY_YESNO, 0);
|
||||||
sChat->funcState = 3;
|
sChat->funcState = 3;
|
||||||
@@ -1512,7 +1512,7 @@ static void Chat_SaveAndExit(void)
|
|||||||
input = ProcessMenuInput();
|
input = ProcessMenuInput();
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case -1:
|
case MENU_B_PRESSED:
|
||||||
case 1:
|
case 1:
|
||||||
sChat->funcState = 12;
|
sChat->funcState = 12;
|
||||||
break;
|
break;
|
||||||
@@ -1537,7 +1537,7 @@ static void Chat_SaveAndExit(void)
|
|||||||
input = ProcessMenuInput();
|
input = ProcessMenuInput();
|
||||||
switch (input)
|
switch (input)
|
||||||
{
|
{
|
||||||
case -1:
|
case MENU_B_PRESSED:
|
||||||
case 1:
|
case 1:
|
||||||
sChat->funcState = 12;
|
sChat->funcState = 12;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -340,15 +340,10 @@ static void AnimateUnionRoomPlayer(u32 leaderId, struct UnionRoomObject * object
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (object->schedAnim == UNION_ROOM_SPAWN_OUT)
|
if (object->schedAnim != UNION_ROOM_SPAWN_OUT)
|
||||||
{
|
|
||||||
object->state = 3;
|
|
||||||
object->animState = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
object->state = 3;
|
||||||
|
object->animState = 0;
|
||||||
// fallthrough
|
// fallthrough
|
||||||
case 3:
|
case 3:
|
||||||
if (AnimateUnionRoomPlayerDespawn(&object->animState, leaderId, object) == 1)
|
if (AnimateUnionRoomPlayerDespawn(&object->animState, leaderId, object) == 1)
|
||||||
|
|||||||
@@ -379,7 +379,7 @@ static void CreateWildMon(u16 species, u8 level)
|
|||||||
ZeroEnemyPartyMons();
|
ZeroEnemyPartyMons();
|
||||||
checkCuteCharm = TRUE;
|
checkCuteCharm = TRUE;
|
||||||
|
|
||||||
switch (gBaseStats[species].genderRatio)
|
switch (gSpeciesInfo[species].genderRatio)
|
||||||
{
|
{
|
||||||
case MON_MALE:
|
case MON_MALE:
|
||||||
case MON_FEMALE:
|
case MON_FEMALE:
|
||||||
@@ -913,7 +913,7 @@ static bool8 TryGetRandomWildMonIndexByType(const struct WildPokemon *wildMon, u
|
|||||||
|
|
||||||
for (validMonCount = 0, i = 0; i < numMon; i++)
|
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;
|
validIndexes[validMonCount++] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||