Match cloud/sub_0809F770

This commit is contained in:
Marcus Huderle 2020-08-07 17:38:08 -05:00
parent 5719866643
commit 5963472d01
2 changed files with 6 additions and 58 deletions

View File

@ -1,45 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
push {r4, r5, lr}
adds r5, r0, #0
movs r0, #0xa3
movs r1, #1
movs r2, #0
bl CreateObject
adds r4, r0, #0
cmp r4, #0
beq _0809F7B6
adds r0, r5, #0
adds r1, r4, #0
bl PositionEntityOnTop
bl Random
ldrh r2, [r4, #0x2e]
subs r2, #0x10
movs r3, #0x1f
adds r1, r0, #0
ands r1, r3
adds r2, r2, r1
strh r2, [r4, #0x2e]
ldrh r2, [r4, #0x32]
subs r2, #0x10
asrs r1, r0, #8
ands r1, r3
adds r2, r2, r1
strh r2, [r4, #0x32]
asrs r0, r0, #0x10
movs r1, #3
ands r0, r1
strb r0, [r4, #0x1e]
movs r0, #0xff
strb r0, [r4, #0x15]
_0809F7B6:
adds r0, r4, #0
pop {r4, r5, pc}
.align 2, 0
.syntax divided

View File

@ -156,28 +156,21 @@ void sub_0809F700(Entity* this) {
}
}
#ifdef NON_MATCHING
Entity* sub_0809F770(Entity* this) {
Entity* cloud;
s32 uVar1;
int uVar1;
cloud = CreateObject(163, 1, 0);
if (cloud != NULL) {
if (cloud) {
PositionEntityOnTop(this, cloud);
uVar1 = Random();
cloud->x.HALF.HI = ((cloud->x.HALF.HI - 16) + (uVar1 >> 0)) & 31;
cloud->y.HALF.HI = ((cloud->y.HALF.HI - 16) + (uVar1 >> 8)) & 31;
cloud->animationList = (u8)(uVar1 >> 16) & 3;
cloud->direction = 255;
cloud->x.HALF.HI += ((uVar1 >> 0) & 31) - 16;
cloud->y.HALF.HI += ((uVar1 >> 8) & 31) - 16;
cloud->frameIndex = (uVar1 >> 16) & 3;
cloud->direction = 0xFF;
}
return cloud;
}
#else
NAKED
Entity* sub_0809F770(Entity* this) {
asm(".include \"asm/non_matching/cloud/sub_0809F770.inc\"");
}
#endif
void sub_0809F7BC(Entity* this) {
Entity* cloud;