mirror of https://github.com/zeldaret/tmc.git
Merge pull request #415 from hatal175/lamp
This commit is contained in:
commit
4e10e89cca
|
|
@ -1,39 +0,0 @@
|
||||||
.include "asm/macros.inc"
|
|
||||||
|
|
||||||
.include "constants/constants.inc"
|
|
||||||
|
|
||||||
.syntax unified
|
|
||||||
|
|
||||||
.text
|
|
||||||
|
|
||||||
thumb_func_start Lamp
|
|
||||||
Lamp: @ 0x0809CE90
|
|
||||||
push {lr}
|
|
||||||
ldr r2, _0809CEA4 @ =gUnk_08123E80
|
|
||||||
ldrb r1, [r0, #0xc]
|
|
||||||
lsls r1, r1, #2
|
|
||||||
adds r1, r1, r2
|
|
||||||
ldr r1, [r1]
|
|
||||||
bl _call_via_r1
|
|
||||||
pop {pc}
|
|
||||||
.align 2, 0
|
|
||||||
_0809CEA4: .4byte gUnk_08123E80
|
|
||||||
|
|
||||||
thumb_func_start sub_0809CEA8
|
|
||||||
sub_0809CEA8: @ 0x0809CEA8
|
|
||||||
push {r4, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
movs r0, #1
|
|
||||||
strb r0, [r4, #0xc]
|
|
||||||
adds r0, r4, #0
|
|
||||||
bl UpdateSpriteForCollisionLayer
|
|
||||||
adds r0, r4, #0
|
|
||||||
movs r1, #0
|
|
||||||
bl InitializeAnimation
|
|
||||||
pop {r4, pc}
|
|
||||||
|
|
||||||
thumb_func_start sub_0809CEC0
|
|
||||||
sub_0809CEC0: @ 0x0809CEC0
|
|
||||||
push {lr}
|
|
||||||
bl GetNextFrame
|
|
||||||
pop {pc}
|
|
||||||
|
|
@ -4,10 +4,6 @@
|
||||||
.section .rodata
|
.section .rodata
|
||||||
.align 2
|
.align 2
|
||||||
|
|
||||||
gUnk_08123E80:: @ 08123E80
|
|
||||||
.4byte sub_0809CEA8
|
|
||||||
.4byte sub_0809CEC0
|
|
||||||
|
|
||||||
gSpriteAnimations_Lamp_0_0:: @ 08123E88
|
gSpriteAnimations_Lamp_0_0:: @ 08123E88
|
||||||
.include "animations/gSpriteAnimations_Lamp_0_0.s"
|
.include "animations/gSpriteAnimations_Lamp_0_0.s"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -791,7 +791,7 @@ SECTIONS {
|
||||||
asm/object/object90.o(.text);
|
asm/object/object90.o(.text);
|
||||||
asm/object/object91.o(.text);
|
asm/object/object91.o(.text);
|
||||||
src/object/bakerOven.o(.text);
|
src/object/bakerOven.o(.text);
|
||||||
asm/object/lamp.o(.text);
|
src/object/lamp.o(.text);
|
||||||
src/object/windTribeFlag.o(.text);
|
src/object/windTribeFlag.o(.text);
|
||||||
src/object/bird.o(.text);
|
src/object/bird.o(.text);
|
||||||
asm/object/bird.o(.text);
|
asm/object/bird.o(.text);
|
||||||
|
|
@ -1546,6 +1546,7 @@ SECTIONS {
|
||||||
data/const/object/object91.o(.rodata);
|
data/const/object/object91.o(.rodata);
|
||||||
data/const/object/bakerOven.o(.rodata);
|
data/const/object/bakerOven.o(.rodata);
|
||||||
data/animations/object/bakerOven.o(.rodata);
|
data/animations/object/bakerOven.o(.rodata);
|
||||||
|
src/object/lamp.o(.rodata);
|
||||||
data/animations/object/lamp.o(.rodata);
|
data/animations/object/lamp.o(.rodata);
|
||||||
data/const/object/bird.o(.rodata);
|
data/const/object/bird.o(.rodata);
|
||||||
data/animations/object/bird.o(.rodata);
|
data/animations/object/bird.o(.rodata);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
#include "entity.h"
|
||||||
|
|
||||||
|
void Lamp_Init(Entity* this);
|
||||||
|
void Lamp_Action1(Entity* this);
|
||||||
|
|
||||||
|
void Lamp(Entity* this) {
|
||||||
|
static void (*const actionFuncs[])(Entity*) = {
|
||||||
|
Lamp_Init,
|
||||||
|
Lamp_Action1,
|
||||||
|
};
|
||||||
|
|
||||||
|
actionFuncs[this->action](this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lamp_Init(Entity* this) {
|
||||||
|
this->action = 1;
|
||||||
|
UpdateSpriteForCollisionLayer(this);
|
||||||
|
InitializeAnimation(this, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lamp_Action1(Entity* this) {
|
||||||
|
GetNextFrame(this);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue