AddCameraObject

This commit is contained in:
scnorton 2017-09-10 16:02:20 -04:00
parent 5a5ea8c740
commit 9e0a171098
3 changed files with 11 additions and 34 deletions

View File

@ -5,40 +5,6 @@
.text .text
thumb_func_start AddCameraObject
@ u8 AddCameraObject(u8 followedObjectId)
AddCameraObject: @ 808ED34
push {r4,lr}
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
ldr r0, =gUnknown_084975D4
movs r1, 0
movs r2, 0
movs r3, 0x4
bl CreateSprite
lsls r0, 24
lsrs r0, 24
ldr r2, =gSprites
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r2
movs r2, 0x3E
adds r2, r1
mov r12, r2
ldrb r2, [r2]
movs r3, 0x4
orrs r2, r3
mov r3, r12
strb r2, [r3]
strh r4, [r1, 0x2E]
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end AddCameraObject
thumb_func_start ObjectCB_CameraObject thumb_func_start ObjectCB_CameraObject
@ void ObjectCB_CameraObject(struct obj *object) @ void ObjectCB_CameraObject(struct obj *object)
ObjectCB_CameraObject: @ 808ED78 ObjectCB_CameraObject: @ 808ED78

View File

@ -14,5 +14,6 @@ extern const struct SpritePalette gUnknown_0850BBC8[];
extern const struct PairedPalettes gUnknown_0850BD00[15]; extern const struct PairedPalettes gUnknown_0850BD00[15];
extern const struct PairedPalettes gUnknown_0850BD78[15]; extern const struct PairedPalettes gUnknown_0850BD78[15];
extern u8 gUnknown_084975C4[0x10]; extern u8 gUnknown_084975C4[0x10];
extern const struct SpriteTemplate gUnknown_084975D4;
#endif //POKEEMERALD_DATA3_H #endif //POKEEMERALD_DATA3_H

View File

@ -1336,3 +1336,13 @@ void UpdateFieldObjectsForCameraUpdate(s16 x, s16 y)
SpawnFieldObjectsInView(x, y); SpawnFieldObjectsInView(x, y);
RemoveFieldObjectsOutsideView(); RemoveFieldObjectsOutsideView();
} }
u8 AddCameraObject(u8 data0)
{
u8 spriteId;
spriteId = CreateSprite(&gUnknown_084975D4, 0, 0, 4);
gSprites[spriteId].invisible = TRUE;
gSprites[spriteId].data0 = data0;
return spriteId;
}