mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
CopyPlayer2
This commit is contained in:
parent
c6bb13939e
commit
12885ca371
@ -5,89 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start FieldObjectCB_CopyPlayer2
|
||||
FieldObjectCB_CopyPlayer2: @ 8092494
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
movs r0, 0x2E
|
||||
ldrsh r2, [r1, r0]
|
||||
lsls r0, r2, 3
|
||||
adds r0, r2
|
||||
lsls r0, 2
|
||||
ldr r2, =gMapObjects
|
||||
adds r0, r2
|
||||
ldr r2, =sub_80924B8
|
||||
bl FieldObjectStep
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end FieldObjectCB_CopyPlayer2
|
||||
|
||||
thumb_func_start sub_80924B8
|
||||
sub_80924B8: @ 80924B8
|
||||
push {r4,lr}
|
||||
ldr r3, =gUnknown_0850DA90
|
||||
movs r4, 0x30
|
||||
ldrsh r2, [r1, r4]
|
||||
lsls r2, 2
|
||||
adds r2, r3
|
||||
ldr r2, [r2]
|
||||
bl _call_via_r2
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80924B8
|
||||
|
||||
thumb_func_start mss_08062EA4
|
||||
mss_08062EA4: @ 80924D8
|
||||
push {r4-r7,lr}
|
||||
adds r6, r0, 0
|
||||
adds r7, r1, 0
|
||||
ldr r2, =gMapObjects
|
||||
ldr r3, =gPlayerAvatar
|
||||
ldrb r1, [r3, 0x5]
|
||||
lsls r0, r1, 3
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
ldrb r0, [r0, 0x1C]
|
||||
cmp r0, 0xFF
|
||||
beq _080924F8
|
||||
ldrb r0, [r3, 0x3]
|
||||
cmp r0, 0x2
|
||||
bne _08092504
|
||||
_080924F8:
|
||||
movs r0, 0
|
||||
b _0809252C
|
||||
.pool
|
||||
_08092504:
|
||||
ldr r5, =gUnknown_0850DA64
|
||||
bl player_get_x22
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 22
|
||||
adds r4, r5
|
||||
bl player_get_direction_upper_nybble
|
||||
adds r2, r0, 0
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
ldr r3, =sub_8088E64
|
||||
ldr r4, [r4]
|
||||
adds r0, r6, 0
|
||||
adds r1, r7, 0
|
||||
bl _call_via_r4
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
_0809252C:
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end mss_08062EA4
|
||||
|
||||
thumb_func_start FieldObjectCB_TreeDisguise
|
||||
@ void FieldObjectCB_TreeDisguise(struct obj *object)
|
||||
FieldObjectCB_TreeDisguise: @ 809253C
|
||||
|
11
include/metatile_behavior.h
Normal file
11
include/metatile_behavior.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef GUARD_METATILE_BEHAVIOR_H
|
||||
#define GUARD_METATILE_BEHAVIOR_H
|
||||
|
||||
// Exported type declarations
|
||||
|
||||
// Exported RAM declarations
|
||||
|
||||
// Exported ROM declarations
|
||||
bool8 sub_8088E64(u8);
|
||||
|
||||
#endif //GUARD_METATILE_BEHAVIOR_H
|
@ -17,6 +17,7 @@
|
||||
#include "field_ground_effect.h"
|
||||
#include "map_obj_8097404.h"
|
||||
#include "mauville_old_man.h"
|
||||
#include "metatile_behavior.h"
|
||||
#include "field_effect.h"
|
||||
#include "field_effect_helpers.h"
|
||||
#include "field_map_obj.h"
|
||||
@ -3357,6 +3358,17 @@ bool8 oac_hopping(struct MapObject *mapObject, struct Sprite *sprite, u8 playerD
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
field_object_step(CopyPlayer2, gUnknown_0850DA90)
|
||||
|
||||
bool8 mss_08062EA4(struct MapObject *mapObject, struct Sprite *sprite)
|
||||
{
|
||||
if (gMapObjects[gPlayerAvatar.mapObjectId].mapobj_unk_1C == 0xFF || gPlayerAvatar.running1 == 2)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
return gUnknown_0850DA64[player_get_x22()](mapObject, sprite, player_get_direction_upper_nybble(), sub_8088E64);
|
||||
}
|
||||
|
||||
asm(".section .text.get_face_direction_anim_id");
|
||||
|
||||
void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *);
|
||||
|
Loading…
Reference in New Issue
Block a user