summaryrefslogtreecommitdiff
path: root/src/code_801DCC4.c
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2021-06-09 22:54:21 -0500
committerGitHub <noreply@github.com>2021-06-09 22:54:21 -0500
commit377bd14ea67d6177250fb401e12d7dfcf44e2cf6 (patch)
tree5440970e02a7890791b234aa233e91e5c1d65b40 /src/code_801DCC4.c
parenteaa141c612dd1689936a21bd57018a55ff686b69 (diff)
Dungeon pokemon/Floor ID JSON Part 1 (#39)
* move Thunderwave and Tiny Woods pokemon to json * rule tweaking to actually build tool before parsing JSON * delete .inc pokemon for tiny Woods and Thunderwave * silence git complaining about br_ips and ips_patch * use defines for species and pass the header file for species * convert sinister woods * convert MtThunderPeak * convert silent chasm * add trial floor_id w/ tiny woods * change make rule name to fix compile * MtSteel converted and bugfix * convert few floor headers and great canyon pokemon * code cleanup * unify unkData into UnkTextStruct2 * more code cleanup and some text decomp * doc more funcs and decomp/split some stuff * document more save stuff * more save work and move some data * pika sniped UpdateNatureTotal * decomp a litle and convert a few more dungeons * better scanning for json files * mt freeze and peak
Diffstat (limited to 'src/code_801DCC4.c')
-rw-r--r--src/code_801DCC4.c71
1 files changed, 60 insertions, 11 deletions
diff --git a/src/code_801DCC4.c b/src/code_801DCC4.c
index d713bd6..0fde1a2 100644
--- a/src/code_801DCC4.c
+++ b/src/code_801DCC4.c
@@ -2,16 +2,7 @@
#include "memory.h"
#include "menu.h"
#include "gUnknown_203B46C.h"
-
-struct unkData
-{
- u8 unk0[0xB];
- u16 unkB;
- u16 unkD;
- u16 unk10;
- u16 unk12;
- u32 *unk14;
-};
+#include "text.h"
struct unkStruct_203B25C
{
@@ -25,7 +16,7 @@ struct unkStruct_203B25C
struct MenuItem unk6C[3];
u8 fill84[0xAC - 0x84];
u16 unkAC[8];
- struct unkData unkBC[4];
+ struct UnkTextStruct2 unkBC[4];
};
@@ -58,9 +49,12 @@ extern void sub_801E2C4(void);
extern s32 sub_80144A4(s32 *);
extern void sub_8094C14(void);
extern void sub_8099690(u32);
+extern void sub_8012CAC(struct UnkTextStruct2 *, struct MenuItem *);
extern struct UnkSaveStruct1 *gUnknown_203B46C;
extern struct unkStruct_203B25C *gUnknown_203B25C;
+extern const struct UnkTextStruct2 gUnknown_80DBFCC;
+extern const struct UnkTextStruct2 gUnknown_80DBFB0;
extern const char gOthers_MenuOption[];
extern const char gUnknown_80DBFEC[];
@@ -131,6 +125,60 @@ void sub_801DD6C(u32 newState)
sub_801DED0();
}
+#ifdef NONMATCHING
+void sub_801DD84(void)
+{
+ s32 iVar3;
+ sub_8006518(gUnknown_203B25C->unkBC);
+ switch(gUnknown_203B25C->state)
+ {
+ case 0:
+ CreateOthersMenu();
+ // TODO probably could be cleaned up to actually match
+ iVar3 = 0;
+ if (gUnknown_203B25C->unkAC[iVar3] == 0) {
+ gUnknown_203B25C->unk18 = gUnknown_203B25C->unk6C[iVar3].menuAction;
+ }
+ else {
+ do {
+ iVar3++;
+ if(iVar3 > 7)
+ break;
+ if(gUnknown_203B25C->unkAC[iVar3] == 0){
+ gUnknown_203B25C->unk18 = gUnknown_203B25C->unk6C[iVar3].menuAction;
+ break;
+ }
+ } while (iVar3 < 8);
+ }
+ for(iVar3 = 0; iVar3 < 4; iVar3++)
+ {
+ gUnknown_203B25C->unkBC[iVar3] = gUnknown_80DBFCC;
+ }
+ gUnknown_203B25C->unkBC[0] = gUnknown_80DBFB0;
+ sub_8012CAC(&gUnknown_203B25C->unkBC[0], gUnknown_203B25C->unk6C);
+ gUnknown_203B25C->unkBC[0].unk0c = 0xA;
+ break;
+ case 1:
+ CreateOthersMenu();
+ for(iVar3 = 0; iVar3 < 4; iVar3++)
+ {
+ gUnknown_203B25C->unkBC[iVar3] = gUnknown_80DBFB0;
+ }
+ gUnknown_203B25C->unkBC[0] = gUnknown_80DBFCC;
+ sub_8012CAC(&gUnknown_203B25C->unkBC[0], gUnknown_203B25C->unk6C);
+ gUnknown_203B25C->unkBC[0].unk0c = 0xA;
+ break;
+ default:
+ for(iVar3 = 0; iVar3 < 4; iVar3++)
+ {
+ gUnknown_203B25C->unkBC[iVar3] = gUnknown_80DBFB0;
+ }
+ break;
+ }
+ ResetUnusedInputStruct();
+ sub_800641C(gUnknown_203B25C->unkBC, 1, 1);
+}
+#else
NAKED
void sub_801DD84(void)
{
@@ -297,6 +345,7 @@ void sub_801DD84(void)
"\t.align 2, 0\n"
"_0801DECC: .4byte gUnknown_203B25C");
}
+#endif
void sub_801DED0(void)
{