Merge pull request #2 from gamestabled/bell

bell matching
This commit is contained in:
notyouraveragehooman 2020-06-12 02:52:48 -07:00 committed by GitHub
commit 27d389e50a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 60 deletions

View File

@ -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}

View File

@ -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);

28
src/bell.c Normal file
View File

@ -0,0 +1,28 @@
#include "entity.h"
#include "global.h"
extern void sub_080042B8();
extern void (*gUnk_08123384[])(Entity*);
extern void UpdateSpriteOrderAndFlip(Entity*);
extern void LoadAnimation();
void sub_08097D78(Entity *ent)
{
gUnk_08123384[ent->action](ent);
}
void sub_08097D90(Entity *ent)
{
ent->action = 1;
ent->spriteSettings.b.ss0 = 1;
ent->collisionLayer = 1;
ent->ticks.b0 = 0;
UpdateSpriteOrderAndFlip(ent);
LoadAnimation(ent, 0);
}
void sub_08097DCC(Entity *ent)
{
sub_080042B8(ent);
}