This commit is contained in:
theo3
2021-03-22 01:27:45 -07:00
786 changed files with 22698 additions and 10886 deletions
+5 -15
View File
@@ -1,26 +1,16 @@
#include "global.h"
#include "entity.h"
#include "sprite.h"
extern u32 CheckIsDungeon();
#include "game.h"
void Archway(Entity* this) {
u32 v1;
u32 v2;
u32 v3;
if (this->action == 0) {
v1 = this->action = 1;
v2 = this->spriteSettings.raw;
v1 = v1 - 0x5;
v1 = v1 & v2;
this->spriteSettings.raw = v1 | 1;
this->action = 1;
this->spriteSettings.b.draw = 1;
this->frameIndex = this->type2;
this->collisionLayer = 2;
UpdateSpriteForCollisionLayer(this);
v3 = CheckIsDungeon();
if (v3 != 0) {
this->spritePriority.b0 = (this->spritePriority.b0 & 0xf8) | 1;
if (CheckIsDungeon()) {
this->spritePriority.b0 = 1;
}
}
}
+7 -6
View File
@@ -1,5 +1,6 @@
#include "global.h"
#include "entity.h"
#include "random.h"
#include "functions.h"
extern void (*const gUnk_08121EA4[])(Entity*);
@@ -18,13 +19,13 @@ void sub_0808F658(Entity* this) {
this->spritePriority.b0 = this->type;
this->frameIndex = this->type;
this->direction = 8;
this->nonPlanarMovement = gUnk_08121EB0[this->type];
this->speed = gUnk_08121EB0[this->type];
this->field_0x78.HWORD = gRoomControls.roomOriginX - 0x60;
this->field_0x7a.HWORD = gRoomControls.roomOriginX + gRoomControls.width + 0x60;
this->animationState = 0;
this->x.HALF.HI += (Random() & 0xf) << 4;
this->actionDelay = 0;
this->previousActionFlag = 0;
this->subAction = 0;
}
void sub_0808F6E0(Entity* this) {
@@ -35,8 +36,8 @@ void sub_0808F6E0(Entity* this) {
}
void sub_0808F70C(Entity* this) {
if (this->previousActionFlag == 0) {
this->previousActionFlag = 1;
if (this->subAction == 0) {
this->subAction = 1;
this->actionDelay = ((Random() & 7) << 3) + 31;
if ((this->direction & 0x10)) {
@@ -49,10 +50,10 @@ void sub_0808F70C(Entity* this) {
this->y.HALF.HI = gUnk_08121EB3[this->type2 * 2 + (Random() & 1)];
}
if (this->previousActionFlag == 1) {
if (this->subAction == 1) {
if (--this->actionDelay == 0) {
this->action = 1;
this->previousActionFlag = 0;
this->subAction = 0;
}
}
}
+2 -2
View File
@@ -59,12 +59,12 @@ void sub_0809CD0C(Entity* this) {
}
/* Damage minish link if he touches a steam cloud */
if (this->field_0xf == 0 && gPlayerEntity.hurtBlinkTime == 0 && this->frameIndex &&
if (this->field_0xf == 0 && gPlayerEntity.iframes == 0 && this->frameIndex &&
sub_0806FC80(this, &gPlayerEntity, 4)) {
this->field_0xf++;
ModHealth(-2);
sub_0800449C(&gPlayerEntity, 0x7a);
gPlayerEntity.hurtBlinkTime = 16;
gPlayerEntity.iframes = 16;
gPlayerEntity.field_0x3e = 16;
gPlayerEntity.field_0x42 = 12;
gPlayerEntity.field_0x46 = 16;
+1 -1
View File
@@ -1,5 +1,5 @@
#include "entity.h"
#include "global.h"
#include "entity.h"
extern void (*gUnk_08123384[])(Entity*);
+5 -4
View File
@@ -2,8 +2,9 @@
#include "audio.h"
#include "entity.h"
#include "flags.h"
#include "functions.h"
#include "save.h"
#include "random.h"
#include "functions.h"
extern void (*const gUnk_08123EC0[])(Entity*);
extern void (*const gUnk_08123EEC[])(Entity*);
@@ -29,7 +30,7 @@ void sub_0809CF54(Entity* this) {
this->field_0x20 = -0x18000;
this->height.WORD = -0x38C000;
this->field_0x68.HWORD = -0x800;
this->nonPlanarMovement = 0x280;
this->speed = 0x280;
this->direction = 8;
this->collisionLayer = 2;
this->x.HALF.HI = gRoomControls.roomScrollX;
@@ -70,7 +71,7 @@ void sub_0809D048(Entity* this) {
}
void sub_0809D06C(Entity* this) {
gUnk_08123EFC[this->previousActionFlag](this);
gUnk_08123EFC[this->subAction](this);
}
void sub_0809D084(Entity* this) {
@@ -81,7 +82,7 @@ void sub_0809D084(Entity* this) {
if (temp != 0) {
PositionRelative(this->parent, this, 0, 0x80000);
} else {
this->previousActionFlag++;
this->subAction++;
this->field_0x20 = temp;
}
}
+2 -7
View File
@@ -47,7 +47,7 @@ void sub_08081FF8(Entity*);
void sub_08081BAC(Entity* this) {
if (sub_08081CB0(this)) {
this->previousActionFlag = 0;
this->subAction = 0;
this->actionDelay = 0xA;
sub_0805E4E0(this, 0xA);
sub_08081FF8(this);
@@ -105,7 +105,6 @@ void sub_08081C98(Entity* this) {
}
Entity* sub_08081D74(Entity*);
void sub_0807B7D8(u32, u32, u32);
u32 sub_080001DA(u32, u32);
u32 sub_08081CB0(Entity* this) {
@@ -142,8 +141,7 @@ u32 sub_08081D28(Entity* this) {
}
extern u32 sub_080002E0(u32, u32);
extern Entity* gUnk_03004040[];
extern u32 sub_080041A0(Entity*, Entity*, u32, u32);
extern Entity* gUnk_03004040[3];
u32 sub_08081E0C(Entity*);
Entity* sub_08081D74(Entity* this) {
@@ -171,8 +169,6 @@ Entity* sub_08081D74(Entity* this) {
return ent;
}
extern u32 sub_08079F8C();
u32 sub_08081E0C(Entity* this) {
Entity* tmp = &gPlayerEntity;
if (tmp->height.HALF.HI != 0 || !sub_08079F8C()) {
@@ -273,7 +269,6 @@ u32 sub_08081F7C(Entity* this, u32 r7) {
return 1;
}
extern Entity* gUnk_03004040[3];
extern void sub_080044AE(Entity*, u32, u32);
void sub_08081FF8(Entity* this) {
-1
View File
@@ -1,6 +1,5 @@
#include "global.h"
#include "entity.h"
#include "flags.h"
extern void sub_080842D8(Entity*);
extern void sub_08078828(Entity*);
+3 -15
View File
@@ -4,29 +4,17 @@
#include "room.h"
#include "player.h"
#include "flags.h"
#include "random.h"
#include "functions.h"
#include "structures.h"
extern void sub_0809F7BC(Entity*);
extern void SoundReq(u32);
extern void sub_0809F814(u32);
extern void sub_0809F7F4(Entity*);
extern void LoadRoomEntityList();
extern void DeleteThisEntity();
extern u32 CheckRoomFlag(u32);
extern void sub_08078A90(u32);
extern void sub_08078B48(void);
extern void sub_0806F69C(Entity*);
extern void (*gUnk_08124798[])(Entity*);
extern void (*gUnk_081247A0[])(Entity*);
extern void (*gUnk_081247AC[])(Entity*);
extern Entity* CreateObject(u32, u32, u32);
extern void PositionEntityOnTop(Entity*, Entity*);
extern void sub_0807BB68(u32*, u32, u32);
extern void* gUnk_080DD750;
extern Entity gPlayerEntity;
extern PlayerState gPlayerState;
extern u8 gUnk_081247C0[];
extern u16 gUnk_081247C8[];
extern u32 gUnk_081247D0;
@@ -73,7 +61,7 @@ void sub_0809F5B0(Entity* this) {
if (--this->actionDelay == 0) {
SoundReq(SFX_SECRET_BIG);
SetGlobalFlag(KUMOTATSUMAKI);
LoadRoomEntityList(&gUnk_080DD750);
LoadRoomEntityList((EntityData*)&gUnk_080DD750);
DeleteThisEntity();
}
}
@@ -181,7 +169,7 @@ void sub_0809F7BC(Entity* this) {
cloud = sub_0809F770(this);
if (cloud != NULL) {
uVar1 = Random();
cloud->nonPlanarMovement = gUnk_081247C8[uVar1 & 3];
cloud->speed = gUnk_081247C8[uVar1 & 3];
cloud->direction = (u8)(uVar1 >> 8) & 31;
}
}
+6 -8
View File
@@ -1,18 +1,17 @@
#include "global.h"
#include "entity.h"
#include "flags.h"
#include "functions.h"
#include "main.h"
#include "menu.h"
#include "npc.h"
#include "position.h"
#include "structures.h"
#include "coord.h"
#include "fileScreen.h"
#include "utils.h"
#include "structures.h"
#include "functions.h"
extern int sub_0807A094(int);
extern void LoadPalettes(const u8*, int, int);
extern u32 sub_080041EC(int, int);
extern u32 sub_080045DA(int, int);
static bool32 sub_0808E950(void);
static void sub_0808EABC(Entity*);
@@ -39,7 +38,6 @@ typedef struct {
extern void (*const gUnk_08121C64[])(Entity*);
extern void (*const gUnk_08121CCC[])(Entity*);
extern const int gUnk_08133368[];
extern const u8 gGlobalGfxAndPalettes[];
extern const struct_08121CD4 gUnk_08121CD4[][4];
extern const u8 gUnk_08121D10[];
extern const u8 gUnk_08121D38[][8];
@@ -506,7 +504,7 @@ static u32 sub_0808EF6C(Entity* this) {
if (this->field_0x6c.HWORD < var7) {
var7 = this->field_0x6c.HWORD;
}
this->nonPlanarMovement = var7;
this->speed = var7;
this->direction = sub_080045DA(var0, var2) >> 3;
sub_0806F69C(this);
return 1;
@@ -517,7 +515,7 @@ static void sub_0808EFF0(Entity* this) {
u8 var1;
this->spriteSettings.b.draw = 2;
this->nonPlanarMovement = 0x400;
this->speed = 0x400;
this->currentHealth = 1;
this->frameIndex = 0xFF;
this->animIndex = 0xFF;
-1
View File
@@ -1,6 +1,5 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
void FloatingBlock(Entity* this) {
if (this->action == 0) {
+1 -2
View File
@@ -1,11 +1,10 @@
#include "global.h"
#include "entity.h"
#include "room.h"
#include "functions.h"
void SetTile(u32 tileIndex, s32 tilePosition, s32 layerIndex);
void sub_0808D618(Entity* ent);
extern RoomControls gRoomControls;
extern s16 gUnk_08121750[];
extern s16 gUnk_0812176A[];
+72 -105
View File
@@ -3,10 +3,13 @@
#include "entity.h"
#include "room.h"
#include "screen.h"
#include "structures.h"
#include "greatFairy.h"
#include "functions.h"
#include "flags.h"
#include "save.h"
#include "random.h"
#include "script.h"
#include "structures.h"
#include "functions.h"
enum {
BEHAVIORS,
@@ -23,11 +26,9 @@ enum {
// Main
void GreatFairy(Entity* this) {
u8 bVar1;
if (this->action == 0) {
bVar1 = __modsi3(this->type, 11);
this->type2 = bVar1;
s32 temp = 11;
this->type2 = this->type % temp;
}
GreatFairy_Main[this->type2](this);
}
@@ -66,20 +67,18 @@ void GreatFairy_DormantUpdate(Entity* this) {
--*pFrame;
}
switch (*pFrame) {
case 0x96:
case 0x82:
goto e;
case 0x0:
case 0:
this->action = 2;
break;
e:
case 0xd2:
case 0xaa:
case 0x121:
case 130:
case 150:
case 170:
case 210:
case 289:
ripple = GreatFairy_CreateForm(this, RIPPLE, 0);
if (ripple) {
PositionRelative(this, ripple, (s32)GreatFairy_RippleOffsets[this->actionDelay] << 16,
(s32)GreatFairy_RippleOffsets[this->actionDelay + 1] << 16);
PositionRelative(this, ripple, (s32)GreatFairy_RippleOffsets[this->actionDelay] * 65536,
(s32)GreatFairy_RippleOffsets[this->actionDelay + 1] * 65536);
this->actionDelay += 2;
break;
}
@@ -108,9 +107,8 @@ void GreatFairy_SpawningUpdate(Entity* this) {
DoFade(6, 4);
SoundReq(325);
this->action = 4;
this->actionDelay = 0x3c;
var = this->spriteSettings.raw & ~0x3;
this->spriteSettings.raw = (this->spriteSettings.raw & var) | 1;
this->actionDelay = 60;
this->spriteSettings.b.draw = 1;
}
}
}
@@ -159,21 +157,19 @@ void GreatFairy_WingsInit(Entity* this) {
this->spriteRendering.alphaBlend = 1;
gScreen.controls.layerFXControl = 0xF40;
gScreen.controls.alphaBlend = BLDALPHA_BLEND(9, 8);
this->nonPlanarMovement = 1024;
this->speed = 1024;
sub_0805EC9C(this, 1024, 256, 0);
}
void GreatFairy_WingsUpdate(Entity* this) {
s32 iVar1;
iVar1 = this->nonPlanarMovement -= 32;
if (iVar1 * 65536 >> 16 == 256) {
this->speed -= 32;
if (this->speed == 256) {
this->action = 2;
sub_0805EC60(this);
gRoomVars.greatFairyState |= 32;
gUnk_02033280.unk_00 |= 4;
gActiveScriptInfo.unk_00 |= 4;
} else {
sub_0805EC9C(this, this->nonPlanarMovement, 256, 0);
sub_0805EC9C(this, this->speed, 256, 0);
}
}
@@ -235,7 +231,7 @@ void GreatFairy_MiniRisingUpdate(Entity* this) {
void GreatFairy_MiniRemoveMe(Entity* this) {
GetNextFrame(this);
sub_080873D0(this);
if ((gRoomVars.greatFairyState & 1) != 0) {
if (gRoomVars.greatFairyState & 1) {
DeleteEntity(this);
}
}
@@ -260,7 +256,7 @@ void GreatFairy_MiniAffineInit2(Entity* this) {
if (this->height.HALF.HI == -20) {
this->action = 2;
this->actionDelay = 90;
this->nonPlanarMovement = 4096;
this->speed = 4096;
this->spriteRendering.b0 = 3;
sub_0805EC9C(this, 256, 256, 0);
}
@@ -268,15 +264,13 @@ void GreatFairy_MiniAffineInit2(Entity* this) {
// Mini great fairy stretch
void GreatFairy_MiniAffineUpdate(Entity* this) {
s32 iVar2;
if (--this->actionDelay == 0) {
gRoomVars.greatFairyState |= 1;
this->action = 3;
sub_0805EC60(this);
} else {
iVar2 = this->nonPlanarMovement -= 24;
sub_0805EC9C(this, 256, iVar2 * 0x10000 >> 20, 0);
this->speed -= 24;
sub_0805EC9C(this, 256, this->speed >> 4, 0);
}
}
@@ -295,7 +289,7 @@ void GreatFairy_DropletInit(Entity* this) {
void GreatFairy_DropletUpdate(Entity* this) {
GetNextFrame(this);
if (this->frames.b.f3) {
if (this->frames.all & 0x80) {
DeleteEntity(this);
}
}
@@ -312,7 +306,7 @@ void GreatFairy_RippleInit(Entity* this) {
}
void GreatFairy_RippleUpdate(Entity* this) {
if ((gRoomVars.greatFairyState & 2) != 0) {
if (gRoomVars.greatFairyState & 2) {
DeleteEntity(this);
} else {
GetNextFrame(this);
@@ -361,7 +355,7 @@ void GreatFairy_EnergyInit(Entity* this) {
void GreatFairy_EnergyUpdate(Entity* this) {
GetNextFrame(this);
if (this->frames.b.f3) {
if (this->frames.all & 0x80) {
DeleteEntity(this);
}
}
@@ -375,35 +369,25 @@ void sub_08087114(Entity* this) {
}
}
#ifdef NON_MATCHING
extern u8 gUnk_0812079C;
void sub_08087150(Entity* this) {
NONMATCH("asm/greatFairy/sub_08087150.inc", void sub_08087150(Entity* this)) {
u32 temp;
GreatFairy_InitializeAnimation();
GreatFairy_InitializeAnimation(this);
this->spriteSettings.b.draw = TRUE;
this->spriteOrientation.flipY = 0;
this->spriteRendering.b0 = 0;
this->spritePriority.b0 = 3;
this->nonPlanarMovement = 0x80;
this->speed = 128;
this->direction = 0x10;
temp = gUnk_0812079C;
temp = gUnk_0812079C[0];
this->palette.raw = ((temp & 0xf) << 4) | 0xf;
}
#else
NAKED
void sub_08087150(Entity* this) {
asm(".include \"asm/greatFairy/sub_08087150.inc\"");
}
#endif
END_NONMATCH
void nullsub_516(Entity* this) {
}
void sub_080871A8(Entity* this) {
u32 bVar1;
if (--this->actionDelay == 0) {
this->action = 3;
this->actionDelay = 60;
@@ -412,7 +396,6 @@ void sub_080871A8(Entity* this) {
}
void sub_080871D0(Entity* this) {
if (--this->actionDelay == 0) {
gRoomVars.greatFairyState |= 8;
DeleteEntity(this);
@@ -422,16 +405,16 @@ void sub_080871D0(Entity* this) {
void sub_080871F8(Entity* this) {
Entity* temp = this->attachedEntity;
if ((temp->x.HALF.HI == this->x.HALF.HI) && (temp->y.HALF.HI - 0x20 == this->y.HALF.HI)) {
if ((temp->x.HALF.HI == this->x.HALF.HI) && (temp->y.HALF.HI - 32 == this->y.HALF.HI)) {
this->action = 2;
} else {
this->direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, temp->x.HALF.HI, temp->y.HALF.HI - 0x20);
this->direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, temp->x.HALF.HI, temp->y.HALF.HI - 32);
sub_0806F69C(this);
}
}
void sub_08087240(Entity* this) {
if ((gRoomVars.greatFairyState & 4) != 0) {
if (gRoomVars.greatFairyState & 4) {
this->action = 3;
this->actionDelay = 20;
this->direction = 16;
@@ -446,7 +429,6 @@ void sub_08087264(Entity* this) {
}
void sub_0808727C(Entity* this) {
if (--this->actionDelay == 0) {
DeleteEntity(this);
}
@@ -463,7 +445,7 @@ void sub_080872AC(Entity* this) {
this->field_0x68.HWORD = this->x.HALF.HI;
this->field_0x6a.HWORD = this->y.HALF.HI;
this->direction = (u8)Random() & 0x1F;
this->nonPlanarMovement = 32;
this->speed = 32;
GreatFairy_InitializeAnimation(this);
}
@@ -477,17 +459,16 @@ void sub_080872F8(Entity* this) {
sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, (s16)this->field_0x68.HWORD, (s16)this->field_0x6a.HWORD);
this->direction = (this->direction + gUnk_081207AC[Random() & 3]) & 0x1f;
}
temp = gSineTable[this->actionDelay + 0x40];
temp = gSineTable[this->actionDelay + 64];
this->height.HALF.HI = (temp >> 6) - 8;
this->actionDelay++;
}
void GreatFairy_InitializeAnimation(Entity* this) {
s32 temp;
s32 temp = 11;
this->action = 1;
temp = this->type;
this->type2 = temp % 11;
this->type2 = this->type % temp;
this->collisionLayer = 2;
InitializeAnimation(this, this->type2);
sub_0805E3A0(this, 2);
@@ -513,7 +494,7 @@ void sub_080873D0(Entity* this) {
ent = GreatFairy_CreateForm(this, 8, 0);
if (ent != NULL) {
CopyPosition(this, ent);
this->actionDelay = 0x30;
this->actionDelay = 48;
}
}
}
@@ -524,12 +505,12 @@ void sub_080873FC(void) {
SoundReq(SFX_APPARATE);
gRoomControls.cameraTarget = NULL;
while (ent = FindEntityInListBySubtype(0x6, 0x1b, 0x6), ent != NULL) {
while (ent = FindEntityByID(0x6, 0x1b, 0x6), ent != NULL) {
DeleteEntity(ent);
}
}
void sub_08087424(Entity* arg0, struct_08087424* arg1) {
void sub_08087424(Entity* this, ScriptExecutionContext* context) {
Entity* ent;
sub_080791D0();
@@ -540,9 +521,9 @@ void sub_08087424(Entity* arg0, struct_08087424* arg1) {
sub_0805E3A0(ent, 2);
}
switch (arg1->unk4) {
switch (context->intVariable) {
case 0:
gSave.stats.arrowCount = arg1->unk4;
gSave.stats.arrowCount = 0;
break;
case 1:
gSave.stats.bombCount = 0;
@@ -550,104 +531,90 @@ void sub_08087424(Entity* arg0, struct_08087424* arg1) {
}
}
void sub_0808747C(u32 arg0, u32 arg1) {
u32 iVar1;
void sub_0808747C(Entity* this, ScriptExecutionContext* context) {
u32 iVar1 = 0;
iVar1 = (u32)FindEntityInListByForm(0x6, 0xf, 0x6, 0xb, 0x0);
iVar1 = (u32)FindEntity(0x6, 0xf, 0x6, 0xb, 0x0);
if (iVar1 != 0) {
iVar1 = 1;
}
*(u32*)(arg1 + 0x14) = iVar1;
context->condition = iVar1;
}
// clang-format off
void (*const GreatFairy_Main[])(Entity*) = {
GreatFairy_CallBehavior,
GreatFairy_CallBehavior,
GreatFairy_WingsCallBehavior,
GreatFairy_WakeCallBehavior,
GreatFairy_MiniCallBehavior,
GreatFairy_MiniAffineCallBehavior,
GreatFairy_DropletCallBehavior,
GreatFairy_RippleCallBehavior,
GreatFairy_MiniAffineCallBehavior,
GreatFairy_DropletCallBehavior,
GreatFairy_RippleCallBehavior,
GreatFairy_BigRippleCallBehavior,
GreatFairy_EnergyCallBehavior,
sub_08087114,
sub_08087294
GreatFairy_EnergyCallBehavior,
sub_08087114,
sub_08087294,
};
void (*const GreatFairy_Behaviors[])(Entity*) = {
GreatFairy_Init,
GreatFairy_DormantUpdate,
GreatFairy_CreateBigRipple,
GreatFairy_SpawningUpdate,
GreatFairy_MiniUpdate,
GreatFairy_FinalUpdate
GreatFairy_Init, GreatFairy_DormantUpdate, GreatFairy_CreateBigRipple,
GreatFairy_SpawningUpdate, GreatFairy_MiniUpdate, GreatFairy_FinalUpdate,
};
const s16 GreatFairy_RippleOffsets[10] = {
0, 0,
-32, -8,
16, 20,
24, -12,
-16, 24
0, 0, -32, -8, 16, 20, 24, -12, -16, 24,
};
void (*const GreatFairy_WingsBehaviors[])(Entity*) = {
void (*const GreatFairy_WingsBehaviors[])(Entity*) = {
GreatFairy_WingsInit,
GreatFairy_WingsUpdate,
nullsub_116
nullsub_116,
};
void (*const GreatFairy_WakeBehaviors[])(Entity*) = {
GreatFairy_WakeInit,
GreatFairy_WakeUpdate
GreatFairy_WakeUpdate,
};
void (*const GreatFairy_MiniBehaviors[])(Entity*) = {
GreatFairy_MiniInit,
GreatFairy_MiniRisingUpdate,
GreatFairy_MiniRemoveMe
GreatFairy_MiniRemoveMe,
};
void (*const GreatFairy_MiniAffineBehaviors[])(Entity*) = {
GreatFairy_MiniAffineInit,
GreatFairy_MiniAffineInit2,
GreatFairy_MiniAffineUpdate,
DeleteEntity
DeleteEntity,
};
void (*const GreatFairy_DropletBehaviors[])(Entity*) = {
GreatFairy_DropletInit,
GreatFairy_DropletUpdate
GreatFairy_DropletUpdate,
};
void (*const GreatFairy_RippleBehaviors[])(Entity*) = {
GreatFairy_RippleInit,
GreatFairy_RippleUpdate
GreatFairy_RippleUpdate,
};
void (*const GreatFairy_BigRippleBehaviors[])(Entity*) = {
GreatFairy_BigRippleInit,
GreatFairy_BigRippleUpdate
GreatFairy_BigRippleUpdate,
};
void (*const GreatFairy_EnergyBehaviors[])(Entity*) = {
GreatFairy_EnergyInit,
GreatFairy_EnergyUpdate
GreatFairy_EnergyUpdate,
};
void (*const GreatFairy_Form1Behaviors[])(Entity*) = {
sub_08087150,
nullsub_516,
sub_080871A8,
sub_080871D0
sub_080871D0,
};
void (*const GreatFairy_Form2Behaviors[])(Entity*) = {
sub_08087150,
sub_080871F8,
sub_08087240,
sub_08087264,
sub_0808727C
sub_08087150, sub_080871F8, sub_08087240, sub_08087264, sub_0808727C,
};
// clang-format on
-3
View File
@@ -4,9 +4,6 @@
#include "flags.h"
#include "functions.h"
extern void DeleteThisEntity();
extern void sub_08080CB4(Entity*);
extern u32 sub_08017850(Entity*);
static void sub_0808E6A0(Entity*);
static void sub_0808E6E4(Entity*);
static void sub_0808E714(Entity*);
+10 -11
View File
@@ -61,7 +61,7 @@ void sub_080866D8(Entity* this) {
entity->field_0x68.HWORD = prop->unk0;
entity->field_0x6a.HWORD = prop->unk2;
entity->collisionLayer = prop->unk4;
entity->previousActionFlag = prop->unk5;
entity->subAction = prop->unk5;
UpdateSpriteForCollisionLayer(entity);
*((u32*)(&this->field_0x68)) |= mask;
if (prop->unk8) {
@@ -98,7 +98,7 @@ static void sub_0808681C(Entity* this) {
this->spriteSettings.b.draw = 1;
this->frameIndex = 0;
this->hitbox = &gUnk_081206AC;
if (this->previousActionFlag == 1) {
if (this->subAction == 1) {
this->action = 2;
this->frameIndex = 1;
}
@@ -117,7 +117,7 @@ static void sub_0808681C(Entity* this) {
}
if (this->flags & 0x2) {
ExecuteScriptCommandSet(this, *(ScriptExecutionContext**)&this->cutsceneBeh);
ExecuteScript(this, *(ScriptExecutionContext**)&this->cutsceneBeh);
sub_080868EC(this, *(void**)&this->cutsceneBeh);
}
}
@@ -129,7 +129,7 @@ void sub_080868B0(Entity* this) {
this->hitbox = &gUnk_081206AC;
this->actionDelay = 8;
}
ExecuteScriptCommandSet(this, *(ScriptExecutionContext**)&this->cutsceneBeh);
ExecuteScript(this, *(ScriptExecutionContext**)&this->cutsceneBeh);
sub_080868EC(this, *(void**)&this->cutsceneBeh);
}
@@ -158,7 +158,7 @@ void sub_0808692C(Entity* this) {
this->flags &= 0xFD;
this->type2 = 2;
this->action = this->frameIndex == 0 ? 1 : 2;
this->previousActionFlag = 0;
this->subAction = 0;
this->actionDelay = 8;
}
@@ -174,11 +174,10 @@ static u8 sub_08086954(Entity* this) {
return this->actionDelay;
}
// TODO: Second arg is some unknown struct.
void sub_080869A4(Entity* entityA, u32* entityB) {
entityB[5] = 0;
if (!sub_08086954(entityA)) {
entityA->actionDelay = 8;
entityB[5] = 1;
void sub_080869A4(Entity* this, ScriptExecutionContext* context) {
context->condition = 0;
if (!sub_08086954(this)) {
this->actionDelay = 8;
context->condition = 1;
}
}
+6 -6
View File
@@ -142,8 +142,8 @@ static void sub_080810A8(Entity* this) {
sub_080814A4(this);
if (this->direction & 0x80) {
this->direction &= 0x1F;
if (this->nonPlanarMovement == 0) {
this->nonPlanarMovement = 0x100;
if (this->speed == 0) {
this->speed = 0x100;
}
} else {
this->direction |= 0xFF;
@@ -163,7 +163,7 @@ static void sub_080810FC(Entity* this) {
sub_08081598(this);
} else {
this->action = 2;
this->previousActionFlag = 0;
this->subAction = 0;
this->flags |= 0x80;
this->flags2 = 0x11;
CopyPosition(&gPlayerEntity, this);
@@ -260,7 +260,7 @@ void sub_080812A0(Entity* this) {
void sub_080812A8(Entity* this) {
if (sub_080002D0(this) != 0xF && this->field_0x6e.HWORD != GetTileTypeByEntity(this)) {
this->direction = 0;
this->nonPlanarMovement = 0;
this->speed = 0;
this->spriteSettings.b.draw = 1;
this->field_0x68.HALF.HI = 0;
sub_080810A8(this);
@@ -305,11 +305,11 @@ void sub_0808136C(Entity* this) {
}
static void sub_080813BC(Entity* this) {
gUnk_0811E840[this->previousActionFlag](this);
gUnk_0811E840[this->subAction](this);
}
void sub_080813D4(Entity* this) {
this->previousActionFlag = 1;
this->subAction = 1;
this->field_0x1d = 1;
this->spriteSettings.b.draw = 1;
}
+1 -1
View File
@@ -2,9 +2,9 @@
#include "entity.h"
#include "flags.h"
#include "room.h"
#include "functions.h"
extern void sub_080A0960(Entity*, u32);
extern void SoundReq(u32);
extern void sub_0801AF18(u8*, u32, u32);
extern void (*const gUnk_08124950[])(Entity*);
-3
View File
@@ -7,10 +7,7 @@
extern void sub_0809EB30(Entity*);
extern void sub_0809EAD8(Entity*);
extern void sub_0809EABC(Entity*);
extern void EnqueueSFX(u32);
extern void sub_080A2CC0(Entity*, Entity**, u16*);
extern void SetTile(u32, u32, u32);
extern void sub_0806F69C(Entity*);
extern void (*const gUnk_081243B4[])(Entity*);
extern void (*const gUnk_081243BC[])(Entity*);
+2 -1
View File
@@ -1,7 +1,8 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
#include "player.h"
#include "random.h"
#include "functions.h"
extern void sub_080A2CC0(Entity*, Entity**, u16*);
+7 -16
View File
@@ -2,26 +2,17 @@
#include "entity.h"
#include "room.h"
#include "random.h"
extern Entity gPlayerEntity;
extern u16 gScreenTransition[];
#include "structures.h"
#include "player.h"
#include "flags.h"
#include "functions.h"
extern void (*MaskActionFuncs[])(Entity*);
extern void DeleteThisEntity();
extern bool32 CheckFlags(u16);
extern void SetFlag(u16);
extern void ClearFlag(u16);
extern void SetTile(u32, u16, u32);
extern void sub_08000148(u16, u16, u32);
extern s16 sub_080001DA(u16, u32);
extern u16 sub_080002E0(u16, u32);
extern void EnqueueSFX(u32);
extern void sub_080044EC(Entity*, u16);
extern void sub_0805457C(Entity*, s32);
void Mask(Entity* this) {
@@ -35,7 +26,7 @@ void sub_080929A4(Entity* this) {
switch (this->type2 & 0xC0) {
case 0x40:
field_0x0a = gScreenTransition[0x5];
field_0x0a = gScreenTransition.field_0xa;
switch (field_0x0a) {
case 0x44D ... 0x44F:
@@ -69,7 +60,7 @@ void sub_080929A4(Entity* this) {
this->field_0x7a.HWORD = sub_080002E0(this->field_0x7c.HALF.HI, 1);
SetTile(0x4022, this->field_0x7c.HALF.HI, 1);
SetTile(0x4022, this->field_0x7c.HALF_U.HI, 1);
}
// Probably related to knocking it down
@@ -94,7 +85,7 @@ void sub_08092A94(Entity* this) {
}
// Presumably, make the mask fall
SetTile((u16)this->field_0x7c.HALF.LO, this->field_0x7c.HALF.HI, 1);
SetTile(this->field_0x7c.HALF_U.LO, this->field_0x7c.HALF_U.HI, 1);
sub_08000148(this->field_0x7a.HWORD, this->field_0x7c.HALF.HI, 1);
+2 -5
View File
@@ -2,15 +2,12 @@
#include "entity.h"
#include "room.h"
#include "flags.h"
#include "functions.h"
extern u32 sub_08083734(Entity*, u32);
extern void sub_080A080C(Entity*);
extern void sub_0806F69C(Entity*);
extern void EnqueueSFX(u32);
extern void sub_080A0870(Entity*);
extern void SoundReq(u32);
extern u32 sub_080001DA(u32, u32);
extern void SetTile(u32, u32, u32);
extern void (*const gUnk_0812493C[])(Entity*);
@@ -25,7 +22,7 @@ void sub_080A0684(Entity* this) {
DeleteThisEntity();
}
this->action = 1;
this->nonPlanarMovement = 0x300;
this->speed = 0x300;
this->spriteSettings.b.draw = 0;
this->frameIndex = 0;
this->spriteSettings.b.flipY = 1;
+4 -5
View File
@@ -8,7 +8,6 @@ extern u32 sub_08091DDC(Entity*);
extern u32 sub_080002B4(Entity*, u32, u32);
extern u32 sub_08007DD6(u32, u32);
extern void sub_08017744(Entity*);
extern u32 sub_080002B8(Entity*);
extern void sub_08091C0C(Entity*);
typedef struct {
@@ -52,7 +51,7 @@ void sub_080916EC(Entity* this) {
this->field_0x40 = 0x44;
this->flags2 = 0x80;
this->direction = DirectionFromAnimationState(this->animationState);
this->nonPlanarMovement = 0x700;
this->speed = 0x700;
this->spritePriority.b1 = 3;
InitAnimationForceUpdate(this, this->type2 + 4 + this->animationState);
SetTile(0x4022, COORD_TO_TILE(this), this->collisionLayer);
@@ -82,7 +81,7 @@ void sub_080917DC(Entity* this) {
gPlayerState.jumpStatus = 0x81;
gPlayerState.flags.all |= 0x4000000;
gPlayerEntity.field_0x20 = 0x20000;
gPlayerEntity.nonPlanarMovement = 0x100;
gPlayerEntity.speed = 0x100;
gPlayerEntity.flags &= 0x7f;
ResetPlayer();
sub_0807A108();
@@ -144,7 +143,7 @@ void sub_080919AC(Entity* this) {
}
} else {
this->flags = this->flags | 0x80;
gPlayerEntity.nonPlanarMovement = 0;
gPlayerEntity.speed = 0;
sub_0806F69C(this);
CopyPosition(this, &gPlayerEntity);
gPlayerEntity.spritePriority.b0 = this->spritePriority.b0 - 1;
@@ -177,7 +176,7 @@ void sub_080919AC(Entity* this) {
gPlayerState.jumpStatus = 0x41;
gPlayerState.flags.all = (gPlayerState.flags.all ^ 0x1000) | 0x4000000;
gPlayerEntity.field_0x20 = 0x20000;
gPlayerEntity.nonPlanarMovement = 0x200;
gPlayerEntity.speed = 0x200;
gPlayerEntity.animationState = this->animationState << 1;
gPlayerEntity.direction = this->direction;
gPlayerEntity.flags |= 0x80;
+15
View File
@@ -0,0 +1,15 @@
#include "global.h"
#include "entity.h"
#include "game.h"
void MinishSizedArchway(Entity* this) {
if (this->action == 0) {
this->action = 1;
this->frameIndex = this->type;
this->collisionLayer = 2;
UpdateSpriteForCollisionLayer(this);
if (CheckIsDungeon()) {
this->spritePriority.b0 = 1;
}
}
}
+19 -3
View File
@@ -1,11 +1,13 @@
#include "global.h"
#include "entity.h"
#include "game.h"
#include "player.h"
#include "functions.h"
extern bool32 CheckIsDungeon();
extern void sub_080AE068(Entity*);
extern void LoadFixedGFX(Entity*, u32);
extern void DoExitTransition(void*);
extern void (*const gUnk_08122254[])(Entity*);
extern u16 gUnk_0812225C[];
void MinishSizedEntrance(Entity* this) {
gUnk_08122254[this->action](this);
@@ -22,3 +24,17 @@ void sub_08090EC0(Entity* this) {
LoadFixedGFX(this, 0x184);
}
}
void sub_08090F00(Entity* this) {
if (this->type == 1) {
Entity* parent = this->parent;
u32 mask = 1 << this->field_0xf;
if (!(parent->field_0x20 & mask)) {
DeleteThisEntity();
}
}
if ((gPlayerState.flags.all & 0x80) && sub_080041A0(this, &gPlayerEntity, 4, 4) &&
(gPlayerEntity.height.HALF.HI == 0) && (((u16)gPlayerState.field_0x90.HALF.LO) & gUnk_0812225C[this->type2])) {
DoExitTransition((Entity*)GetCurrentRoomProperty(this->actionDelay));
}
}
+2 -1
View File
@@ -1,5 +1,6 @@
#include "global.h"
#include "entity.h"
#include "random.h"
#include "functions.h"
extern void sub_08086A6C();
@@ -54,5 +55,5 @@ void sub_08086A6C(Entity* ent) {
uVar1 = Random();
ent->field_0x20 = 163840;
ent->direction = (uVar1 >> 16) & 31;
ent->nonPlanarMovement = uVar1 & 480;
ent->speed = uVar1 & 480;
}
-1
View File
@@ -2,7 +2,6 @@
#include "entity.h"
extern u32 CheckRectOnScreen(s16, s16, u32, u32);
extern void DeleteThisEntity();
void Object1C(Entity* this) {
s32 iVar1;
-2
View File
@@ -1,8 +1,6 @@
#include "global.h"
#include "entity.h"
void DeleteThisEntity();
extern void (*gUnk_081208A0[])(Entity*);
void Object1D(Entity* this) {
+1 -1
View File
@@ -31,7 +31,7 @@ void sub_08089B18(Entity* this) {
case 4:
if (!CheckFlags(this->field_0x86.HWORD)) {
this->spriteSettings.b.draw = FALSE;
this->previousActionFlag = 1;
this->subAction = 1;
return;
}
}
+3 -4
View File
@@ -2,7 +2,7 @@
#include "audio.h"
#include "entity.h"
#include "functions.h"
#include "position.h"
#include "coord.h"
#include "random.h"
#include "structures.h"
@@ -12,7 +12,6 @@ static void sub_0808F244(Entity*);
extern void sub_0806FCF4(Entity*, u32, u32, u32);
extern void sub_0808F5EC(Entity*);
extern bool32 sub_0806F3E4(Entity*);
extern void (*const gUnk_08121E5C[])(Entity*);
extern void (*const gUnk_08121E88[])(Entity*);
@@ -151,13 +150,13 @@ void sub_0808F2C0(Entity* this) {
void sub_0808F370(Entity* this) {
if (this->action == 0) {
if (this->parent->previousActionFlag == 1) {
if (this->parent->subAction == 1) {
this->action = 1;
this->field_0x70.WORD = 0;
sub_0808F5EC(this);
}
} else {
u8 flag = this->parent->previousActionFlag - 1;
u8 flag = this->parent->subAction - 1;
if (flag < 5) {
if (this->field_0x70.WORD == 0) {
if (--(*(u32*)&this->field_0x74) == -1) {
+1 -1
View File
@@ -1,6 +1,6 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
#include "coord.h"
void Object7E(Entity* this) {
+6 -5
View File
@@ -1,9 +1,10 @@
#include "global.h"
#include "entity.h"
#include "coord.h"
#include "player.h"
#include "flags.h"
#include "functions.h"
extern u32 sub_080041A0(Entity*, Entity*, u32, u32);
void sub_08099ECC(Entity*);
extern void sub_0805E4E0(Entity*, u32);
extern void sub_0805B390(u32);
@@ -18,7 +19,7 @@ void sub_08099DD0(Entity* this) {
this->collisionLayer = 1;
this->spriteRendering.b3 = 3;
this->spritePriority.b0 = 7;
this->previousActionFlag = 0;
this->subAction = 0;
if (GetInventoryValue(0x46)) {
this->action = 4;
this->frameIndex = 0;
@@ -31,7 +32,7 @@ void sub_08099DD0(Entity* this) {
void sub_08099E10(Entity* this) {
if (CheckLocalFlag(0x74)) {
GetNextFrame(this);
if ((this->frames.all == 1) && (this->previousActionFlag == 0)) {
if ((this->frames.all == 1) && (this->subAction == 0)) {
this->frames.all = 0;
sub_08099ECC(this);
}
@@ -56,7 +57,7 @@ void sub_08099E58(Entity* this) {
void sub_08099E8C(Entity* this) {
if (sub_080041A0(this, &gPlayerEntity, 0xc, 0xc)) {
if (this->previousActionFlag == 0) {
if (this->subAction == 0) {
sub_08099ECC(this);
sub_0805E4E0(this, 0x1e);
}
@@ -70,7 +71,7 @@ void nullsub_534(Entity* this) {
}
void sub_08099ECC(Entity* this) {
this->previousActionFlag = 1;
this->subAction = 1;
CopyPosition(this, &gPlayerEntity);
gPlayerState.playerAction = 3;
gPlayerState.field_0x34[4] = 0;
+2 -2
View File
@@ -1,11 +1,11 @@
#include "global.h"
#include "entity.h"
#include "coord.h"
#include "room.h"
#include "functions.h"
extern Hitbox gUnk_080FD168;
extern void SetTile(u32, u32, u32);
void Object9E(Entity* this) {
Entity* ent;
u32 tilePos;
+1
View File
@@ -2,6 +2,7 @@
#include "entity.h"
#include "room.h"
#include "flags.h"
#include "createObject.h"
#include "functions.h"
extern Hitbox gUnk_080FD170;
+2 -1
View File
@@ -1,6 +1,7 @@
#include "global.h"
#include "object.h"
#include "menu.h"
#include "random.h"
#include "structures.h"
#include "functions.h"
@@ -105,6 +106,6 @@ void sub_0809F448(Entity* this) {
tmp += -0x80000 + (rand & 0xFFFFF);
break;
}
this->nonPlanarMovement = (tmp > 0 ? tmp : -tmp) / (tmp2->unk_1 << 8);
this->speed = (tmp > 0 ? tmp : -tmp) / (tmp2->unk_1 << 8);
this->direction = sub_080045DA(tmp, 0) >> 3;
}
+2 -6
View File
@@ -1,14 +1,10 @@
#include "global.h"
#include "entity.h"
extern Entity* CreateItemEntity(u32, u32, u32);
extern void DeleteThisEntity();
extern void sub_08080CB4(Entity*);
#include "player.h"
#include "functions.h"
extern void (*gUnk_08124824[])(Entity*);
extern Entity gPlayerEntity;
void ObjectA8(Entity* this) {
if ((this->bitfield & 0x80) != 0) {
switch (this->bitfield & 0x7f) {
+1
View File
@@ -1,5 +1,6 @@
#include "global.h"
#include "entity.h"
#include "coord.h"
extern void sub_080A0640(Entity*);
+3 -3
View File
@@ -1,7 +1,7 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
extern void sub_0806F69C(Entity*);
extern u32 sub_080AE4CC(Entity*, u32, u32, u32);
extern void* gUnk_02027EB4;
@@ -22,12 +22,12 @@ void ObjectB2(Entity* this) {
this->attachedEntity = pEVar3;
InitializeAnimation(this, this->type);
}
this->nonPlanarMovement = this->parent->nonPlanarMovement;
this->speed = this->parent->speed;
sub_0806F69C(this);
if (sub_080AE4CC(this->attachedEntity, this->x.HALF.HI, this->y.HALF.HI, 9) != 0) {
DeleteThisEntity();
}
if (this->nonPlanarMovement < 0x41) {
if (this->speed < 0x41) {
this->spriteSettings.b.draw ^= 1;
if (--this->actionDelay == 0) {
+2 -3
View File
@@ -1,10 +1,9 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
#include "flags.h"
#include "createObject.h"
extern u32 ReadBit(u32*, u32);
extern void DeleteThisEntity();
extern u32 CheckLocalFlag(u32);
extern u32 gUnk_020342F8;
extern u16 gUnk_08125050[];
+9 -11
View File
@@ -16,10 +16,8 @@ extern void (*const gUnk_0811F0C4[])(Entity*);
extern Hitbox gUnk_080FD338; // TODO: should be const
extern Hitbox gUnk_080FD340; // TODO: should be const
extern u32 sub_08016A30(Entity*);
extern u32 sub_080001DA(u32, u32);
extern void sub_08078930(Entity*);
extern u32 sub_080002B8(Entity*);
extern void sub_08016A6C(Entity*);
void Pot(Entity* this) {
@@ -34,7 +32,7 @@ void sub_0808222C(Entity* this) {
this->action = 1;
this->hitbox = &gUnk_080FD338;
this->nonPlanarMovement = 0x80;
this->speed = 0x80;
this->y.HALF.HI += 3;
this->field_0x16 = 0;
this->flags |= 0x80;
@@ -62,7 +60,7 @@ void sub_08082310(Entity* this) {
switch (var0) {
case 0x13:
this->action = 3;
this->previousActionFlag = 0;
this->subAction = 0;
break;
case 0x1D:
SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
@@ -86,7 +84,7 @@ void sub_08082310(Entity* this) {
this->actionDelay = 32;
this->action = 4;
if (gPlayerState.flags.all & 0x80) {
this->nonPlanarMovement >>= 1;
this->speed >>= 1;
this->actionDelay = 64;
}
SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
@@ -114,7 +112,7 @@ void sub_08082310(Entity* this) {
}
void sub_080824F8(Entity* this) {
gUnk_0811F0A8[this->previousActionFlag](this);
gUnk_0811F0A8[this->subAction](this);
}
void sub_08082510(Entity* this) {
@@ -125,7 +123,7 @@ void sub_08082510(Entity* this) {
this->flags2 = gPlayerEntity.flags2;
this->spriteOffsetY = 0;
SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
this->previousActionFlag++;
this->subAction++;
}
void nullsub_511(Entity* this) {
@@ -166,7 +164,7 @@ void sub_080825F0(Entity* this) {
static void sub_08082608(Entity* this) {
this->action = 1;
this->previousActionFlag = 0;
this->subAction = 0;
}
void sub_08082614(Entity* this) {
@@ -185,7 +183,7 @@ void sub_08082614(Entity* this) {
this->action = 1;
if (gPlayerState.flags.all & 0x80) {
this->nonPlanarMovement <<= 1;
this->speed <<= 1;
}
this->field_0x70.HALF.LO = sub_080001DA(COORD_TO_TILE(this), this->collisionLayer);
@@ -203,11 +201,11 @@ void sub_08082614(Entity* this) {
}
void sub_080826E4(Entity* this) {
gUnk_0811F0C4[this->previousActionFlag](this);
gUnk_0811F0C4[this->subAction](this);
}
void sub_080826FC(Entity* this) {
this->previousActionFlag = 1;
this->subAction = 1;
this->field_0x1d = 48;
this->actionDelay = 0;
}
+1 -2
View File
@@ -2,13 +2,12 @@
#include "entity.h"
#include "room.h"
#include "flags.h"
#include "functions.h"
extern u32* GetLayerByIndex(u32);
extern void sub_08085394(Entity*);
extern void sub_0808543C(Entity*);
extern void EnqueueSFX(u32);
extern u32 sub_080854A8(Entity*);
extern void SetTile(u32, u32, u32);
extern void (*const gUnk_081205D0[])(Entity*);
+2 -3
View File
@@ -1,9 +1,8 @@
#include "global.h"
#include "entity.h"
#include "random.h"
#include "functions.h"
extern void sub_0806F69C(Entity*);
extern void (*const gUnk_08121060[])(Entity*);
extern void (*const gUnk_08121070[])(Entity*);
@@ -37,7 +36,7 @@ void sub_0808A46C(Entity* this) {
void sub_0808A484(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = TRUE;
this->nonPlanarMovement = 0x40;
this->speed = 0x40;
this->direction = 6;
this->spriteRendering.b3 = 1;
this->spritePriority.b0 = 0;
+1 -5
View File
@@ -1,10 +1,6 @@
#include "global.h"
#include "entity.h"
extern void InitializeAnimation(Entity*, u32);
extern void SoundReq(u32);
extern void DeleteThisEntity();
extern void GetNextFrame(Entity*);
#include "functions.h"
extern void (*const ThoughtBubble_Behaviors[])(Entity*);
+3 -5
View File
@@ -4,19 +4,17 @@
#include "flags.h"
#include "player.h"
#include "room.h"
#include "structures.h"
#include "functions.h"
extern void sub_0809E96C(Entity*);
extern u32 sub_0800419C(Entity*, Entity*, u32, u32);
extern void CreateSparkle(Entity*);
extern u32 sub_0809E9A0(void);
extern void sub_08078A90(u32);
extern void sub_0809E918(Entity*);
extern void SoundReq(u32);
extern void CreateMinishEntrance(u32 tile);
extern void (*const gUnk_08124354[])(Entity*);
extern u32 gScreenTransition;
extern s16 gUnk_08124364[];
void TreeHidingPortal(Entity* this) {
@@ -37,7 +35,7 @@ void sub_0809E86C(Entity* this) {
if (sub_0800419C(this, &gPlayerEntity, 0x30, 0x30)) {
if (CheckGlobalFlag(EZERO_1ST)) {
if (((gScreenTransition & 3) == 0)) {
if (((gScreenTransition.frameCount & 3) == 0)) {
CreateSparkle(this);
}
}
+1 -5
View File
@@ -2,11 +2,7 @@
#include "entity.h"
#include "room.h"
#include "player.h"
void SetTile(u32 tileIndex, s32 tilePosition, s32 layerIndex);
s32 GetTileType(s32 tilePosition, s32 layerIndex);
void sub_08078B48();
void DeleteThisEntity();
#include "functions.h"
extern void (*gUnk_08124C08[])(Entity*);
+1 -1
View File
@@ -1,6 +1,6 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
#include "random.h"
void WindTribeFlag(Entity* this) {
if (this->action == 0) {
+2 -7
View File
@@ -1,15 +1,10 @@
#include "global.h"
#include "audio.h"
#include "entity.h"
#include "functions.h"
#include "save.h"
#include "script.h"
extern void sub_0807DD64(Entity*);
extern void sub_0807DDE4(Entity*);
extern void sub_08078850(Entity*, u32, u32, u8*);
extern void SoundReq(u32);
extern Entity* CreateFx(Entity*, u32, u32);
extern u8 gUnk_08125010;
@@ -19,8 +14,8 @@ void Windcrest(Entity* this) {
this->frameIndex = 0;
sub_0807DD64(this);
}
sub_0807DDAC(this, NULL);
sub_0807DDE4(this);
ExecuteScriptForEntity(this, NULL);
HandleEntity0x82Actions(this);
}
void sub_080A2124(Entity* this) {