mirror of https://github.com/zeldaret/tmc.git
commit
98739c400e
|
@ -1,58 +0,0 @@
|
|||
.syntax unified
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldrb r0, [r4, #0xc]
|
||||
cmp r0, #0
|
||||
bne _0806BC40
|
||||
ldrb r0, [r4, #0xa]
|
||||
lsls r1, r0, #1
|
||||
adds r1, r1, r0
|
||||
lsls r1, r1, #2
|
||||
ldr r0, _0806BC28 @ =gUnk_08113140
|
||||
adds r1, r1, r0
|
||||
adds r0, r4, #0
|
||||
bl LoadExtraSpriteData
|
||||
cmp r0, #0
|
||||
beq _0806BC54
|
||||
ldrb r0, [r4, #0xc]
|
||||
adds r0, #1
|
||||
strb r0, [r4, #0xc]
|
||||
ldrb r1, [r4, #0xe]
|
||||
movs r0, #1
|
||||
ands r1, r0
|
||||
lsls r1, r1, #6
|
||||
ldrb r2, [r4, #0x18]
|
||||
movs r0, #0x41
|
||||
rsbs r0, r0, #0
|
||||
ands r0, r2
|
||||
orrs r0, r1
|
||||
strb r0, [r4, #0x18]
|
||||
lsls r0, r0, #0x19
|
||||
cmp r0, #0
|
||||
blt _0806BC2C
|
||||
movs r0, #6
|
||||
b _0806BC2E
|
||||
.align 2, 0
|
||||
_0806BC28: .4byte gUnk_08113140
|
||||
_0806BC2C:
|
||||
movs r0, #2
|
||||
_0806BC2E:
|
||||
strb r0, [r4, #0x14]
|
||||
ldrb r0, [r4, #0x14]
|
||||
strb r0, [r4, #0xe]
|
||||
adds r0, r4, #0
|
||||
bl sub_0806BC58
|
||||
adds r0, r4, #0
|
||||
bl sub_0807DD64
|
||||
_0806BC40:
|
||||
adds r0, r4, #0
|
||||
movs r1, #0
|
||||
bl ExecuteScriptForEntity
|
||||
adds r0, r4, #0
|
||||
bl HandleEntity0x82Actions
|
||||
adds r0, r4, #0
|
||||
bl GetNextFrame
|
||||
_0806BC54:
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
.syntax divided
|
|
@ -8,7 +8,26 @@ extern Dialog gUnk_08113158[];
|
|||
extern SpriteLoadData gUnk_08113140[];
|
||||
void sub_0806BC58(Entity* this);
|
||||
|
||||
ASM_FUNC("asm/non_matching/farmers/Farmers.inc", void Farmers(Entity* this))
|
||||
void Farmers(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
if (LoadExtraSpriteData(this, &gUnk_08113140[this->type * 3]) == 0) {
|
||||
return;
|
||||
}
|
||||
this->action++;
|
||||
this->spriteSettings.flipX = this->actionDelay;
|
||||
if (this->spriteSettings.flipX == 0) {
|
||||
this->animationState = 6;
|
||||
} else {
|
||||
this->animationState = 2;
|
||||
}
|
||||
this->actionDelay = this->animationState;
|
||||
sub_0806BC58(this);
|
||||
sub_0807DD64(this);
|
||||
}
|
||||
ExecuteScriptForEntity(this, 0);
|
||||
HandleEntity0x82Actions(this);
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
void sub_0806BC58(Entity* this) {
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
|
@ -48,7 +67,6 @@ void sub_0806BCE8(Entity* this) {
|
|||
}
|
||||
|
||||
void Farmers_Fusion(Entity* this) {
|
||||
|
||||
if (this->action == 0) {
|
||||
if (LoadExtraSpriteData(this, &gUnk_08113140[this->type * 3]) != 0) {
|
||||
this->action = this->action + 1;
|
||||
|
|
Loading…
Reference in New Issue