Split item files

This commit is contained in:
octorock
2021-06-11 12:22:15 +02:00
parent 3664b4a37b
commit fd640407bb
133 changed files with 7919 additions and 10287 deletions
+39 -1
View File
@@ -122,7 +122,45 @@ ASM_FUNC("asm/non_matching/bigGoron/sub_0806D138.inc", void sub_0806D138(u8* par
ASM_FUNC("asm/non_matching/bigGoron/sub_0806D164.inc", void sub_0806D164(Entity* this))
ASM_FUNC("asm/non_matching/bigGoron/sub_0806D1D0.inc", void sub_0806D1D0(Entity* this))
void sub_0806D1D0(Entity* this) {
if (this->action == 0) {
if (sub_0806D00C(this) == NULL) {
DeleteThisEntity();
}
this->action = 1;
this->spriteOrientation.flipY = 3;
this->spriteRendering.b3 = 3;
this->spritePriority.b0 = 7;
this->spriteSettings.b.draw = 3;
this->frameIndex = 0;
this->actionDelay = 0x1e;
sub_0805E3A0(this, 2);
}
switch (this->subAction) {
case 0:
default:
if (--this->actionDelay == 0) {
this->actionDelay = (Random() & 0x7f) + 0x30;
this->field_0xf = 8;
this->frameIndex = 1;
}
if (this->field_0xf != 0) {
if (--this->field_0xf == 0) {
this->frameIndex = 0;
}
}
break;
case 1:
this->frameIndex = this->subAction;
break;
case 2:
this->spriteSettings.b.draw = 0;
break;
}
this->x.HALF.HI = this->parent->x.HALF.HI;
this->y.HALF.HI = this->parent->y.HALF.HI;
}
void sub_0806D274(Entity* this) {
Entity* npc;
+27 -1
View File
@@ -1,5 +1,7 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
#include "flags.h"
extern void (*gUnk_0811423C[])(Entity*);
@@ -7,7 +9,31 @@ void ClothesRack(Entity* this) {
gUnk_0811423C[this->action](this);
}
ASM_FUNC("asm/non_matching/clothesRack/sub_0806DD90.inc", void sub_0806DD90(Entity* this))
void sub_0806DD90(Entity* this) {
u32 uVar1;
u32 uVar2;
u32 x;
u32 y;
this->action = 1;
uVar1 = CheckGlobalFlag(DRUG_1);
uVar2 = BOOLCAST(uVar1);
if (CheckGlobalFlag(DRUG_2) != 0) {
uVar2 = 2;
}
if (CheckGlobalFlag(DRUG_3) != 0) {
uVar2 = 3;
}
InitializeAnimation(this, uVar2);
x = this->x.HALF.HI;
y = this->y.HALF.HI;
SetTile(0x4072, TILE(x - 0x18, y - 0x10), this->collisionLayer);
SetTile(0x4072, TILE(x - 0x18, y), this->collisionLayer);
SetTile(0x4072, TILE(x - 0x18, y + 0x10), this->collisionLayer);
SetTile(0x4072, TILE(x + 0x18, y - 0x10), this->collisionLayer);
SetTile(0x4072, TILE(x + 0x18, y), this->collisionLayer);
SetTile(0x4072, TILE(x + 0x18, y + 0x10), this->collisionLayer);
}
void sub_0806DEC8(Entity* this) {
GetNextFrame(this);
+4 -1
View File
@@ -22,7 +22,10 @@ void Farmers_Head(Entity* this) {
sub_0807000C(this);
}
ASM_FUNC("asm/non_matching/farmers/sub_0806BC94.inc", void sub_0806BC94(Entity* this, ScriptExecutionContext* context))
void sub_0806BC94(Entity* this, ScriptExecutionContext* context) {
InitializeAnimation(this, context->intVariable + (BOOLCAST(this->spriteSettings.b.flipX) & 8U) +
(this->animationState >> 1));
}
void sub_0806BCB8(Entity* this) {
this->animationState = this->actionDelay;
+4 -1
View File
@@ -48,7 +48,10 @@ void sub_08063830(Entity* this) {
}
}
ASM_FUNC("asm/non_matching/sittingPerson/sub_08063850.inc", void sub_08063850(Entity* this))
void sub_08063850(Entity* this, ScriptExecutionContext* context) {
InitializeAnimation(this, context->intVariable + (BOOLCAST(this->spriteSettings.b.flipX) & 4U) +
(this->animationState >> 1));
}
void sub_08063874(Entity* this) {
this->animationState = this->actionDelay;