mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-23 05:00:12 +00:00
Split+data code_801EE10_1
This commit is contained in:
parent
6b419cc73b
commit
8b7c5e5ff5
1186
asm/code_801EE10_1.s
1186
asm/code_801EE10_1.s
File diff suppressed because it is too large
Load Diff
1190
asm/code_8023868.s
Normal file
1190
asm/code_8023868.s
Normal file
File diff suppressed because it is too large
Load Diff
@ -185,67 +185,4 @@ gUnknown_80DC934: @ 80DC934
|
||||
|
||||
.global gUnknown_80DC93C
|
||||
gUnknown_80DC93C: @ 80DC93C
|
||||
.string "{COLOR_2}%c%s{END_COLOR_TEXT_2}\0"
|
||||
.align 2,0
|
||||
|
||||
@ code_801EE10_1
|
||||
.string "pksdir0\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DC950
|
||||
gUnknown_80DC950: @ 80DC950
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_80DC968
|
||||
gUnknown_80DC968: @ 80DC968
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x06, 0x00, 0x00, 0x00
|
||||
.byte 0x02, 0x00, 0x02, 0x00
|
||||
.byte 0x0f, 0x00, 0x0e, 0x00
|
||||
.byte 0x0e, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_80DC980
|
||||
gUnknown_80DC980: @ 80DC980
|
||||
.string "Friends\0"
|
||||
|
||||
.global gUnknown_80DC988
|
||||
gUnknown_80DC988: @ 80DC988
|
||||
.string "Pokémon Friends\0"
|
||||
|
||||
.global gUnknown_80DC998
|
||||
gUnknown_80DC998: @ 80DC998
|
||||
.string "{COLOR_2}%c%s{END_COLOR_TEXT_2}\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DC9A4
|
||||
gUnknown_80DC9A4: @ 80DC9A4
|
||||
.string "%s\0"
|
||||
.align 2,0
|
||||
|
||||
@ code_801EE10_1 #2
|
||||
.string "pksdir0\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DC9B0
|
||||
gUnknown_80DC9B0: @ 80DC9B0
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_80DC9C8
|
||||
gUnknown_80DC9C8: @ 80DC9C8
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x06, 0x00, 0x00, 0x00
|
||||
.byte 0x02, 0x00, 0x02, 0x00
|
||||
.byte 0x12, 0x00, 0x0e, 0x00
|
||||
.byte 0x12, 0x00, 0x02, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.string "{COLOR_2}%c%s{END_COLOR_TEXT_2}\0"
|
@ -1,17 +0,0 @@
|
||||
#ifndef GUARD_CODE_801EE10_1_H
|
||||
#define GUARD_CODE_801EE10_1_H
|
||||
|
||||
bool8 sub_8024458(s16 speciesNum, s32);
|
||||
u32 sub_80244E4(void);
|
||||
void sub_802453C(void);
|
||||
|
||||
// code_801EE10_1.s
|
||||
extern void sub_8023868(u32, u32, u32, u32);
|
||||
extern u32 sub_8023A94(bool8);
|
||||
extern s16 sub_8023B44(void);
|
||||
extern void sub_8023B7C(u32);
|
||||
extern void sub_8023C60(void);
|
||||
extern void sub_8023DA4(void);
|
||||
extern bool8 sub_8024108(u32);
|
||||
|
||||
#endif // GUARD_CODE_801EE10_1_H
|
30
include/code_8023868.h
Normal file
30
include/code_8023868.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef GUARD_CODE_8023868_H
|
||||
#define GUARD_CODE_8023868_H
|
||||
|
||||
struct unkStruct_3001B60
|
||||
{
|
||||
u32 unk0;
|
||||
u32 sortMethod;
|
||||
u32 unk8;
|
||||
u32 unkC;
|
||||
u32 unk10;
|
||||
u8 fill14[0x18 - 0x14];
|
||||
s16 unk18;
|
||||
s16 unk1A[2];
|
||||
u8 fill1C[0x370 - 0x1E];
|
||||
s16 unk370;
|
||||
s16 unk372;
|
||||
s16 unk374;
|
||||
s16 unk376;
|
||||
};
|
||||
|
||||
// code_8023868.s
|
||||
extern void sub_8023868(u32, u32, u32, u32);
|
||||
extern u32 sub_8023A94(bool8);
|
||||
extern s16 sub_8023B44(void);
|
||||
extern void sub_8023B7C(u32);
|
||||
extern void sub_8023C60(void);
|
||||
extern void sub_8023DA4(void);
|
||||
extern bool8 sub_8024108(u32);
|
||||
|
||||
#endif // GUARD_CODE_8023868_H
|
28
include/code_8024458.h
Normal file
28
include/code_8024458.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef GUARD_CODE_8024458_H
|
||||
#define GUARD_CODE_8024458_H
|
||||
|
||||
#include "input.h"
|
||||
#include "text.h"
|
||||
|
||||
struct unkStruct_203B2AC
|
||||
{
|
||||
MenuInputStruct input;
|
||||
u32 unk34[3];
|
||||
u8 unk40[0x48 - 0x40];
|
||||
s16 speciesNum;
|
||||
u32 unk4C;
|
||||
u8 unk50[0xB0 - 0x50];
|
||||
u32 unkB0;
|
||||
u8 fillB4[0xE0 - 0xB4];
|
||||
u32 unkE0;
|
||||
UnkTextStruct2 *unkE4;
|
||||
UnkTextStruct2 unkE8[4];
|
||||
u8 unk148[4];
|
||||
};
|
||||
|
||||
bool8 sub_8024458(s16 speciesNum, s32);
|
||||
u32 sub_80244E4(void);
|
||||
void sub_802452C(void);
|
||||
void sub_802453C(void);
|
||||
|
||||
#endif // GUARD_CODE_8024458_H
|
@ -30,4 +30,8 @@ void SetDefaultIQSkills(u8 *param_1, bool8 enableSelfCurer);
|
||||
void sub_808F468(PokemonStruct1 *param_1, EvolveStatus *evolveStatus, u8 param_3);
|
||||
u32 sub_808F734(PokemonStruct1 *pokemon, s16 _species);
|
||||
|
||||
// pokemon_3.s
|
||||
extern void CreatePokemonInfoTabScreen(u32, s16, u32 *, u32 *, u32);
|
||||
extern void sub_808FF20(u32 *, PokemonStruct1 *, bool8);
|
||||
|
||||
#endif // GUARD_POKEMON_3_H
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include "pokemon.h"
|
||||
|
||||
bool8 ComparePokemonNames(s16, s16);
|
||||
void PrintPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon);
|
||||
|
||||
bool8 sub_808DA44(s32, u32);
|
||||
|
@ -125,7 +125,9 @@ SECTIONS {
|
||||
asm/code_8023144.o(.text);
|
||||
src/code_8023144.o(.text);
|
||||
asm/code_801EE10_1.o(.text);
|
||||
src/code_801EE10_1.o(.text);
|
||||
asm/code_8023868.o(.text);
|
||||
src/code_8023868.o(.text);
|
||||
src/code_8024458.o(.text);
|
||||
src/luminous_cave.o(.text);
|
||||
src/friend_list_menu.o(.text);
|
||||
src/party_list_menu.o(.text);
|
||||
@ -436,6 +438,8 @@ SECTIONS {
|
||||
src/wigglytuff_shop2.o(.rodata);
|
||||
src/wigglytuff_shop3.o(.rodata);
|
||||
data/data_80DC464.o(.rodata);
|
||||
src/code_8023868.o(.rodata);
|
||||
src/code_8024458.o(.rodata);
|
||||
src/luminous_cave.o(.rodata);
|
||||
src/friend_list_menu.o(.rodata);
|
||||
src/party_list_menu.o(.rodata);
|
||||
|
@ -4,8 +4,9 @@
|
||||
#include "code_80130A8.h"
|
||||
#include "code_801BEEC.h"
|
||||
#include "code_801D014.h"
|
||||
#include "code_801EE10_1.h"
|
||||
#include "code_8023144.h"
|
||||
#include "code_8023868.h"
|
||||
#include "code_8024458.h"
|
||||
#include "code_8096AF8.h"
|
||||
#include "common_strings.h"
|
||||
#include "constants/friend_area.h"
|
||||
|
@ -1,318 +0,0 @@
|
||||
#include "global.h"
|
||||
#include "code_801EE10_1.h"
|
||||
#include "constants/input.h"
|
||||
#include "code_800D090.h"
|
||||
#include "pokemon.h"
|
||||
#include "input.h"
|
||||
#include "memory.h"
|
||||
#include "text1.h"
|
||||
#include "text2.h"
|
||||
#include "text_util.h"
|
||||
#include "menu_input.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "event_flag.h"
|
||||
|
||||
struct unkStruct_203B2AC
|
||||
{
|
||||
MenuInputStruct input;
|
||||
u32 unk34[3];
|
||||
u8 unk40[0x48 - 0x40];
|
||||
s16 speciesNum;
|
||||
u32 unk4C;
|
||||
u8 unk50[0xB0 - 0x50];
|
||||
u32 unkB0;
|
||||
u8 fillB4[0xE0 - 0xB4];
|
||||
u32 unkE0;
|
||||
UnkTextStruct2 *unkE4;
|
||||
UnkTextStruct2 unkE8[4];
|
||||
u8 unk148[4];
|
||||
};
|
||||
extern struct unkStruct_203B2AC *gUnknown_203B2AC;
|
||||
|
||||
struct unkStruct_3001B60
|
||||
{
|
||||
u32 unk0;
|
||||
u32 sortMethod;
|
||||
u32 unk8;
|
||||
u32 unkC;
|
||||
u32 unk10;
|
||||
u8 fill14[0x18 - 0x14];
|
||||
s16 unk18;
|
||||
s16 unk1A[2];
|
||||
u8 fill1C[0x370 - 0x1E];
|
||||
s16 unk370;
|
||||
s16 unk372;
|
||||
s16 unk374;
|
||||
s16 unk376;
|
||||
};
|
||||
|
||||
extern struct unkStruct_3001B60 *gUnknown_3001B60;
|
||||
|
||||
extern UnkTextStruct2 gUnknown_80DC9B0;
|
||||
extern UnkTextStruct2 gUnknown_80DC9C8;
|
||||
|
||||
extern void sub_808FF20(u32 *, PokemonStruct1 *, bool8);
|
||||
extern void CreatePokemonInfoTabScreen(u32, s16, u32 *, u32 *, u32);
|
||||
extern void sub_802452C(void);
|
||||
bool8 ComparePokemonNames(s16 a1, s16 a2);
|
||||
|
||||
void sub_8024588(void);
|
||||
void sub_80245D0(void);
|
||||
void sub_8024604(void);
|
||||
|
||||
extern u8 gUnknown_80DC9A4[];
|
||||
|
||||
void SortbyInternalNo(s32 param_1, s32 param_2);
|
||||
void SortbyAlphabetNo(s32 param_1,s32 param_2);
|
||||
void SortbyName(s32 param_1,s32 param_2);
|
||||
|
||||
bool8 sub_8024184(PokemonStruct1 *pokemon, u8 area)
|
||||
{
|
||||
if(area == GetFriendArea(pokemon->speciesNum))
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void sub_80241A8(void)
|
||||
{
|
||||
switch(gUnknown_3001B60->sortMethod)
|
||||
{
|
||||
case 2:
|
||||
if (gUnknown_3001B60->unkC != gUnknown_3001B60->unk10) {
|
||||
SortbyAlphabetNo(gUnknown_3001B60->unkC, gUnknown_3001B60->unk10);
|
||||
}
|
||||
if (gUnknown_3001B60->unk10 != gUnknown_3001B60->unk8) {
|
||||
SortbyAlphabetNo(gUnknown_3001B60->unk10, gUnknown_3001B60->unk8);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (gUnknown_3001B60->unkC != gUnknown_3001B60->unk10) {
|
||||
SortbyName(gUnknown_3001B60->unkC, gUnknown_3001B60->unk10);
|
||||
}
|
||||
if (gUnknown_3001B60->unk10 != gUnknown_3001B60->unk8) {
|
||||
SortbyName(gUnknown_3001B60->unk10, gUnknown_3001B60->unk8);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (gUnknown_3001B60->unkC != gUnknown_3001B60->unk10) {
|
||||
SortbyInternalNo(gUnknown_3001B60->unkC, gUnknown_3001B60->unk10);
|
||||
}
|
||||
if (gUnknown_3001B60->unk10 != gUnknown_3001B60->unk8) {
|
||||
SortbyInternalNo(gUnknown_3001B60->unk10, gUnknown_3001B60->unk8);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SortbyInternalNo(s32 param_1, s32 param_2)
|
||||
{
|
||||
s16 *r4;
|
||||
s32 iVar4;
|
||||
s16 *r10;
|
||||
s16 *r5;
|
||||
s32 r6;
|
||||
s32 r1;
|
||||
s32 r7;
|
||||
s32 r9;
|
||||
|
||||
r10 = &gUnknown_3001B60->unk18 + param_2;
|
||||
r7 = param_1;
|
||||
r1 = param_2 - 1;
|
||||
if (r7 < r1) {
|
||||
r9 = r1;
|
||||
do {
|
||||
r4 = r10;
|
||||
r6 = r1;
|
||||
iVar4 = r7 + 1;
|
||||
for (; r6 > r7; r6--) {
|
||||
if (GetInternalNo(gRecruitedPokemonRef->pokemon[r5 = r4 - 1, *r5].speciesNum) > GetInternalNo(gRecruitedPokemonRef->pokemon[*r4].speciesNum)) {
|
||||
r1 = *r4;
|
||||
*r4 = *r5;
|
||||
*r5 = r1;
|
||||
}
|
||||
r4 = r5;
|
||||
}
|
||||
r7 = iVar4;
|
||||
r1 = r9;
|
||||
} while (iVar4 < r1);
|
||||
}
|
||||
}
|
||||
|
||||
void SortbyAlphabetNo(s32 param_1,s32 param_2)
|
||||
{
|
||||
s16 *r4;
|
||||
s32 iVar4;
|
||||
s16 *r10;
|
||||
s16 *r5;
|
||||
s32 r6;
|
||||
s32 r1;
|
||||
s32 r7;
|
||||
s32 r9;
|
||||
|
||||
r10 = &gUnknown_3001B60->unk18 + param_2;
|
||||
r7 = param_1;
|
||||
r1 = param_2 - 1;
|
||||
if (r7 < r1) {
|
||||
r9 = r1;
|
||||
do {
|
||||
r4 = r10;
|
||||
r6 = r1;
|
||||
iVar4 = r7 + 1;
|
||||
for (; r6 > r7; r6--) {
|
||||
if (GetAlphabetParentNo(gRecruitedPokemonRef->pokemon[r5 = r4 - 1, *r5].speciesNum, 0) > GetAlphabetParentNo(gRecruitedPokemonRef->pokemon[*r4].speciesNum, 0)) {
|
||||
r1 = *r4;
|
||||
*r4 = *r5;
|
||||
*r5 = r1;
|
||||
}
|
||||
r4 = r5;
|
||||
}
|
||||
r7 = iVar4;
|
||||
r1 = r9;
|
||||
} while (iVar4 < r1);
|
||||
}
|
||||
}
|
||||
|
||||
void SortbyName(s32 param_1,s32 param_2)
|
||||
{
|
||||
s16 *r4;
|
||||
s32 iVar4;
|
||||
s16 *r10;
|
||||
s16 *r5;
|
||||
s32 r6;
|
||||
s32 r1;
|
||||
s32 r7;
|
||||
s32 r9;
|
||||
|
||||
r10 = &gUnknown_3001B60->unk18 + param_2;
|
||||
r7 = param_1;
|
||||
r1 = param_2 - 1;
|
||||
if (r7 < r1) {
|
||||
r9 = r1;
|
||||
do {
|
||||
r4 = r10;
|
||||
r6 = r1;
|
||||
iVar4 = r7 + 1;
|
||||
for (; r6 > r7; r6--) {
|
||||
r5 = r4 - 1;
|
||||
if (ComparePokemonNames(*r5, *r4)) {
|
||||
r1 = *r4;
|
||||
*r4 = *r5;
|
||||
*r5 = r1;
|
||||
}
|
||||
r4 = r5;
|
||||
}
|
||||
r7 = iVar4;
|
||||
r1 = r9;
|
||||
} while (iVar4 < r1);
|
||||
}
|
||||
}
|
||||
|
||||
PokemonStruct1 *sub_80243E8(void)
|
||||
{
|
||||
u8 buffer [40];
|
||||
u8 nameBuffer [20];
|
||||
PokemonStruct1 *pokeStruct = &gRecruitedPokemonRef->pokemon[gUnknown_3001B60->unk1A[gUnknown_3001B60->unk376 * gUnknown_3001B60->unk374 + gUnknown_3001B60->unk370]];
|
||||
|
||||
sub_80922B4(nameBuffer, pokeStruct->name, POKEMON_NAME_LENGTH);
|
||||
sprintfStatic(buffer, gUnknown_80DC9A4,nameBuffer); // %s
|
||||
return pokeStruct;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// THIS IS A NEW FILE:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool8 sub_8024458(s16 speciesNum, s32 param_2)
|
||||
{
|
||||
s32 speciesNum_s32 = speciesNum;
|
||||
gUnknown_203B2AC = MemoryAlloc(sizeof(struct unkStruct_203B2AC), 8);
|
||||
gUnknown_203B2AC->speciesNum = speciesNum_s32;
|
||||
gUnknown_203B2AC->unkE0 = param_2;
|
||||
gUnknown_203B2AC->unkE4 = &gUnknown_203B2AC->unkE8[param_2];
|
||||
sub_8006518(gUnknown_203B2AC->unkE8);
|
||||
gUnknown_203B2AC->unkE8[gUnknown_203B2AC->unkE0] = gUnknown_80DC9C8;
|
||||
gUnknown_203B2AC->unkE4->unk14 = gUnknown_203B2AC->unk148;
|
||||
gUnknown_203B2AC->unk148[2] = 10;
|
||||
sub_8024604();
|
||||
sub_802452C();
|
||||
sub_8013984(&gUnknown_203B2AC->input);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
u32 sub_80244E4(void)
|
||||
{
|
||||
switch(GetKeyPress(&gUnknown_203B2AC->input))
|
||||
{
|
||||
case INPUT_B_BUTTON:
|
||||
PlayMenuSoundEffect(1);
|
||||
return 2;
|
||||
case INPUT_A_BUTTON:
|
||||
PlayMenuSoundEffect(0);
|
||||
return 3;
|
||||
default:
|
||||
if (sub_8013938(&gUnknown_203B2AC->input) != 0) {
|
||||
sub_802452C();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_802452C(void)
|
||||
{
|
||||
sub_8024588();
|
||||
sub_80245D0();
|
||||
}
|
||||
|
||||
void sub_802453C(void)
|
||||
{
|
||||
if(gUnknown_203B2AC)
|
||||
{
|
||||
gUnknown_203B2AC->unkE8[gUnknown_203B2AC->unkE0] = gUnknown_80DC9B0;
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(gUnknown_203B2AC->unkE8, TRUE, TRUE);
|
||||
MemoryFree(gUnknown_203B2AC);
|
||||
gUnknown_203B2AC = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8024588(void)
|
||||
{
|
||||
gUnknown_203B2AC->unk148[0] = gUnknown_203B2AC->input.unk20;
|
||||
gUnknown_203B2AC->unk148[1] = gUnknown_203B2AC->input.unk1E;
|
||||
gUnknown_203B2AC->unk148[3] = 0;
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(gUnknown_203B2AC->unkE8, TRUE, TRUE);
|
||||
}
|
||||
|
||||
void sub_80245D0(void)
|
||||
{
|
||||
CreatePokemonInfoTabScreen
|
||||
(gUnknown_203B2AC->unk34[gUnknown_203B2AC->input.unk1E],
|
||||
gUnknown_203B2AC->input.unk1E,&gUnknown_203B2AC->unk4C,
|
||||
&gUnknown_203B2AC->unkB0,gUnknown_203B2AC->unkE0);
|
||||
}
|
||||
|
||||
void sub_8024604(void)
|
||||
{
|
||||
PokemonStruct1 *pokeStruct;
|
||||
u32 *iVar3;
|
||||
|
||||
gUnknown_203B2AC->unk34[0] = 2;
|
||||
gUnknown_203B2AC->unk34[1] = 3;
|
||||
gUnknown_203B2AC->unk34[2] = 5;
|
||||
sub_8013818(&gUnknown_203B2AC->input,3,1,gUnknown_203B2AC->unkE0);
|
||||
iVar3 = &gUnknown_203B2AC->unk4C;
|
||||
pokeStruct = &gRecruitedPokemonRef->pokemon[gUnknown_203B2AC->speciesNum];
|
||||
sub_808FF20(iVar3,pokeStruct, sub_80023E4(7));
|
||||
}
|
174
src/code_8023868.c
Normal file
174
src/code_8023868.c
Normal file
@ -0,0 +1,174 @@
|
||||
#include "global.h"
|
||||
#include "code_800D090.h"
|
||||
#include "code_8023868.h"
|
||||
#include "pokemon.h"
|
||||
#include "pokemon_mid.h"
|
||||
#include "text.h"
|
||||
#include "text_util.h"
|
||||
|
||||
//static // MAKE STATIC WHEN code_8023868.s IS DONE
|
||||
IWRAM_DATA struct unkStruct_3001B60 *gUnknown_3001B60 = {0};
|
||||
|
||||
#include "data/code_8023868.h"
|
||||
|
||||
static void SortbyAlphabetNo(s32, s32);
|
||||
static void SortbyInternalNo(s32, s32);
|
||||
static void SortbyName(s32, s32);
|
||||
|
||||
//static bool8 sub_8024184(PokemonStruct1 *pokemon, u8 area);
|
||||
//static void sub_80241A8(void);
|
||||
|
||||
// THE REMAINING CODE FROM THIS FILE IS IN code_8023868.s STARTING WITH sub_8023868
|
||||
|
||||
//static // MAKE STATIC WHEN code_8023868.s IS DONE
|
||||
bool8 sub_8024184(PokemonStruct1 *pokemon, u8 area)
|
||||
{
|
||||
if (area == GetFriendArea(pokemon->speciesNum))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//static // MAKE STATIC WHEN code_8023868.s IS DONE
|
||||
void sub_80241A8(void)
|
||||
{
|
||||
switch (gUnknown_3001B60->sortMethod) {
|
||||
case 2:
|
||||
if (gUnknown_3001B60->unkC != gUnknown_3001B60->unk10)
|
||||
SortbyAlphabetNo(gUnknown_3001B60->unkC, gUnknown_3001B60->unk10);
|
||||
|
||||
if (gUnknown_3001B60->unk10 != gUnknown_3001B60->unk8)
|
||||
SortbyAlphabetNo(gUnknown_3001B60->unk10, gUnknown_3001B60->unk8);
|
||||
break;
|
||||
case 3:
|
||||
if (gUnknown_3001B60->unkC != gUnknown_3001B60->unk10)
|
||||
SortbyName(gUnknown_3001B60->unkC, gUnknown_3001B60->unk10);
|
||||
|
||||
if (gUnknown_3001B60->unk10 != gUnknown_3001B60->unk8)
|
||||
SortbyName(gUnknown_3001B60->unk10, gUnknown_3001B60->unk8);
|
||||
break;
|
||||
case 1:
|
||||
if (gUnknown_3001B60->unkC != gUnknown_3001B60->unk10)
|
||||
SortbyInternalNo(gUnknown_3001B60->unkC, gUnknown_3001B60->unk10);
|
||||
|
||||
if (gUnknown_3001B60->unk10 != gUnknown_3001B60->unk8)
|
||||
SortbyInternalNo(gUnknown_3001B60->unk10, gUnknown_3001B60->unk8);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Remove hacky if/do
|
||||
static void SortbyInternalNo(s32 param_1, s32 param_2)
|
||||
{
|
||||
s16 *r4;
|
||||
s32 iVar4;
|
||||
s16 *r10;
|
||||
s16 *r5;
|
||||
s32 r6;
|
||||
s32 r1;
|
||||
s32 r7;
|
||||
s32 r9;
|
||||
|
||||
r10 = &gUnknown_3001B60->unk18 + param_2;
|
||||
r7 = param_1;
|
||||
r1 = param_2 - 1;
|
||||
if (r7 < r1) {
|
||||
r9 = r1;
|
||||
do {
|
||||
r4 = r10;
|
||||
r6 = r1;
|
||||
iVar4 = r7 + 1;
|
||||
for (; r6 > r7; r6--) {
|
||||
if (GetInternalNo(gRecruitedPokemonRef->pokemon[r5 = r4 - 1, *r5].speciesNum) > GetInternalNo(gRecruitedPokemonRef->pokemon[*r4].speciesNum)) {
|
||||
r1 = *r4;
|
||||
*r4 = *r5;
|
||||
*r5 = r1;
|
||||
}
|
||||
r4 = r5;
|
||||
}
|
||||
r7 = iVar4;
|
||||
r1 = r9;
|
||||
} while (iVar4 < r1);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Remove hacky if/do
|
||||
static void SortbyAlphabetNo(s32 param_1, s32 param_2)
|
||||
{
|
||||
s16 *r4;
|
||||
s32 iVar4;
|
||||
s16 *r10;
|
||||
s16 *r5;
|
||||
s32 r6;
|
||||
s32 r1;
|
||||
s32 r7;
|
||||
s32 r9;
|
||||
|
||||
r10 = &gUnknown_3001B60->unk18 + param_2;
|
||||
r7 = param_1;
|
||||
r1 = param_2 - 1;
|
||||
if (r7 < r1) {
|
||||
r9 = r1;
|
||||
do {
|
||||
r4 = r10;
|
||||
r6 = r1;
|
||||
iVar4 = r7 + 1;
|
||||
for (; r6 > r7; r6--) {
|
||||
if (GetAlphabetParentNo(gRecruitedPokemonRef->pokemon[r5 = r4 - 1, *r5].speciesNum, 0) > GetAlphabetParentNo(gRecruitedPokemonRef->pokemon[*r4].speciesNum, 0)) {
|
||||
r1 = *r4;
|
||||
*r4 = *r5;
|
||||
*r5 = r1;
|
||||
}
|
||||
r4 = r5;
|
||||
}
|
||||
r7 = iVar4;
|
||||
r1 = r9;
|
||||
} while (iVar4 < r1);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Remove hacky if/do
|
||||
static void SortbyName(s32 param_1, s32 param_2)
|
||||
{
|
||||
s16 *r4;
|
||||
s32 iVar4;
|
||||
s16 *r10;
|
||||
s16 *r5;
|
||||
s32 r6;
|
||||
s32 r1;
|
||||
s32 r7;
|
||||
s32 r9;
|
||||
|
||||
r10 = &gUnknown_3001B60->unk18 + param_2;
|
||||
r7 = param_1;
|
||||
r1 = param_2 - 1;
|
||||
if (r7 < r1) {
|
||||
r9 = r1;
|
||||
do {
|
||||
r4 = r10;
|
||||
r6 = r1;
|
||||
iVar4 = r7 + 1;
|
||||
for (; r6 > r7; r6--) {
|
||||
r5 = r4 - 1;
|
||||
if (ComparePokemonNames(*r5, *r4)) {
|
||||
r1 = *r4;
|
||||
*r4 = *r5;
|
||||
*r5 = r1;
|
||||
}
|
||||
r4 = r5;
|
||||
}
|
||||
r7 = iVar4;
|
||||
r1 = r9;
|
||||
} while (iVar4 < r1);
|
||||
}
|
||||
}
|
||||
|
||||
UNUSED static PokemonStruct1 *sub_80243E8(void)
|
||||
{
|
||||
u8 buffer[40];
|
||||
u8 nameBuffer[20];
|
||||
PokemonStruct1 *pokeStruct = &gRecruitedPokemonRef->pokemon[gUnknown_3001B60->unk1A[(gUnknown_3001B60->unk376 * gUnknown_3001B60->unk374) + gUnknown_3001B60->unk370]];
|
||||
|
||||
sub_80922B4(nameBuffer, pokeStruct->name, POKEMON_NAME_LENGTH);
|
||||
sprintfStatic(buffer, sUnknown_80DC9A4, nameBuffer);
|
||||
return pokeStruct;
|
||||
}
|
101
src/code_8024458.c
Normal file
101
src/code_8024458.c
Normal file
@ -0,0 +1,101 @@
|
||||
#include "global.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "code_8024458.h"
|
||||
#include "constants/input.h"
|
||||
#include "event_flag.h"
|
||||
#include "memory.h"
|
||||
#include "menu_input.h"
|
||||
#include "pokemon.h"
|
||||
#include "pokemon_3.h"
|
||||
#include "text1.h"
|
||||
#include "text2.h"
|
||||
|
||||
static EWRAM_DATA_2 struct unkStruct_203B2AC *sUnknown_203B2AC = {0};
|
||||
|
||||
#include "data/code_8024458.h"
|
||||
|
||||
static void sub_8024588(void);
|
||||
static void sub_80245D0(void);
|
||||
static void sub_8024604(void);
|
||||
|
||||
bool8 sub_8024458(s16 speciesNum, s32 a1)
|
||||
{
|
||||
s32 speciesNum_s32 = speciesNum;
|
||||
|
||||
sUnknown_203B2AC = MemoryAlloc(sizeof(struct unkStruct_203B2AC), 8);
|
||||
sUnknown_203B2AC->speciesNum = speciesNum_s32;
|
||||
sUnknown_203B2AC->unkE0 = a1;
|
||||
sUnknown_203B2AC->unkE4 = &sUnknown_203B2AC->unkE8[a1];
|
||||
sub_8006518(sUnknown_203B2AC->unkE8);
|
||||
sUnknown_203B2AC->unkE8[sUnknown_203B2AC->unkE0] = sUnknown_80DC9C8;
|
||||
sUnknown_203B2AC->unkE4->unk14 = sUnknown_203B2AC->unk148;
|
||||
sUnknown_203B2AC->unk148[2] = 10;
|
||||
sub_8024604();
|
||||
sub_802452C();
|
||||
sub_8013984(&sUnknown_203B2AC->input);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
u32 sub_80244E4(void)
|
||||
{
|
||||
switch (GetKeyPress(&sUnknown_203B2AC->input)) {
|
||||
case INPUT_B_BUTTON:
|
||||
PlayMenuSoundEffect(1);
|
||||
return 2;
|
||||
case INPUT_A_BUTTON:
|
||||
PlayMenuSoundEffect(0);
|
||||
return 3;
|
||||
default:
|
||||
if (sub_8013938(&sUnknown_203B2AC->input)) {
|
||||
sub_802452C();
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_802452C(void)
|
||||
{
|
||||
sub_8024588();
|
||||
sub_80245D0();
|
||||
}
|
||||
|
||||
void sub_802453C(void)
|
||||
{
|
||||
if (sUnknown_203B2AC != NULL) {
|
||||
sUnknown_203B2AC->unkE8[sUnknown_203B2AC->unkE0] = sUnknown_80DC9B0;
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(sUnknown_203B2AC->unkE8, TRUE, TRUE);
|
||||
MemoryFree(sUnknown_203B2AC);
|
||||
sUnknown_203B2AC = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8024588(void)
|
||||
{
|
||||
sUnknown_203B2AC->unk148[0] = sUnknown_203B2AC->input.unk20;
|
||||
sUnknown_203B2AC->unk148[1] = sUnknown_203B2AC->input.unk1E;
|
||||
sUnknown_203B2AC->unk148[3] = 0;
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(sUnknown_203B2AC->unkE8, TRUE, TRUE);
|
||||
}
|
||||
|
||||
static void sub_80245D0(void)
|
||||
{
|
||||
CreatePokemonInfoTabScreen(sUnknown_203B2AC->unk34[sUnknown_203B2AC->input.unk1E], sUnknown_203B2AC->input.unk1E, &sUnknown_203B2AC->unk4C, &sUnknown_203B2AC->unkB0, sUnknown_203B2AC->unkE0);
|
||||
}
|
||||
|
||||
static void sub_8024604(void)
|
||||
{
|
||||
PokemonStruct1 *pokeStruct;
|
||||
u32 *iVar3;
|
||||
|
||||
sUnknown_203B2AC->unk34[0] = 2;
|
||||
sUnknown_203B2AC->unk34[1] = 3;
|
||||
sUnknown_203B2AC->unk34[2] = 5;
|
||||
|
||||
sub_8013818(&sUnknown_203B2AC->input, 3, 1, sUnknown_203B2AC->unkE0);
|
||||
iVar3 = &sUnknown_203B2AC->unk4C;
|
||||
pokeStruct = &gRecruitedPokemonRef->pokemon[sUnknown_203B2AC->speciesNum];
|
||||
sub_808FF20(iVar3, pokeStruct, sub_80023E4(7));
|
||||
}
|
29
src/data/code_8023868.h
Normal file
29
src/data/code_8023868.h
Normal file
@ -0,0 +1,29 @@
|
||||
ALIGNED(4) static const u8 sFill[] = _("pksdir0");
|
||||
|
||||
//static // MAKE STATIC WHEN code_8023868.s IS DONE
|
||||
const UnkTextStruct2 sUnknown_80DC950 = {
|
||||
0, 0, 0, 0,
|
||||
3,
|
||||
0, 0,
|
||||
0, 0,
|
||||
0, 0,
|
||||
NULL
|
||||
};
|
||||
//static // MAKE STATIC WHEN code_8023868.s IS DONE
|
||||
const UnkTextStruct2 sUnknown_80DC968 = {
|
||||
0, 0, 0, 0,
|
||||
6,
|
||||
2, 2,
|
||||
15, 14,
|
||||
14, 0,
|
||||
NULL
|
||||
};
|
||||
|
||||
ALIGNED(4) //static // MAKE STATIC WHEN code_8023868.s IS DONE
|
||||
const u8 sUnknown_80DC980[] = _("Friends");
|
||||
ALIGNED(4) //static // MAKE STATIC WHEN code_8023868.s IS DONE
|
||||
const u8 sUnknown_80DC988[] = _("Pokémon Friends");
|
||||
ALIGNED(4) //static // MAKE STATIC WHEN code_8023868.s IS DONE
|
||||
const u8 sUnknown_80DC998[] = _("{COLOR_2}%c%s{END_COLOR_TEXT_2}");
|
||||
ALIGNED(4) //static // MAKE STATIC WHEN code_8023868.s IS DONE
|
||||
const u8 sUnknown_80DC9A4[] = _("%s");
|
19
src/data/code_8024458.h
Normal file
19
src/data/code_8024458.h
Normal file
@ -0,0 +1,19 @@
|
||||
ALIGNED(4) static const u8 sFill[] = _("pksdir0");
|
||||
|
||||
static const UnkTextStruct2 sUnknown_80DC9B0 = {
|
||||
0, 0, 0, 0,
|
||||
3,
|
||||
0, 0,
|
||||
0, 0,
|
||||
0, 0,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const UnkTextStruct2 sUnknown_80DC9C8 = {
|
||||
0, 0, 0, 0,
|
||||
6,
|
||||
2, 2,
|
||||
18, 14,
|
||||
18, 2,
|
||||
NULL
|
||||
};
|
@ -1,6 +1,6 @@
|
||||
ALIGNED(4) static const u8 sFill[] = _("pksdir0");
|
||||
|
||||
static const UnkTextStruct2 gUnknown_80DC464 = {
|
||||
static const UnkTextStruct2 sUnknown_80DC464 = {
|
||||
0, 0, 0, 0,
|
||||
3,
|
||||
0, 0,
|
||||
@ -9,7 +9,7 @@ static const UnkTextStruct2 gUnknown_80DC464 = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static const UnkTextStruct2 gUnknown_80DC47C = {
|
||||
static const UnkTextStruct2 sUnknown_80DC47C = {
|
||||
0, 0, 0, 0,
|
||||
6,
|
||||
2, 2,
|
||||
@ -18,6 +18,6 @@ static const UnkTextStruct2 gUnknown_80DC47C = {
|
||||
NULL
|
||||
};
|
||||
|
||||
ALIGNED(4) static const u8 gUnknown_80DC494[] = _("Friend Areas");
|
||||
ALIGNED(4) static const u8 gUnknown_80DC4A4[] = _("{COLOR_1 RED}%s{END_COLOR_TEXT_1}");
|
||||
ALIGNED(4) static const u8 gUnknown_80DC4AC[] = _("{COLOR_1 GREEN}%s{END_COLOR_TEXT_1}");
|
||||
ALIGNED(4) static const u8 sFriendAreas[] = _("Friend Areas");
|
||||
ALIGNED(4) static const u8 sFmtRedString[] = _("{COLOR_1 RED}%s{END_COLOR_TEXT_1}");
|
||||
ALIGNED(4) static const u8 sFmtGreenString[] = _("{COLOR_1 GREEN}%s{END_COLOR_TEXT_1}");
|
@ -1,6 +1,6 @@
|
||||
ALIGNED(4) static const u8 sFill[] = _("pksdir0");
|
||||
|
||||
static const UnkTextStruct2 gUnknown_80DC4BC = {
|
||||
static const UnkTextStruct2 sUnknown_80DC4BC = {
|
||||
0, 0, 0, 0,
|
||||
3,
|
||||
0, 0,
|
||||
@ -10,7 +10,7 @@ static const UnkTextStruct2 gUnknown_80DC4BC = {
|
||||
};
|
||||
|
||||
static const u8 sUnknown_80DC4D4[] = {1, 0, 18, 0};
|
||||
static const UnkTextStruct2 gUnknown_80DC4D8 = {
|
||||
static const UnkTextStruct2 sUnknown_80DC4D8 = {
|
||||
0, 0, 0, 0,
|
||||
6,
|
||||
2, 2,
|
||||
@ -19,6 +19,6 @@ static const UnkTextStruct2 gUnknown_80DC4D8 = {
|
||||
sUnknown_80DC4D4
|
||||
};
|
||||
|
||||
ALIGNED(4) static const u8 gUnknown_80DC4F0[] = _("Inhabitants (Friends: {COLOR_2 CYAN}Light blue{END_COLOR_TEXT_2})");
|
||||
ALIGNED(4) static const u8 gUnknown_80DC518[] = _("Inhabitants");
|
||||
ALIGNED(4) static const u8 gUnknown_80DC524[] = _("{COLOR_2 CYAN}%s{END_COLOR_TEXT_2}");
|
||||
ALIGNED(4) static const u8 sUnknown_80DC4F0[] = _("Inhabitants (Friends: {COLOR_2 CYAN}Light blue{END_COLOR_TEXT_2})");
|
||||
ALIGNED(4) static const u8 sInhabitants[] = _("Inhabitants");
|
||||
ALIGNED(4) static const u8 sFmtCyanString[] = _("{COLOR_2 CYAN}%s{END_COLOR_TEXT_2}");
|
@ -1,6 +1,6 @@
|
||||
ALIGNED(4) static const u8 sFill[] = _("pksdir0");
|
||||
|
||||
static const UnkTextStruct2 gUnknown_80DC534 = {
|
||||
static const UnkTextStruct2 sUnknown_80DC534 = {
|
||||
0, 0, 0, 0,
|
||||
3,
|
||||
0, 0,
|
||||
@ -9,7 +9,7 @@ static const UnkTextStruct2 gUnknown_80DC534 = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static const UnkTextStruct2 gUnknown_80DC54C = {
|
||||
static const UnkTextStruct2 sUnknown_80DC54C = {
|
||||
0, 0, 0, 0,
|
||||
3,
|
||||
21, 4,
|
||||
@ -18,7 +18,7 @@ static const UnkTextStruct2 gUnknown_80DC54C = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static const UnkTextStruct2 gUnknown_80DC564 = {
|
||||
static const UnkTextStruct2 sUnknown_80DC564 = {
|
||||
0, 0, 0, 0,
|
||||
3,
|
||||
21, 14,
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "code_8012A18_1.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_801EE10_1.h"
|
||||
#include "code_8023868.h"
|
||||
#include "debug_menu4.h"
|
||||
#include "memory.h"
|
||||
#include "menu_input.h"
|
||||
|
@ -3,8 +3,9 @@
|
||||
#include "code_801B3C0.h"
|
||||
#include "code_801BEEC.h"
|
||||
#include "code_801EE10.h"
|
||||
#include "code_801EE10_1.h"
|
||||
#include "code_801EE10_mid.h"
|
||||
#include "code_8023868.h"
|
||||
#include "code_8024458.h"
|
||||
#include "code_8098BDC.h"
|
||||
#include "common_strings.h"
|
||||
#include "constants/dungeon.h"
|
||||
|
@ -5,8 +5,9 @@
|
||||
#include "code_801B3C0.h"
|
||||
#include "code_801BEEC.h"
|
||||
#include "code_801EE10.h"
|
||||
#include "code_801EE10_1.h"
|
||||
#include "code_801EE10_mid.h"
|
||||
#include "code_8023868.h"
|
||||
#include "code_8024458.h"
|
||||
#include "code_8098BDC.h"
|
||||
#include "common_strings.h"
|
||||
#include "constants/dungeon.h"
|
||||
|
@ -2,8 +2,9 @@
|
||||
#include "code_80118A4.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_801B3C0.h"
|
||||
#include "code_801EE10_1.h"
|
||||
#include "code_801C8C4.h"
|
||||
#include "code_8023868.h"
|
||||
#include "code_8024458.h"
|
||||
#include "code_8094F88.h"
|
||||
#include "constants/communication_error_codes.h"
|
||||
#include "constants/monster.h"
|
||||
@ -266,7 +267,6 @@ extern u8 sub_80307EC(void);
|
||||
extern u32 sub_8031DCC(void);
|
||||
extern void sub_8031E10(void);
|
||||
extern void sub_8031E00(void);
|
||||
extern void sub_802452C(void);
|
||||
extern u32 sub_8039068(u32, u8 *passwordBuffer, unkStruct_203B480 *r0);
|
||||
|
||||
extern void sub_803084C(void);
|
||||
|
@ -3,8 +3,9 @@
|
||||
#include "code_80130A8.h"
|
||||
#include "code_801BEEC.h"
|
||||
#include "code_801EE10.h"
|
||||
#include "code_801EE10_1.h"
|
||||
#include "code_801EE10_mid.h"
|
||||
#include "code_8023868.h"
|
||||
#include "code_8024458.h"
|
||||
#include "common_strings.h"
|
||||
#include "felicity_bank.h"
|
||||
#include "gulpin_shop.h"
|
||||
|
@ -5,9 +5,9 @@
|
||||
#include "code_801B3C0.h"
|
||||
#include "code_801BEEC.h"
|
||||
#include "code_801EE10.h"
|
||||
#include "code_801EE10_1.h"
|
||||
#include "code_801EE10_mid.h"
|
||||
#include "code_8023144.h"
|
||||
#include "code_8024458.h"
|
||||
#include "code_8098BDC.h"
|
||||
#include "common_strings.h"
|
||||
#include "constants/dungeon.h"
|
||||
|
@ -207,7 +207,8 @@ bool8 IsPokemonRenamed(PokemonStruct1* pokemon) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 ComparePokemonNames(s16 a1, s16 a2) {
|
||||
bool8 ComparePokemonNames(s16 a1, s16 a2)
|
||||
{
|
||||
s32 index1 = a1;
|
||||
s32 index2 = a2;
|
||||
u8* name1 = gRecruitedPokemonRef->pokemon[index1].name;
|
||||
|
@ -31,7 +31,7 @@ bool8 sub_80211AC(u32 mode, u32 a1)
|
||||
sWigglytuffShop1Work->unk74 = a1;
|
||||
sWigglytuffShop1Work->unk78 = &sWigglytuffShop1Work->unk7C[sWigglytuffShop1Work->unk74];
|
||||
sub_8006518(sWigglytuffShop1Work->unk7C);
|
||||
sWigglytuffShop1Work->unk7C[sWigglytuffShop1Work->unk74] = gUnknown_80DC47C;
|
||||
sWigglytuffShop1Work->unk7C[sWigglytuffShop1Work->unk74] = sUnknown_80DC47C;
|
||||
sWigglytuffShop1Work->unk78->unk14 = sWigglytuffShop1Work->unkDC;
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(sWigglytuffShop1Work->unk7C, TRUE, TRUE);
|
||||
@ -102,7 +102,7 @@ void sub_80213A0(void)
|
||||
sUnknown_203B284 = sWigglytuffShop1Work->mode;
|
||||
sUnknown_203B288 = sWigglytuffShop1Work->unk40.menuIndex;
|
||||
sUnknown_203B28A = sWigglytuffShop1Work->unk40.unk1E;
|
||||
sWigglytuffShop1Work->unk7C[sWigglytuffShop1Work->unk74] = gUnknown_80DC464;
|
||||
sWigglytuffShop1Work->unk7C[sWigglytuffShop1Work->unk74] = sUnknown_80DC464;
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(sWigglytuffShop1Work->unk7C, TRUE, TRUE);
|
||||
MemoryFree(sWigglytuffShop1Work);
|
||||
@ -185,7 +185,7 @@ void sub_8021494(void)
|
||||
|
||||
sub_8008C54(sWigglytuffShop1Work->unk74);
|
||||
sub_80073B8(sWigglytuffShop1Work->unk74);
|
||||
xxx_call_draw_string(10, 0, gUnknown_80DC494, sWigglytuffShop1Work->unk74, 0);
|
||||
xxx_call_draw_string(10, 0, sFriendAreas, sWigglytuffShop1Work->unk74, 0);
|
||||
|
||||
sub_8012BC4((sWigglytuffShop1Work->unkDC[2] * 8) + 4, 0, sWigglytuffShop1Work->unk40.unk1E + 1, 1, 7, sWigglytuffShop1Work->unk74);
|
||||
|
||||
@ -198,7 +198,7 @@ void sub_8021494(void)
|
||||
if (GetFriendAreaPrice(friendAreaIndex) <= gTeamInventoryRef->teamMoney)
|
||||
xxx_call_draw_string(8,sub_8013800(&sWigglytuffShop1Work->unk40, i), buffer1, sWigglytuffShop1Work->unk74, 0);
|
||||
else {
|
||||
sprintfStatic(buffer2, gUnknown_80DC4A4, buffer1);
|
||||
sprintfStatic(buffer2, sFmtRedString, buffer1);
|
||||
xxx_call_draw_string(8, sub_8013800(&sWigglytuffShop1Work->unk40, i), buffer2, sWigglytuffShop1Work->unk74, 0);
|
||||
}
|
||||
}
|
||||
@ -206,7 +206,7 @@ void sub_8021494(void)
|
||||
if (gFriendAreas[friendAreaIndex] == TRUE)
|
||||
xxx_call_draw_string(8, sub_8013800(&sWigglytuffShop1Work->unk40, i), GetFriendAreaName(friendAreaIndex), sWigglytuffShop1Work->unk74, 0);
|
||||
else {
|
||||
sprintfStatic(buffer2, gUnknown_80DC4AC, GetFriendAreaName(friendAreaIndex));
|
||||
sprintfStatic(buffer2, sFmtGreenString, GetFriendAreaName(friendAreaIndex));
|
||||
xxx_call_draw_string(8, sub_8013800(&sWigglytuffShop1Work->unk40, i), buffer2, sWigglytuffShop1Work->unk74, 0);
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ bool8 sub_8021774(u8 friendArea, bool8 a1, s32 a2)
|
||||
sWigglytuffShop2Work->unk74 = a2;
|
||||
sWigglytuffShop2Work->unk78 = &sWigglytuffShop2Work->unk7C[a2];
|
||||
sub_8006518(sWigglytuffShop2Work->unk7C);
|
||||
sWigglytuffShop2Work->unk7C[sWigglytuffShop2Work->unk74] = gUnknown_80DC4D8;
|
||||
sWigglytuffShop2Work->unk7C[sWigglytuffShop2Work->unk74] = sUnknown_80DC4D8;
|
||||
sub_8021820();
|
||||
return TRUE;
|
||||
}
|
||||
@ -60,7 +60,7 @@ static void sub_8021820(void)
|
||||
void sub_8021830(void)
|
||||
{
|
||||
if (sWigglytuffShop2Work) {
|
||||
sWigglytuffShop2Work->unk7C[sWigglytuffShop2Work->unk74] = gUnknown_80DC4BC;
|
||||
sWigglytuffShop2Work->unk7C[sWigglytuffShop2Work->unk74] = sUnknown_80DC4BC;
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(sWigglytuffShop2Work->unk7C, TRUE, TRUE);
|
||||
MemoryFree(sWigglytuffShop2Work);
|
||||
@ -91,9 +91,9 @@ static void sub_8021894(void)
|
||||
xxx_call_draw_string(10, 20, string, sWigglytuffShop2Work->unk74, 0);
|
||||
|
||||
if (sWigglytuffShop2Work->unkD != 0)
|
||||
xxx_call_draw_string(32, 60, gUnknown_80DC4F0, sWigglytuffShop2Work->unk74, 0);
|
||||
xxx_call_draw_string(32, 60, sUnknown_80DC4F0, sWigglytuffShop2Work->unk74, 0);
|
||||
else
|
||||
xxx_call_draw_string(32, 60, gUnknown_80DC518, sWigglytuffShop2Work->unk74, 0);
|
||||
xxx_call_draw_string(32, 60, sInhabitants, sWigglytuffShop2Work->unk74, 0);
|
||||
|
||||
sub_800792C(sWigglytuffShop2Work->unk74, 4, 64, 20, 4);
|
||||
|
||||
@ -119,7 +119,7 @@ static void sub_8021894(void)
|
||||
xxx_call_draw_string(x, y, buffer2, sWigglytuffShop2Work->unk74, 0);
|
||||
break;
|
||||
case 2:
|
||||
sprintfStatic(buffer1, gUnknown_80DC524, buffer2);
|
||||
sprintfStatic(buffer1, sFmtCyanString, buffer2);
|
||||
xxx_call_draw_string(x, y, buffer1, sWigglytuffShop2Work->unk74, 0);
|
||||
break;
|
||||
}
|
||||
|
@ -141,16 +141,16 @@ static void sub_8021D5C(void)
|
||||
switch (sWigglytuffShop3Work->state) {
|
||||
case WIGGLYTUFF_UNK9:
|
||||
case WIGGLYTUFF_UNKA:
|
||||
sWigglytuffShop3Work->unkD0[0] = gUnknown_80DC534;
|
||||
sWigglytuffShop3Work->unkD0[2] = gUnknown_80DC534;
|
||||
sWigglytuffShop3Work->unkD0[1] = gUnknown_80DC564;
|
||||
sWigglytuffShop3Work->unkD0[0] = sUnknown_80DC534;
|
||||
sWigglytuffShop3Work->unkD0[2] = sUnknown_80DC534;
|
||||
sWigglytuffShop3Work->unkD0[1] = sUnknown_80DC564;
|
||||
break;
|
||||
case WIGGLYTUFF_UNKB:
|
||||
sWigglytuffShop3Work->unkD0[2] = gUnknown_80DC54C;
|
||||
sWigglytuffShop3Work->unkD0[2] = sUnknown_80DC54C;
|
||||
break;
|
||||
default:
|
||||
for (i = 0; i < 4; i++)
|
||||
sWigglytuffShop3Work->unkD0[i] = gUnknown_80DC534;
|
||||
sWigglytuffShop3Work->unkD0[i] = sUnknown_80DC534;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include "global.h"
|
||||
#include "code_80118A4.h"
|
||||
#include "code_801EE10_1.h"
|
||||
#include "code_80130A8.h"
|
||||
#include "code_8023868.h"
|
||||
#include "code_8024458.h"
|
||||
#include "code_8094F88.h"
|
||||
#include "code_80A26CC.h"
|
||||
#include "constants/communication_error_codes.h"
|
||||
@ -46,7 +47,6 @@ extern u32 sub_80154F0();
|
||||
extern u32 sub_8039068(u32, u8 *r1, unkStruct_203B480 *r0);
|
||||
extern void sub_8095274(u32);
|
||||
extern void sub_80155F0();
|
||||
extern void sub_802452C();
|
||||
extern u32 sub_8031DCC();
|
||||
extern void sub_8031E10();
|
||||
extern void sub_8031E00();
|
||||
|
@ -207,9 +207,7 @@ gUnknown_203B2A8: /* 203B2A8 (sub_8023868 - sub_8023C60) */
|
||||
gUnknown_203B2AA: /* 203B2AA (sub_8023868 - sub_8023C60) */
|
||||
.space 0x2
|
||||
|
||||
gUnknown_203B2AC: /* 203B2AC (sub_8024458 - sub_8024604) */
|
||||
.space 0x4
|
||||
|
||||
.include "src/code_8024458.o"
|
||||
.include "src/luminous_cave.o"
|
||||
.include "src/friend_list_menu.o"
|
||||
.include "src/party_list_menu.o"
|
||||
|
@ -29,8 +29,7 @@ gUnknown_3001B5A: /* 3001B5A */
|
||||
gUnknown_3001B5C: /* 3001B5C */
|
||||
.space 0x4
|
||||
|
||||
gUnknown_3001B60: /* 3001B60 */
|
||||
.space 0x4
|
||||
.include "src/code_8023868.o"
|
||||
|
||||
gUnknown_3001B64: /* 3001B64 */
|
||||
.space 0x4
|
||||
|
Loading…
Reference in New Issue
Block a user