mirror of
https://github.com/pret/pmd-red.git
synced 2026-07-30 23:36:47 -05:00
more decomp, move of some data, and code cleanup
This commit is contained in:
parent
515f0871bc
commit
c7d3ab03b0
File diff suppressed because it is too large
Load Diff
|
|
@ -4614,6 +4614,3 @@ gUnknown_80DCA2C: @ 80DCA2C
|
|||
|
||||
#include "text/luminous_cave.inc"
|
||||
|
||||
#include "friend_area.inc"
|
||||
|
||||
#include "text/party_menu.inc"
|
||||
|
|
|
|||
|
|
@ -1,176 +0,0 @@
|
|||
.global gUnknown_80DD148
|
||||
gUnknown_80DD148: @ 80DD148 (default friend area warp script)
|
||||
.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_80DD160
|
||||
gUnknown_80DD160: @ 80DD160 (Another friend area warp script)
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
.byte 0x13, 0x00, 0x04, 0x00
|
||||
.byte 0x08, 0x00, 0x03, 0x00
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_80DD178
|
||||
gUnknown_80DD178: @ 80DD178 (Another friend area warp script)
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
.byte 0x14, 0x00, 0x04, 0x00
|
||||
.byte 0x06, 0x00, 0x03, 0x00
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_80DD190
|
||||
gUnknown_80DD190: @ 80DD190 (seems to be Friend Area Warp Script)
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
.byte 0x02, 0x00, 0x11, 0x00
|
||||
.byte 0x1A, 0x00, 0x02, 0x00
|
||||
.byte 0x02, 0x00, 0x00, 0x00
|
||||
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_80DD1A8
|
||||
gUnknown_80DD1A8: @ 80DD1A8
|
||||
.string "Whom would you like to visit?\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD1C8
|
||||
gUnknown_80DD1C8: @ 80DD1C8
|
||||
.string "{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_1}{END_COLOR_TEXT_1} was\n"
|
||||
.string "{CENTER_ALIGN}handed over. \0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD1EC
|
||||
gUnknown_80DD1EC: @ 80DD1EC
|
||||
.string "{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_1}{END_COLOR_TEXT_1} was\n"
|
||||
.string "{CENTER_ALIGN}handed over.{EXTRA_MSG}"
|
||||
.string "{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
|
||||
.string "{CENTER_ALIGN}returned to the Toolbox.\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD240
|
||||
gUnknown_80DD240: @ 80DD240
|
||||
.string "{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
|
||||
.string "{CENTER_ALIGN}returned to the Toolbox.\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD270
|
||||
gUnknown_80DD270: @ 80DD270
|
||||
.string "{CENTER_ALIGN}{ARG_POKEMON_1} left the team to remain\n"
|
||||
.string "{CENTER_ALIGN}on standby in the Friend Area.\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD2B0
|
||||
gUnknown_80DD2B0: @ 80DD2B0
|
||||
.string "Give\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD2B8
|
||||
gUnknown_80DD2B8: @ 80DD2B8
|
||||
.string "Take\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD2C0
|
||||
gUnknown_80DD2C0: @ 80DD2C0
|
||||
.string "Stand By\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD2CC
|
||||
gUnknown_80DD2CC: @ 80DD2CC
|
||||
.string "Visit\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD2D4
|
||||
gUnknown_80DD2D4: @ 80DD2D4
|
||||
.string "Name\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD2DC
|
||||
gUnknown_80DD2DC: @ 80DD2DC
|
||||
.string "Summary\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD2E4
|
||||
gUnknown_80DD2E4: @ 80DD2E4
|
||||
.string "Moves\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD2EC
|
||||
gUnknown_80DD2EC: @ 80DD2EC
|
||||
.string "Check IQ\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD2F8
|
||||
gUnknown_80DD2F8: @ 80DD2F8
|
||||
.string "Item: {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} \0"
|
||||
.align 2,0
|
||||
.string "pksdir0\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_80DD310
|
||||
gUnknown_80DD310: @ 80DD310 (default friend area script)
|
||||
.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_80DD328
|
||||
gUnknown_80DD328: @ 80DD328 (another friend area warp script)
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
.byte 0x13, 0x00, 0x03, 0x00
|
||||
.byte 0x08, 0x00, 0x03, 0x00
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_80DD340
|
||||
gUnknown_80DD340: @ 80DD340
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
.byte 0x14, 0x00, 0x04, 0x00
|
||||
.byte 0x06, 0x00, 0x03, 0x00
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_80DD358
|
||||
gUnknown_80DD358: @ 80DD358
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
.byte 0x02, 0x00, 0x11, 0x00
|
||||
.byte 0x1A, 0x00, 0x02, 0x00
|
||||
.byte 0x02, 0x00, 0x00, 0x00
|
||||
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_80DD370
|
||||
gUnknown_80DD370: @ 80DD370
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.byte 0x03, 0x00, 0x00, 0x00
|
||||
.byte 0x02, 0x00, 0x03, 0x00
|
||||
.byte 0x0F, 0x00, 0x02, 0x00
|
||||
.byte 0x02, 0x00, 0x00, 0x00
|
||||
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
gUnknown_80DD388:: @ 80DD388
|
||||
.string "You have chosen to say farewell\n"
|
||||
.string "to this Pokémon.{EXTRA_MSG}"
|
||||
.string "The Pokémon will leave its Friend Area.\n"
|
||||
.string "It will no longer be available for\n"
|
||||
.string "adventures. Is that OK?\0"
|
||||
.align 2, 0
|
||||
|
||||
gUnknown_80DD420:: @ 80DD420
|
||||
.string "If you say farewell to this\n"
|
||||
.string "Pokémon{COMMA} it will be gone forever.{EXTRA_MSG}"
|
||||
.string "You will never be able to get another one\n"
|
||||
.string "like it to join your team.\n"
|
||||
.string "Will you release it anyway?\0"
|
||||
.align 2, 0
|
||||
|
||||
gUnknown_80DD4C4:: @ 80DD4C4
|
||||
.string "{CENTER_ALIGN}{ARG_POKEMON_1} joined the\n"
|
||||
.string "{CENTER_ALIGN}rescue team for adventures!\0"
|
||||
.align 2, 0
|
||||
|
||||
gUnknown_80DD4F4:: @ 80DD4F4
|
||||
.string "{CENTER_ALIGN}{ARG_POKEMON_1} left the team to remain\n"
|
||||
.string "{CENTER_ALIGN}on standby in the Friend Area.\0"
|
||||
.align 2, 0
|
||||
|
||||
gUnknown_80DD534:: @ 80DD534
|
||||
.string "{CENTER_ALIGN}{ARG_POKEMON_1} became the leader\n"
|
||||
.string "{CENTER_ALIGN}of the rescue team.\0"
|
||||
.align 2, 0
|
||||
|
||||
gUnknown_80DD564:: @ 80DD564
|
||||
.string "{CENTER_ALIGN}{ARG_POKEMON_1} left\n"
|
||||
.string "{CENTER_ALIGN}the Friend Area.\n"
|
||||
.string "{CENTER_ALIGN}Bye-bye{COMMA} {ARG_POKEMON_1}!\0"
|
||||
.align 2,0
|
||||
|
||||
gUnknown_80DD594:: @ 80DD594
|
||||
.string "{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_1}{END_COLOR_TEXT_1} was\n"
|
||||
.string "{CENTER_ALIGN}handed over. \0"
|
||||
.align 2, 0
|
||||
|
||||
gUnknown_80DD5B8:: @ 80DD5B8
|
||||
.string "{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_1}{END_COLOR_TEXT_1} was\n"
|
||||
.string "{CENTER_ALIGN}handed over.{EXTRA_MSG}"
|
||||
.string "{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
|
||||
.string "{CENTER_ALIGN}returned to the Toolbox.\0"
|
||||
.align 2, 0
|
||||
|
||||
gUnknown_80DD60C:: @ 80DD60C
|
||||
.string "{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
|
||||
.string "{CENTER_ALIGN}returned to the Toolbox.\0"
|
||||
.align 2, 0
|
||||
|
||||
gUnknown_80DD63C:: @ 80DD63C
|
||||
.string "{CENTER_ALIGN}The {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} was\n"
|
||||
.string "{CENTER_ALIGN}sent to storage.\0"
|
||||
.align 2, 0
|
||||
|
||||
gPartyMenuStandBy:: @ 80DD664
|
||||
.string "Stand By\0"
|
||||
.align 2, 0
|
||||
|
||||
gPartyMenuMakeLeader:: @ 80DD670
|
||||
.string "Make Leader\0"
|
||||
.align 2,0
|
||||
|
||||
gPartyMenuJoinTeam:: @ 80DD67C
|
||||
.string "Join Team\0"
|
||||
.align 2, 0
|
||||
|
||||
gPartyMenuGiveGummi:: @ 80DD688
|
||||
.string "Give Gummi\0"
|
||||
.align 2, 0
|
||||
|
||||
gPartyMenuGive:: @ 80DD694
|
||||
.string "Give\0"
|
||||
.align 2, 0
|
||||
|
||||
gPartyMenuTake:: @ 80DD69C
|
||||
.string "Take\0"
|
||||
.align 2, 0
|
||||
|
||||
gPartyMenuSayFarewell:: @ 80DD6A4
|
||||
.string "Say Farewell\0"
|
||||
.align 2, 0
|
||||
|
||||
gPartyMenuSummary:: @ 80DD6B4
|
||||
.string "Summary\0"
|
||||
.align 2, 0
|
||||
|
||||
gPartyMenuMoves:: @ 80DD6BC
|
||||
.string "Moves\0"
|
||||
.align 2, 0
|
||||
|
||||
gPartyMenuCheckIQ:: @ 80DD6C4
|
||||
.string "Check IQ\0"
|
||||
.align 2, 0
|
||||
|
||||
gPartyMenuItemPlaceholder:: @ 80DD6D0
|
||||
.string "Item: {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} \0"
|
||||
.align 2, 0
|
||||
|
||||
gUnknown_80DD6E0:: @ 80DD6E0
|
||||
.string "%s\0"
|
||||
.align 2, 0
|
||||
|
||||
.string "pksdir0\0"
|
||||
.align 2, 0
|
||||
|
|
@ -31,6 +31,10 @@ bool8 FailsWhileMuzzled(u16 moveID);
|
|||
bool8 IsSoundMove(struct Move *move);
|
||||
bool8 DoesMoveCharge(u16 move);
|
||||
|
||||
int GetLinkedSequence(int index, struct Move* moves, u16* sequenceMoveIDs);
|
||||
void unk_CopyMoves4To8(struct Move* destMoves, struct Move* srcMoves);
|
||||
void sub_8094060(struct Move* srcMoves, struct Move* destMoves);
|
||||
|
||||
void unk_FixLinkedMovesSetEnabled8_v2(struct Move* move);
|
||||
|
||||
void sub_8092D54(u8 *buffer, struct Move *move);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ struct PokemonStruct
|
|||
{
|
||||
// size: 0x58
|
||||
/* 0x0 */ u16 unk0; // recruited??
|
||||
/* 0x1 */ bool8 isTeamLeader;
|
||||
/* 0x2 */ bool8 isTeamLeader;
|
||||
/* 0x3 */ u8 unkHasNextStage; // set to a random value?
|
||||
/* 0x4 */ struct DungeonLocation dungeonLocation;
|
||||
/* 0x8 */ s16 speciesNum; // species #
|
||||
|
|
|
|||
|
|
@ -122,9 +122,8 @@ SECTIONS {
|
|||
asm/code_801EE10_1.o(.text);
|
||||
src/code_801EE10_1.o(.text);
|
||||
src/luminous_cave.o(.text);
|
||||
src/friend_list_menu_1.o(.text);
|
||||
asm/friend_list_menu.o(.text);
|
||||
src/friend_list_menu.o(.text);
|
||||
src/party_list_menu.o(.text);
|
||||
src/friend_area_action_menu.o(.text);
|
||||
asm/friend_area_action_menu.o(.text);
|
||||
src/friend_area_action_menu_1.o(.text);
|
||||
|
|
@ -415,6 +414,8 @@ SECTIONS {
|
|||
src/save.o(.rodata);
|
||||
src/menu_input.o(.rodata);
|
||||
data/data_80D47B8.o(.rodata);
|
||||
src/friend_list_menu.o(.rodata);
|
||||
src/party_list_menu.o(.rodata);
|
||||
src/friend_area_action_menu.o(.rodata);
|
||||
src/friend_area_action_menu_1.o(.rodata);
|
||||
src/wonder_mail.o(.rodata);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,297 +0,0 @@
|
|||
#include "global.h"
|
||||
#include "memory.h"
|
||||
#include "text.h"
|
||||
#include "input.h"
|
||||
#include "menu.h"
|
||||
#include "item.h"
|
||||
#include "pokemon.h"
|
||||
#include "moves.h"
|
||||
#include "menu_input.h"
|
||||
|
||||
|
||||
// there might be more overlap with unkStruct_203B2BC
|
||||
// I was working on the moves and put the data that seemed to correspond to that
|
||||
// into a separate struct
|
||||
struct unkStruct_203B2B4
|
||||
{
|
||||
// size: 0x178
|
||||
s32 unk0;
|
||||
s32 state;
|
||||
u32 fallbackState;
|
||||
u8 unkC;
|
||||
u8 unkD;
|
||||
s16 species;
|
||||
u32 unk10;
|
||||
struct BulkItem item1;
|
||||
struct BulkItem item2;
|
||||
/* 0x1C */ struct PokemonStruct *pokeStruct;
|
||||
u32 moveIndex; // some sort of move index
|
||||
u16 moveID;
|
||||
struct Move moves[8];
|
||||
u16 moveIDs[4]; // some list of move IDs
|
||||
u32 menuAction1;
|
||||
s32 menuAction2;
|
||||
struct MenuStruct unk78;
|
||||
struct MenuItem unkC8[8];
|
||||
u16 unk108[8];
|
||||
struct UnkTextStruct2 unk118[4];
|
||||
};
|
||||
extern struct unkStruct_203B2B4 *gUnknown_203B2B4;
|
||||
|
||||
extern struct UnkTextStruct2 gUnknown_80DD190;
|
||||
extern struct UnkTextStruct2 gUnknown_80DD160;
|
||||
extern struct UnkTextStruct2 gUnknown_80DD148;
|
||||
extern struct UnkTextStruct2 gUnknown_80DD178;
|
||||
|
||||
extern u8 gAvailablePokemonNames[];
|
||||
extern u8 gUnknown_80DD1A8[];
|
||||
extern u8 gUnknown_80DD270[];
|
||||
extern u8 gUnknown_80DD1C8[];
|
||||
extern u8 gUnknown_80DD1EC[];
|
||||
extern u8 gUnknown_80DD240[];
|
||||
|
||||
extern void sub_80141B4(const char *r0, u32, struct OpenedFile **r1, u32);
|
||||
extern s16 sub_80A5728(void);
|
||||
extern u8 sub_8002658(s16);
|
||||
extern bool8 sub_8024108(u32);
|
||||
extern void sub_8025434(s32);
|
||||
extern void sub_80259F0(void);
|
||||
extern void sub_8025A84(void);
|
||||
extern void sub_8025BCC(void);
|
||||
extern void sub_8025BE8(void);
|
||||
extern void sub_8025C04(void);
|
||||
extern void sub_8025CB4(void);
|
||||
extern void sub_8025D90(void);
|
||||
extern void sub_8025DAC(void);
|
||||
extern void sub_8025E08(void);
|
||||
extern void sub_8025E24(void);
|
||||
extern void sub_8025E44(void);
|
||||
extern void sub_802544C(void);
|
||||
extern void sub_8025518(void);
|
||||
extern void sub_8025728(void);
|
||||
extern void sub_802591C(void);
|
||||
extern u32 sub_801B3C0(struct Item *param_1);
|
||||
extern void sub_8023868(u32, u32, u32, u32);
|
||||
extern void sub_801F1B0(u32, u32);
|
||||
extern void sub_801A5D8(u32,u32, u32, u32);
|
||||
extern void sub_801A8D0(u32);
|
||||
extern void sub_801A9E0(void);
|
||||
extern void PlaySound(u32);
|
||||
extern void sub_8024458(s16, u32);
|
||||
extern void sub_801BEEC(s16);
|
||||
extern void sub_8023B7C(u32);
|
||||
extern void sub_8023DA4(void);
|
||||
|
||||
extern void unk_CopyMoves4To8(struct Move *, struct Move *);
|
||||
extern void sub_801EE10(u32, s16, struct Move *, u32, u32, u32);
|
||||
extern void GetLinkedSequence(u32, struct Move *, u16*);
|
||||
extern void sub_801F808(u16 *);
|
||||
u32 sub_801602C(u32 r0, u8 *name);
|
||||
extern void sub_8025E68(u32 , struct BulkItem *);
|
||||
|
||||
bool8 sub_80252F0(s32 param_1)
|
||||
{
|
||||
|
||||
if ((param_1 == 2) && (sub_8024108(4) != '\0')) {
|
||||
return FALSE;
|
||||
}
|
||||
else {
|
||||
gUnknown_203B2B4 = MemoryAlloc(sizeof(struct unkStruct_203B2B4),8);
|
||||
gUnknown_203B2B4->menuAction1 = 0;
|
||||
gUnknown_203B2B4->unk0 = param_1;
|
||||
gUnknown_203B2B4->unkC = sub_8002658(sub_80A5728());
|
||||
gUnknown_203B2B4->unkD = 0;
|
||||
if (gUnknown_203B2B4->unk0 == 2) {
|
||||
sub_8025434(0);
|
||||
}
|
||||
else {
|
||||
sub_8025434(1);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_8025354(void)
|
||||
{
|
||||
switch(gUnknown_203B2B4->state) {
|
||||
case 0x13:
|
||||
return 3;
|
||||
case 1:
|
||||
case 2:
|
||||
sub_80259F0();
|
||||
break;
|
||||
case 3:
|
||||
sub_8025A84();
|
||||
break;
|
||||
case 4:
|
||||
sub_8025BCC();
|
||||
break;
|
||||
case 5:
|
||||
sub_8025BE8();
|
||||
break;
|
||||
case 0xb:
|
||||
case 0xc:
|
||||
sub_8025C04();
|
||||
break;
|
||||
case 0xd:
|
||||
sub_8025CB4();
|
||||
break;
|
||||
case 0xe:
|
||||
sub_8025D90();
|
||||
break;
|
||||
case 0xf:
|
||||
case 0x10:
|
||||
sub_8025DAC();
|
||||
break;
|
||||
case 0x11:
|
||||
sub_8025E08();
|
||||
break;
|
||||
case 0x12:
|
||||
sub_8025E24();
|
||||
break;
|
||||
default:
|
||||
sub_8025E44();
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 sub_802540C(void)
|
||||
{
|
||||
return gUnknown_203B2B4->unkD;
|
||||
}
|
||||
|
||||
void sub_8025418(void)
|
||||
{
|
||||
if(gUnknown_203B2B4 != NULL)
|
||||
{
|
||||
MemoryFree(gUnknown_203B2B4);
|
||||
gUnknown_203B2B4 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8025434(s32 newState)
|
||||
{
|
||||
gUnknown_203B2B4->state = newState;
|
||||
sub_802544C();
|
||||
sub_8025518();
|
||||
}
|
||||
|
||||
void sub_802544C(void)
|
||||
{
|
||||
s32 index;
|
||||
|
||||
sub_8006518(gUnknown_203B2B4->unk118);
|
||||
|
||||
switch(gUnknown_203B2B4->state)
|
||||
{
|
||||
case 3:
|
||||
if (gUnknown_203B2B4->unk0 == 0) {
|
||||
gUnknown_203B2B4->unk118[3] = gUnknown_80DD190;
|
||||
}
|
||||
sub_8025728();
|
||||
gUnknown_203B2B4->unk118[2] = gUnknown_80DD160;
|
||||
sub_8012CAC(&gUnknown_203B2B4->unk118[2],gUnknown_203B2B4->unkC8);
|
||||
break;
|
||||
case 0xD:
|
||||
sub_802591C();
|
||||
gUnknown_203B2B4->unk118[2] = gUnknown_80DD178;
|
||||
sub_8012CAC(&gUnknown_203B2B4->unk118[2],gUnknown_203B2B4->unkC8);
|
||||
break;
|
||||
default:
|
||||
for(index = 0; index < 4; index++)
|
||||
{
|
||||
gUnknown_203B2B4->unk118[index] = gUnknown_80DD148;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
ResetUnusedInputStruct();
|
||||
sub_800641C(gUnknown_203B2B4->unk118,1,1);
|
||||
}
|
||||
|
||||
void sub_8025518(void)
|
||||
{
|
||||
u32 uVar3;
|
||||
struct Item item;
|
||||
|
||||
switch(gUnknown_203B2B4->state)
|
||||
{
|
||||
case 0:
|
||||
gUnknown_203B2B4->fallbackState = 1;
|
||||
sub_80141B4(gUnknown_80DD1A8,0,0,0x301);
|
||||
break;
|
||||
case 1:
|
||||
uVar3 = 4;
|
||||
if (gUnknown_203B2B4->unk0 == 0) {
|
||||
uVar3 = 2;
|
||||
}
|
||||
sub_8023868(uVar3,0,0,10);
|
||||
break;
|
||||
case 2:
|
||||
sub_8023B7C(1);
|
||||
break;
|
||||
case 3:
|
||||
if (gUnknown_203B2B4->unk0 == 0) {
|
||||
sub_8025E68(3,&gUnknown_203B2B4->item2);
|
||||
}
|
||||
sub_8023DA4();
|
||||
PrintColoredPokeNameToBuffer(gAvailablePokemonNames,gUnknown_203B2B4->pokeStruct,7);
|
||||
PrintColoredPokeNameToBuffer(gAvailablePokemonNames + 0x50,gUnknown_203B2B4->pokeStruct,6);
|
||||
sub_8012D60(&gUnknown_203B2B4->unk78,gUnknown_203B2B4->unkC8,0,gUnknown_203B2B4->unk108,gUnknown_203B2B4->menuAction1,2);
|
||||
break;
|
||||
case 4:
|
||||
sub_8024458(gUnknown_203B2B4->species,2);
|
||||
break;
|
||||
case 5:
|
||||
sub_801BEEC(gUnknown_203B2B4->species);
|
||||
break;
|
||||
case 0xb:
|
||||
sub_801A5D8(1,0,0,10);
|
||||
break;
|
||||
case 0xc:
|
||||
sub_801A8D0(1);
|
||||
break;
|
||||
case 0xd:
|
||||
sub_801A9E0();
|
||||
sub_8012D60(&gUnknown_203B2B4->unk78,gUnknown_203B2B4->unkC8,0,gUnknown_203B2B4->unk108,gUnknown_203B2B4->menuAction2,2);
|
||||
break;
|
||||
case 0xe:
|
||||
HeldItemToSlot(&item, &gUnknown_203B2B4->item1);
|
||||
sub_801B3C0(&item);
|
||||
break;
|
||||
case 8:
|
||||
gUnknown_203B2B4->fallbackState = 2;
|
||||
sub_80141B4(gUnknown_80DD1C8,0,0,0x101);
|
||||
break;
|
||||
case 9:
|
||||
gUnknown_203B2B4->fallbackState = 2;
|
||||
sub_80141B4(gUnknown_80DD1EC,0,0,0x101);
|
||||
break;
|
||||
case 10:
|
||||
gUnknown_203B2B4->fallbackState = 2;
|
||||
sub_80141B4(gUnknown_80DD240,0,0,0x101);
|
||||
break;
|
||||
case 7:
|
||||
gUnknown_203B2B4->fallbackState = 1;
|
||||
PlaySound(0xcf);
|
||||
sub_80141B4(gUnknown_80DD270,0,0,0x101);
|
||||
break;
|
||||
case 0xf:
|
||||
unk_CopyMoves4To8(gUnknown_203B2B4->moves,gUnknown_203B2B4->pokeStruct->moves);
|
||||
sub_801EE10(3,gUnknown_203B2B4->species,gUnknown_203B2B4->moves,0,0,0);
|
||||
break;
|
||||
case 0x10:
|
||||
sub_801F1B0(1,0);
|
||||
break;
|
||||
case 0x11:
|
||||
GetLinkedSequence(gUnknown_203B2B4->moveIndex,gUnknown_203B2B4->moves, gUnknown_203B2B4->moveIDs);
|
||||
sub_801F808(gUnknown_203B2B4->moveIDs);
|
||||
break;
|
||||
case 0x12:
|
||||
sub_801602C(2,gUnknown_203B2B4->pokeStruct->name);
|
||||
break;
|
||||
case 0x13:
|
||||
break;
|
||||
}
|
||||
}
|
||||
12
src/items.c
12
src/items.c
|
|
@ -151,7 +151,7 @@ void xxx_init_helditem_8090B08(struct BulkItem *held, u8 id)
|
|||
held->quantity = 0;
|
||||
}
|
||||
else {
|
||||
held->id = 0;
|
||||
held->id = ITEM_NOTHING;
|
||||
held->quantity = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -494,7 +494,7 @@ void FillInventoryGaps()
|
|||
_slot += (size_t)gTeamInventory_203B460->teamItems;
|
||||
slot = (struct Item*)_slot; // &gTeamInventory_203B460->teamItems[end];
|
||||
#endif
|
||||
slot->id = 0;
|
||||
slot->id = ITEM_NOTHING;
|
||||
slot->quantity = 0;
|
||||
slot->flags = 0;
|
||||
}
|
||||
|
|
@ -567,7 +567,7 @@ void ShiftItemsDownFrom(s32 start)
|
|||
for (i = start, j = start + 1; i < INVENTORY_SIZE - 1; i++, j++) {
|
||||
gTeamInventory_203B460->teamItems[i] = gTeamInventory_203B460->teamItems[j];
|
||||
}
|
||||
gTeamInventory_203B460->teamItems[INVENTORY_SIZE - 1].id = 0;
|
||||
gTeamInventory_203B460->teamItems[INVENTORY_SIZE - 1].id = ITEM_NOTHING;
|
||||
gTeamInventory_203B460->teamItems[INVENTORY_SIZE - 1].flags = 0;
|
||||
}
|
||||
|
||||
|
|
@ -621,7 +621,7 @@ void ConvertMoneyItemToMoney()
|
|||
|
||||
result = GetMoneyValue(current_slot);
|
||||
AddToTeamMoney(result);
|
||||
current_slot->id = 0;
|
||||
current_slot->id = ITEM_NOTHING;
|
||||
current_slot->quantity = 0;
|
||||
current_slot->flags = 0;
|
||||
}
|
||||
|
|
@ -1471,7 +1471,7 @@ void ClearAllItems_8091FB4() {
|
|||
slot->flags &= 0xf7;
|
||||
if (slot->id == ITEM_POKE) {
|
||||
AddToTeamMoney(GetMoneyValue(slot));
|
||||
slot->id = 0;
|
||||
slot->id = ITEM_NOTHING;
|
||||
slot->quantity = 0;
|
||||
slot->flags = 0;
|
||||
}
|
||||
|
|
@ -1493,7 +1493,7 @@ void ClearAllItems_8091FB4() {
|
|||
if (pokemon->heldItem.id) {
|
||||
if (pokemon->heldItem.id == ITEM_POKE) {
|
||||
AddToTeamMoney(GetMoneyValueHeld(&pokemon->heldItem));
|
||||
pokemon->heldItem.id = 0;
|
||||
pokemon->heldItem.id = ITEM_NOTHING;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1081
src/party_list_menu.c
Normal file
1081
src/party_list_menu.c
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -553,7 +553,7 @@ void xxx_pokemonstruct_to_pokemon2_808DE50(struct PokemonStruct2 * a1, struct Po
|
|||
HeldItemToSlot(slot, held);
|
||||
}
|
||||
else {
|
||||
slot->id = 0;
|
||||
slot->id = ITEM_NOTHING;
|
||||
slot->quantity = 0;
|
||||
slot->flags = 0;
|
||||
}
|
||||
|
|
@ -601,7 +601,7 @@ void xxx_pokemon2_to_pokemonstruct_808DF44(struct PokemonStruct* pokemon, struct
|
|||
SlotToHeldItem(&pokemon->heldItem, &a2->itemSlot);
|
||||
}
|
||||
else {
|
||||
pokemon->heldItem.id = 0;
|
||||
pokemon->heldItem.id = ITEM_NOTHING;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -613,7 +613,7 @@ void sub_808DFDC(s32 a1, struct PokemonStruct2* a2)
|
|||
SlotToHeldItem(&pokemon->heldItem, &a2->itemSlot);
|
||||
}
|
||||
else {
|
||||
pokemon->heldItem.id = 0;
|
||||
pokemon->heldItem.id = ITEM_NOTHING;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user