mirror of https://github.com/zeldaret/tmc.git
object7E.c OK
This commit is contained in:
parent
c32fcaca51
commit
5ffec8a611
|
|
@ -1,36 +0,0 @@
|
|||
.include "asm/macros.inc"
|
||||
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_08091EC0
|
||||
sub_08091EC0: @ 0x08091EC0
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldr r1, [r4, #0x50]
|
||||
cmp r1, #0
|
||||
beq _08091ED6
|
||||
ldrh r0, [r1, #0x2e]
|
||||
strh r0, [r4, #0x2e]
|
||||
ldrh r0, [r1, #0x32]
|
||||
strh r0, [r4, #0x32]
|
||||
ldrh r0, [r1, #0x36]
|
||||
strh r0, [r4, #0x36]
|
||||
_08091ED6:
|
||||
ldrb r0, [r4, #0xb]
|
||||
cmp r0, #2
|
||||
beq _08091EEC
|
||||
ldrb r0, [r4, #0xe]
|
||||
subs r0, #1
|
||||
strb r0, [r4, #0xe]
|
||||
lsls r0, r0, #0x18
|
||||
cmp r0, #0
|
||||
bne _08091EEC
|
||||
bl DeleteThisEntity
|
||||
_08091EEC:
|
||||
adds r0, r4, #0
|
||||
bl GetNextFrame
|
||||
pop {r4, pc}
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
.include "asm/macros.inc"
|
||||
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
|
||||
thumb_func_start Object7E
|
||||
Object7E: @ 0x080989F8
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldr r0, [r4, #0x50]
|
||||
ldr r0, [r0, #4]
|
||||
cmp r0, #0
|
||||
bne _08098A08
|
||||
bl DeleteThisEntity
|
||||
_08098A08:
|
||||
ldrb r0, [r4, #0xc]
|
||||
cmp r0, #0
|
||||
bne _08098A44
|
||||
movs r0, #1
|
||||
strb r0, [r4, #0xc]
|
||||
adds r2, r4, #0
|
||||
adds r2, #0x29
|
||||
ldrb r0, [r2]
|
||||
movs r1, #7
|
||||
orrs r0, r1
|
||||
strb r0, [r2]
|
||||
movs r0, #0x28
|
||||
strb r0, [r4, #0x1e]
|
||||
ldrb r0, [r4, #0xa]
|
||||
cmp r0, #0
|
||||
bne _08098A38
|
||||
ldrb r0, [r4, #0x18]
|
||||
movs r1, #4
|
||||
rsbs r1, r1, #0
|
||||
ands r1, r0
|
||||
movs r0, #1
|
||||
orrs r1, r0
|
||||
strb r1, [r4, #0x18]
|
||||
b _08098A44
|
||||
_08098A38:
|
||||
cmp r0, #2
|
||||
bne _08098A44
|
||||
ldrb r0, [r4, #0x18]
|
||||
movs r1, #0x40
|
||||
orrs r0, r1
|
||||
strb r0, [r4, #0x18]
|
||||
_08098A44:
|
||||
ldr r0, [r4, #0x50]
|
||||
movs r3, #0x80
|
||||
lsls r3, r3, #0xc
|
||||
adds r1, r4, #0
|
||||
movs r2, #0
|
||||
bl PositionRelative
|
||||
movs r0, #0
|
||||
strh r0, [r4, #0x36]
|
||||
ldrb r0, [r4, #0xa]
|
||||
cmp r0, #0
|
||||
beq _08098A76
|
||||
ldr r3, [r4, #0x54]
|
||||
ldrb r1, [r3, #0x18]
|
||||
lsls r1, r1, #0x1e
|
||||
lsrs r1, r1, #0x1e
|
||||
ldrb r2, [r4, #0x18]
|
||||
movs r0, #4
|
||||
rsbs r0, r0, #0
|
||||
ands r0, r2
|
||||
orrs r0, r1
|
||||
strb r0, [r4, #0x18]
|
||||
ldrb r0, [r3, #0x1e]
|
||||
adds r0, #0x1f
|
||||
strb r0, [r4, #0x1e]
|
||||
_08098A76:
|
||||
pop {r4, pc}
|
||||
|
|
@ -799,7 +799,7 @@ SECTIONS {
|
|||
asm/pushableLever.o(.text);
|
||||
asm/macroShoes.o(.text);
|
||||
asm/objectOnSpinyBeetle.o(.text);
|
||||
asm/object7E.o(.text);
|
||||
src/object/object7E.o(.text);
|
||||
asm/picoBloom.o(.text);
|
||||
asm/object80.o(.text);
|
||||
asm/object81.o(.text);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
|
||||
void Object7E(Entity *this) {
|
||||
|
||||
if (this->parent->field_0x4 == NULL) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
this->spritePriority.b0 = 7;
|
||||
this->frameIndex = 0x28;
|
||||
if (this->entityType.form == 0) {
|
||||
this->spriteSettings.b.draw = TRUE;
|
||||
} else if (this->entityType.form == 2) {
|
||||
this->spriteSettings.b.flipX = TRUE;
|
||||
}
|
||||
}
|
||||
PositionRelative(this->parent, this, 0, 0x80000);
|
||||
this->height.HALF.HI = 0;
|
||||
if ((this->entityType).form != 0) {
|
||||
this->spriteSettings.b.draw = this->attachedEntity->spriteSettings.b.draw;
|
||||
this->frameIndex = this->attachedEntity->frameIndex + 0x1f;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue