Merge branch 'master' of https://github.com/pret/pmd-red into code_8015080

This commit is contained in:
DizzyEggg
2025-02-16 10:13:49 +01:00
13 changed files with 10841 additions and 12778 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

8945
data/data_8115F5C_2.s Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -12,4 +12,4 @@ bool8 sub_8035678(void);
u32 sub_80356A0(void);
void sub_8035758(void);
#endif // GUARD_CREDITS2_H
#endif // GUARD_CREDITS2_H

View File

@@ -39,6 +39,6 @@ struct PersonalityTestTracker
bool8 CreateTestTracker(void);
void DeleteTestTracker(void);
u8 HandleTestTrackerState(void);
u32 HandleTestTrackerState(void);
#endif // GUARD_PERSONALITY_TEST1_H

View File

@@ -2,46 +2,64 @@
#define GUARD_STR_3001B64_H
#include "file_system.h"
#include "structs/menu.h"
#include "string_format.h"
// Maybe Position32?
struct unkStruct_3001B64_sub_sub
{
s32 a0;
s32 a4;
};
struct unkStruct_3001B64_sub
{
// size: 0x24
u16 unk0;
s16 unk0;
/* 0x2 */ s16 speciesID;
u8 unk4;
u8 unk5;
u8 unk6;
s8 unk6;
u8 unk7;
u32 unk8;
u32 unkC;
u32 unk10;
/* 0x14 */ u8 *faceData;
u32 fill18;
u8 unk1C;
u8 fill1D[0x20 - 0x1D];
struct unkStruct_3001B64_sub_sub unk8;
struct MonPortraitMsg monPortrait;
/* 0x20 */ OpenedFile *faceFile;
};
struct unkStruct_3001B64_unkC
{
u16 unk0;
u32 unk4;
u8 buffer[0x400];
};
struct unkStruct_3001B64_unk418
{
u16 unk0;
u8 (*unk4)(void);
void (*unk8)(void);
u32 (*unkC)(void);
};
struct unkStruct_3001B64
{
// size: 0x5A8
u32 unk0;
u32 unk4;
u32 unk8;
u32 unkC;
u8 fill10[0x414 - 0x10];
struct unkStruct_3001B64_unkC unkC;
u32 unk414;
u32 unk418;
u32 unk41C;
const struct unkStruct_3001B64_unk418 *unk418;
const MenuItem *unk41C;
u32 unk420;
u32 unk424;
u32 unk428;
u32 unk42C;
u32 unk430;
u32 unk434;
u8 *unk42C;
s32 unk430;
s32 unk434;
u32 fill438;
struct unkStruct_3001B64_sub unk43C[10];
u16 unk5A4;
s16 unk5A4;
};
#endif // GUARD_STR_3001B61_H

View File

@@ -34,4 +34,7 @@ typedef struct WonderMailStruct_203B2C0
/* 0x544 */ s16 speciesNum;
} WonderMailStruct_203B2C0;
u8 sub_8027F88(void);
u32 sub_8028078(void);
#endif // GUARD_WONDER_MAIL_H

View File

@@ -317,8 +317,6 @@ SECTIONS {
src/code_8099360.o(.text);
asm/code_8099360.o(.text);
src/code_809A560.o(.text);
asm/code_809A560.o(.text);
src/code_809A560_1.o(.text);
src/code_809C5C4.o(.text);
asm/code_809C5C4.o(.text);
src/code_809D148.o(.text);
@@ -573,6 +571,8 @@ SECTIONS {
data/data_8115EB8.o(.rodata);
src/ground_main.o(.rodata);
data/data_8115F5C.o(.rodata);
src/code_809A560.o(.rodata);
data/data_8115F5C_2.o(.rodata);
src/ground_event_data.o(.rodata);
data/friend_area_dialogue.o(.rodata);
src/ground_data_t00p01_station.o(.rodata);

File diff suppressed because it is too large Load Diff

View File

@@ -1,169 +0,0 @@
#include "global.h"
#include "structs/str_3001B64.h"
#include "code_80118A4.h"
#include "code_801D014.h"
#include "code_8099360.h"
#include "credits2.h"
#include "event_flag.h"
#include "flash.h"
#include "friend_list_menu.h"
#include "ground_main.h"
#include "personality_test1.h"
extern struct unkStruct_3001B64 *gUnknown_3001B64;
u32 sub_802E90C();
void sub_802E918();
u32 sub_80282DC(u8 *r0);
void sub_809927C(u8);
void sub_80282FC(void);
void sub_8001064(void);
void sub_809C39C(void) {
gUnknown_3001B64->unk430 = sub_801D178();
if(gUnknown_3001B64->unk430 == 3)
GroundMainGroundRequest(sub_8002694(sub_801D1D4()), 0, -1);
sub_801D1E0();
}
void sub_809C3D8(void)
{
gUnknown_3001B64->unk430 = sub_801D178();
if(gUnknown_3001B64->unk430 == 3)
GroundMainGroundRequest(sub_8002694(sub_801D1D4()), 0, -1);
sub_801D1E0();
}
void sub_809C414(void)
{
u8 val;
val = sub_802540C();
if(val != 0)
{
gUnknown_3001B64->unk430 = val;
GroundMainGroundRequest(sub_8002694(val), 0, -1);
}
else
{
gUnknown_3001B64->unk430 = -1;
}
CleanFriendListMenu();
}
void sub_809C464(void)
{
DeleteTestTracker();
sub_8001064();
sub_809965C();
}
void sub_809C478(void)
{
s32 temp;
s32 temp1;
if(sub_80356A0() == 0x3)
{
PlaySound(0x313);
InitFlash();
ClearFlashData();
}
sub_8035758();
GetScriptVarScenario(SCENARIO_MAIN, &temp, &temp1);
sub_80993C0(0);
}
// https://decomp.me/scratch/WyHAL - (84.32% matching - Seth)
NAKED
void sub_809C4B0(void)
{
asm_unified(
"\tpush {r4,r5,lr}\n"
"\tmovs r4, 0x1\n"
"\tnegs r4, r4\n"
"\tldr r5, _0809C4FC\n"
"\tldr r0, [r5]\n"
"\tmovs r2, 0x86\n"
"\tlsls r2, 3\n"
"\tadds r1, r0, r2\n"
"\tldr r0, [r1]\n"
"\tcmp r0, 0\n"
"\tbne _0809C4DE\n"
"\tbl sub_803B168\n"
"\tlsls r0, 16\n"
"\tldr r1, [r5]\n"
"\tldr r3, _0809C500\n"
"\tadds r2, r1, r3\n"
"\tasrs r4, r0, 16\n"
"\tlsrs r0, 16\n"
"\tstrh r0, [r2]\n"
"\tmovs r0, 0x86\n"
"\tlsls r0, 3\n"
"\tadds r1, r0\n"
"_0809C4DE:\n"
"\tstr r4, [r1]\n"
"\tbl sub_803B1BC\n"
"\tmovs r0, 0x1\n"
"\tnegs r0, r0\n"
"\tcmp r4, r0\n"
"\tbeq _0809C4F4\n"
"\tadds r0, r4, 0\n"
"\tmovs r1, 0\n"
"\tbl GroundMap_ExecuteEvent\n"
"_0809C4F4:\n"
"\tpop {r4,r5}\n"
"\tpop {r0}\n"
"\tbx r0\n"
"\t.align 2, 0\n"
"_0809C4FC: .4byte gUnknown_3001B64\n"
"_0809C500: .4byte 0x000005a4");
}
void sub_809C504(void)
{
u8 temp;
if(sub_80282DC(&temp) == 1)
{
sub_809927C(temp);
gUnknown_3001B64->unk430 = 1;
}
else
{
gUnknown_3001B64->unk430 = -1;
}
sub_80282FC();
}
void sub_809C550(void)
{
u32 ret;
s32 val;
ret = sub_802E90C();
val = 0;
sub_802E918();
switch(ret)
{
case 1:
if(ScriptVarScenarioBefore(SCENARIO_SUB1, 0x1D, 0x3))
val = 1;
break;
case 2:
if(ScriptVarScenarioBefore(SCENARIO_SUB1, 0x1F, 0x2))
val = 2;
break;
case 3:
if(ScriptVarScenarioBefore(SCENARIO_SUB8, 0x33, 0x8))
val = 3;
break;
}
gUnknown_3001B64->unk430 = val;
}

View File

@@ -93,7 +93,7 @@ static void InitializeTestStats(void)
sPersonalityTestTracker->playerGender = 0;
}
u8 HandleTestTrackerState(void)
u32 HandleTestTrackerState(void)
{
s32 counter;
s32 iVar1;

View File

@@ -180,7 +180,7 @@ enum MenuActions {
void SetFriendRescueCounterState(u32 r0);
u32 sub_8027F88(void)
u8 sub_8027F88(void)
{
char *monName;
OpenedFile *faceFile;

View File

@@ -74,7 +74,7 @@ ALIGNED(4) const char gUnknown_80DFB14[] = _(
" Please give me a shout if\n"
"you would like to send {COLOR CYAN_G}A-OK Mail{RESET}.");
s32 sub_802B2D4(void)
u8 sub_802B2D4(void)
{
OpenedFile *faceFile;