mirror of https://github.com/zeldaret/tmc.git
bell matching
This commit is contained in:
parent
d5350cd72b
commit
29d8ee9b06
58
asm/bell.s
58
asm/bell.s
|
@ -1,58 +0,0 @@
|
||||||
.include "asm/macros.inc"
|
|
||||||
|
|
||||||
.include "constants/constants.inc"
|
|
||||||
|
|
||||||
.syntax unified
|
|
||||||
|
|
||||||
.text
|
|
||||||
|
|
||||||
|
|
||||||
thumb_func_start sub_08097D78
|
|
||||||
sub_08097D78: @ 0x08097D78
|
|
||||||
push {lr}
|
|
||||||
ldr r2, _08097D8C @ =gUnk_08123384
|
|
||||||
ldrb r1, [r0, #0xc]
|
|
||||||
lsls r1, r1, #2
|
|
||||||
adds r1, r1, r2
|
|
||||||
ldr r1, [r1]
|
|
||||||
bl _call_via_r1
|
|
||||||
pop {pc}
|
|
||||||
.align 2, 0
|
|
||||||
_08097D8C: .4byte gUnk_08123384
|
|
||||||
|
|
||||||
thumb_func_start sub_08097D90
|
|
||||||
sub_08097D90: @ 0x08097D90
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
movs r3, #1
|
|
||||||
movs r2, #1
|
|
||||||
strb r2, [r4, #0xc]
|
|
||||||
ldrb r1, [r4, #0x18]
|
|
||||||
movs r0, #4
|
|
||||||
rsbs r0, r0, #0
|
|
||||||
ands r0, r1
|
|
||||||
orrs r0, r3
|
|
||||||
strb r0, [r4, #0x18]
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r0, #0x38
|
|
||||||
strb r2, [r0]
|
|
||||||
adds r2, r4, #0
|
|
||||||
adds r2, #0x29
|
|
||||||
ldrb r1, [r2]
|
|
||||||
movs r0, #8
|
|
||||||
rsbs r0, r0, #0
|
|
||||||
ands r0, r1
|
|
||||||
strb r0, [r2]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl UpdateSpriteOrderAndFlip
|
|
||||||
adds r0, r4, #0
|
|
||||||
movs r1, #0
|
|
||||||
bl LoadAnimation
|
|
||||||
pop {r4, pc}
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start sub_08097DCC
|
|
||||||
sub_08097DCC: @ 0x08097DCC
|
|
||||||
push {lr}
|
|
||||||
bl sub_080042B8
|
|
||||||
pop {pc}
|
|
|
@ -697,7 +697,7 @@ SECTIONS {
|
||||||
asm/object72.o(.text);
|
asm/object72.o(.text);
|
||||||
asm/lilypadSmall.o(.text);
|
asm/lilypadSmall.o(.text);
|
||||||
asm/object74.o(.text);
|
asm/object74.o(.text);
|
||||||
asm/bell.o(.text);
|
src/bell.o(.text);
|
||||||
asm/macroDecorations.o(.text);
|
asm/macroDecorations.o(.text);
|
||||||
asm/object79.o(.text);
|
asm/object79.o(.text);
|
||||||
asm/steam.o(.text);
|
asm/steam.o(.text);
|
||||||
|
@ -765,7 +765,7 @@ SECTIONS {
|
||||||
asm/windTribeTeleporter.o(.text);
|
asm/windTribeTeleporter.o(.text);
|
||||||
asm/objectB9.o(.text);
|
asm/objectB9.o(.text);
|
||||||
asm/objectBA.o(.text);
|
asm/objectBA.o(.text);
|
||||||
asm/windCrest.o(.text);
|
asm/windcrest.o(.text);
|
||||||
asm/litArea.o(.text);
|
asm/litArea.o(.text);
|
||||||
asm/objectBD.o(.text);
|
asm/objectBD.o(.text);
|
||||||
asm/pinwheel.o(.text);
|
asm/pinwheel.o(.text);
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
#include "global.h"
|
||||||
|
#include "entity.h"
|
||||||
|
|
||||||
|
extern void sub_080042B8();
|
||||||
|
extern void (*gUnk_08123384[])(Entity *);
|
||||||
|
|
||||||
|
extern void UpdateSpriteOrderAndFlip(Entity *);
|
||||||
|
extern void LoadAnimation();
|
||||||
|
|
||||||
|
|
||||||
|
void sub_08097D78(Entity* this){
|
||||||
|
gUnk_08123384[this->action](this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08097D90(Entity* this){
|
||||||
|
this->action = 1;
|
||||||
|
this->spriteSettings.b.ss0 = 1;
|
||||||
|
this->collisionLayer = 1;
|
||||||
|
this->ticks.b0 = 0;
|
||||||
|
UpdateSpriteOrderAndFlip(this);
|
||||||
|
LoadAnimation(this, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_08097DCC(Entity* this){
|
||||||
|
sub_080042B8(this);
|
||||||
|
}
|
Loading…
Reference in New Issue