decompile LikeLike and SpearMoblin

remove redundant function definitions
This commit is contained in:
Behemoth
2020-09-17 01:43:57 +02:00
parent c0a95b9063
commit 7ecc2caf21
26 changed files with 1238 additions and 1861 deletions
+4 -5
View File
@@ -3,6 +3,7 @@
#include "room.h"
#include "player.h"
#include "flags.h"
#include "functions.h"
extern void sub_0809F7BC(Entity*);
extern void PlaySFX(u32);
@@ -13,7 +14,6 @@ extern void DeleteThisEntity();
extern u32 CheckRoomFlag(u32);
extern void sub_08078A90(u32);
extern void sub_08078B48(void);
extern u32 Random(void);
extern void sub_0806F69C(Entity*);
extern void (*gUnk_08124798[])(Entity*);
extern void (*gUnk_081247A0[])(Entity*);
@@ -23,7 +23,6 @@ extern void PositionEntityOnTop(Entity*, Entity*);
extern void sub_0807BB68(u32*, u32, u32);
extern u8 gUnk_02034490;
extern u32 gScreenTransition;
extern void* gUnk_080DD750;
extern Entity gPlayerEntity;
extern PlayerState gPlayerState;
@@ -62,7 +61,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 ((gScreenTransition & 7) == 0) {
if ((gScreenTransition.frameCount & 7) == 0) {
sub_0809F7BC(this);
}
sub_0809F7F4(this);
@@ -110,7 +109,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 ((gScreenTransition & 7) == 0) {
if ((gScreenTransition.frameCount & 7) == 0) {
sub_0809F7BC(this);
}
sub_0809F7F4(this);
@@ -145,7 +144,7 @@ void sub_0809F700(Entity* this) {
this->actionDelay = (Random() & 30) + 8;
this->flags = this->flags | 12;
}
if ((gScreenTransition & 3) == 0) {
if ((gScreenTransition.frameCount & 3) == 0) {
uVar2 = Random();
this->spriteOffsetX = gUnk_081247C0[uVar2 & 7];
this->spriteOffsetY = gUnk_081247C0[uVar2 >> 4 & 7];
+4 -4
View File
@@ -4,6 +4,7 @@
#include "screen.h"
#include "greatFairy.h"
#include "structures.h"
#include "functions.h"
enum {
BEHAVIORS,
@@ -550,14 +551,14 @@ void sub_08087424(Entity* arg0, struct_08087424* arg1) {
void sub_0808747C(u32 arg0, u32 arg1) {
u32 iVar1;
iVar1 = FindEntityInListByForm(0x6, 0xf, 0x6, 0xb, 0x0);
iVar1 = (u32)FindEntityInListByForm(0x6, 0xf, 0x6, 0xb, 0x0);
if (iVar1 != 0) {
iVar1 = 1;
}
*(u32*)(arg1 + 0x14) = iVar1;
}
//clang-format off
// clang-format off
void (*const GreatFairy_Main[])(Entity*) = {
GreatFairy_CallBehavior,
GreatFairy_WingsCallBehavior,
@@ -647,5 +648,4 @@ void (*const GreatFairy_Form2Behaviors[])(Entity*) = {
sub_08087264,
sub_0808727C
};
//clang-format on
// clang-format on
-1
View File
@@ -1,7 +1,6 @@
#include "global.h"
#include "entity.h"
extern u32 Random();
extern bool32 CheckIsDungeon();
extern void sub_080AE068(Entity*);
extern void LoadFixedGFX(Entity*, u32);
+2 -6
View File
@@ -1,10 +1,8 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
extern void sub_08086A6C();
extern s32 sub_080044EC();
extern void ProcessMovement();
extern u32 Random(void);
extern void (*gUnk_081206C4[99])(Entity*);
@@ -33,12 +31,10 @@ void sub_080869DC(Entity* ent) {
}
void sub_08086A28(Entity* ent) {
s32 iVar1;
if (ent->attachedEntity->next == NULL) {
ent->action = 2;
} else {
iVar1 = sub_080044EC(ent, 10240);
u32 iVar1 = sub_080044EC(ent, 10240);
if (iVar1 == 0) {
ent->action = 2;
}
+1 -1
View File
@@ -1,7 +1,7 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
extern u32 Random(void);
extern void sub_0806F69C(Entity*);
extern void (*const gUnk_08121060[])(Entity*);