mirror of https://github.com/zeldaret/tmc.git
Merge pull request #269 from hatal175/sub_0801D898
Decompile sub_080451CC
This commit is contained in:
commit
2ccc45995c
|
|
@ -1,36 +0,0 @@
|
|||
.include "asm/macros.inc"
|
||||
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_080451CC
|
||||
sub_080451CC: @ 0x080451CC
|
||||
ldrb r3, [r0, #0x10]
|
||||
movs r2, #0xfe
|
||||
ands r2, r3
|
||||
strb r2, [r1, #0x10]
|
||||
ldr r2, [r0, #0x2c]
|
||||
str r2, [r1, #0x2c]
|
||||
ldr r2, [r0, #0x30]
|
||||
str r2, [r1, #0x30]
|
||||
ldr r2, [r0, #0x34]
|
||||
str r2, [r1, #0x34]
|
||||
adds r0, #0x68
|
||||
adds r1, #0x68
|
||||
ldrb r2, [r0, #4]
|
||||
strb r2, [r1, #4]
|
||||
ldrb r2, [r0, #5]
|
||||
strb r2, [r1, #5]
|
||||
ldrb r2, [r0, #6]
|
||||
strb r2, [r1, #6]
|
||||
ldrb r2, [r0, #7]
|
||||
strb r2, [r1, #7]
|
||||
ldrh r2, [r0, #8]
|
||||
strh r2, [r1, #8]
|
||||
ldrh r0, [r0, #0xa]
|
||||
strh r0, [r1, #0xa]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
|
|
@ -408,7 +408,7 @@ SECTIONS {
|
|||
asm/enemy/dust.o(.text);
|
||||
src/enemy/vaatiBall.o(.text);
|
||||
src/enemy/slime.o(.text);
|
||||
asm/enemy/sub_080451CC.o(.text);
|
||||
src/enemy/sub_080451CC.o(.text);
|
||||
src/enemy/miniSlime.o(.text);
|
||||
src/enemy/fireballGuy.o(.text);
|
||||
src/enemy/miniFireballGuy.o(.text);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
#include "entity.h"
|
||||
|
||||
void sub_080451CC(Entity* this, Entity* other) {
|
||||
u8* pThis;
|
||||
u8* pOther;
|
||||
other->flags = this->flags & 0xfe;
|
||||
other->x.WORD = this->x.WORD;
|
||||
other->y.WORD = this->y.WORD;
|
||||
other->z.WORD = this->z.WORD;
|
||||
|
||||
pThis = (u8*)&this->field_0x68;
|
||||
pOther = (u8*)&other->field_0x68;
|
||||
pOther[4] = pThis[4];
|
||||
pOther[5] = pThis[5];
|
||||
pOther[6] = pThis[6];
|
||||
pOther[7] = pThis[7];
|
||||
((u16*)(pOther))[4] = ((u16*)(pThis))[4];
|
||||
((u16*)(pOther))[5] = ((u16*)(pThis))[5];
|
||||
}
|
||||
Loading…
Reference in New Issue