mirror of
https://github.com/zeldaret/tmc
synced 2026-07-09 06:53:27 -04:00
Decompile manager1F
This commit is contained in:
+48
-4
@@ -1,9 +1,53 @@
|
||||
#include "manager.h"
|
||||
#include "flags.h"
|
||||
#include "room.h"
|
||||
|
||||
ASM_FUNC("asm/non_matching/manager1F/Manager1F_Main.inc", void Manager1F_Main())
|
||||
typedef struct {
|
||||
Manager manager;
|
||||
u8 field_0x20[0x16];
|
||||
u8 field_0x36;
|
||||
u8 field_0x37;
|
||||
s16 field_0x38;
|
||||
u16 field_0x3a;
|
||||
u8 field_0x3c;
|
||||
u8 field_0x3d;
|
||||
u16 field_0x3e;
|
||||
} Manager1F;
|
||||
extern void (*const gUnk_08108C94[])(Manager1F*);
|
||||
|
||||
ASM_FUNC("asm/non_matching/manager1F/sub_0805B70C.inc", void sub_0805B70C())
|
||||
void sub_0805B778(Manager1F*);
|
||||
|
||||
ASM_FUNC("asm/non_matching/manager1F/sub_0805B744.inc", void sub_0805B744())
|
||||
extern u16 gUnk_08108C9C[];
|
||||
|
||||
ASM_FUNC("asm/non_matching/manager1F/sub_0805B778.inc", void sub_0805B778())
|
||||
void Manager1F_Main(Manager1F* this) {
|
||||
gUnk_08108C94[this->manager.action](this);
|
||||
}
|
||||
|
||||
void sub_0805B70C(Manager1F* this) {
|
||||
if (CheckFlags(this->field_0x3e) != 0) {
|
||||
this->manager.unk_0b = 1;
|
||||
}
|
||||
this->manager.action = 1;
|
||||
this->field_0x38 =
|
||||
(this->field_0x38 >> 4 & 0x3fU) | (((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6);
|
||||
sub_0805B778(this);
|
||||
}
|
||||
|
||||
void sub_0805B744(Manager1F* this) {
|
||||
if (CheckFlags(this->field_0x3e) != 0) {
|
||||
if (this->manager.unk_0b == 0) {
|
||||
this->manager.unk_0b = 1;
|
||||
sub_0805B778(this);
|
||||
}
|
||||
} else {
|
||||
if (this->manager.unk_0b == 1) {
|
||||
this->manager.unk_0b = 0;
|
||||
sub_0805B778(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0805B778(Manager1F* this) {
|
||||
SetTileType(gUnk_08108C9C[this->manager.unk_0a * 2 + this->manager.unk_0b],
|
||||
this->field_0x38, this->field_0x36);
|
||||
}
|
||||
Reference in New Issue
Block a user