mirror of https://github.com/zeldaret/tmc.git
Match sub_08018B50
This commit is contained in:
parent
ffdec50c76
commit
392509f89c
|
|
@ -838,57 +838,3 @@ _08018B28:
|
|||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4, r5, r6, r7, pc}
|
||||
|
||||
thumb_func_start sub_08018B50
|
||||
sub_08018B50: @ 0x08018B50
|
||||
push {r4, r5, r6, r7, lr}
|
||||
sub sp, #4
|
||||
lsls r1, r0, #2
|
||||
adds r1, r1, r0
|
||||
lsls r1, r1, #2
|
||||
ldr r0, _08018BAC @ =gUnk_080FE320
|
||||
adds r2, r1, r0
|
||||
ldrb r1, [r2, #1]
|
||||
movs r0, #0x80
|
||||
ands r0, r1
|
||||
ldr r3, _08018BB0 @ =0x00000219
|
||||
cmp r0, #0
|
||||
bne _08018B6C
|
||||
subs r3, #0x19
|
||||
_08018B6C:
|
||||
ldrh r0, [r2, #8]
|
||||
lsrs r5, r0, #4
|
||||
movs r1, #0x3f
|
||||
ands r5, r1
|
||||
ldrh r0, [r2, #0xa]
|
||||
lsrs r0, r0, #4
|
||||
ands r0, r1
|
||||
lsls r0, r0, #6
|
||||
orrs r5, r0
|
||||
subs r5, #0x82
|
||||
movs r0, #0
|
||||
_08018B82:
|
||||
movs r4, #0
|
||||
adds r6, r5, #0
|
||||
adds r6, #0x40
|
||||
adds r7, r0, #1
|
||||
_08018B8A:
|
||||
adds r0, r3, #0
|
||||
adds r3, #1
|
||||
adds r1, r5, r4
|
||||
movs r2, #1
|
||||
str r3, [sp]
|
||||
bl SetTileType
|
||||
adds r4, #1
|
||||
ldr r3, [sp]
|
||||
cmp r4, #4
|
||||
bls _08018B8A
|
||||
adds r5, r6, #0
|
||||
adds r0, r7, #0
|
||||
cmp r0, #4
|
||||
bls _08018B82
|
||||
add sp, #4
|
||||
pop {r4, r5, r6, r7, pc}
|
||||
.align 2, 0
|
||||
_08018BAC: .4byte gUnk_080FE320
|
||||
_08018BB0: .4byte 0x00000219
|
||||
|
|
|
|||
|
|
@ -4,6 +4,31 @@
|
|||
#include "common.h"
|
||||
#include "flags.h"
|
||||
|
||||
void sub_08018B50(int param_1) {
|
||||
u32 i;
|
||||
int iVar2;
|
||||
u32 j;
|
||||
int tilePosition;
|
||||
struct_080FE320* ptr;
|
||||
|
||||
ptr = &gUnk_080FE320[param_1];
|
||||
if ((ptr->entity_idx & 0x80) == 0) {
|
||||
iVar2 = 0x200;
|
||||
} else {
|
||||
iVar2 = 0x219;
|
||||
}
|
||||
|
||||
tilePosition = (ptr->x >> 4) & 0x3f;
|
||||
tilePosition |= ((ptr->y >> 4) & 0x3f) << 6;
|
||||
tilePosition -= 0x82;
|
||||
|
||||
for (i = 0; i < 5; tilePosition += 0x40, i++) {
|
||||
for (j = 0; j < 5; j++) {
|
||||
SetTileType(iVar2++, tilePosition + j, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08018BB4(int param_1) {
|
||||
u32 layer;
|
||||
TileEntity tile;
|
||||
|
|
|
|||
Loading…
Reference in New Issue