mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
AddCameraObject
This commit is contained in:
parent
5a5ea8c740
commit
9e0a171098
@ -5,40 +5,6 @@
|
||||
|
||||
.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
|
||||
@ void ObjectCB_CameraObject(struct obj *object)
|
||||
ObjectCB_CameraObject: @ 808ED78
|
||||
|
@ -14,5 +14,6 @@ extern const struct SpritePalette gUnknown_0850BBC8[];
|
||||
extern const struct PairedPalettes gUnknown_0850BD00[15];
|
||||
extern const struct PairedPalettes gUnknown_0850BD78[15];
|
||||
extern u8 gUnknown_084975C4[0x10];
|
||||
extern const struct SpriteTemplate gUnknown_084975D4;
|
||||
|
||||
#endif //POKEEMERALD_DATA3_H
|
||||
|
@ -1336,3 +1336,13 @@ void UpdateFieldObjectsForCameraUpdate(s16 x, s16 y)
|
||||
SpawnFieldObjectsInView(x, y);
|
||||
RemoveFieldObjectsOutsideView();
|
||||
}
|
||||
|
||||
u8 AddCameraObject(u8 data0)
|
||||
{
|
||||
u8 spriteId;
|
||||
|
||||
spriteId = CreateSprite(&gUnknown_084975D4, 0, 0, 4);
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
gSprites[spriteId].data0 = data0;
|
||||
return spriteId;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user