summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornotyouraveragehooman <65437533+notyouraveragehooman@users.noreply.github.com>2020-08-05 00:44:09 -0700
committerGitHub <noreply@github.com>2020-08-05 00:44:09 -0700
commit1912771187ac03041ced8e7dcfe37dccff494cd3 (patch)
tree06d5640ac9adb49f25a2f286ffcfd95addf4dff7 /src
parenteb911c9248deb5392ad1ceba095501fdb77c6156 (diff)
parent1002af33602ddf1dbe2e8dd9500622516e02ca41 (diff)
Merge pull request #39 from notyouraveragehooman:master
annotated ram func calls, various struct changes
Diffstat (limited to 'src')
-rw-r--r--src/code_0805436C.c6
-rw-r--r--src/code_0807CC3C.c125
-rw-r--r--src/code_080808D8.c25
-rw-r--r--src/code_0808091C.c4
-rw-r--r--src/manager/manager27.c10
-rw-r--r--src/npc/bigGoron.c4
-rw-r--r--src/npc/bladeBrothers.c16
-rw-r--r--src/npc/forestMinish.c1
-rw-r--r--src/npc/goronMerchant.c4
-rw-r--r--src/npc/guard.c6
-rw-r--r--src/npc/mayorHagen.c2
-rw-r--r--src/npc/mutoh.c1
-rw-r--r--src/npc/postman.c1
-rw-r--r--src/npc/simon.c10
-rw-r--r--src/npc/syrup.c4
-rw-r--r--src/npc/townsperson.c1
-rw-r--r--src/npc/windTribespeople.c1
-rw-r--r--src/object/cloud.c8
-rw-r--r--src/object/mask.c4
-rw-r--r--src/object/minecart.c2
-rw-r--r--src/object/treeHidingPortal.c4
-rw-r--r--src/object/windcrest.c6
-rw-r--r--src/room.c36
-rw-r--r--src/sub_0805E374.c4
-rw-r--r--src/sub_080A3B84.c4
25 files changed, 208 insertions, 81 deletions
diff --git a/src/code_0805436C.c b/src/code_0805436C.c
index 92175a3c..cc81546c 100644
--- a/src/code_0805436C.c
+++ b/src/code_0805436C.c
@@ -17,11 +17,11 @@ typedef struct {
typedef struct {
u8 filler[0x2e];
u8 unk;
-} struct_030010A0;
+} ScreenTransition;
extern struct_02002A40 gUnk_02002A40;
extern struct_080FD5B4 gUnk_080FD5B4[];
-extern struct_030010A0 gUnk_030010A0;
+extern ScreenTransition gScreenTransition;
extern u8 gUnk_0200AF13;
extern u8 gUnk_0200AF14;
@@ -154,7 +154,7 @@ void sub_08054524(void) {
bVar1 = gArea.locationIndex;
if (gArea.locationIndex == 0) {
- bVar1 = gUnk_030010A0.unk;
+ bVar1 = gScreenTransition.unk;
}
if (bVar1 > 0x16) {
bVar1 = 0;
diff --git a/src/code_0807CC3C.c b/src/code_0807CC3C.c
new file mode 100644
index 00000000..b5b1c4ee
--- /dev/null
+++ b/src/code_0807CC3C.c
@@ -0,0 +1,125 @@
+#include "global.h"
+#include "entity.h"
+#include "functions.h"
+#include "menu.h"
+#include "structures.h"
+
+extern void (*const gUnk_0811E478[])(u32);
+
+extern s16 gUnk_02021EE0[6];
+
+void sub_0807CD9C() {
+ sub_080530C8();
+}
+
+void sub_0807CDA4(u32 arg0) {
+ gUnk_0811E478[gMenu.storyPanelIndex](arg0);
+}
+
+u32 sub_0807CDC0(void) {
+ gUnk_02021EE0[5] -= 8;
+ if (gUnk_02021EE0[4] <= 0) {
+ gMenu.field_0xa = 8;
+ gMenu.storyPanelIndex = 1;
+ }
+ return 0;
+}
+
+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;
+}
+
+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);
+}
diff --git a/src/code_080808D8.c b/src/code_080808D8.c
new file mode 100644
index 00000000..e9b9f8f5
--- /dev/null
+++ b/src/code_080808D8.c
@@ -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;
+} \ No newline at end of file
diff --git a/src/code_0808091C.c b/src/code_0808091C.c
index 3ba2096e..1607ddf0 100644
--- a/src/code_0808091C.c
+++ b/src/code_0808091C.c
@@ -6,7 +6,7 @@ extern void sub_0805E5A8();
extern RoomControls gRoomControls;
extern u32 gUnk_0200B650;
extern u32 gUnk_02025EB0;
-extern u8 gUnk_030010A0[10];
+extern u8 gScreenTransition[10];
extern void DoExitTransition(Entity*);
extern void sub_080809D4();
@@ -15,7 +15,7 @@ void sub_0808091C(Entity* param_1, u32 param_2)
{
DoExitTransition(param_1);
- gUnk_030010A0[9] = param_2;
+ gScreenTransition[9] = param_2;
return;
}
diff --git a/src/manager/manager27.c b/src/manager/manager27.c
index db5bd8b6..57952513 100644
--- a/src/manager/manager27.c
+++ b/src/manager/manager27.c
@@ -3,16 +3,10 @@
#include "flags.h"
#include "functions.h"
-typedef struct {
- u8 filler[0xAC];
- u16 unk;
-} struct_030010A0;
-
extern u32 sub_0805C920(Entity*);
extern void LoadPalettesByPaletteGroupIndex(u32);
extern void (*const gUnk_08108D10[])(Entity*);
-extern struct_030010A0 gUnk_030010A0;
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)) {
- gUnk_030010A0.unk |= (1 << (this->entityType).form);
+ gScreenTransition.field_0xac |= (1 << (this->entityType).form);
}
else {
- gUnk_030010A0.unk &= ~(1 << (this->entityType).form);
+ gScreenTransition.field_0xac &= ~(1 << (this->entityType).form);
}
}
diff --git a/src/npc/bigGoron.c b/src/npc/bigGoron.c
index 0d6b9f3f..5096dfa0 100644
--- a/src/npc/bigGoron.c
+++ b/src/npc/bigGoron.c
@@ -5,7 +5,7 @@
extern void (*gUnk_081140D4[])(Entity*);
extern u16 gUnk_081140CC[];
-extern u32 gUnk_030010A0;
+extern u32 gScreenTransition;
extern void sub_0805E3A0(Entity*, u32);
extern void sub_0806D0B0(Entity*);
extern void sub_0807DD64(Entity*);
@@ -40,7 +40,7 @@ void sub_0806CF30(Entity* this) {
if (this->previousActionFlag != 2) {
if (this->previousActionFlag < 3) {
- if ((gUnk_030010A0 & 3) == 0) {
+ if ((gScreenTransition & 3) == 0) {
iVar3 = this->x.HALF.HI;
if (gLinkEntity.x.HALF.HI < iVar3) {
if ((this->field_0x68 - 32) < iVar3) {
diff --git a/src/npc/bladeBrothers.c b/src/npc/bladeBrothers.c
index 051d8836..3ebb104f 100644
--- a/src/npc/bladeBrothers.c
+++ b/src/npc/bladeBrothers.c
@@ -6,25 +6,13 @@
#include "room.h"
#include "textbox.h"
-typedef struct {
- /*0x00*/ u8 filler[0x2C];
- /*0x2C*/ u8 unk;
-} struct_030010A0;
-
-typedef struct {
- u8 filler[0xa8];
- Stats stats;
-} struct_02002A40;
-
extern void (*gUnk_081115C0[])(Entity*);
extern void (*gUnk_081115D0[])(Entity*);
-extern struct_030010A0 gUnk_030010A0;
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 (gUnk_030010A0.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 (gUnk_030010A0.unk == 2) {
+ if (gScreenTransition.field_0x24[8] == 2) {
GetNextFrame(this);
}
sub_0806FD3C(this);
diff --git a/src/npc/forestMinish.c b/src/npc/forestMinish.c
index 32b9c77a..7d0daab7 100644
--- a/src/npc/forestMinish.c
+++ b/src/npc/forestMinish.c
@@ -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*);
diff --git a/src/npc/goronMerchant.c b/src/npc/goronMerchant.c
index 8cda93ec..94736676 100644
--- a/src/npc/goronMerchant.c
+++ b/src/npc/goronMerchant.c
@@ -27,7 +27,7 @@ void GoronMerchant(Entity *this)
void sub_08069584(Entity *this)
{
- if (gUnk_030010A0.field_0x24[8] != 0) {
+ if (gScreenTransition.field_0x24[8] != 0) {
this->action = 3;
}
else {
@@ -65,7 +65,7 @@ void sub_080695E8(Entity *this)
void sub_0806961C(Entity *this)
{
- if (gUnk_030010A0.field_0x24[8] == 2) {
+ if (gScreenTransition.field_0x24[8] == 2) {
UpdateAnimationSingleFrame(this);
}
sub_0806FD3C(this);
diff --git a/src/npc/guard.c b/src/npc/guard.c
index 765a89dd..a2cd0b25 100644
--- a/src/npc/guard.c
+++ b/src/npc/guard.c
@@ -13,7 +13,7 @@ typedef struct {
typedef struct {
u8 filler[8];
u8 unk;
-} struct_030010A0;
+} ScreenTransition;
typedef struct {
u32 unk;
@@ -38,7 +38,7 @@ extern void (*const gUnk_0810F550[])(Entity*);
extern u8 gUnk_03003DBC;
extern SpriteLoadData gUnk_0810F524[];
extern void* gUnk_0810F6BC[];
-extern struct_030010A0 gUnk_030010A0;
+extern ScreenTransition gScreenTransition;
void Guard(Entity *this)
{
@@ -175,7 +175,7 @@ void sub_08064030(Entity *arg0,Entity *arg1)
void sub_08064044(void)
{
- gUnk_030010A0.unk = 1;
+ gScreenTransition.unk = 1;
}
void sub_08064050(Entity *arg0, struct_08064050 *arg1)
diff --git a/src/npc/mayorHagen.c b/src/npc/mayorHagen.c
index bedf82be..9c9cbe51 100644
--- a/src/npc/mayorHagen.c
+++ b/src/npc/mayorHagen.c
@@ -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*);
diff --git a/src/npc/mutoh.c b/src/npc/mutoh.c
index d9d54769..e20d6ea6 100644
--- a/src/npc/mutoh.c
+++ b/src/npc/mutoh.c
@@ -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*);
diff --git a/src/npc/postman.c b/src/npc/postman.c
index e2ed44c8..6df8f21b 100644
--- a/src/npc/postman.c
+++ b/src/npc/postman.c
@@ -3,6 +3,7 @@
#include "npc.h"
#include "textbox.h"
#include "link.h"
+#include "structures.h"
typedef struct {
u8 filler[7];
diff --git a/src/npc/simon.c b/src/npc/simon.c
index 911fd745..d30b869a 100644
--- a/src/npc/simon.c
+++ b/src/npc/simon.c
@@ -5,11 +5,6 @@
#include "flags.h"
typedef struct {
- u8 filler[9];
- u8 unk;
-} struct_030010A0;
-
-typedef struct {
u8 filler[4];
u32 unk;
} struct_0806C2A0;
@@ -21,7 +16,6 @@ extern void DoFade(u32, u32);
extern void gUnk_0813AD60;
extern void gUnk_0813AD74;
-extern struct_030010A0 gUnk_030010A0;
void Simon(Entity *this)
{
@@ -37,7 +31,7 @@ void Simon(Entity *this)
void sub_0806C224(void)
{
DoExitTransition(&gUnk_0813AD60);
- gUnk_030010A0.unk = 6;
+ gScreenTransition.transitionType = 6;
}
void Simon_CreateChest(Entity *this)
@@ -51,7 +45,7 @@ void sub_0806C280(void)
{
SetGlobalFlag(MAROYA_WAKEUP);
DoExitTransition(&gUnk_0813AD74);
- gUnk_030010A0.unk = 6;
+ gScreenTransition.transitionType = 6;
}
void sub_0806C2A0(u32 *param_1,struct_0806C2A0 *param_2)
diff --git a/src/npc/syrup.c b/src/npc/syrup.c
index da3f69e8..58a3cb61 100644
--- a/src/npc/syrup.c
+++ b/src/npc/syrup.c
@@ -11,7 +11,7 @@ extern void (*gUnk_081121D4[])(Entity*);
extern SpriteLoadData gUnk_081121C4;
extern SpriteLoadData gUnk_081121B4;
-extern u32 gUnk_030010A0;
+extern u32 gScreenTransition;
extern void sub_0807DD94(Entity*, u32);
extern void sub_0806A26C(Entity*);
extern void sub_080042BA(Entity*, u32);
@@ -42,7 +42,7 @@ void sub_0806A234(Entity *this)
{
sub_0807DD94(this, 0);
if ((this->field_0x82.HWORD & 4) != 0) {
- if ((gUnk_030010A0 & 7) == 0) {
+ if ((gScreenTransition & 7) == 0) {
sub_0806A26C(this);
}
sub_080042BA(this, 2);
diff --git a/src/npc/townsperson.c b/src/npc/townsperson.c
index c0b1dd76..60748042 100644
--- a/src/npc/townsperson.c
+++ b/src/npc/townsperson.c
@@ -4,6 +4,7 @@
#include "link.h"
#include "textbox.h"
#include "flags.h"
+#include "structures.h"
typedef struct {
u8 frame1;
diff --git a/src/npc/windTribespeople.c b/src/npc/windTribespeople.c
index 60f9905b..620483b3 100644
--- a/src/npc/windTribespeople.c
+++ b/src/npc/windTribespeople.c
@@ -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*);
diff --git a/src/object/cloud.c b/src/object/cloud.c
index 6ca000ac..96ffc659 100644
--- a/src/object/cloud.c
+++ b/src/object/cloud.c
@@ -23,7 +23,7 @@ extern void PositionEntityOnTop(Entity*, Entity*);
extern void sub_0807BB68(u32*, u32, u32);
extern u8 gUnk_02034490;
-extern u32 gUnk_030010A0;
+extern u32 gScreenTransition;
extern void* gUnk_080DD750;
extern Entity gLinkEntity;
extern LinkState gLinkState;
@@ -62,7 +62,7 @@ void sub_0809F548(Entity* this) {
sub_0809F814((((this->x.HALF.HI - gRoomControls.roomOriginX) >> 4) & 63) |
(((this->y.HALF.HI - gRoomControls.roomOriginY) >> 4) & 63) << 6);
} else {
- if ((gUnk_030010A0 & 7) == 0) {
+ if ((gScreenTransition & 7) == 0) {
sub_0809F7BC(this);
}
sub_0809F7F4(this);
@@ -110,7 +110,7 @@ void sub_0809F61C(Entity* this) {
sub_0809F814((((this->x.HALF.HI - gRoomControls.roomOriginX) >> 4) & 63) |
(((this->y.HALF.HI - gRoomControls.roomOriginY) >> 4) & 63) << 6);
} else {
- if ((gUnk_030010A0 & 7) == 0) {
+ if ((gScreenTransition & 7) == 0) {
sub_0809F7BC(this);
}
sub_0809F7F4(this);
@@ -145,7 +145,7 @@ void sub_0809F700(Entity* this) {
this->actionDelay = (Random() & 30) + 8;
this->flags = this->flags | 12;
}
- if ((gUnk_030010A0 & 3) == 0) {
+ if ((gScreenTransition & 3) == 0) {
uVar2 = Random();
this->spriteOffsetX = gUnk_081247C0[uVar2 & 7];
this->spriteOffsetY = gUnk_081247C0[uVar2 >> 4 & 7];
diff --git a/src/object/mask.c b/src/object/mask.c
index 6dd866c9..033039e4 100644
--- a/src/object/mask.c
+++ b/src/object/mask.c
@@ -4,7 +4,7 @@
#include "random.h"
extern Entity gLinkEntity;
-extern u16 gUnk_030010A0[];
+extern u16 gScreenTransition[];
extern void (*MaskActionFuncs[])(Entity *);
@@ -36,7 +36,7 @@ void sub_080929A4(Entity *this) {
switch (this->entityType.parameter & 0xC0) {
case 0x40:
- field_0x0a = gUnk_030010A0[0x5];
+ field_0x0a = gScreenTransition[0x5];
switch (field_0x0a) {
case 0x44D ... 0x44F:
diff --git a/src/object/minecart.c b/src/object/minecart.c
index eff15d3a..5bf59c5d 100644
--- a/src/object/minecart.c
+++ b/src/object/minecart.c
@@ -155,7 +155,7 @@ void sub_080919AC(Entity *this)
CopyPosition(this,&gLinkEntity);
gLinkEntity.spritePriority.b0 = this->spritePriority.b0 - 1;
if (!sub_08091DDC(this)) {
- if ((gUnk_030010A0.field_0x0 & 0xf) == 0) {
+ if ((gScreenTransition.field_0x0 & 0xf) == 0) {
PlaySFX(0x138);
}
diff --git a/src/object/treeHidingPortal.c b/src/object/treeHidingPortal.c
index 8bab5747..5b8522b3 100644
--- a/src/object/treeHidingPortal.c
+++ b/src/object/treeHidingPortal.c
@@ -15,7 +15,7 @@ extern void CreateMinishEntrance(u32 tile);
extern void (*const gUnk_08124354[])(Entity*);
-extern u32 gUnk_030010A0;
+extern u32 gScreenTransition;
extern s16 gUnk_08124364[];
void TreeHidingPortal(Entity* this) {
@@ -36,7 +36,7 @@ void sub_0809E86C(Entity* this) {
if (sub_0800419C(this, &gLinkEntity, 0x30, 0x30)) {
if (CheckGlobalFlag(EZERO_1ST)) {
- if (((gUnk_030010A0 & 3) == 0)) {
+ if (((gScreenTransition & 3) == 0)) {
sub_080A2B80(this);
}
}
diff --git a/src/object/windcrest.c b/src/object/windcrest.c
index 231eb425..3b883f4e 100644
--- a/src/object/windcrest.c
+++ b/src/object/windcrest.c
@@ -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)
{
diff --git a/src/room.c b/src/room.c
index df30ec9e..4246c675 100644
--- a/src/room.c
+++ b/src/room.c
@@ -234,7 +234,7 @@ extern EntityData gUnk_080D6210;
void sub_0804B5BC(void) {
- if ((u16)gUnk_030010A0.field_0x10.HALF.HI > 0x40)
+ if ((u16)gScreenTransition.playerStartPos.HALF.y > 0x40)
LoadRoomEntityList(&gUnk_080D6210);
}
@@ -641,7 +641,7 @@ void sub_0804bc38(void) {
u32 sub_0804BC50(void) {
if (!CheckLocalFlag(0x9f)) {
- gUnk_030010A0.field_0xa[5] = 5;
+ gScreenTransition.field_0xf = 5;
ClearGlobalFlag(ZELDA_CHASE);
}
return 1;
@@ -1024,7 +1024,7 @@ void sub_0804C018(void) {
SetTile(0x4072, 0xc47, 1);
if (CheckGlobalFlag(MAZE_CLEAR))
- if (gUnk_030010A0.field_0x10.WORD == 0x2780078)
+ if (gScreenTransition.playerStartPos.WORD == 0x2780078) // todo: wtf
PlaySFX(0x72);
ClearGlobalFlag(MAZE_CLEAR);
@@ -2445,8 +2445,8 @@ u32 sub_0804CF40() {
}
void sub_0804CF44(void) {
- gUnk_030010A0.field_0x38 = 0;
- gUnk_030010A0.field_0x39 = 0x5a;
+ gScreenTransition.field_0x38 = 0;
+ gScreenTransition.field_0x39 = 0x5a;
}
u32 sub_0804CF5C() {
@@ -2521,10 +2521,10 @@ u32 sub_0804CFAC() {
void sub_0804CFB0(void) {
if (!CheckFlags(0x31)) {
- if (gUnk_030010A0.field_0x38 == 0) {
+ if (gScreenTransition.field_0x38 == 0) {
PlaySFX(0x80100000);
} else {
- if (gUnk_030010A0.field_0x39 == 0) {
+ if (gScreenTransition.field_0x39 == 0) {
PlaySFX(0x80050000);
sub_08078A90(3);
}
@@ -3509,16 +3509,16 @@ u32 sub_0804D6EC() {
void sub_0804D6F0(void) {
sub_0805D3C8(0);
- if ((gUnk_030010A0.field_0x38 & 1) && gUnk_030010A0.field_0x39) {
- if (gUnk_030010A0.field_0x3c == 1) {
- gLinkEntity.x.HALF.HI = gUnk_030010A0.field_0x48;
- gLinkEntity.y.HALF.HI = gUnk_030010A0.field_0x4a + 8;
+ if ((gScreenTransition.field_0x38 & 1) && gScreenTransition.field_0x39) {
+ if (gScreenTransition.field_0x3c == 1) {
+ gLinkEntity.x.HALF.HI = gScreenTransition.field_0x48;
+ gLinkEntity.y.HALF.HI = gScreenTransition.field_0x4a + 8;
} else {
- if (gUnk_030010A0.field_0x3c) {
+ if (gScreenTransition.field_0x3c) {
return;
}
- gLinkEntity.x.HALF.HI = gUnk_030010A0.field_0x44;
- gLinkEntity.y.HALF.HI = gUnk_030010A0.field_0x46 + 8;
+ gLinkEntity.x.HALF.HI = gScreenTransition.field_0x44;
+ gLinkEntity.y.HALF.HI = gScreenTransition.field_0x46 + 8;
}
}
}
@@ -4537,7 +4537,7 @@ void sub_0804E4E4(void)
if (!GetInventoryValue(0x3a) && CheckGlobalFlag(MIZUKAKI_HARIFALL)) {
LoadRoomEntityList(&gUnk_080F2194);
}
- if (gUnk_030010A0.field_0xa[5] == 1) {
+ if (gScreenTransition.field_0xf == 1) {
LoadRoomEntityList(&gUnk_080F21B4);
}
}
@@ -4853,8 +4853,8 @@ void sub_0804E954(void)
if (!GetInventoryValue(0x46) && CheckGlobalFlag(MIZUKAKI_START) && !GetInventoryValue(0x3b)) {
LoadRoomEntityList(&gUnk_080F3A48);
}
- gUnk_030010A0.field_0x20 = 0xf28;
- gUnk_030010A0.field_0x22 = 0x82d;
+ gScreenTransition.field_0x20 = 0xf28;
+ gScreenTransition.field_0x22 = 0x82d;
}
extern u32 gUnk_080F3D44;
@@ -5261,7 +5261,7 @@ void nullsub_398() {}
u32 sub_0804EFDC(void)
{
if (CheckGlobalFlag(MAROYA_WAKEUP)) {
- gUnk_030010A0.field_0xa[5] = 5;
+ gScreenTransition.field_0xf = 5;
}
return 1;
}
diff --git a/src/sub_0805E374.c b/src/sub_0805E374.c
index 38b30e94..ebad1b0e 100644
--- a/src/sub_0805E374.c
+++ b/src/sub_0805E374.c
@@ -1,10 +1,10 @@
#include "entity.h"
extern Entity* sub_0805E3A0(Entity*, u32);
-extern u8 gUnk_030010A0[];
+extern u8 gScreenTransition[];
extern u8 gUnk_081091F8[];
extern u8 gUnk_081091EE[];
Entity* sub_0805E374(Entity* param_1) {
- u8 r3 = gUnk_030010A0[0x2C];
+ u8 r3 = gScreenTransition[0x2C];
u8* array = gUnk_081091F8;
if (r3 != '\x02') {
diff --git a/src/sub_080A3B84.c b/src/sub_080A3B84.c
index f45daa40..892e010a 100644
--- a/src/sub_080A3B84.c
+++ b/src/sub_080A3B84.c
@@ -8,7 +8,7 @@ extern void (*const gUnk_081280C4[])();
void DrawKinstoneMenu(void)
{
- gUnk_030010A0.field_0x24[8] = 2;
+ gScreenTransition.field_0x24[8] = 2;
sub_080AD90C();
gUnk_081280C4[gMenu.menuType]();
sub_080A3B74();
@@ -18,7 +18,7 @@ void DrawKinstoneMenu(void)
sub_0805E5C0();
sub_080AD9B0();
sub_080AD918();
- gUnk_030010A0.field_0x24[8] = 0;
+ gScreenTransition.field_0x24[8] = 0;
}
extern void gUnk_081280DC;