Updating pokedex count function labels

This commit is contained in:
KDSKardabox 2018-02-12 16:15:51 +05:30
parent 0ca0ad1c63
commit d52a54e64f
10 changed files with 44 additions and 44 deletions

View File

@ -15923,11 +15923,11 @@ sub_8197080: @ 8197080
b _0819715C b _0819715C
_081970A2: _081970A2:
movs r0, 0 movs r0, 0
bl sub_80C0844 bl GetHoennPokedexCount
lsls r0, 16 lsls r0, 16
lsrs r4, r0, 16 lsrs r4, r0, 16
movs r0, 0x1 movs r0, 0x1
bl sub_80C0844 bl GetHoennPokedexCount
lsls r0, 16 lsls r0, 16
lsrs r6, r0, 16 lsrs r6, r0, 16
ldr r0, =gStringVar1 ldr r0, =gStringVar1
@ -15977,11 +15977,11 @@ _081970A2:
strb r6, [r5] strb r6, [r5]
adds r5, 0x1 adds r5, 0x1
movs r0, 0 movs r0, 0
bl pokedex_count bl GetNationalPokedexCount
lsls r0, 16 lsls r0, 16
lsrs r4, r0, 16 lsrs r4, r0, 16
movs r0, 0x1 movs r0, 0x1
bl pokedex_count bl GetNationalPokedexCount
lsls r0, 16 lsls r0, 16
lsrs r6, r0, 16 lsrs r6, r0, 16
mov r0, r10 mov r0, r10

View File

@ -9252,7 +9252,7 @@ start_menu_is_selected_item_valid: @ 811EA6C
cmp r0, 0 cmp r0, 0
bne _0811EA84 bne _0811EA84
movs r0, 0 movs r0, 0
bl pokedex_count bl GetNationalPokedexCount
lsls r0, 16 lsls r0, 16
lsrs r0, 16 lsrs r0, 16
b _0811EA9A b _0811EA9A
@ -10369,7 +10369,7 @@ sub_811F2D4: @ 811F2D4
movs r5, 0 movs r5, 0
strh r5, [r0] strh r5, [r0]
movs r0, 0 movs r0, 0
bl pokedex_count bl GetNationalPokedexCount
lsls r0, 16 lsls r0, 16
cmp r0, 0 cmp r0, 0
beq _0811F2FC beq _0811F2FC

View File

@ -4654,12 +4654,12 @@ fmt_pokedex: @ 8031F7C
cmp r0, 0 cmp r0, 0
beq _08031FA4 beq _08031FA4
movs r0, 0x1 movs r0, 0x1
bl pokedex_count bl GetNationalPokedexCount
b _08031FAA b _08031FAA
.pool .pool
_08031FA4: _08031FA4:
movs r0, 0x1 movs r0, 0x1
bl sub_80C0844 bl GetHoennPokedexCount
_08031FAA: _08031FAA:
lsls r0, 16 lsls r0, 16
lsrs r7, r0, 16 lsrs r7, r0, 16

View File

@ -443,24 +443,24 @@ _080BB65E:
cmp r0, 0 cmp r0, 0
bne _080BB6D0 bne _080BB6D0
movs r0, 0 movs r0, 0
bl sub_80C0844 bl GetHoennPokedexCount
ldr r1, [r4] ldr r1, [r4]
ldr r2, =0x0000061a ldr r2, =0x0000061a
adds r1, r2 adds r1, r2
strh r0, [r1] strh r0, [r1]
movs r0, 0x1 movs r0, 0x1
bl sub_80C0844 bl GetHoennPokedexCount
b _080BB6E4 b _080BB6E4
.pool .pool
_080BB6D0: _080BB6D0:
movs r0, 0 movs r0, 0
bl pokedex_count bl GetNationalPokedexCount
ldr r1, [r4] ldr r1, [r4]
ldr r2, =0x0000061a ldr r2, =0x0000061a
adds r1, r2 adds r1, r2
strh r0, [r1] strh r0, [r1]
movs r0, 0x1 movs r0, 0x1
bl pokedex_count bl GetNationalPokedexCount
_080BB6E4: _080BB6E4:
ldr r1, [r4] ldr r1, [r4]
ldr r3, =0x0000061c ldr r3, =0x0000061c
@ -5058,7 +5058,7 @@ _080BDF4C:
movs r1, 0x1 movs r1, 0x1
bl StartSpriteAnim bl StartSpriteAnim
movs r0, 0 movs r0, 0
bl sub_80C0844 bl GetHoennPokedexCount
lsls r0, 16 lsls r0, 16
lsrs r6, r0, 16 lsrs r6, r0, 16
movs r0, 0 movs r0, 0
@ -5283,7 +5283,7 @@ _080BE198:
lsrs r1, 24 lsrs r1, 24
bl StartSpriteAnim bl StartSpriteAnim
movs r0, 0x1 movs r0, 0x1
bl sub_80C0844 bl GetHoennPokedexCount
lsls r0, 16 lsls r0, 16
lsrs r6, r0, 16 lsrs r6, r0, 16
movs r0, 0 movs r0, 0
@ -9597,8 +9597,8 @@ _080C07E8:
.pool .pool
thumb_func_end GetSetPokedexFlag thumb_func_end GetSetPokedexFlag
thumb_func_start pokedex_count thumb_func_start GetNationalPokedexCount
pokedex_count: @ 80C07F4 GetNationalPokedexCount: @ 80C07F4
push {r4-r7,lr} push {r4-r7,lr}
lsls r0, 24 lsls r0, 24
lsrs r6, r0, 24 lsrs r6, r0, 24
@ -9641,10 +9641,10 @@ _080C0832:
pop {r4-r7} pop {r4-r7}
pop {r1} pop {r1}
bx r1 bx r1
thumb_func_end pokedex_count thumb_func_end GetNationalPokedexCount
thumb_func_start sub_80C0844 thumb_func_start GetHoennPokedexCount
sub_80C0844: @ 80C0844 GetHoennPokedexCount: @ 80C0844
push {r4-r6,lr} push {r4-r6,lr}
lsls r0, 24 lsls r0, 24
lsrs r6, r0, 24 lsrs r6, r0, 24
@ -9691,7 +9691,7 @@ _080C088C:
pop {r4-r6} pop {r4-r6}
pop {r1} pop {r1}
bx r1 bx r1
thumb_func_end sub_80C0844 thumb_func_end GetHoennPokedexCount
thumb_func_start sub_80C089C thumb_func_start sub_80C089C
sub_80C089C: @ 80C089C sub_80C089C: @ 80C089C

View File

@ -418,7 +418,7 @@ _0809FAFE:
cmp r1, r0 cmp r1, r0
bne _0809FB34 bne _0809FB34
movs r0, 0 movs r0, 0
bl pokedex_count bl GetNationalPokedexCount
lsls r0, 16 lsls r0, 16
cmp r0, 0 cmp r0, 0
beq _0809FBA0 beq _0809FBA0

View File

@ -1925,11 +1925,11 @@ sub_80C376C: @ 80C376C
cmp r0, 0 cmp r0, 0
bne _080C377E bne _080C377E
movs r0, 0x1 movs r0, 0x1
bl sub_80C0844 bl GetHoennPokedexCount
b _080C3784 b _080C3784
_080C377E: _080C377E:
movs r0, 0x1 movs r0, 0x1
bl pokedex_count bl GetNationalPokedexCount
_080C3784: _080C3784:
lsls r0, 16 lsls r0, 16
lsrs r0, 16 lsrs r0, 16

View File

@ -17,7 +17,7 @@ enum
}; };
s8 GetSetPokedexFlag(u16 nationalNum, u8 caseId); s8 GetSetPokedexFlag(u16 nationalNum, u8 caseId);
u16 pokedex_count(u8); u16 GetNationalPokedexCount(u8);
u16 sub_80C0844(u8); u16 sub_80C0844(u8);
#endif // GUARD_POKEDEX_H #endif // GUARD_POKEDEX_H

View File

@ -34,13 +34,13 @@ bool16 ScriptGetPokedexInfo(void)
{ {
if (gSpecialVar_0x8004 == 0) // is national dex not present? if (gSpecialVar_0x8004 == 0) // is national dex not present?
{ {
gSpecialVar_0x8005 = sub_80C0844(0); gSpecialVar_0x8005 = GetHoennPokedexCount(0);
gSpecialVar_0x8006 = sub_80C0844(1); gSpecialVar_0x8006 = GetHoennPokedexCount(1);
} }
else else
{ {
gSpecialVar_0x8005 = pokedex_count(0); gSpecialVar_0x8005 = GetNationalPokedexCount(0);
gSpecialVar_0x8006 = pokedex_count(1); gSpecialVar_0x8006 = GetNationalPokedexCount(1);
} }
return IsNationalPokedexEnabled(); return IsNationalPokedexEnabled();

View File

@ -63,7 +63,7 @@ static EWRAM_DATA void *gUnknown_0203CDAC[0x20] = {NULL};
const u16 gUnknown_0860F074[] = INCBIN_U16("graphics/interface/860F074.gbapal"); const u16 gUnknown_0860F074[] = INCBIN_U16("graphics/interface/860F074.gbapal");
static const u8 gUnknown_0860F094[] = { 8, 4, 1 }; static const u8 gUnknown_0860F094[] = { 8, 4, 1 };
static const struct WindowTemplate gUnknown_0860F098[] = static const struct WindowTemplate gUnknown_0860F098[] =
{ {
{ 0x00, 0x02, 0x0F, 0x1B, 0x04, 0x0F, 0x194 }, { 0x00, 0x02, 0x0F, 0x1B, 0x04, 0x0F, 0x194 },
DUMMY_WIN_TEMPLATE DUMMY_WIN_TEMPLATE
@ -76,7 +76,7 @@ static const struct WindowTemplate gUnknown_0860F0A8 =
const u16 gUnknown_0860F0B0[] = INCBIN_U16("graphics/interface/860F0B0.gbapal"); const u16 gUnknown_0860F0B0[] = INCBIN_U16("graphics/interface/860F0B0.gbapal");
const u8 gUnknown_0860F0D0[] = { 15, 1, 2 }; const u8 gUnknown_0860F0D0[] = { 15, 1, 2 };
const struct SomeUnkStruct_60F0D4 gUnknown_0860F0D4[] = const struct SomeUnkStruct_60F0D4 gUnknown_0860F0D4[] =
{ {
{ 12, 12, 0x00 }, { 12, 12, 0x00 },
{ 32, 12, 0x20 }, { 32, 12, 0x20 },
@ -151,7 +151,7 @@ u16 sub_8197224(void)
u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 fgColor, u8 bgColor, u8 shadowColor) u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 fgColor, u8 bgColor, u8 shadowColor)
{ {
struct TextSubPrinter printer; struct TextSubPrinter printer;
printer.current_text_offset = str; printer.current_text_offset = str;
printer.windowId = windowId; printer.windowId = windowId;
printer.fontId = fontId; printer.fontId = fontId;
@ -165,9 +165,9 @@ u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 speed,
printer.fgColor = fgColor; printer.fgColor = fgColor;
printer.bgColor = bgColor; printer.bgColor = bgColor;
printer.shadowColor = shadowColor; printer.shadowColor = shadowColor;
gTextFlags.flag_1 = 0; gTextFlags.flag_1 = 0;
return AddTextPrinter(&printer, speed, callback); return AddTextPrinter(&printer, speed, callback);
} }
void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress) void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress)
@ -234,7 +234,7 @@ void sub_819746C(u8 windowId, bool8 copyToVram)
void DrawStandardFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) void DrawStandardFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
{ {
int i; int i;
FillBgTilemapBufferRect(bg, FillBgTilemapBufferRect(bg,
STD_WINDOW_BASE_TILE_NUM + 0, STD_WINDOW_BASE_TILE_NUM + 0,
tilemapLeft - 1, tilemapLeft - 1,
@ -256,7 +256,7 @@ void DrawStandardFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height
1, 1,
1, 1,
STD_WINDOW_PALETTE_NUM); STD_WINDOW_PALETTE_NUM);
for (i = tilemapTop; i < tilemapTop + height; i++) for (i = tilemapTop; i < tilemapTop + height; i++)
{ {
FillBgTilemapBufferRect(bg, FillBgTilemapBufferRect(bg,
@ -274,7 +274,7 @@ void DrawStandardFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height
1, 1,
STD_WINDOW_PALETTE_NUM); STD_WINDOW_PALETTE_NUM);
} }
FillBgTilemapBufferRect(bg, FillBgTilemapBufferRect(bg,
STD_WINDOW_BASE_TILE_NUM + 6, STD_WINDOW_BASE_TILE_NUM + 6,
tilemapLeft - 1, tilemapLeft - 1,
@ -1941,7 +1941,7 @@ void box_print(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 spee
printer.fgColor = color[1]; printer.fgColor = color[1];
printer.bgColor = color[0]; printer.bgColor = color[0];
printer.shadowColor = color[2]; printer.shadowColor = color[2];
AddTextPrinter(&printer, speed, NULL); AddTextPrinter(&printer, speed, NULL);
} }
@ -1962,7 +1962,7 @@ void AddTextPrinterParameterized2(u8 windowId, u8 fontId, u8 left, u8 top, u8 le
printer.fgColor = color[1]; printer.fgColor = color[1];
printer.bgColor = color[0]; printer.bgColor = color[0];
printer.shadowColor = color[2]; printer.shadowColor = color[2];
AddTextPrinter(&printer, speed, NULL); AddTextPrinter(&printer, speed, NULL);
} }
@ -2373,14 +2373,14 @@ void sub_819A344(u8 a0, u8 *a1, u8 a2)
s32 flagCount; s32 flagCount;
u8 *endOfString; u8 *endOfString;
u8 *string = a1; u8 *string = a1;
*(string++) = EXT_CTRL_CODE_BEGIN; *(string++) = EXT_CTRL_CODE_BEGIN;
*(string++) = EXT_CTRL_CODE_COLOR; *(string++) = EXT_CTRL_CODE_COLOR;
*(string++) = a2; *(string++) = a2;
*(string++) = EXT_CTRL_CODE_BEGIN; *(string++) = EXT_CTRL_CODE_BEGIN;
*(string++) = EXT_CTRL_CODE_SHADOW; *(string++) = EXT_CTRL_CODE_SHADOW;
*(string++) = a2 + 1; *(string++) = a2 + 1;
switch (a0) switch (a0)
{ {
case 0: case 0:
@ -2388,9 +2388,9 @@ void sub_819A344(u8 a0, u8 *a1, u8 a2)
break; break;
case 1: case 1:
if (IsNationalPokedexEnabled()) if (IsNationalPokedexEnabled())
string = ConvertIntToDecimalStringN(string, pokedex_count(1), 0, 3); string = ConvertIntToDecimalStringN(string, GetNationalPokedexCount(1), 0, 3);
else else
string = ConvertIntToDecimalStringN(string, sub_80C0844(1), 0, 3); string = ConvertIntToDecimalStringN(string, GetHoennPokedexCount(1), 0, 3);
*string = EOS; *string = EOS;
break; break;
case 2: case 2:

View File

@ -1957,11 +1957,11 @@ void sub_80EDB44(void)
show->rivalTrainer.badgeCount = nBadges; show->rivalTrainer.badgeCount = nBadges;
if (IsNationalPokedexEnabled()) if (IsNationalPokedexEnabled())
{ {
show->rivalTrainer.dexCount = pokedex_count(0x01); show->rivalTrainer.dexCount = GetNationalPokedexCount(0x01);
} }
else else
{ {
show->rivalTrainer.dexCount = sub_80C0844(0x01); show->rivalTrainer.dexCount = GetHoennPokedexCount(0x01);
} }
show->rivalTrainer.location = gMapHeader.regionMapSectionId; show->rivalTrainer.location = gMapHeader.regionMapSectionId;
show->rivalTrainer.mapDataId = gMapHeader.mapDataId; show->rivalTrainer.mapDataId = gMapHeader.mapDataId;