mirror of
https://github.com/zeldaret/tmc
synced 2026-09-02 02:02:30 -04:00
struct_02002A40 -> structures.h
This commit is contained in:
+113
-13
@@ -1,25 +1,125 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
#include "menu.h"
|
||||
#include "structures.h"
|
||||
|
||||
void sub_080808D8(void) {
|
||||
gScreenTransition.transitionType = 0;
|
||||
extern void (*const gUnk_0811E478[])(u32);
|
||||
|
||||
extern s16 gUnk_02021EE0[6];
|
||||
|
||||
void sub_0807CD9C() {
|
||||
sub_080530C8();
|
||||
}
|
||||
|
||||
void sub_080808E4(void) {
|
||||
void sub_0807CDA4(u32 arg0) {
|
||||
gUnk_0811E478[gMenu.storyPanelIndex](arg0);
|
||||
}
|
||||
|
||||
if (sub_08052638(gScreenTransition.areaID)) {
|
||||
gScreenTransition.transitionType = 0;
|
||||
} else {
|
||||
gScreenTransition.transitionType = 5;
|
||||
u32 sub_0807CDC0(void) {
|
||||
gUnk_02021EE0[5] -= 8;
|
||||
if (gUnk_02021EE0[4] <= 0) {
|
||||
gMenu.field_0xa = 8;
|
||||
gMenu.storyPanelIndex = 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sub_08080904(void) {
|
||||
gScreenTransition.transitionType = 1;
|
||||
u32 sub_0807CDE8(u32 arg0) {
|
||||
u32 temp;
|
||||
|
||||
if (gMenu.field_0xa == 0) {
|
||||
sub_0805616C();
|
||||
switch (arg0) {
|
||||
case 0:
|
||||
temp = sub_0807CF08(gUnk_02000000->saveFile, gUnk_02002A40.filler0);
|
||||
break;
|
||||
case 1:
|
||||
sub_0807CF48(gUnk_02000000->saveFile);
|
||||
temp = 1;
|
||||
break;
|
||||
case 2:
|
||||
temp = sub_0807CF10((u8*)gUnk_02000000->header);
|
||||
break;
|
||||
}
|
||||
gMenu.field_0xa = temp;
|
||||
gMenu.storyPanelIndex = 2;
|
||||
sub_08056208();
|
||||
} else {
|
||||
gMenu.field_0xa--;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sub_08080910(void) {
|
||||
gScreenTransition.transitionType = 1;
|
||||
}
|
||||
s32 sub_0807CE54(void) {
|
||||
u32 uVar1;
|
||||
|
||||
uVar1 = 0;
|
||||
gUnk_02021EE0[5] += 8;
|
||||
if (gUnk_02021EE0[3] <= gUnk_02021EE0[5]) {
|
||||
gUnk_02021EE0[5] = gUnk_02021EE0[3];
|
||||
sub_08050384();
|
||||
gMenu.storyPanelIndex = 0;
|
||||
if (gMenu.field_0xa == 1) {
|
||||
uVar1 = 1;
|
||||
} else {
|
||||
uVar1 = -1;
|
||||
}
|
||||
}
|
||||
return uVar1;
|
||||
}
|
||||
|
||||
extern char gUnk_0811E484[];
|
||||
|
||||
u32 sub_0807CE90(void)
|
||||
{
|
||||
struct_0807D1C4 *puVar1;
|
||||
int iVar2;
|
||||
int iVar3;
|
||||
|
||||
sub_080B1520(0x40);
|
||||
puVar1 = sub_0807D1C4(4);
|
||||
iVar3 = 0;
|
||||
if (sub_0807D24C(puVar1->field_0x6, gUnk_0811E484, puVar1->field_0x0) == 0) {
|
||||
iVar3 += 1;
|
||||
}
|
||||
if (sub_0807D24C(puVar1->field_0x8, gUnk_0811E484, puVar1->field_0x0) == 0) {
|
||||
iVar3 += 2;
|
||||
}
|
||||
if (iVar3 != 0) {
|
||||
if (iVar3 == 3) {
|
||||
sub_0807CF68(5);
|
||||
sub_0807CF68(3);
|
||||
sub_0807CF68(2);
|
||||
sub_0807CF68(1);
|
||||
sub_0807CF68(0);
|
||||
}
|
||||
sub_0807D20C(puVar1->field_0x8, gUnk_0811E484, puVar1->field_0x0);
|
||||
sub_0807D20C(puVar1->field_0x6, gUnk_0811E484, puVar1->field_0x0);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
u32 sub_0807CF08(u32 arg0, u8* arg1) {
|
||||
return sub_0807CF88(arg0, arg1);
|
||||
}
|
||||
|
||||
u32 sub_0807CF10(u8* arg0) {
|
||||
return sub_0807CF88(3, arg0);
|
||||
}
|
||||
|
||||
u32 sub_0807CF1C(u8* arg0) {
|
||||
return sub_0807CF88(5, arg0);
|
||||
}
|
||||
|
||||
u32 sub_0807CF28(u32 arg0, void* arg1) {
|
||||
return sub_0807D008(arg0, arg1);
|
||||
}
|
||||
|
||||
u32 sub_0807CF30(void* arg0) {
|
||||
return sub_0807D008(3, arg0);
|
||||
}
|
||||
|
||||
u32 sub_0807CF3C(void* arg0) {
|
||||
return sub_0807D008(5, arg0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
|
||||
void sub_080808D8(void) {
|
||||
gScreenTransition.transitionType = 0;
|
||||
}
|
||||
|
||||
void sub_080808E4(void) {
|
||||
|
||||
if (sub_08052638(gScreenTransition.areaID)) {
|
||||
gScreenTransition.transitionType = 0;
|
||||
} else {
|
||||
gScreenTransition.transitionType = 5;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08080904(void) {
|
||||
gScreenTransition.transitionType = 1;
|
||||
}
|
||||
|
||||
void sub_08080910(void) {
|
||||
gScreenTransition.transitionType = 1;
|
||||
}
|
||||
@@ -3,16 +3,10 @@
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
|
||||
typedef struct {
|
||||
u8 filler[0xAC];
|
||||
u16 unk;
|
||||
} ScreenTransition;
|
||||
|
||||
extern u32 sub_0805C920(Entity*);
|
||||
extern void LoadPalettesByPaletteGroupIndex(u32);
|
||||
extern void (*const gUnk_08108D10[])(Entity*);
|
||||
|
||||
extern ScreenTransition gScreenTransition;
|
||||
extern u8 gUnk_08108D20[];
|
||||
|
||||
void Manager27(Entity *this)
|
||||
@@ -20,10 +14,10 @@ void Manager27(Entity *this)
|
||||
|
||||
gUnk_08108D10[this->action](this);
|
||||
if (CheckLocalFlagByOffset(0x300, this->entityType.form + 0x67)) {
|
||||
gScreenTransition.unk |= (1 << (this->entityType).form);
|
||||
gScreenTransition.field_0xac |= (1 << (this->entityType).form);
|
||||
}
|
||||
else {
|
||||
gScreenTransition.unk &= ~(1 << (this->entityType).form);
|
||||
gScreenTransition.field_0xac &= ~(1 << (this->entityType).form);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-14
@@ -6,25 +6,13 @@
|
||||
#include "room.h"
|
||||
#include "textbox.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ u8 filler[0x2C];
|
||||
/*0x2C*/ u8 unk;
|
||||
} ScreenTransition;
|
||||
|
||||
typedef struct {
|
||||
u8 filler[0xa8];
|
||||
Stats stats;
|
||||
} struct_02002A40;
|
||||
|
||||
|
||||
extern void (*gUnk_081115C0[])(Entity*);
|
||||
extern void (*gUnk_081115D0[])(Entity*);
|
||||
|
||||
extern ScreenTransition gScreenTransition;
|
||||
extern u16 gUnk_081115DC[];
|
||||
extern u8 gUnk_08111618[];
|
||||
extern u32* gUnk_081115EC[];
|
||||
extern struct_02002A40 gUnk_02002A40;
|
||||
extern u8 gUnk_08111623[];
|
||||
extern u8 gUnk_0811162B[];
|
||||
extern u16 gUnk_08111664[];
|
||||
@@ -60,7 +48,7 @@ void sub_08068A1C(Entity* this) {
|
||||
int offset;
|
||||
|
||||
(this->entityType).parameter = (this->entityType).form;
|
||||
if (gScreenTransition.unk != 0) {
|
||||
if (gScreenTransition.field_0x24[8] != 0) {
|
||||
offset = 6;
|
||||
bVar1 = 3;
|
||||
|
||||
@@ -114,7 +102,7 @@ void sub_08068AA4(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08068ADC(Entity* this) {
|
||||
if (gScreenTransition.unk == 2) {
|
||||
if (gScreenTransition.field_0x24[8] == 2) {
|
||||
GetNextFrame(this);
|
||||
}
|
||||
sub_0806FD3C(this);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "flags.h"
|
||||
#include "textbox.h"
|
||||
#include "link.h"
|
||||
#include "structures.h"
|
||||
|
||||
extern void sub_0805E3A0(Entity*, u32);
|
||||
extern void StartCutscene(Entity*, void*);
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "sprite.h"
|
||||
#include "textbox.h"
|
||||
#include "npc.h"
|
||||
#include "structures.h"
|
||||
|
||||
extern void sub_0807DD50(Entity*);
|
||||
extern u32 sub_0806F5A4(u32);
|
||||
extern void sub_0806F118(Entity*);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "flags.h"
|
||||
#include "textbox.h"
|
||||
#include "npc.h"
|
||||
#include "structures.h"
|
||||
|
||||
extern void sub_0805E3A0(Entity*, u32);
|
||||
extern void sub_0807DD50(Entity*);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "npc.h"
|
||||
#include "textbox.h"
|
||||
#include "link.h"
|
||||
#include "structures.h"
|
||||
|
||||
typedef struct {
|
||||
u8 filler[7];
|
||||
|
||||
+2
-8
@@ -4,11 +4,6 @@
|
||||
#include "room.h"
|
||||
#include "flags.h"
|
||||
|
||||
typedef struct {
|
||||
u8 filler[9];
|
||||
u8 unk;
|
||||
} ScreenTransition;
|
||||
|
||||
typedef struct {
|
||||
u8 filler[4];
|
||||
u32 unk;
|
||||
@@ -21,7 +16,6 @@ extern void DoFade(u32, u32);
|
||||
|
||||
extern void gUnk_0813AD60;
|
||||
extern void gUnk_0813AD74;
|
||||
extern ScreenTransition gScreenTransition;
|
||||
|
||||
void Simon(Entity *this)
|
||||
{
|
||||
@@ -37,7 +31,7 @@ void Simon(Entity *this)
|
||||
void sub_0806C224(void)
|
||||
{
|
||||
DoExitTransition(&gUnk_0813AD60);
|
||||
gScreenTransition.unk = 6;
|
||||
gScreenTransition.transitionType = 6;
|
||||
}
|
||||
|
||||
void Simon_CreateChest(Entity *this)
|
||||
@@ -51,7 +45,7 @@ void sub_0806C280(void)
|
||||
{
|
||||
SetGlobalFlag(MAROYA_WAKEUP);
|
||||
DoExitTransition(&gUnk_0813AD74);
|
||||
gScreenTransition.unk = 6;
|
||||
gScreenTransition.transitionType = 6;
|
||||
}
|
||||
|
||||
void sub_0806C2A0(u32 *param_1,struct_0806C2A0 *param_2)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "link.h"
|
||||
#include "textbox.h"
|
||||
#include "flags.h"
|
||||
#include "structures.h"
|
||||
|
||||
typedef struct {
|
||||
u8 frame1;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "npc.h"
|
||||
#include "textbox.h"
|
||||
#include "flags.h"
|
||||
#include "structures.h"
|
||||
|
||||
extern u32 LoadExtraSpriteData(Entity*, SpriteLoadData*);
|
||||
extern void sub_0807DD50(Entity*);
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
|
||||
typedef struct {
|
||||
u8 filler[64];
|
||||
u32 windcrests;
|
||||
} struct_02002A40;
|
||||
|
||||
extern void sub_0807DD64(Entity*);
|
||||
extern void sub_0807DDAC(Entity*, u32);
|
||||
extern void sub_0807DDE4(Entity*);
|
||||
@@ -15,7 +10,6 @@ extern void PlaySFX(u32);
|
||||
extern Entity* CreateFx (Entity*, u32, u32);
|
||||
|
||||
extern u8 gUnk_08125010;
|
||||
extern struct_02002A40 gUnk_02002A40;
|
||||
|
||||
void Windcrest(Entity *this)
|
||||
{
|
||||
|
||||
+2
-2
@@ -234,7 +234,7 @@ extern EntityData gUnk_080D6210;
|
||||
|
||||
void sub_0804B5BC(void) {
|
||||
|
||||
if ((u16)gScreenTransition.startPos.HALF.y > 0x40)
|
||||
if ((u16)gScreenTransition.playerStartPos.HALF.y > 0x40)
|
||||
LoadRoomEntityList(&gUnk_080D6210);
|
||||
}
|
||||
|
||||
@@ -1024,7 +1024,7 @@ void sub_0804C018(void) {
|
||||
SetTile(0x4072, 0xc47, 1);
|
||||
|
||||
if (CheckGlobalFlag(MAZE_CLEAR))
|
||||
if (gScreenTransition.startPos.WORD == 0x2780078) // todo: wtf
|
||||
if (gScreenTransition.playerStartPos.WORD == 0x2780078) // todo: wtf
|
||||
PlaySFX(0x72);
|
||||
|
||||
ClearGlobalFlag(MAZE_CLEAR);
|
||||
|
||||
Reference in New Issue
Block a user