mirror of
https://github.com/zeldaret/tmc
synced 2026-08-19 22:02:40 -04:00
Merge branch 'master' into cleanup_declarations
This commit is contained in:
+15
-14
@@ -6,6 +6,7 @@
|
||||
#include "flags.h"
|
||||
#include "save.h"
|
||||
#include "random.h"
|
||||
#include "script.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
|
||||
@@ -160,21 +161,21 @@ 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;
|
||||
iVar1 = this->speed -= 32;
|
||||
if (iVar1 * 65536 >> 16 == 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,7 +262,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);
|
||||
}
|
||||
@@ -276,7 +277,7 @@ void GreatFairy_MiniAffineUpdate(Entity* this) {
|
||||
this->action = 3;
|
||||
sub_0805EC60(this);
|
||||
} else {
|
||||
iVar2 = this->nonPlanarMovement -= 24;
|
||||
iVar2 = this->speed -= 24;
|
||||
sub_0805EC9C(this, 256, iVar2 * 0x10000 >> 20, 0);
|
||||
}
|
||||
}
|
||||
@@ -387,7 +388,7 @@ void sub_08087150(Entity* this) {
|
||||
this->spriteOrientation.flipY = 0;
|
||||
this->spriteRendering.b0 = 0;
|
||||
this->spritePriority.b0 = 3;
|
||||
this->nonPlanarMovement = 0x80;
|
||||
this->speed = 0x80;
|
||||
this->direction = 0x10;
|
||||
temp = gUnk_0812079C;
|
||||
this->palette.raw = ((temp & 0xf) << 4) | 0xf;
|
||||
@@ -464,7 +465,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);
|
||||
}
|
||||
|
||||
@@ -530,7 +531,7 @@ void sub_080873FC(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08087424(Entity* arg0, struct_08087424* arg1) {
|
||||
void sub_08087424(Entity* this, ScriptExecutionContext* context) {
|
||||
Entity* ent;
|
||||
|
||||
sub_080791D0();
|
||||
@@ -541,9 +542,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;
|
||||
@@ -551,14 +552,14 @@ 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);
|
||||
if (iVar1 != 0) {
|
||||
iVar1 = 1;
|
||||
}
|
||||
*(u32*)(arg1 + 0x14) = iVar1;
|
||||
context->condition = iVar1;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
|
||||
Reference in New Issue
Block a user