Identify player functions and update asm.h

This commit is contained in:
theo3
2021-12-28 12:08:30 -08:00
parent 9456e38606
commit 0f65f8fd50
442 changed files with 697 additions and 1092 deletions
+3 -3
View File
@@ -4,8 +4,8 @@
#include "audio.h"
#include "utils.h"
#define IS_BGM(song) (song) - 1 <= NUM_BGM - 1
#define IS_SFX(song) (song) - 1 > NUM_BGM - 1
#define IS_BGM(song) ((song)-1 <= NUM_BGM - 1)
#define IS_SFX(song) ((song)-1 > NUM_BGM - 1)
static s32 fade(s32 target, s32 current);
static void doPlaySound(u32 sound);
@@ -44,7 +44,7 @@ void SetSfxVolume(u32 volume) {
gSoundPlayingInfo.volumeSfx = volume;
}
void SoundReq(Sound sound) {
void SoundReq(u32 sound) {
u32 song;
SoundPlayingInfo* ptr;
if (gMain.field_0x7)
+10 -12
View File
@@ -4,17 +4,15 @@
#include "menu.h"
#include "area.h"
#include "utils.h"
#include "structures.h"
#include "save.h"
#include "item.h"
typedef struct {
u8 unk;
u8 filler[7];
} struct_080FD5B4;
extern SaveFile gSave;
extern struct_080FD5B4 gUnk_080FD5B4[];
extern ScreenTransition gScreenTransition;
extern u8 gUnk_0200AF13;
extern u8 gUnk_0200AF14;
@@ -96,16 +94,16 @@ u32 SetBottleContents(u32 itemID, u32 bottleIndex) {
return bottleIndex;
}
u32 ItemIsSword(u32 arg0) {
switch (arg0) {
case 1:
case 2:
case 3:
case 4:
case 6:
return 1;
u32 ItemIsSword(u32 item) {
switch (item) {
case ITEM_SMITH_SWORD:
case ITEM_GREEN_SWORD:
case ITEM_RED_SWORD:
case ITEM_BLUE_SWORD:
case ITEM_FOURSWORD:
return TRUE;
default:
return 0;
return FALSE;
}
}
+1
View File
@@ -2,6 +2,7 @@
#include "utils.h"
#include "structures.h"
#include "functions.h"
#include "asm.h"
extern u16 gUnk_081092D4;
extern u8 gUnk_081094CE;
-1
View File
@@ -10,7 +10,6 @@ typedef struct {
u8 field_0x1;
} UnkItemStruct;
Entity* sub_08077C94(ItemBehavior*, u32);
void* sub_08077C54(UnkItemStruct* unk);
Entity* CreatePlayerBomb(ItemBehavior*, u32);
extern Entity* sub_0805E744();
-5
View File
@@ -1,9 +1,4 @@
#include "global.h"
#include "structures.h"
#include "functions.h"
#include "script.h"
#include "entity.h"
#include "save.h"
// these three functions use gRoomControls, maybe once that is understood better, these can be decompiled easier
ASM_FUNC("asm/non_matching/code_0807CC3C/sub_0807D280.inc", void sub_0807D280(u32 unk_1, u32 unk_2))
+1 -2
View File
@@ -3,7 +3,6 @@
#include "structures.h"
#include "functions.h"
#include "overworld.h"
#include "room.h"
extern void sub_08080BC4(void);
@@ -97,7 +96,7 @@ void sub_080809D4(void) {
int x, y;
int var1, var0;
RoomControls* roomControls = &gRoomControls;
roomControls->unk6 &= 0xFB;
roomControls->scroll_flags &= ~4;
target = roomControls->cameraTarget;
x = target->x.HALF.HI;
-1
View File
@@ -2,7 +2,6 @@
#include "entity.h"
#include "room.h"
#include "object.h"
#include "effects.h"
void sub_080A29C8(s32 xOff, s32 yOff, u32 layer) {
Entity* pEVar1;
+1 -2
View File
@@ -6,8 +6,8 @@
#include "utils.h"
#include "functions.h"
#include "enemy.h"
#include "effects.h"
#include "object.h"
#include "overworld.h"
extern u8 gCollidableCount;
extern u8 gUnk_080B3740[];
@@ -317,7 +317,6 @@ Entity* sub_08017A90(Entity* a1, Entity* parent) {
}
typedef s32 (*CollisionHandler)(Entity* org, Entity* tgt, u32 direction, ColSettings* settings);
s32 sub_08018308(Entity* org, Entity* tgt, u32 direction, ColSettings* settings);
s32 CollisionNoOp(Entity* org, Entity* tgt, u32 direction, ColSettings* settings);
s32 CollisionGroundItem(Entity* org, Entity* tgt, u32 direction, ColSettings* settings);
s32 sub_08017B58(Entity* org, Entity* tgt, u32 direction, ColSettings* settings);
+1 -3
View File
@@ -1,8 +1,6 @@
#include "asm.h"
#include "area.h"
#include "player.h"
#include "global.h"
#include "entity.h"
#include "coord.h"
#include "utils.h"
#include "audio.h"
@@ -163,7 +161,7 @@ void sub_0806F62C(Entity* ent, u32 a, u32 b) {
ent->y.WORD -= FixedDiv(FixedMul(gSineTable[(u8)b + 64], a), 256) << 8;
}
void sub_0806F69C(Entity* ent) {
void LinearMoveUpdate(Entity* ent) {
if ((ent->direction & 0x80) == 0) {
ent->x.WORD += FixedDiv(FixedMul(gSineTable[ent->direction * 8], ent->speed), 256) << 8;
ent->y.WORD -= FixedDiv(FixedMul(gSineTable[ent->direction * 8 + 64], ent->speed), 256) << 8;
-1
View File
@@ -5,7 +5,6 @@
#include "main.h"
#include "menu.h"
#include "screen.h"
#include "structures.h"
#include "textbox.h"
extern void (*const gUnk_08109A30[])();
-1
View File
@@ -1,4 +1,3 @@
#include "global.h"
#include "entity.h"
#include "enemy.h"
#include "definitions.h"
+2 -3
View File
@@ -12,7 +12,6 @@ extern void sub_08032338(Entity*);
extern Entity* sub_08049DF4(u32);
extern Entity* gUnk_020000B0;
extern u8 gEntCount;
extern void (*const gUnk_080012C8[])(Entity*);
extern void (*const gUnk_080CE56C[])(Entity*);
extern void (*const gUnk_080CE584[])(Entity*);
@@ -411,12 +410,12 @@ void sub_08032008(Entity* this) {
this->field_0x76.HALF.HI = 1;
this->direction = GetFacingDirection(this, parent);
sub_080322E8(this);
sub_0806F69C(this);
LinearMoveUpdate(this);
}
} else {
this->direction = GetFacingDirection(this, parent);
sub_080322E8(this);
sub_0806F69C(this);
LinearMoveUpdate(this);
if (this->x.HALF.HI == parent->x.HALF.HI && this->y.HALF.HI == parent->y.HALF.HI)
this->field_0x76.HALF.HI = 0;
}
+1 -1
View File
@@ -245,7 +245,7 @@ void sub_08021B64(Entity* this) {
InitializeAnimation(this, 5);
} else {
gPlayerState.field_0x1a[0] |= 0x80;
gPlayerState.field_0x80 -= 0x50;
gPlayerState.speed_modifier -= 0x50;
gPlayerState.field_0xaa++;
CopyPositionAndSpriteOffset(&gPlayerEntity, this);
this->x.HALF.HI += gUnk_080CB5E4[(this->field_0xf++ & 0xe) >> 1];
+1 -2
View File
@@ -1,4 +1,3 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "room.h"
@@ -13,7 +12,7 @@ void BladeTrap(Entity* this) {
sub_080A2CC0(this, &this->child, &this->field_0x74);
}
if (!(this->direction & 0x80)) {
sub_0806F69C(this);
LinearMoveUpdate(this);
}
if (!(--this->field_0x74.HWORD)) {
+1 -2
View File
@@ -1,5 +1,4 @@
#include "asm.h"
#include "global.h"
#include "entity.h"
#include "enemy.h"
#include "player.h"
@@ -280,7 +279,7 @@ ASM_FUNC("asm/non_matching/eu/sub_0802AC40.inc", void sub_0802AC40(Entity* this)
#else
void sub_0802AC40(Entity* this) {
GetNextFrame(this);
sub_0806F69C(this);
LinearMoveUpdate(this);
if (this->field_0x7a.HALF.LO) {
if (sub_0802B234(this) == 0) {
this->field_0x7a.HALF.LO = 0;
+1 -5
View File
@@ -1,15 +1,11 @@
#include "asm.h"
#include "enemy.h"
#include "audio.h"
#include "entity.h"
#include "flags.h"
#include "textbox.h"
#include "save.h"
#include "npc.h"
#include "functions.h"
#include "effects.h"
#include "overworld.h"
extern void LoadObjPalette(Entity*, u32);
extern Entity* sub_08049DF4(u32);
extern bool32 sub_08056338(void);
extern void UnloadOBJPalette(Entity*);
-1
View File
@@ -1,5 +1,4 @@
#include "enemy.h"
#include "entity.h"
#include "functions.h"
extern s32 sub_080012DC(Entity*);
-2
View File
@@ -1,8 +1,6 @@
#include "asm.h"
#include "enemy.h"
#include "entity.h"
#include "functions.h"
#include "audio.h"
extern s32 sub_080012DC(Entity*);
extern void sub_08001318(Entity*);
-2
View File
@@ -1,6 +1,4 @@
#include "enemy.h"
#include "entity.h"
#include "functions.h"
void sub_08027870(Entity*);
-2
View File
@@ -1,8 +1,6 @@
#include "audio.h"
#include "enemy.h"
#include "entity.h"
#include "functions.h"
#include "effects.h"
extern s16 sub_080001DA(u32, u32); // ?
extern void sub_08049CF4();
-1
View File
@@ -1,5 +1,4 @@
#include "enemy.h"
#include "entity.h"
#include "functions.h"
void sub_08023000(Entity*, int);
+1 -1
View File
@@ -110,7 +110,7 @@ NONMATCH("asm/non_matching/fallingBoulder/sub_0802C334.inc", void sub_0802C334(E
if (y >= 5) {
sub_080AEFB4(this);
} else {
sub_0806F69C(this);
LinearMoveUpdate(this);
if (this->z.HALF.HI - y > 0x38) {
sub_0802C62C(this);
this->field_0x7a.HWORD = (Random() & 0x7f) | 0x80;
-2
View File
@@ -13,8 +13,6 @@ extern void (*const gUnk_080D1800[])(Entity*);
extern u8 gUnk_080D180C[4]; // Entity count per form
extern PosOffset gUnk_080D1810[4];
extern u8 gEntCount;
void FireballGuy(Entity* this) {
EnemyFunctionHandler(this, gUnk_080D17E8);
}
-1
View File
@@ -3,7 +3,6 @@
#include "player.h"
#include "fileScreen.h"
#include "functions.h"
#include "effects.h"
void (*const gUnk_080D1AFC[8])(Entity*);
void (*const gUnk_080D1B1C[7])(Entity*);
-1
View File
@@ -1,7 +1,6 @@
#include "entity.h"
#include "enemy.h"
#include "functions.h"
#include "effects.h"
extern void (*const gHangingSeedFunctions[])(Entity*);
extern void (*const gUnk_080CB588[])(Entity*);
+1 -1
View File
@@ -85,7 +85,7 @@ void sub_0803CDA8(Entity* this) {
UpdateAnimationSingleFrame(this);
if ((this->direction & 0x80) == 0) {
sub_0806F69C(this);
LinearMoveUpdate(this);
}
if (--this->field_0x74.HWORD << 0x10 == 0) {
-1
View File
@@ -1,7 +1,6 @@
#include "enemy.h"
#include "functions.h"
extern u8 gEntCount;
extern Hitbox gUnk_080FD298;
extern Hitbox gUnk_080FD2A0;
+15 -16
View File
@@ -85,7 +85,6 @@ void sub_0803B978(Entity*);
void sub_0803BA6C(Entity*);
void sub_0803BA80(Entity*);
extern u8 gEntCount;
// these are not with the rest of this files constant data
extern Hitbox gUnk_080FD35C;
extern Hitbox gUnk_080FD364;
@@ -242,7 +241,7 @@ void sub_0803A364(Entity* this) {
break;
case 5:
if (sub_0803B4E4(this) == 0) {
sub_0806F69C(this);
LinearMoveUpdate(this);
return;
}
this->type2 = 0;
@@ -325,7 +324,7 @@ void sub_0803A548(Entity* this) {
index = ((this->parent->field_0xf >> 4) + 3);
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
if (sub_0803B4E4(this) == 0) {
sub_0806F69C(this);
LinearMoveUpdate(this);
}
}
@@ -339,7 +338,7 @@ void sub_0803A58C(Entity* this) {
if (sub_0803B4E4(this) != 0) {
sub_0803B59C(this);
} else {
sub_0806F69C(this);
LinearMoveUpdate(this);
}
}
@@ -408,7 +407,7 @@ void sub_0803A6E8(Entity* this) {
this->actionDelay = 10;
} else {
sub_0803B63C(this);
sub_0806F69C(this);
LinearMoveUpdate(this);
y = this->parent->y.HALF.HI + 8;
if (y > this->y.HALF.HI) {
this->y.HALF.HI = y;
@@ -468,7 +467,7 @@ void sub_0803A7CC(Entity* this) {
this->action = 0xd;
InitAnimationForceUpdate(this->child, 6);
} else {
sub_0806F69C(this);
LinearMoveUpdate(this);
}
}
@@ -527,7 +526,7 @@ void sub_0803A90C(Entity* this) {
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
GetNextFrame(this);
sub_0803B55C(this);
sub_0806F69C(this);
LinearMoveUpdate(this);
this->actionDelay--;
if (this->actionDelay == 0) {
this->action = 0x11;
@@ -550,7 +549,7 @@ void sub_0803A978(Entity* this) {
if ((++this->actionDelay & 3) == 0) {
sub_08004596(this, 0x10);
}
sub_0806F69C(this);
LinearMoveUpdate(this);
if (this->direction == 0x10) {
this->action = 0x12;
this->actionDelay = 3;
@@ -574,7 +573,7 @@ void sub_0803AA00(Entity* this) {
if ((++this->actionDelay & 3) == 0) {
sub_08004596(this, direction);
}
sub_0806F69C(this);
LinearMoveUpdate(this);
if ((this->direction == direction) || (this->y.HALF.HI >= gPlayerEntity.y.HALF.HI)) {
this->action = 0x13;
this->spriteSettings.draw = 0;
@@ -594,7 +593,7 @@ NONMATCH("asm/non_matching/mazaal/sub_0803AA98.inc", void sub_0803AA98(Entity* t
index = ((this->parent->field_0xf >> 4) + 3);
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
if (sub_0803B870(this) == 0) {
sub_0806F69C(this);
LinearMoveUpdate(this);
if (sub_0803B6F4(this) != 0) {
this->action = 0x14;
this->speed = 0x40;
@@ -616,7 +615,7 @@ void sub_0803AB10(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
sub_0806F69C(this);
LinearMoveUpdate(this);
sub_0803B55C(this);
if ((this->child->frame & 0x80) != 0) {
this->action = 0x15;
@@ -667,7 +666,7 @@ void sub_0803AC1C(Entity* this) {
if (sub_0803B4E4(this)) {
sub_0803B59C(this);
} else {
sub_0806F69C(this);
LinearMoveUpdate(this);
}
}
@@ -685,7 +684,7 @@ void sub_0803AC60(Entity* this) {
this->subAction = 0;
this->actionDelay = 0x1e;
} else {
sub_0806F69C(this);
LinearMoveUpdate(this);
}
} else {
this->actionDelay = this->actionDelay - 1;
@@ -788,7 +787,7 @@ void sub_0803AE48(Entity* this) {
InitializeAnimation(this, 4);
} else {
if (sub_0803B4E4(this) == 0) {
sub_0806F69C(this);
LinearMoveUpdate(this);
}
}
}
@@ -1049,7 +1048,7 @@ void sub_0803B398(Entity* this) {
InitializeAnimation(this, 4);
InitAnimationForceUpdate(this->child, 0);
} else {
sub_0806F69C(this);
LinearMoveUpdate(this);
}
}
@@ -1214,7 +1213,7 @@ void sub_0803B724(Entity* param_1) {
pEVar1->x.HALF.HI = (random_value & 0x70) + temp + gRoomControls.roomOriginX;
pEVar1->y.HALF.HI = ((random_value >> 0x10) & 7) * 10 + 0x5c + gRoomControls.roomOriginY;
pEVar1->parent = param_1;
sub_08016A30(pEVar1);
ResolveCollisionLayer(pEVar1);
param_1->field_0xf++;
param_1->cutsceneBeh.HALF.LO--;
}
-1
View File
@@ -1,4 +1,3 @@
#include "global.h"
#include "entity.h"
void sub_08035194(Entity*);
+4 -6
View File
@@ -5,8 +5,6 @@
extern void UnloadOBJPalette(Entity*);
extern u8 gEntCount;
void sub_0803499C(Entity*);
void sub_08034420(Entity*);
void sub_08034830(Entity*);
@@ -220,7 +218,7 @@ void sub_08033FFC(Entity* this) {
gRoomControls.cameraTarget = &gPlayerEntity;
sub_08034420(this);
gPlayerState.controlMode = 1;
sub_080791D0();
ResetPlayerAnimationAndAction();
SoundReq(BGM_BOSS_THEME);
}
}
@@ -243,7 +241,7 @@ void sub_0803414C(Entity* this) {
}
} else {
this->direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, x, y);
sub_0806F69C(this);
LinearMoveUpdate(this);
}
}
@@ -562,7 +560,7 @@ NONMATCH("asm/non_matching/mazaal/sub_0803473C.inc", void sub_0803473C(Entity* t
direction = 0x18;
}
this->direction = direction;
sub_0806F69C(this);
LinearMoveUpdate(this);
}
END_NONMATCH
@@ -585,7 +583,7 @@ NONMATCH("asm/non_matching/mazaal/sub_080347B4.inc", void sub_080347B4(Entity* t
direction = 0x18;
}
this->direction = direction;
sub_0806F69C(this);
LinearMoveUpdate(this);
}
END_NONMATCH
-1
View File
@@ -9,7 +9,6 @@ extern void (*const gUnk_080CBBA0[])(Entity*);
extern void (*const gUnk_080CBBB4[])(Entity*);
extern void (*const gUnk_080CBBBC[])(Entity*);
extern u8 gEntCount;
extern const s8 gUnk_080CBBC4[];
void Moldorm(Entity* this) {
-1
View File
@@ -14,7 +14,6 @@ void sub_0802390C(Entity*);
void sub_080239F0(Entity*);
bool32 sub_08023B38(Entity*);
extern u8 gEntCount;
extern const u8 gUnk_080B37A0[];
extern void (*const gUnk_080CBC38[])(Entity*);
+7 -8
View File
@@ -2,7 +2,6 @@
#include "functions.h"
#include "object.h"
#include "projectile.h"
#include "structures.h"
#include "overworld.h"
extern void sub_08078AC0(u32, u32, u32);
@@ -36,25 +35,25 @@ this->field_0x7c.BYTES.byte0 Boss Phase
3: frozen 2
4: unfrozen -> death
*/
#define IS_FROZEN(this) (this->field_0x7c.BYTES.byte0 & 1)
#define GET_BOSS_PHASE(this) (this->field_0x7c.BYTES.byte0)
#define IS_FROZEN(this) ((this)->field_0x7c.BYTES.byte0 & 1)
#define GET_BOSS_PHASE(this) ((this)->field_0x7c.BYTES.byte0)
/*
this->field_0x78.HALF.HI reused timer
*/
#define GET_TIMER(this) this->field_0x78.HALF.HI
#define GET_TIMER(this) ((this)->field_0x78.HALF.HI)
/*
this->field_0x78.HALF.LO turns until the next attack
*/
#define GET_ATTACK_WAIT_TURNS(this) this->field_0x78.HALF.LO
#define GET_ATTACK_WAIT_TURNS(this) ((this)->field_0x78.HALF.LO)
/*
this->field_0x7a.HALF.HI angle of legs
*/
#define GET_ANGLE(this) this->field_0x7a.HWORD
#define GET_ANGLE_HI(this) this->field_0x7a.HALF.HI
#define GET_ANGLE(this) ((this)->field_0x7a.HWORD)
#define GET_ANGLE_HI(this) ((this)->field_0x7a.HALF.HI)
/*
this->field_0x82.HWORD angular speed
*/
#define GET_ANGULAR_VEL(this) this->field_0x82.HWORD
#define GET_ANGULAR_VEL(this) ((this)->field_0x82.HWORD)
enum OctorokBossPart { WHOLE, LEG_BR, LEG_FR, LEG_FL, LEG_BL, MOUTH, TAIL_END, TAIL };
enum OctorokBossAction {
+1 -1
View File
@@ -343,7 +343,7 @@ void PeahatPropeller_Fly(Entity* this) {
this->spriteSettings.draw ^= 1;
this->z.WORD -= 0xc000;
sub_0806F69C(this);
LinearMoveUpdate(this);
if (--this->field_0xf == 0) {
this->field_0xf = 40;
this->direction = (Random() & 0x10) + 8;
-1
View File
@@ -9,7 +9,6 @@ extern void SoundReqClipped(Entity*, u32);
extern u32 sub_08049F1C(Entity*, Entity*, u32);
extern u32 PlayerInRange(Entity*, u32, u32);
extern void sub_080AEFB4(Entity*);
extern Entity* FindNextDuplicateID(Entity* ent, int listIndex);
void sub_080249F4(Entity*);
void sub_08024940(Entity*);
-3
View File
@@ -1,6 +1,5 @@
#include "global.h"
#include "entity.h"
#include "sprite.h"
#include "functions.h"
#include "enemy.h"
@@ -9,8 +8,6 @@ extern void (*const gUnk_080CF4C8[6])(Entity*);
extern void (*const gUnk_080CF4E0[4])(Entity*);
extern s32 sub_080012DC(Entity*);
extern void SetGlobalFlag(u32);
extern u32 CheckGlobalFlag(u32);
extern u32 sub_0804A044(Entity*, Entity*, u32);
void sub_080383AC(Entity*);
+1 -3
View File
@@ -3,11 +3,9 @@
#include "audio.h"
#include "entity.h"
#include "enemy.h"
#include "npc.h"
#include "player.h"
#include "save.h"
#include "object.h"
#include "functions.h"
#include "save.h"
extern void sub_080293DC(Entity*);
extern void sub_080296D8(Entity*);
-2
View File
@@ -1,6 +1,4 @@
#include "enemy.h"
#include "audio.h"
#include "functions.h"
extern u32 sub_0804A024(Entity*, u32, u32);
extern bool32 sub_080AE4CC(Entity*, u32, u32, u32);
-2
View File
@@ -16,8 +16,6 @@ extern void (*const gUnk_080D16A4[])(Entity*);
extern u8 gUnk_080D16D0[4]; // Entity count per form
extern PosOffset gUnk_080D16D4[4];
extern u8 gEntCount;
void Slime(Entity* this) {
EnemyFunctionHandler(this, gUnk_080D16A4);
SetChildOffset(this, 0, 1, -12);
+1 -1
View File
@@ -94,7 +94,7 @@ void sub_08031770(Entity* this) {
void sub_080317B4(Entity* this) {
this->z.HALF.HI = ((Random() & 0x30) != 0) ? -0xc : -0xd;
sub_0806F69C(this);
LinearMoveUpdate(this);
GetNextFrame(this);
}
-2
View File
@@ -1,8 +1,6 @@
#include "enemy.h"
#include "entity.h"
#include "object.h"
#include "functions.h"
#include "effects.h"
extern void (*const gUnk_080CD234[])(Entity*);
extern void (*const gUnk_080CD24C[])(Entity*);
-2
View File
@@ -1,8 +1,6 @@
#include "global.h"
#include "enemy.h"
#include "entity.h"
#include "object.h"
#include "functions.h"
static bool32 ShouldSpawnTreeItem(Entity*);
-3
View File
@@ -2,8 +2,6 @@
#include "object.h"
#include "functions.h"
extern void DoExitTransition(ScreenTransitionData*);
typedef struct VaatiArm_HeapStruct1 {
union SplitHWord unk00;
u16 unk02;
@@ -165,7 +163,6 @@ const u16 gUnk_080D140E[] = { -0x6000, -0x5000, -0x4000 };
const u8 gUnk_080D1414[] = { 0, 0xc, 0xe, 0x10, 0x1c };
const u8 gUnk_080D1419[] = { 0, 0xa, 0xa, 0xa, 0x1c };
extern u8 gEntCount;
extern const Hitbox gUnk_080FD450;
extern const Hitbox gUnk_080FD538;
+15 -17
View File
@@ -1,9 +1,7 @@
#include "entity.h"
#include "enemy.h"
#include "player.h"
#include "screen.h"
#include "object.h"
#include "audio.h"
#include "functions.h"
typedef struct {
@@ -112,7 +110,7 @@ void sub_0804474C(Entity* this) {
this->direction++;
this->direction &= 0x1f;
}
sub_0806F69C(this);
LinearMoveUpdate(this);
UpdateAnimationSingleFrame(this);
}
}
@@ -164,7 +162,7 @@ void sub_08044868(Entity* this) {
}
break;
case 1:
sub_0806F69C(this);
LinearMoveUpdate(this);
if (sub_0806FCB8(this, vaati->x.HALF.HI, vaati->y.HALF.HI - 0x10, 0xc)) {
this->field_0x74.HALF.LO++;
this->x.HALF.HI = vaati->x.HALF.HI;
@@ -200,7 +198,7 @@ void sub_08044868(Entity* this) {
case 2:
if (this->actionDelay)
if (--this->actionDelay < 0x11)
sub_0806F69C(this);
LinearMoveUpdate(this);
break;
case 3: {
u8 draw;
@@ -229,7 +227,7 @@ void sub_080449F8(Entity* this) {
switch (vaati->field_0x74.HALF.LO) {
case 0:
sub_0806F69C(this);
LinearMoveUpdate(this);
if (--this->actionDelay)
break;
@@ -254,17 +252,17 @@ void sub_080449F8(Entity* this) {
break;
case 1:
this->direction = (this->direction + 0x10) & 0x1f;
sub_0806F69C(this);
LinearMoveUpdate(this);
this->direction = (this->direction + 0x10) & 0x1f;
this->actionDelay = 2;
break;
case 3:
sub_0806F69C(this);
LinearMoveUpdate(this);
this->actionDelay = 2;
break;
case 4:
sub_0806F69C(this);
sub_0806F69C(this);
LinearMoveUpdate(this);
LinearMoveUpdate(this);
this->actionDelay = 2;
break;
}
@@ -305,7 +303,7 @@ void sub_08044B04(Entity* this) {
switch (vaati->field_0x74.HALF.LO) {
case 0:
sub_0806F69C(this);
LinearMoveUpdate(this);
switch (this->field_0x74.HALF.LO) {
case 0:
if (--this->actionDelay == 0) {
@@ -420,7 +418,7 @@ void sub_08044B04(Entity* this) {
}
break;
case 1:
sub_0806F69C(this);
LinearMoveUpdate(this);
if (--this->actionDelay == 0)
this->field_0x74.HALF.LO++;
break;
@@ -472,11 +470,11 @@ void sub_08044E74(Entity* this, u32 state) {
this->direction &= 0x1f;
PositionRelative(this->parent, this, 0, -0x100000);
this->speed = 12288;
sub_0806F69C(this);
LinearMoveUpdate(this);
this->direction += 0x8;
this->direction &= 0x1f;
this->speed = 1280;
sub_0806F69C(this);
LinearMoveUpdate(this);
break;
case 1:
this->direction = (this->direction + 8) & 0x1f;
@@ -486,18 +484,18 @@ void sub_08044E74(Entity* this, u32 state) {
switch (this->actionDelay) {
case 3 ... 4:
do {
sub_0806F69C(this);
LinearMoveUpdate(this);
} while (this->actionDelay-- != 3);
break;
case 1:
this->direction = (this->direction + 0x10) & 0x1f;
sub_0806F69C(this);
LinearMoveUpdate(this);
this->direction = (this->direction + 0x10) & 0x1f;
break;
}
} else {
if (this->actionDelay == 2) {
sub_0806F69C(this);
LinearMoveUpdate(this);
}
}
break;
-2
View File
@@ -43,8 +43,6 @@ const u8 gUnk_080CDE70[] = {
const s8 gUnk_080CDE90[] = { -2, -3, -4, -5, -6, -5, -4, -3 };
const u16 gUnk_080CDE98[] = { 0xc0, 0x100, 0x140, 0x180 };
extern u8 gEntCount;
void VaatiEyesMacro(Entity* this) {
vaatiEyesMacroFunctions[GetNextFunction(this)](this);
SetChildOffset(this, 0, 1, -0x10);
+2 -3
View File
@@ -2,7 +2,6 @@
#include "functions.h"
extern bool32 PlayerInRange(Entity*, u32, u32);
extern void DoExitTransition(ScreenTransitionData*);
extern u32 sub_080002E0(u32, u32);
extern Entity* gUnk_020000B0;
extern const ScreenTransitionData gUnk_0813AB94;
@@ -131,7 +130,7 @@ void VaatiProjectileFunction0Action1(Entity* this) {
} else {
if (gUnk_020000B0 != NULL) {
sub_08004596(this, GetFacingDirection(this, gUnk_020000B0));
sub_0806F69C(this);
LinearMoveUpdate(this);
}
}
GetNextFrame(this);
@@ -191,7 +190,7 @@ void VaatiProjectileFunction0Action6(Entity* this) {
void VaatiProjectileFunction0Action7(Entity* this) {
sub_0803E444(this);
sub_0806F69C(this);
LinearMoveUpdate(this);
sub_0803E4D8(this);
if ((gRoomControls.roomOriginY + gRoomControls.height + -0x10) <= this->y.HALF.HI) {
SetInitializationPriority();
-1
View File
@@ -3,7 +3,6 @@
#include "functions.h"
extern void sub_080AEFB4(Entity*);
extern u8 gEntCount;
void VaatiRebornEnemyType0PreAction(Entity*);
void VaatiRebornEnemyType1PreAction(Entity*);
+1 -2
View File
@@ -37,7 +37,6 @@ typedef struct {
s8 x;
s8 y;
} PACKED xy;
extern u8 gEntCount;
#ifdef EU
const u8 gUnk_080D0ABC[] = { 0xf0, 0xd0, 0xb0 };
@@ -288,7 +287,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
if (this->animationState > 2) {
this->action = 7;
this->actionDelay = 0xe0;
sub_0807A108();
DeleteClones();
SoundReq(SFX_BOSS_HIT);
return;
}
-1
View File
@@ -1,6 +1,5 @@
#include "entity.h"
#include "enemy.h"
#include "audio.h"
#include "textbox.h"
#include "coord.h"
#include "functions.h"
+4 -7
View File
@@ -1,13 +1,10 @@
#include "enemy.h"
#include "object.h"
#include "textbox.h"
#include "structures.h"
#include "functions.h"
#include "save.h"
#include "screen.h"
extern u8 gEntCount;
void VaatiWrathType0PreAction(Entity*);
u32 sub_08041FCC(Entity*);
void sub_08042004(Entity*);
@@ -380,7 +377,7 @@ void VaatiWrathType0Action7(Entity* this) {
if (gRoomControls.roomOriginY + 0x48 != this->y.HALF.HI) {
this->speed = 0x100;
this->direction = ((gRoomControls.roomOriginY + 0x48) >= this->y.HALF.HI) ? 0x10 : 0;
sub_0806F69C(this);
LinearMoveUpdate(this);
} else {
if (--this->actionDelay == 0) {
sub_08042050(this);
@@ -391,7 +388,7 @@ void VaatiWrathType0Action7(Entity* this) {
void VaatiWrathType0Action8(Entity* this) {
sub_08042004(this);
UpdateAnimationSingleFrame(this);
sub_0806F69C(this);
LinearMoveUpdate(this);
if (((gRoomControls.roomOriginX + 0x20) > this->x.HALF.HI) ||
((gRoomControls.roomOriginX + 0x140) < this->x.HALF.HI)) {
if (0x3f < this->speed) {
@@ -466,7 +463,7 @@ void VaatiWrathType0ActionA(Entity* this) {
void VaatiWrathType0ActionB(Entity* this) {
switch (this->subAction) {
case 0:
sub_0806F69C(this);
LinearMoveUpdate(this);
UpdateAnimationSingleFrame(this);
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type1);
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2);
@@ -527,7 +524,7 @@ void VaatiWrathType0ActionC(Entity* this) {
if (this->actionDelay) {
this->actionDelay--;
} else {
sub_0806F69C(this);
LinearMoveUpdate(this);
if (gRoomControls.roomOriginY + 0x48 == this->y.HALF.HI) {
this->subAction = 2;
InitializeAnimation(((VaatiWrathHeapStruct*)this->myHeap)->type1, 0x11);
+1 -2
View File
@@ -1,5 +1,4 @@
#include "enemy.h"
#include "structures.h"
#include "functions.h"
void sub_080485D8(Entity*);
@@ -82,7 +81,7 @@ void VaatiWrathEyeAction3(Entity* this) {
y = parent->y.HALF.HI + ptr[1];
direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, x, y);
this->direction = direction;
sub_0806F69C(this);
LinearMoveUpdate(this);
this->z.HALF.HI = this->parent->z.HALF.HI;
if ((this->x.HALF.HI == x) && (this->y.HALF.HI == y)) {
this->action = 4;
+3 -3
View File
@@ -92,7 +92,7 @@ void sub_0802CD54(Entity* this) {
this->actionDelay = 60;
sub_0802CF64(this);
}
sub_0806F69C(this);
LinearMoveUpdate(this);
}
void sub_0802CDE8(Entity* this) {
@@ -101,7 +101,7 @@ void sub_0802CDE8(Entity* this) {
sub_08004596(this, GetFacingDirection(this, gUnk_020000B0));
sub_0802CF8C(this);
}
sub_0806F69C(this);
LinearMoveUpdate(this);
} else {
this->action = 1;
this->actionDelay = 60;
@@ -120,7 +120,7 @@ void sub_0802CE68(Entity* this) {
gPlayerState.flags |= 0x100;
if (!sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 4)) {
this->direction = GetFacingDirection(this, &gPlayerEntity);
sub_0806F69C(this);
LinearMoveUpdate(this);
}
sub_0802CFD8(this);
GetNextFrame(this);
+1 -2
View File
@@ -2,7 +2,6 @@
#include "screen.h"
#include "object.h"
#include "structures.h"
#include "functions.h"
void sub_0802A39C(Entity*);
void sub_0802A334(Entity*);
@@ -39,7 +38,7 @@ void sub_0802A2B4(Entity* this) {
this->spritePriority.b0 = 7;
EnqueueSFX(0x84);
} else {
sub_0806F69C(this);
LinearMoveUpdate(this);
}
sub_0802A39C(this);
-21
View File
@@ -1,10 +1,7 @@
#include "global.h"
#include "utils.h"
#include "functions.h"
#include "entity.h"
#include "area.h"
#include "room.h"
#include "script.h"
#include "textbox.h"
#include "npc.h"
@@ -18,12 +15,9 @@ void sub_0805EE88(void);
void ClearAllDeletedEntities(void);
void DeleteAllEntities(void);
void sub_0805E98C(void);
extern void sub_080AE068();
extern void UnloadOBJPalette();
extern void sub_0806FE84();
extern void sub_080788E0();
extern void sub_08078954();
extern void sub_0805EC60();
extern void sub_08017744(Entity*);
extern void UnloadHitbox();
extern void sub_0804AA1C();
@@ -31,7 +25,6 @@ extern void sub_0804AA1C();
extern void _ClearAndUpdateEntities();
extern void UpdateEntities_arm(u32);
void SetPriorityTimer(u32);
static void UpdatePriorityTimer(void);
static void ReleaseTransitionManager();
static void UnlinkEntity();
@@ -256,8 +249,6 @@ Entity* sub_0805E744(void) {
return NULL;
}
Manager* GetEmptyManager(void);
typedef void* (*Getter)(void);
void* GetEmptyEntityByKind(u32 kind) {
@@ -277,8 +268,6 @@ void DeleteThisEntity(void) {
f();
}
void DeleteManager(void*);
typedef void (*Deleter)(void*);
void DeleteEntityAny(Entity* ent) {
@@ -320,7 +309,6 @@ void DeleteEntity(Entity* ent) {
}
}
extern Entity gPlayerEntity;
void ClearDeletedEntity(Entity*);
void ClearAllDeletedEntities(void) {
@@ -333,8 +321,6 @@ void ClearAllDeletedEntities(void) {
} while (ent++, ent < (&gPlayerEntity + 80));
}
extern u8 gEntCount;
void ClearDeletedEntity(Entity* ent) {
DmaClear32(3, ent, sizeof(Entity));
gEntCount--;
@@ -357,8 +343,6 @@ void DeleteAllEntities(void) {
}
}
extern Manager gUnk_02033290;
typedef struct Temp {
void* prev;
void* next;
@@ -376,8 +360,6 @@ Manager* GetEmptyManager(void) {
return NULL;
}
extern u8 gManagerCount;
void DeleteManager(void* ent) {
Manager* manager = (Manager*)ent;
if (!manager->next)
@@ -399,7 +381,6 @@ void ReleaseTransitionManager(void* mgr) {
}
extern Entity gUnk_020369F0;
void sub_0805E98C(void);
void sub_0805E958(void) {
MemCopy(&gEntityLists, &gUnk_020369F0, 0x48);
@@ -449,8 +430,6 @@ void DeleteSleepingEntities(void) {
} while (++list < &gEntityLists[9]);
}
extern void sub_0805E374(Entity*);
void AppendEntityToList(Entity* entity, u32 listIndex) {
LinkedList* list;
-1
View File
@@ -1,7 +1,6 @@
#include "global.h"
#include "audio.h"
#include "textbox.h"
#include "structures.h"
typedef struct {
s8 unk0;
-1
View File
@@ -2,7 +2,6 @@
#include "functions.h"
#include "screen.h"
#include "utils.h"
#include "fade.h"
typedef struct {
u8 field_0x0;
-1
View File
@@ -1,6 +1,5 @@
#include "fileScreen.h"
#include "main.h"
#include "player.h"
#include "utils.h"
#include "screen.h"
#include "menu.h"
-2
View File
@@ -1,5 +1,3 @@
#include "flags.h"
const char* const globalFlagNames[] = {
"BEGIN",
"LV0_CLEAR",
+2 -2
View File
@@ -39,9 +39,9 @@ u32 CheckRoomFlag(u32 flag) {
return ReadBit(&gRoomVars.roomFlags, flag);
}
u32 CheckLocalFlagsByBank(u32 flag, u32 offset, u32 length) {
u32 CheckLocalFlagsByBank(u32 offset, u32 flag, u32 length) {
return CheckBits(&gGlobalFlags, flag + offset, length);
return CheckBits(&gGlobalFlags, offset + flag, length);
}
u32 CheckLocalFlags(u32 flag, u32 length) {
-1
View File
@@ -1,6 +1,5 @@
#include "global.h"
#include "gba/m4a.h"
#include "gba/gba.h"
// ASCII encoding of 'Smsh' in reverse
// This is presumably short for SMASH, the developer of MKS4AGB.
+3 -9
View File
@@ -6,12 +6,9 @@
#include "save.h"
#include "textbox.h"
#include "functions.h"
#include "object.h"
#include "utils.h"
#include "npc.h"
#include "effects.h"
#include "screen.h"
#include "gba/m4a.h"
#include "object.h"
extern u8 gUnk_03003DE0;
extern u8 gUnk_03000C30;
@@ -29,13 +26,10 @@ extern void sub_080ADD70();
extern void sub_0801C25C();
extern void UpdateDisplayControls();
extern void LoadResources();
extern void FadeVBlank();
extern void HandlePlayerLife();
extern void DoPlayerAction();
extern void sub_080171F0();
extern void sub_08078FB0();
extern u32 CheckDontUpdate();
extern void DrawEntity();
extern void sub_0807A050();
extern u32 sub_08079B24();
extern void sub_08079708();
@@ -227,7 +221,7 @@ void HandlePlayerLife(Entity* this) {
if (gPlayerState.flags & PL_BURNING)
ResetPlayer();
if ((gPlayerState.flags & PL_CLONING) && !gPlayerState.field_0xa0[0])
sub_0807A108();
DeleteClones();
if (sub_08079B24() == 0)
sub_08079708(this);
@@ -308,7 +302,7 @@ void sub_080171F0(void) {
gPlayerState.field_0xa &= 0xf;
gPlayerState.keepFacing &= ~0x80;
gPlayerState.field_0x1a[0] = 0;
gPlayerState.field_0x80 = 0;
gPlayerState.speed_modifier = 0;
gPlayerState.field_0xaa = 0;
MemClear(&gUnk_03003BE0, 0x8c);
gPlayerEntity.spriteOffsetY = gPlayerState.field_0x3f;
-2
View File
@@ -1,12 +1,10 @@
#include "audio.h"
#include "global.h"
#include "main.h"
#include "entity.h"
#include "utils.h"
#include "screen.h"
#include "object.h"
#include "textbox.h"
#include "structures.h"
#include "functions.h"
typedef struct {
-2
View File
@@ -3,8 +3,6 @@
extern void (*const gUnk_0811BD78[])(ItemBehavior*, u32);
extern void ResetPlayerVelocity(void);
void ItemBoomerang(ItemBehavior* this, u32 arg1) {
gUnk_0811BD78[this->stateID](this, arg1);
}
-1
View File
@@ -5,7 +5,6 @@
extern void (*const gUnk_0811BE28[])(ItemBehavior*, u32);
extern u8 gUnk_02002AC8[];
extern void sub_08077BB8(ItemBehavior*);
void ItemJarEmpty(ItemBehavior* this, u32 arg1) {
gUnk_0811BE28[this->stateID](this, arg1);
+2 -2
View File
@@ -10,7 +10,7 @@ s32 sub_080774A0(void);
extern u8 gUnk_0811BE14[];
extern s32 sub_0800875A(Entity*, u32, ItemBehavior*);
extern void sub_08079E08();
extern void UpdatePlayerMovement();
void ItemMoleMitts(ItemBehavior* this, u32 arg1) {
gUnk_0811BE04[this->stateID](this, arg1);
@@ -89,7 +89,7 @@ void sub_08077448(ItemBehavior* this, u32 arg1) {
gPlayerEntity.direction = gPlayerEntity.animationState << 2 ^ 0x10;
gPlayerEntity.speed = 0x100;
if (((this->field_0x5[9] & 1) != 0) && (this->field_0x5[0] != 0)) {
sub_08079E08();
UpdatePlayerMovement();
}
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
-2
View File
@@ -5,10 +5,8 @@
extern void (*const gOcarinaStates[4])(ItemBehavior*, u32);
extern void ResetPlayerVelocity(void);
extern void SetPlayerEventPriority(void);
extern void CreateBird(void);
extern void ResetPlayerEventPriority(void);
void ItemOcarina(ItemBehavior* this, u32 arg1) {
gOcarinaStates[this->stateID](this, arg1);
-2
View File
@@ -5,8 +5,6 @@
void sub_08076758(ItemBehavior*, u32);
extern void sub_08077F84(void);
extern bool32 sub_08077EFC(ItemBehavior*);
/*void ItemRocsCape(ItemBehavior* this, u32 arg1) {
if (this->stateID != 0) {
sub_08076758(this, arg1);
+1 -1
View File
@@ -89,7 +89,7 @@ void sub_08075694(ItemBehavior* this, u32 arg1) {
gPlayerState.field_0x1a[1] &= 0xdf;
if ((gPlayerState.field_0xa0[0] == 0x04) && ((gPlayerState.flags & PL_CLONING) == 0)) {
gPlayerState.field_0xa0[0] = 0x01;
sub_0807A108();
DeleteClones();
}
SoundReq(SFX_PLY_VO2);
}
-2
View File
@@ -1,7 +1,5 @@
#include "audio.h"
#include "asm.h"
#include "functions.h"
#include "structures.h"
#include "main.h"
#include "screen.h"
#include "utils.h"
+1 -2
View File
@@ -1,4 +1,5 @@
#include "global.h"
#include "asm.h"
#include "manager.h"
#include "room.h"
#include "area.h"
@@ -8,7 +9,6 @@
#include "fileScreen.h"
#include "functions.h"
void Manager10_Main(Manager10*);
void sub_080595E4(Manager10*);
void sub_08059608(Manager10*);
void sub_08059690(Manager10*);
@@ -18,7 +18,6 @@ u32 sub_0805986C(void);
void sub_08059894(const u16*, const u16*, u32);
u32 sub_080598F8(u32, u32, u32);
void sub_08059960(const u16*, const u16*, u16*, u8);
void sub_08059994(void);
const u8 gUnk_08108390[6] = {
0x0F, 0x1E, 0x2D, 0x3C, 0x01, 0x01,
-1
View File
@@ -1,4 +1,3 @@
#include "global.h"
#include "manager.h"
#include "flags.h"
+2 -1
View File
@@ -1,4 +1,5 @@
#include "area.h"
#include "asm.h"
#include "manager.h"
#include "room.h"
#include "functions.h"
@@ -87,7 +88,7 @@ void sub_08059A58(Manager12* this) {
}
}
#define COMMON(tmp2, tmp1) ((tmp2) >> 4 & 0x3f) | (((tmp1) + 0x188U) >> 4 & 0x3f) << 6
#define COMMON(tmp2, tmp1) (((tmp2) >> 4 & 0x3f) | (((tmp1) + 0x188U) >> 4 & 0x3f) << 6)
void sub_08059B18(void) {
u32 loopVar;
u32 innerLoopVar;
-2
View File
@@ -5,7 +5,6 @@
#include "flags.h"
#include "coord.h"
#include "main.h"
#include "functions.h"
typedef struct {
Manager manager;
@@ -23,7 +22,6 @@ const u16 gUnk_0810859A[] = { 0x808, 0x907, 0xA06, 0x907 };
extern void sub_0805622C(u16*, u32, u32);
extern u16 gUnk_02017AA0[];
void Manager14_Main(Manager14*);
void sub_08059E80(Manager14*);
void sub_08059EF8(Manager14*);
u32 sub_08059F9C(Manager14*);
-1
View File
@@ -1,7 +1,6 @@
#include "manager.h"
#include "area.h"
#include "room.h"
#include "functions.h"
#include "screen.h"
void sub_0805AFFC(Manager*);
-1
View File
@@ -1,7 +1,6 @@
#include "global.h"
#include "manager.h"
#include "flags.h"
#include "entity.h"
#include "room.h"
#include "screen.h"
#include "utils.h"
+1 -1
View File
@@ -1,7 +1,7 @@
#include "global.h"
#include "asm.h"
#include "manager.h"
#include "flags.h"
#include "functions.h"
typedef struct {
Manager manager;
-2
View File
@@ -1,8 +1,6 @@
#include "global.h"
#include "entity.h"
#include "screen.h"
#include "functions.h"
#include "room.h"
typedef struct {
Manager manager;
-2
View File
@@ -1,9 +1,7 @@
#include "global.h"
#include "manager.h"
#include "flags.h"
#include "entity.h"
#include "room.h"
#include "functions.h"
typedef struct {
Manager manager;
+1 -2
View File
@@ -3,7 +3,6 @@
#include "room.h"
#include "object.h"
#include "functions.h"
#include "flags.h"
extern bool32 CheckRectOnScreen(u16, u16, u32, u32);
@@ -44,7 +43,7 @@ void Manager21_Main(Manager21* this) {
object->x.HALF.HI = gRoomControls.roomOriginX + spawnData->x;
object->y.HALF.HI = gRoomControls.roomOriginY + spawnData->y;
object->parent = (Entity*)this;
sub_08016A30(object);
ResolveCollisionLayer(object);
this->field_0x20 |= 1 << count;
}
}
-2
View File
@@ -4,7 +4,6 @@
#include "audio.h"
#include "overworld.h"
#include "object.h"
#include "area.h"
extern void (*const gUnk_08108CDC[])(Manager24*);
@@ -16,7 +15,6 @@ extern u32 sub_080002C8(u16, u8);
extern void (*const gUnk_08108CE8[])(u32, u32);
u32 sub_0805C608(void);
extern u32 CheckIsInteriorWithEnemies(void);
extern u8 gUnk_08108CFC[];
+1
View File
@@ -1,3 +1,4 @@
#include "asm.h"
#include "manager.h"
#include "room.h"
#include "functions.h"
-2
View File
@@ -1,10 +1,8 @@
#include "global.h"
#include "manager.h"
#include "entity.h"
#include "flags.h"
#include "room.h"
#include "object.h"
#include "functions.h"
typedef struct {
Manager manager;
-2
View File
@@ -1,9 +1,7 @@
#include "global.h"
#include "asm.h"
#include "manager.h"
#include "entity.h"
#include "room.h"
#include "functions.h"
typedef struct {
Manager manager;
+1 -1
View File
@@ -1,7 +1,7 @@
#include "asm.h"
#include "manager.h"
#include "room.h"
#include "flags.h"
#include "functions.h"
typedef struct {
u8 field_0x0;
+1 -4
View File
@@ -3,7 +3,6 @@
#include "room.h"
#include "functions.h"
#include "object.h"
#include "audio.h"
typedef struct {
Manager manager;
@@ -27,8 +26,6 @@ typedef struct {
extern void (*const gUnk_08108D30[])(Manager2B*);
extern u8 gEntCount;
void sub_0805D11C(Manager2B*);
void Manager2B_Main(Manager2B* this) {
@@ -50,7 +47,7 @@ void sub_0805D02C(Manager2B* this) {
object->x.HALF.HI = objectData[0] + gRoomControls.roomOriginX;
object->y.HALF.HI = objectData[1] + gRoomControls.roomOriginY;
object->parent = (Entity*)this;
sub_08016A30(object);
ResolveCollisionLayer(object);
this->field_0x20[counter] = object;
counter += 1;
objectData += 3;
+1
View File
@@ -1,4 +1,5 @@
#include "manager.h"
#include "asm.h"
#include "functions.h"
#include "utils.h"
+1
View File
@@ -1,3 +1,4 @@
#include "asm.h"
#include "entity.h"
#include "functions.h"
-1
View File
@@ -7,7 +7,6 @@
#include "player.h"
#include "audio.h"
#include "object.h"
#include "functions.h"
// Facilitates the usage of minish portals.
+1
View File
@@ -1,4 +1,5 @@
#include "global.h"
#include "asm.h"
#include "audio.h"
#include "manager.h"
#include "flags.h"
-1
View File
@@ -3,7 +3,6 @@
#include "flags.h"
#include "asm.h"
#include "object.h"
#include "room.h"
typedef struct {
Manager manager;
-1
View File
@@ -1,6 +1,5 @@
#include "manager.h"
#include "screen.h"
#include "structures.h"
#include "room.h"
#include "functions.h"
#include "area.h"
+2 -4
View File
@@ -17,8 +17,6 @@ typedef struct {
extern void (*const gUnk_08108D98[])(Manager35*);
extern void RequestPriorityDuration(Entity*, u32);
void Manager35_Main(Manager35* this) {
gUnk_08108D98[this->manager.action](this);
}
@@ -57,7 +55,7 @@ void sub_0805DCC8(Manager35* this) {
void sub_0805DD24(Manager35* this) {
RequestPriorityDuration(0, 8);
if ((gRoomControls.unk6 & 4) == 0 && --this->manager.unk_0e == 0) {
if ((gRoomControls.scroll_flags & 4) == 0 && --this->manager.unk_0e == 0) {
this->manager.action = 3;
SetFlag(this->field_0x3c);
if (this->field_0x36 == 0) {
@@ -73,7 +71,7 @@ void sub_0805DD68(Manager35* this) {
gRoomControls.cameraTarget = (Entity*)this->manager.parent;
}
} else {
if ((gRoomControls.unk6 & 4) == 0) {
if ((gRoomControls.scroll_flags & 4) == 0) {
Entity* entity = *(Entity**)this->manager.unk_18;
if (entity != NULL) {
DeleteEntity(entity);
-1
View File
@@ -1,7 +1,6 @@
#include "manager.h"
#include "audio.h"
#include "script.h"
#include "functions.h"
typedef struct {
u16 waitTime;
-1
View File
@@ -28,7 +28,6 @@ extern const u8 gUnk_08108E48[0x18];
extern const u8 gUnk_08108E60[];
extern void sub_0805F46C(void*, const void*);
extern void ResetSystemPriority(void);
void sub_0805E140(Manager39*);
void sub_0805E18C(Manager39*); // unused?
+1
View File
@@ -1,4 +1,5 @@
#include "global.h"
#include "asm.h"
#include "player.h"
#include "room.h"
#include "manager.h"
+1
View File
@@ -1,4 +1,5 @@
#include "global.h"
#include "asm.h"
#include "player.h"
#include "manager.h"
#include "functions.h"
+1 -3
View File
@@ -1,8 +1,6 @@
#include "global.h"
#include "manager.h"
#include "asm.h"
#include "functions.h"
#include "structures.h"
#include "gba/gba.h"
typedef struct {
Manager manager;
-2
View File
@@ -1,8 +1,6 @@
#include "global.h"
#include "manager.h"
#include "screen.h"
#include "functions.h"
#include "gba/gba.h"
typedef struct {
Manager manager;
+1 -2
View File
@@ -1,4 +1,5 @@
#include "global.h"
#include "asm.h"
#include "entity.h"
#include "player.h"
#include "manager.h"
@@ -15,8 +16,6 @@ static void sub_080585B0(ManagerA*);
static u32 PlayerStateValid(ManagerA*);
static void sub_080585DC(ManagerA*);
extern void sub_0801855C(void);
/**
* Ezlo hint manager
*/
-5
View File
@@ -1,12 +1,10 @@
#include "global.h"
#include "manager.h"
#include "flags.h"
#include "entity.h"
#include "room.h"
#include "area.h"
#include "utils.h"
#include "audio.h"
#include "functions.h"
/*
* Manager B is used to create fights:
@@ -47,7 +45,6 @@ void ManagerB_Init(ManagerB* this) {
DeleteThisEntity();
}
}
extern void sub_080186C0(u32);
void ManagerB_WaitForFlag(ManagerB* this) {
int tmp;
@@ -63,8 +60,6 @@ void ManagerB_WaitForFlag(ManagerB* this) {
}
}
extern void sub_0801855C(void);
void ManagerB_WaitForDone(ManagerB* this) {
// check if all helpers are done
if (this->manager.unk_0e)

Some files were not shown because too many files have changed in this diff Show More