mirror of
https://github.com/zeldaret/tmc
synced 2026-06-24 17:43:25 -04:00
structures.h
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void (*const gUnk_081246EC[])(Entity*);
|
||||
|
||||
void PalaceArchway(Entity* this) {
|
||||
gUnk_081246EC[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0809F2A0(Entity *this)
|
||||
{
|
||||
this->action = 1;
|
||||
this->frameIndex = this->entityType.parameter;
|
||||
this->spriteRendering.b3 = 3;
|
||||
this->spritePriority.b0 = 7;
|
||||
SetTile(0x4069, COORD_TO_TILE(this), this->collisionLayer);
|
||||
}
|
||||
|
||||
void nullsub_537() {}
|
||||
+1
-33
@@ -7,39 +7,7 @@
|
||||
#include "link.h"
|
||||
#include "screen.h"
|
||||
#include "main.h"
|
||||
|
||||
typedef struct {
|
||||
u8 field_0x0[8];
|
||||
u8 field_0x8;
|
||||
u8 field_0x9;
|
||||
u8 field_0xa[6];
|
||||
union SplitWord field_0x10;
|
||||
u8 field_0x14[0xc];
|
||||
u16 field_0x20;
|
||||
u16 field_0x22;
|
||||
u8 field_0x24[0x14];
|
||||
u8 field_0x38;
|
||||
u8 field_0x39;
|
||||
u16 field_0x3a;
|
||||
u8 field_0x3c;
|
||||
u8 filler[6];
|
||||
u16 field_0x44;
|
||||
u16 field_0x46;
|
||||
u16 field_0x48;
|
||||
u16 field_0x4a;
|
||||
} struct_030010A0;
|
||||
|
||||
typedef struct {
|
||||
u8 filler[8];
|
||||
u8 field_0x8;
|
||||
u8 field_0x9[0x34];
|
||||
u32 windcrests;
|
||||
u8 field_0x44[0x64];
|
||||
Stats stats;
|
||||
} struct_02002A40;
|
||||
|
||||
extern struct_030010A0 gUnk_030010A0;
|
||||
extern struct_02002A40 gUnk_02002A40;
|
||||
#include "structures.h"
|
||||
|
||||
void sub_0804B3C4(u32 arg0) {
|
||||
sub_0804B29C(arg0);
|
||||
|
||||
+93
-11
@@ -1,4 +1,35 @@
|
||||
#include "global.h"
|
||||
#include "functions.h"
|
||||
#include "screen.h"
|
||||
|
||||
typedef struct {
|
||||
u8 field_0x0;
|
||||
u8 field_0x1;
|
||||
u8 field_0x2;
|
||||
u8 field_0x3;
|
||||
u32 field_0x4;
|
||||
u16 fadeType; // fade in or out, are there others?
|
||||
u16 fadeSpeed; // subtracted from duration
|
||||
u16 fadeDuration;
|
||||
u16 field_0xe;
|
||||
s16 field_0x10;
|
||||
s16 field_0x12;
|
||||
s16 field_0x14;
|
||||
u16 field_0x16;
|
||||
u16 field_0x18;
|
||||
} struct_03000FD0;
|
||||
|
||||
extern struct_03000FD0 gUnk_03000FD0;
|
||||
|
||||
typedef struct {
|
||||
u8 field_0x0;
|
||||
u8 field_0x1;
|
||||
u8 spritesOffset;
|
||||
} struct_03000000;
|
||||
|
||||
extern struct_03000000 gUnk_03000000;
|
||||
|
||||
extern u32 gUnk_0200B644;
|
||||
|
||||
extern void sub_0801E104();
|
||||
extern void DoFade(u32, u32);
|
||||
@@ -9,14 +40,65 @@ void sub_08050024() {
|
||||
return;
|
||||
}
|
||||
|
||||
/* thumb_func_start sub_08050024
|
||||
sub_08050024: @ 0x08050024
|
||||
push {lr}
|
||||
bl sub_0801E104
|
||||
movs r1, #0x80
|
||||
lsls r1, r1, #1
|
||||
movs r0, #5
|
||||
bl DoFade
|
||||
pop {pc}
|
||||
.align 2, 0
|
||||
*/
|
||||
void sub_08050038(u32 arg0)
|
||||
{
|
||||
if ((gUnk_03000FD0.fadeType & 1) != 0) {
|
||||
gUnk_03000FD0.field_0xe = arg0;
|
||||
}
|
||||
else {
|
||||
gUnk_03000FD0.fadeDuration = arg0;
|
||||
}
|
||||
}
|
||||
|
||||
void DoFade(u32 fadeType, u32 fadeSpeed)
|
||||
{
|
||||
gUnk_03000FD0.fadeSpeed = fadeSpeed;
|
||||
gUnk_03000FD0.fadeType = fadeType;
|
||||
gUnk_03000FD0.field_0x0 = 1;
|
||||
gUnk_03000FD0.fadeDuration = 0x100;
|
||||
gUnk_03000FD0.field_0xe = 0;
|
||||
if ((gUnk_03000FD0.fadeType & 2) != 0) {
|
||||
gUnk_03000FD0.field_0x2 = 0xf8;
|
||||
}
|
||||
else {
|
||||
gUnk_03000FD0.field_0x2 = 0;
|
||||
}
|
||||
if ((fadeType & 8) != 0) {
|
||||
gUnk_03000000.spritesOffset = 1;
|
||||
gScreen.bg1.unk |= 0x40;
|
||||
gScreen.bg2.unk |= 0x40;
|
||||
gScreen.affine.unk2 |= 0x40;
|
||||
}
|
||||
if ((fadeType & 0x10) != 0) {
|
||||
sub_0801E1B8(gUnk_03000FD0.field_0x16, gUnk_03000FD0.field_0x18);
|
||||
sub_0801E1EC(gUnk_03000FD0.field_0x12, gUnk_03000FD0.field_0x14, gUnk_03000FD0.field_0x10);
|
||||
if ((fadeType & 1) == 0) {
|
||||
gUnk_03000FD0.fadeType &= 0xfffb;
|
||||
sub_08050008();
|
||||
gUnk_0200B644 = 0xffffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080500F4(u32 arg0)
|
||||
{
|
||||
gUnk_03000FD0.fadeSpeed = arg0;
|
||||
gUnk_03000FD0.fadeType ^= 1;
|
||||
gUnk_03000FD0.field_0x0 = 1;
|
||||
gUnk_03000FD0.fadeDuration = 0x100;
|
||||
}
|
||||
|
||||
void sub_08050110(u32 param_1, u32 param_2, u32 fadeType, u32 fadeSpeed)
|
||||
{
|
||||
if ((fadeType & 1) != 0) {
|
||||
gUnk_03000FD0.field_0x10 = 0x96;
|
||||
}
|
||||
else {
|
||||
gUnk_03000FD0.field_0x10 = 0;
|
||||
}
|
||||
gUnk_03000FD0.field_0x12 = param_1;
|
||||
gUnk_03000FD0.field_0x14 = param_2;
|
||||
gUnk_03000FD0.field_0x16 = 0x3f3f;
|
||||
gUnk_03000FD0.field_0x18 = 0;
|
||||
DoFade(fadeType, fadeSpeed);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#include "global.h"
|
||||
#include "functions.h"
|
||||
#include "menu.h"
|
||||
#include "structures.h"
|
||||
|
||||
extern void (*const gUnk_081280C4[])();
|
||||
|
||||
void DrawKinstoneMenu(void)
|
||||
{
|
||||
gUnk_030010A0.field_0x24[8] = 2;
|
||||
sub_080AD90C();
|
||||
gUnk_081280C4[gMenu.menuType]();
|
||||
sub_080A3B74();
|
||||
sub_080A4054();
|
||||
sub_0801C1D4();
|
||||
sub_0801C208();
|
||||
sub_0805E5C0();
|
||||
sub_080AD9B0();
|
||||
sub_080AD918();
|
||||
gUnk_030010A0.field_0x24[8] = 0;
|
||||
}
|
||||
Reference in New Issue
Block a user