sub_8092FF0

This commit is contained in:
PikalaxALT 2017-09-16 21:59:14 -04:00
parent bd48354207
commit 3f2c6556cb
3 changed files with 22 additions and 34 deletions

View File

@ -5,40 +5,6 @@
.text
thumb_func_start sub_8092FF0
sub_8092FF0: @ 8092FF0
push {r4,r5,lr}
ldr r5, =gSaveBlock1Ptr
ldr r4, [r5]
ldrh r4, [r4]
lsls r0, 16
asrs r0, 16
subs r0, r4
lsls r0, 4
strh r0, [r2]
ldr r0, [r5]
ldrh r0, [r0, 0x2]
lsls r1, 16
asrs r1, 16
subs r1, r0
lsls r1, 4
strh r1, [r3]
ldr r1, =gUnknown_03005DEC
ldrh r0, [r2]
ldrh r1, [r1]
subs r0, r1
strh r0, [r2]
ldr r1, =gUnknown_03005DE8
ldrh r0, [r3]
ldrh r1, [r1]
subs r0, r1
strh r0, [r3]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8092FF0
thumb_func_start sub_8093038
sub_8093038: @ 8093038
push {r4-r7,lr}

13
include/field_camera.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef GUARD_FIELD_CAMERA_H
#define GUARD_FIELD_CAMERA_H
// Exported type declarations
// Exported RAM declarations
extern u16 gUnknown_03005DEC;
extern u16 gUnknown_03005DE8;
// Exported ROM declarations
#endif //GUARD_FIELD_CAMERA_H

View File

@ -20,6 +20,7 @@
#include "metatile_behavior.h"
#include "field_effect.h"
#include "field_effect_helpers.h"
#include "field_camera.h"
#include "field_map_obj.h"
#define NUM_FIELD_MAP_OBJECT_TEMPLATES 0x51
@ -3827,6 +3828,14 @@ void sub_8092F88(u32 dirn, s16 *x, s16 *y, s16 dx, s16 dy)
}
}
void sub_8092FF0(s16 x, s16 y, s16 *dest_x, s16 *dest_y)
{
*dest_x = (x - gSaveBlock1Ptr->pos.x) << 4;
*dest_y = (y - gSaveBlock1Ptr->pos.y) << 4;
*dest_x -= gUnknown_03005DEC;
*dest_y -= gUnknown_03005DE8;
}
asm(".section .text.get_face_direction_anim_id");
void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *);