mirror of https://github.com/zeldaret/tmc.git
Merge pull request #137 from gamestabled/minishSizedArchway
MinishSizedArchway OK
This commit is contained in:
commit
c319dc53d3
|
@ -1,40 +0,0 @@
|
|||
.include "asm/macros.inc"
|
||||
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
|
||||
thumb_func_start MinishSizedArchway
|
||||
MinishSizedArchway: @ 0x080973E4
|
||||
push {r4, lr}
|
||||
adds r4, r0, #0
|
||||
ldrb r0, [r4, #0xc]
|
||||
cmp r0, #0
|
||||
bne _0809741E
|
||||
movs r0, #1
|
||||
strb r0, [r4, #0xc]
|
||||
ldrb r0, [r4, #0xa]
|
||||
strb r0, [r4, #0x1e]
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x38
|
||||
movs r0, #2
|
||||
strb r0, [r1]
|
||||
adds r0, r4, #0
|
||||
bl UpdateSpriteForCollisionLayer
|
||||
bl CheckIsDungeon
|
||||
cmp r0, #0
|
||||
beq _0809741E
|
||||
adds r2, r4, #0
|
||||
adds r2, #0x29
|
||||
ldrb r1, [r2]
|
||||
movs r0, #8
|
||||
rsbs r0, r0, #0
|
||||
ands r0, r1
|
||||
movs r1, #1
|
||||
orrs r0, r1
|
||||
strb r0, [r2]
|
||||
_0809741E:
|
||||
pop {r4, pc}
|
|
@ -62,7 +62,7 @@ extern void CreateDust(Entity*);
|
|||
extern u32 IsItemEquipped(u32);
|
||||
extern void DeleteManager(Manager*);
|
||||
extern bool32 CheckPlayerInRegion(u32 centerX, u32 centerY, u32 radiusX, u32 radiusY);
|
||||
extern u32 CheckIsDungeon();
|
||||
extern u32 CheckIsDungeon(void);
|
||||
extern u32 GetTileTypeByEntity(Entity*);
|
||||
|
||||
// Unidentified
|
||||
|
|
|
@ -799,7 +799,7 @@ SECTIONS {
|
|||
asm/minecartDoor.o(.text);
|
||||
asm/objectOnPillar.o(.text);
|
||||
src/object/mineralWaterSource.o(.text);
|
||||
asm/minishSizedArchway.o(.text);
|
||||
src/object/minishSizedArchway.o(.text);
|
||||
asm/object70.o(.text);
|
||||
asm/pushableGrave.o(.text);
|
||||
asm/object72.o(.text);
|
||||
|
|
|
@ -1,26 +1,17 @@
|
|||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "sprite.h"
|
||||
|
||||
extern u32 CheckIsDungeon();
|
||||
#include "functions.h"
|
||||
|
||||
void Archway(Entity* this) {
|
||||
u32 v1;
|
||||
u32 v2;
|
||||
u32 v3;
|
||||
|
||||
if (this->action == 0) {
|
||||
v1 = this->action = 1;
|
||||
v2 = this->spriteSettings.raw;
|
||||
v1 = v1 - 0x5;
|
||||
v1 = v1 & v2;
|
||||
this->spriteSettings.raw = v1 | 1;
|
||||
this->action = 1;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->frameIndex = this->type2;
|
||||
this->collisionLayer = 2;
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
v3 = CheckIsDungeon();
|
||||
if (v3 != 0) {
|
||||
this->spritePriority.b0 = (this->spritePriority.b0 & 0xf8) | 1;
|
||||
if (CheckIsDungeon()) {
|
||||
this->spritePriority.b0 = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "sprite.h"
|
||||
#include "functions.h"
|
||||
|
||||
void MinishSizedArchway(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
this->frameIndex = this->type;
|
||||
this->collisionLayer = 2;
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
if (CheckIsDungeon()) {
|
||||
this->spritePriority.b0 = 1;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue