This commit is contained in:
theo3
2022-03-27 00:19:10 -07:00
212 changed files with 13172 additions and 18396 deletions
+2 -2
View File
@@ -127,7 +127,7 @@ void sub_080675D4(Entity* this) {
for (i = 0; i < 9; i++, gUnk++) {
Entity* ent = CreateFx(this, FX_DEATH, 0);
if (ent) {
if (ent != NULL) {
ent->x.HALF.HI += gUnk->x;
ent->y.HALF.HI += gUnk->y;
ent->z.HALF.HI = subAction;
@@ -140,7 +140,7 @@ void sub_080675D4(Entity* this) {
gUnk = gUnk_08110E8A;
for (i = 0; i < 4; i++, gUnk++) {
Entity* ent = CreateFx(this, FX_ROCK, 0);
if (ent) {
if (ent != NULL) {
ent->x.HALF.HI = gUnk->x + ent->x.HALF.HI;
ent->y.HALF.HI = gUnk->y + ent->y.HALF.HI;
ent->z.HALF.HI = subAction;
+5 -4
View File
@@ -1,4 +1,5 @@
#include "entity.h"
#include "collision.h"
#include "functions.h"
#include "npc.h"
#include "item.h"
@@ -143,17 +144,17 @@ void sub_08069D54(Entity* this) {
if (this->x.HALF.HI < this->field_0x6e.HWORD) {
this->x.HALF.HI = this->field_0x6e.HWORD + 1;
collisions = 0xe00;
collisions = COL_WEST_ANY;
} else if (this->x.HALF.HI > this->field_0x6c.HWORD) {
this->x.HALF.HI = this->field_0x6c.HWORD - 1;
collisions = 0xe000;
collisions = COL_EAST_ANY;
}
if (this->y.HALF.HI < this->field_0x70.HALF_U.LO) {
this->y.HALF.HI = this->field_0x70.HALF_U.LO + 1;
collisions = 0xe;
collisions = COL_NORTH_ANY;
} else if (this->y.HALF.HI > this->field_0x70.HALF_U.HI) {
this->y.HALF.HI = this->field_0x70.HALF_U.HI - 1;
collisions = 0xe0;
collisions = COL_SOUTH_ANY;
}
sub_0800417E(this, collisions);
sub_08069F6C(this);
+1 -1
View File
@@ -77,7 +77,7 @@ void sub_08069654(Entity* this) {
void sub_08069660(Entity* this) {
MessageNoOverlap(0x2c1c, this);
gMessage.field_0x10 = (u16)GoronMerchant_GetSalePrice(this);
gMessage.rupees = (u16)GoronMerchant_GetSalePrice(this);
}
void sub_08069684(void) {
+43 -44
View File
@@ -270,15 +270,18 @@ void sub_080627E8(Entity* this, ScriptExecutionContext* context) {
RestorePrevTileEntity(0x64d, 1);
}
NONMATCH("asm/non_matching/kid/Kid_Head.inc", void Kid_Head(Entity* this)) {
s32 iVar1;
void Kid_Head(Entity* this) {
u32 uVar1;
u32 uVar2;
u32 uVar3;
u32 uVar4;
u32 uVar5;
u8* ptr;
iVar1 = (u32)this->type * 4;
uVar3 = ((u8)this->frame & 0x1f) + (u32)gUnk_0810C0A0[iVar1];
uVar4 = (this->frameIndex & 0x1f) + (u32)gUnk_0810C0A0[iVar1 + 1];
uVar1 = this->type * 4;
ptr = &gUnk_0810C0A0[uVar1];
uVar3 = ((u8)this->frame & 0x1f) + ptr[0];
uVar4 = (this->frameIndex & 0x1f) + ptr[1];
switch (this->type) {
case 0:
case 1:
@@ -290,19 +293,20 @@ NONMATCH("asm/non_matching/kid/Kid_Head.inc", void Kid_Head(Entity* this)) {
if (uVar2 != 0) {
uVar2 = uVar2 + 0x50;
}
uVar2--;
SetExtraSpriteFrame(this, 0, uVar3);
SetExtraSpriteFrame(this, 1, uVar4);
SetExtraSpriteFrame(this, 2, uVar2 - 1);
SetExtraSpriteFrame(this, 2, uVar2);
SetSpriteSubEntryOffsetData1(this, 1, 0);
SetSpriteSubEntryOffsetData2(this, 1, 2);
sub_0807000C(this);
break;
case 6:
uVar2 = this->frameSpriteSettings & 0xf;
uVar5 = this->frameSpriteSettings & 0xf;
if ((this->frameSpriteSettings & 0xf) != 0) {
uVar2 = uVar2 + 0x93;
uVar5 = uVar5 + 0x93;
}
SetExtraSpriteFrame(this, 0, uVar2 - 1);
SetExtraSpriteFrame(this, 0, uVar5 - 1);
SetExtraSpriteFrame(this, 1, uVar3);
SetExtraSpriteFrame(this, 2, uVar4);
SetSpriteSubEntryOffsetData1(this, 2, 1);
@@ -320,10 +324,9 @@ NONMATCH("asm/non_matching/kid/Kid_Head.inc", void Kid_Head(Entity* this)) {
break;
}
}
END_NONMATCH
NONMATCH("asm/non_matching/kid/sub_08062948.inc", void sub_08062948(Entity* this, ScriptExecutionContext* context)) {
u8 bVar1;
void sub_08062948(Entity* this, ScriptExecutionContext* context) {
s32 bVar1;
u16 uVar2;
u32 uVar3;
s32 iVar4;
@@ -332,64 +335,60 @@ NONMATCH("asm/non_matching/kid/sub_08062948.inc", void sub_08062948(Entity* this
context->unk_18 += 1;
context->unk_12 = (Random() & 0x3f) + 0x20;
uVar3 = Random() & 0x18;
bVar1 = this->direction;
if (bVar1 != 8) {
if (bVar1 >= 9) {
if (bVar1 == 0x10) {
if (uVar3 == 0) {
uVar3 = 0x18;
}
} else {
if ((bVar1 == 0x18) && (uVar3 == 8)) {
uVar3 = 0;
}
}
} else {
if ((bVar1 == 0) && (uVar3 == 0x10)) {
switch (this->direction) {
case 0:
if (uVar3 == 0x10) {
uVar3 = 8;
}
}
} else {
if (uVar3 == 0x18) {
uVar3 = 0x10;
}
break;
case 0x8:
if (uVar3 == 0x18) {
uVar3 = 0x10;
}
break;
case 0x10:
if (uVar3 == 0) {
uVar3 = 0x18;
}
break;
case 0x18:
if ((uVar3 == 8)) {
uVar3 = 0;
}
}
this->direction = (u8)uVar3;
uVar3 = sub_0806F5B0(uVar3);
this->animationState = (u8)uVar3;
this->animationState = sub_0806F5B0(uVar3);
this->speed = 0x80;
}
uVar3 = (this->animationState >> 1) + 4;
if (uVar3 != this->animIndex) {
InitializeAnimation(this, uVar3);
this->field_0x80.HALF.LO = (u16)this->animIndex;
this->field_0x80.HWORD = (u16)this->animIndex;
}
ProcessMovement0(this);
iVar4 = this->x.HALF.HI - this->field_0x6c.HALF.LO;
iVar4 = this->x.HALF.HI - (s16)this->field_0x6c.HWORD;
if (0x10 < iVar4) {
this->x.HALF.HI = this->field_0x6c.HALF.LO + 0x10;
this->x.HALF.HI = this->field_0x6c.HWORD + 0x10;
context->unk_12 = 1;
}
if (iVar4 < -0x10) {
this->x.HALF.HI = this->field_0x6c.HALF.LO + -0x10;
this->x.HALF.HI = this->field_0x6c.HWORD - 0x10;
context->unk_12 = 1;
}
iVar4 = this->y.HALF.HI - this->field_0x6e.HALF.LO;
iVar4 = this->y.HALF.HI - (s16)this->field_0x6e.HWORD;
if (0x10 < iVar4) {
this->y.HALF.HI = this->field_0x6e.HALF.LO + 0x10;
this->y.HALF.HI = this->field_0x6e.HWORD + 0x10;
context->unk_12 = 1;
}
if (iVar4 < -0x10) {
this->y.HALF.HI = this->field_0x6e.HALF.LO + -0x10;
this->y.HALF.HI = this->field_0x6e.HWORD - 0x10;
context->unk_12 = 1;
}
uVar2 = context->unk_12 - 1;
context->unk_12 = uVar2;
if (uVar2 != 0) {
if (--context->unk_12 != 0) {
gActiveScriptInfo.commandSize = 0;
}
}
END_NONMATCH
void sub_08062A48(Entity* this, ScriptExecutionContext* context) {
this->field_0x6a.HALF.LO = sub_0801E99C(this);
+1 -1
View File
@@ -12,7 +12,7 @@ void sub_0806EABC(Entity* this);
void sub_0806EABC(Entity* this, u32 param);
#endif
extern u32 gUnk_081146B8;
extern Font gUnk_081146B8;
extern s8 gUnk_081145E4[];
void Phonograph(Entity* this) {
+2 -2
View File
@@ -175,7 +175,7 @@ void sub_0806E140(PicolyteBottleEntity* this, ScriptExecutionContext* context) {
MessageFromTarget(0x421b);
} else {
MessageFromTarget(0x4218);
gMessage.field_0x10 = this->unk76;
gMessage.rupees = this->unk76;
}
} else {
context->condition = 0;
@@ -201,7 +201,7 @@ void sub_0806E1FC(PicolyteBottleEntity* this) {
void sub_0806E20C(void) {
if (gRoomTransition.field_0x6 != 0) {
MessageFromTarget(0x421f);
gMessage.field_0x10 = gRoomTransition.field_0x6;
gMessage.rupees = gRoomTransition.field_0x6;
} else {
MessageFromTarget(0x4220);
}
+1 -1
View File
@@ -66,7 +66,7 @@ void sub_080650CC(Entity* this) {
MessageNoOverlap(confirmMsgId, this);
//! @bug itemPrice (r8) is not initialized if gRoomVars.shopItemType == 0
gMessage.field_0x10 = (u16)itemPrice;
gMessage.rupees = (u16)itemPrice;
} else if ((this->frame & 0x40)) {
InitializeAnimation(this, gUnk_0810FDB8[Random() & 0xf]);
} else {
+2 -2
View File
@@ -117,7 +117,7 @@ void sub_08064EE8(Entity* this) {
}
fxEnt = CreateFx(this, confettiFx, 0);
if (fxEnt && bVar1 == 2) {
if ((fxEnt != NULL) && (bVar1 == 2)) {
fxEnt->spriteSettings.flipX = 1;
}
}
@@ -171,7 +171,7 @@ void sub_08064F28(Entity* this, ScriptExecutionContext* context) {
}
MessageNoOverlap(TingleSiblings_MessageIndices[this->type][uVar5], this);
if (iVar4 > 0) {
gMessage.field_0x10 = (u16)iVar4;
gMessage.rupees = (u16)iVar4;
}
if (CheckRoomFlag(roomFlag) == 0) {