summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/code_0805436C.c6
-rw-r--r--src/code_0807CC3C.c25
-rw-r--r--src/code_0808091C.c4
-rw-r--r--src/manager/manager27.c8
-rw-r--r--src/npc/bigGoron.c4
-rw-r--r--src/npc/bladeBrothers.c8
-rw-r--r--src/npc/goronMerchant.c4
-rw-r--r--src/npc/guard.c6
-rw-r--r--src/npc/simon.c8
-rw-r--r--src/npc/syrup.c4
-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/room.c36
-rw-r--r--src/sub_0805E374.c4
-rw-r--r--src/sub_080A3B84.c4
17 files changed, 82 insertions, 57 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..e9b9f8f5
--- /dev/null
+++ b/src/code_0807CC3C.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..a4f4fda8 100644
--- a/src/manager/manager27.c
+++ b/src/manager/manager27.c
@@ -6,13 +6,13 @@
typedef struct {
u8 filler[0xAC];
u16 unk;
-} struct_030010A0;
+} ScreenTransition;
extern u32 sub_0805C920(Entity*);
extern void LoadPalettesByPaletteGroupIndex(u32);
extern void (*const gUnk_08108D10[])(Entity*);
-extern struct_030010A0 gUnk_030010A0;
+extern ScreenTransition gScreenTransition;
extern u8 gUnk_08108D20[];
void Manager27(Entity *this)
@@ -20,10 +20,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.unk |= (1 << (this->entityType).form);
}
else {
- gUnk_030010A0.unk &= ~(1 << (this->entityType).form);
+ gScreenTransition.unk &= ~(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 bcd9fa62..71456fe1 100644
--- a/src/npc/bladeBrothers.c
+++ b/src/npc/bladeBrothers.c
@@ -9,7 +9,7 @@
typedef struct {
/*0x00*/ u8 filler[0x2C];
/*0x2C*/ u8 unk;
-} struct_030010A0;
+} ScreenTransition;
typedef struct {
u8 filler[0xa8];
@@ -20,7 +20,7 @@ typedef struct {
extern void (*gUnk_081115C0[])(Entity*);
extern void (*gUnk_081115D0[])(Entity*);
-extern struct_030010A0 gUnk_030010A0;
+extern ScreenTransition gScreenTransition;
extern u16 gUnk_081115DC[];
extern u8 gUnk_08111618[];
extern u32* gUnk_081115EC[];
@@ -60,7 +60,7 @@ void sub_08068A1C(Entity* this) {
int offset;
(this->entityType).parameter = (this->entityType).form;
- if (gUnk_030010A0.unk != 0) {
+ if (gScreenTransition.unk != 0) {
offset = 6;
bVar1 = 3;
@@ -114,7 +114,7 @@ void sub_08068AA4(Entity* this) {
}
void sub_08068ADC(Entity* this) {
- if (gUnk_030010A0.unk == 2) {
+ if (gScreenTransition.unk == 2) {
GetNextFrame(this);
}
sub_0806FD3C(this);
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/simon.c b/src/npc/simon.c
index 911fd745..73e6da35 100644
--- a/src/npc/simon.c
+++ b/src/npc/simon.c
@@ -7,7 +7,7 @@
typedef struct {
u8 filler[9];
u8 unk;
-} struct_030010A0;
+} ScreenTransition;
typedef struct {
u8 filler[4];
@@ -21,7 +21,7 @@ extern void DoFade(u32, u32);
extern void gUnk_0813AD60;
extern void gUnk_0813AD74;
-extern struct_030010A0 gUnk_030010A0;
+extern ScreenTransition gScreenTransition;
void Simon(Entity *this)
{
@@ -37,7 +37,7 @@ void Simon(Entity *this)
void sub_0806C224(void)
{
DoExitTransition(&gUnk_0813AD60);
- gUnk_030010A0.unk = 6;
+ gScreenTransition.unk = 6;
}
void Simon_CreateChest(Entity *this)
@@ -51,7 +51,7 @@ void sub_0806C280(void)
{
SetGlobalFlag(MAROYA_WAKEUP);
DoExitTransition(&gUnk_0813AD74);
- gUnk_030010A0.unk = 6;
+ gScreenTransition.unk = 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/object/cloud.c b/src/object/cloud.c
index c55e0d57..5314d9a4 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/room.c b/src/room.c
index 0bef2ef3..9c7a6b6f 100644
--- a/src/room.c
+++ b/src/room.c
@@ -233,7 +233,7 @@ extern EntityData gUnk_080D6210;
void sub_0804B5BC(void) {
- if ((u16)gUnk_030010A0.field_0x10.HALF.HI > 0x40)
+ if ((u16)gScreenTransition.startPos.HALF.y > 0x40)
LoadRoomEntityList(&gUnk_080D6210);
}
@@ -640,7 +640,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;
@@ -1023,7 +1023,7 @@ void sub_0804C018(void) {
SetTile(0x4072, 0xc47, 1);
if (CheckGlobalFlag(MAZE_CLEAR))
- if (gUnk_030010A0.field_0x10.WORD == 0x2780078)
+ if (gScreenTransition.startPos.WORD == 0x2780078) // todo: wtf
PlaySFX(0x72);
ClearGlobalFlag(MAZE_CLEAR);
@@ -2444,8 +2444,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() {
@@ -2520,10 +2520,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);
}
@@ -3508,16 +3508,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;
}
}
}
@@ -4536,7 +4536,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);
}
}
@@ -4852,8 +4852,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;
@@ -5260,7 +5260,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 80eff685..da4e5ce1 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;