mirror of https://github.com/zeldaret/tmc.git
minishSizedEntrance OK
This commit is contained in:
parent
366ffa3033
commit
9992830ee9
|
|
@ -1,62 +0,0 @@
|
||||||
.include "asm/macros.inc"
|
|
||||||
|
|
||||||
.include "constants/constants.inc"
|
|
||||||
|
|
||||||
.syntax unified
|
|
||||||
|
|
||||||
.text
|
|
||||||
|
|
||||||
thumb_func_start sub_08090F00
|
|
||||||
sub_08090F00: @ 0x08090F00
|
|
||||||
push {r4, r5, r6, lr}
|
|
||||||
adds r4, r0, #0
|
|
||||||
ldrb r1, [r4, #0xa]
|
|
||||||
cmp r1, #1
|
|
||||||
bne _08090F1C
|
|
||||||
ldr r0, [r4, #0x50]
|
|
||||||
ldrb r2, [r4, #0xf]
|
|
||||||
lsls r1, r2
|
|
||||||
ldr r0, [r0, #0x20]
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
bne _08090F1C
|
|
||||||
bl DeleteThisEntity
|
|
||||||
_08090F1C:
|
|
||||||
ldr r6, _08090F64 @ =gPlayerState
|
|
||||||
ldr r0, [r6, #0x30]
|
|
||||||
movs r1, #0x80
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08090F62
|
|
||||||
ldr r5, _08090F68 @ =gPlayerEntity
|
|
||||||
adds r0, r4, #0
|
|
||||||
adds r1, r5, #0
|
|
||||||
movs r2, #4
|
|
||||||
movs r3, #4
|
|
||||||
bl sub_080041A0
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08090F62
|
|
||||||
movs r1, #0x36
|
|
||||||
ldrsh r0, [r5, r1]
|
|
||||||
cmp r0, #0
|
|
||||||
bne _08090F62
|
|
||||||
adds r2, r6, #0
|
|
||||||
adds r2, #0x90
|
|
||||||
ldr r1, _08090F6C @ =gUnk_0812225C
|
|
||||||
ldrb r0, [r4, #0xb]
|
|
||||||
lsls r0, r0, #1
|
|
||||||
adds r0, r0, r1
|
|
||||||
ldrh r1, [r2]
|
|
||||||
ldrh r0, [r0]
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08090F62
|
|
||||||
ldrb r0, [r4, #0xe]
|
|
||||||
bl GetCurrentRoomProperty
|
|
||||||
bl DoExitTransition
|
|
||||||
_08090F62:
|
|
||||||
pop {r4, r5, r6, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_08090F64: .4byte gPlayerState
|
|
||||||
_08090F68: .4byte gPlayerEntity
|
|
||||||
_08090F6C: .4byte gUnk_0812225C
|
|
||||||
|
|
@ -765,7 +765,6 @@ SECTIONS {
|
||||||
asm/pushableFurniture.o(.text);
|
asm/pushableFurniture.o(.text);
|
||||||
asm/furniture.o(.text);
|
asm/furniture.o(.text);
|
||||||
src/object/minishSizedEntrance.o(.text);
|
src/object/minishSizedEntrance.o(.text);
|
||||||
asm/minishSizedEntrance.o(.text);
|
|
||||||
src/object/archway.o(.text);
|
src/object/archway.o(.text);
|
||||||
asm/giantRock.o(.text);
|
asm/giantRock.o(.text);
|
||||||
asm/object51.o(.text);
|
asm/object51.o(.text);
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "entity.h"
|
#include "entity.h"
|
||||||
|
#include "player.h"
|
||||||
|
#include "functions.h"
|
||||||
|
|
||||||
extern bool32 CheckIsDungeon();
|
extern void DoExitTransition(void*);
|
||||||
extern void sub_080AE068(Entity*);
|
|
||||||
extern void LoadFixedGFX(Entity*, u32);
|
|
||||||
|
|
||||||
extern void (*const gUnk_08122254[])(Entity*);
|
extern void (*const gUnk_08122254[])(Entity*);
|
||||||
|
extern u16 gUnk_0812225C[];
|
||||||
|
|
||||||
void MinishSizedEntrance(Entity* this) {
|
void MinishSizedEntrance(Entity* this) {
|
||||||
gUnk_08122254[this->action](this);
|
gUnk_08122254[this->action](this);
|
||||||
|
|
@ -22,3 +23,18 @@ void sub_08090EC0(Entity* this) {
|
||||||
LoadFixedGFX(this, 0x184);
|
LoadFixedGFX(this, 0x184);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sub_08090F00(Entity* this) {
|
||||||
|
if (this->type == 1) {
|
||||||
|
Entity* parent = this->parent;
|
||||||
|
u32 mask = 1 << this->field_0xf;
|
||||||
|
if (!(parent->field_0x20 & mask)) {
|
||||||
|
DeleteThisEntity();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((((gPlayerState.flags.all & 0x80) && sub_080041A0(this, &gPlayerEntity, 4, 4)) &&
|
||||||
|
(gPlayerEntity.height.HALF.HI == 0)) &&
|
||||||
|
(((u16)gPlayerState.field_0x90.HALF.LO) & gUnk_0812225C[this->type2])) {
|
||||||
|
DoExitTransition((Entity*)GetCurrentRoomProperty(this->actionDelay));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue