mirror of https://github.com/zeldaret/tmc.git
Merge pull request #374 from hatal175/pina
This commit is contained in:
commit
b9876fd30f
|
@ -1,64 +0,0 @@
|
|||
.syntax unified
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
movs r1, #0x20
|
||||
movs r2, #0x20
|
||||
bl sub_0806ED9C
|
||||
cmp r0, #0
|
||||
blt _080635B2
|
||||
ldrb r0, [r4, #0xf]
|
||||
cmp r0, #0
|
||||
bne _080635B8
|
||||
bl Random
|
||||
movs r1, #0x3f
|
||||
ands r1, r0
|
||||
cmp r1, #0
|
||||
bne _080635B2
|
||||
movs r0, #1
|
||||
strb r0, [r4, #0xf]
|
||||
adds r0, r4, #0
|
||||
movs r1, #0
|
||||
bl InitAnimationForceUpdate
|
||||
_080635B2:
|
||||
ldrb r0, [r4, #0xf]
|
||||
cmp r0, #0
|
||||
beq _080635D0
|
||||
_080635B8:
|
||||
adds r0, r4, #0
|
||||
bl UpdateAnimationSingleFrame
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x5a
|
||||
ldrb r1, [r0]
|
||||
movs r0, #0x80
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _080635D0
|
||||
movs r0, #0
|
||||
strb r0, [r4, #0xf]
|
||||
_080635D0:
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x39
|
||||
ldrb r0, [r0]
|
||||
lsls r0, r0, #0x18
|
||||
asrs r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
beq _080635FC
|
||||
movs r0, #2
|
||||
strb r0, [r4, #0xc]
|
||||
adds r0, r4, #0
|
||||
bl GetAnimationState
|
||||
adds r1, r0, #0
|
||||
adds r1, #4
|
||||
adds r0, r4, #0
|
||||
bl InitAnimationForceUpdate
|
||||
ldrb r0, [r4, #0xe]
|
||||
ldr r1, _08063604 @ =0x00000A01
|
||||
adds r0, r0, r1
|
||||
bl MessageFromTarget
|
||||
_080635FC:
|
||||
adds r0, r4, #0
|
||||
bl sub_0806ED78
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
_08063604: .4byte 0x00000A01
|
||||
.syntax divided
|
|
@ -1,64 +0,0 @@
|
|||
.syntax unified
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
movs r1, #0x20
|
||||
movs r2, #0x20
|
||||
bl sub_0806ED9C
|
||||
cmp r0, #0
|
||||
blt _08063AEE
|
||||
ldrb r0, [r4, #0xf]
|
||||
cmp r0, #0
|
||||
bne _08063AF4
|
||||
bl Random
|
||||
movs r1, #0x3f
|
||||
ands r1, r0
|
||||
cmp r1, #0
|
||||
bne _08063AEE
|
||||
adds r0, r4, #0
|
||||
movs r1, #0
|
||||
bl InitAnimationForceUpdate
|
||||
movs r0, #1
|
||||
strb r0, [r4, #0xf]
|
||||
_08063AEE:
|
||||
ldrb r0, [r4, #0xf]
|
||||
cmp r0, #0
|
||||
beq _08063B0C
|
||||
_08063AF4:
|
||||
adds r0, r4, #0
|
||||
bl UpdateAnimationSingleFrame
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x5a
|
||||
ldrb r1, [r0]
|
||||
movs r0, #0x80
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _08063B0C
|
||||
movs r0, #0
|
||||
strb r0, [r4, #0xf]
|
||||
_08063B0C:
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x39
|
||||
ldrb r0, [r0]
|
||||
lsls r0, r0, #0x18
|
||||
asrs r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
beq _08063B38
|
||||
movs r0, #2
|
||||
strb r0, [r4, #0xc]
|
||||
adds r0, r4, #0
|
||||
bl GetAnimationState
|
||||
adds r1, r0, #0
|
||||
adds r1, #4
|
||||
adds r0, r4, #0
|
||||
bl InitAnimationForceUpdate
|
||||
ldrb r0, [r4, #0xe]
|
||||
ldr r1, _08063B40 @ =0x00000A01
|
||||
adds r0, r0, r1
|
||||
bl MessageFromTarget
|
||||
_08063B38:
|
||||
adds r0, r4, #0
|
||||
bl sub_0806ED78
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
_08063B40: .4byte 0x00000A01
|
||||
.syntax divided
|
|
@ -4,10 +4,5 @@
|
|||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_0810CAA0:: @ 0810CAA0
|
||||
.4byte sub_0806355C
|
||||
.4byte sub_08063584
|
||||
.4byte sub_08063608
|
||||
|
||||
gUnk_0810CAAC:: @ 0810CAAC
|
||||
.incbin "brocco/gUnk_0810CAAC.bin"
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnk_0810CDF8:: @ 0810CDF8
|
||||
.4byte sub_08063A98
|
||||
.4byte sub_08063AC0
|
||||
.4byte sub_08063B44
|
||||
|
||||
gUnk_0810CE04:: @ 0810CE04
|
||||
.incbin "pina/gUnk_0810CE04.bin"
|
||||
|
||||
|
|
|
@ -1210,10 +1210,12 @@ SECTIONS {
|
|||
data/animations/npc/mailbox.o(.rodata);
|
||||
data/const/npc/beedle.o(.rodata);
|
||||
data/animations/npc/beedle.o(.rodata);
|
||||
src/npc/brocco.o(.rodata);
|
||||
data/const/npc/brocco.o(.rodata);
|
||||
data/animations/npc/brocco.o(.rodata);
|
||||
data/const/npc/sittingPerson.o(.rodata);
|
||||
data/animations/npc/sittingPerson.o(.rodata);
|
||||
src/npc/pina.o(.rodata);
|
||||
data/const/npc/pina.o(.rodata);
|
||||
data/animations/npc/pina.o(.rodata);
|
||||
data/const/npc/guard.o(.rodata);
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
|
||||
void sub_08063544(Entity*);
|
||||
void sub_0806362C(Entity*);
|
||||
|
||||
extern void (*gUnk_0810CAA0[])(Entity*);
|
||||
void sub_0806355C(Entity*);
|
||||
void sub_08063584(Entity*);
|
||||
void sub_08063608(Entity*);
|
||||
|
||||
extern Dialog gUnk_0810CAAC[];
|
||||
|
||||
|
@ -19,7 +20,12 @@ void Brocco(Entity* this) {
|
|||
}
|
||||
|
||||
void sub_08063544(Entity* this) {
|
||||
gUnk_0810CAA0[this->action](this);
|
||||
static void (*const Brocco_Actions[])(Entity*) = {
|
||||
sub_0806355C,
|
||||
sub_08063584,
|
||||
sub_08063608,
|
||||
};
|
||||
Brocco_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0806355C(Entity* this) {
|
||||
|
@ -29,7 +35,30 @@ void sub_0806355C(Entity* this) {
|
|||
sub_08078778(this);
|
||||
}
|
||||
|
||||
ASM_FUNC("asm/non_matching/brocco/sub_08063584.inc", void sub_08063584(Entity* this))
|
||||
void sub_08063584(Entity* this) {
|
||||
if (sub_0806ED9C(this, 0x20, 0x20) >= 0) {
|
||||
if (this->field_0xf == 0) {
|
||||
if ((Random() & 0x3f) == 0) {
|
||||
this->field_0xf = 1;
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this->field_0xf != 0) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
this->field_0xf = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->interactType != 0) {
|
||||
this->action = 2;
|
||||
InitAnimationForceUpdate(this, GetAnimationState(this) + 4);
|
||||
MessageFromTarget(this->actionDelay + 0xa01);
|
||||
}
|
||||
sub_0806ED78(this);
|
||||
}
|
||||
|
||||
void sub_08063608(Entity* this) {
|
||||
u8 tmp = gMessage.doTextBox & 0x7f;
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
|
||||
void sub_08063B68(Entity* this);
|
||||
void sub_08063A80(Entity* this);
|
||||
|
||||
extern void (*gUnk_0810CDF8[])(Entity*);
|
||||
void sub_08063A98(Entity* this);
|
||||
void sub_08063AC0(Entity* this);
|
||||
void sub_08063B44(Entity* this);
|
||||
|
||||
extern Dialog gUnk_0810CE04[];
|
||||
|
||||
|
@ -21,7 +22,12 @@ void Pina(Entity* this) {
|
|||
}
|
||||
|
||||
void sub_08063A80(Entity* this) {
|
||||
gUnk_0810CDF8[this->action](this);
|
||||
static void (*const Pina_Actions[])(Entity*) = {
|
||||
sub_08063A98,
|
||||
sub_08063AC0,
|
||||
sub_08063B44,
|
||||
};
|
||||
Pina_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void sub_08063A98(Entity* this) {
|
||||
|
@ -31,7 +37,30 @@ void sub_08063A98(Entity* this) {
|
|||
sub_08078778(this);
|
||||
}
|
||||
|
||||
ASM_FUNC("asm/non_matching/pina/sub_08063AC0.inc", void sub_08063AC0(Entity* this))
|
||||
void sub_08063AC0(Entity* this) {
|
||||
if (sub_0806ED9C(this, 0x20, 0x20) >= 0) {
|
||||
if (this->field_0xf == 0) {
|
||||
if ((Random() & 0x3f) == 0) {
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
this->field_0xf = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this->field_0xf != 0) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
this->field_0xf = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->interactType != 0) {
|
||||
this->action = 2;
|
||||
InitAnimationForceUpdate(this, GetAnimationState(this) + 4);
|
||||
MessageFromTarget(this->actionDelay + 0xa01);
|
||||
}
|
||||
sub_0806ED78(this);
|
||||
}
|
||||
|
||||
void sub_08063B44(Entity* this) {
|
||||
u8 tmp = gMessage.doTextBox & 0x7f;
|
||||
|
|
Loading…
Reference in New Issue