mirror of https://github.com/pret/pokeemerald.git
through sub_8124668
This commit is contained in:
parent
c3c08bf037
commit
f6d1e5a965
|
@ -5,63 +5,6 @@
|
|||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8124630
|
||||
sub_8124630: @ 8124630
|
||||
push {r4,r5,lr}
|
||||
ldr r5, [sp, 0xC]
|
||||
lsls r0, 16
|
||||
ldr r4, =gRegionMapEntries
|
||||
lsrs r0, 13
|
||||
adds r0, r4
|
||||
ldrb r4, [r0]
|
||||
strh r4, [r1]
|
||||
ldrb r1, [r0, 0x1]
|
||||
strh r1, [r2]
|
||||
ldrb r1, [r0, 0x2]
|
||||
strh r1, [r3]
|
||||
ldrb r0, [r0, 0x3]
|
||||
strh r0, [r5]
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8124630
|
||||
|
||||
thumb_func_start sub_8124658
|
||||
sub_8124658: @ 8124658
|
||||
ldr r0, =gRegionMap
|
||||
ldr r0, [r0]
|
||||
adds r0, 0x78
|
||||
ldrb r0, [r0]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_8124658
|
||||
|
||||
thumb_func_start sub_8124668
|
||||
sub_8124668: @ 8124668
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
movs r1, 0
|
||||
ldr r3, =gUnknown_085A1C34
|
||||
_08124672:
|
||||
adds r0, r1, r3
|
||||
ldrb r0, [r0]
|
||||
cmp r2, r0
|
||||
bne _08124684
|
||||
movs r0, 0x1
|
||||
b _0812468C
|
||||
.pool
|
||||
_08124684:
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x2
|
||||
bls _08124672
|
||||
movs r0, 0
|
||||
_0812468C:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8124668
|
||||
|
||||
thumb_func_start sub_8124690
|
||||
sub_8124690: @ 8124690
|
||||
push {r4,lr}
|
||||
|
|
|
@ -309,6 +309,6 @@ u16 GetRegionMapSectionIdAt(u16 x, u16 y);
|
|||
void CreateRegionMapPlayerIcon(u16 x, u16 y);
|
||||
void CreateRegionMapCursor(u16 tileTag, u16 paletteTag);
|
||||
u8 *GetMapName(u8 *, u16, u16);
|
||||
bool32 sub_8124668(u16 mapSecId);
|
||||
bool32 sub_8124668(u8 mapSecId);
|
||||
|
||||
#endif //GUARD_REGION_MAP_H
|
||||
|
|
|
@ -32,8 +32,10 @@ struct UnkStruct_0203A148 {
|
|||
|
||||
struct RegionMapLocation
|
||||
{
|
||||
u8 x, y;
|
||||
u8 width, height;
|
||||
u8 x;
|
||||
u8 y;
|
||||
u8 width;
|
||||
u8 height;
|
||||
const u8 *name;
|
||||
};
|
||||
|
||||
|
@ -89,6 +91,7 @@ extern const struct SpritePalette gUnknown_085A1C00;
|
|||
extern const struct SpriteTemplate gUnknown_085A1C08;
|
||||
extern const struct OamData gUnknown_085A1C20;
|
||||
extern const union AnimCmd *const gUnknown_085A1C30[];
|
||||
extern const u8 gUnknown_085A1C34[];
|
||||
|
||||
// .text
|
||||
|
||||
|
@ -1234,3 +1237,30 @@ u8 *sub_8124610(u8 *dest, u16 mapSecId)
|
|||
return sub_81245DC(dest, mapSecId);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8124630(u16 mapSecId, u16 *x, u16 *y, u16 *width, u16 *height)
|
||||
{
|
||||
*x = gRegionMapEntries[mapSecId].x;
|
||||
*y = gRegionMapEntries[mapSecId].y;
|
||||
*width = gRegionMapEntries[mapSecId].width;
|
||||
*height = gRegionMapEntries[mapSecId].height;
|
||||
}
|
||||
|
||||
bool8 sub_8124658(void)
|
||||
{
|
||||
return gRegionMap->zoomed;
|
||||
}
|
||||
|
||||
bool32 sub_8124668(u8 mapSecId)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < 3; i ++)
|
||||
{
|
||||
if (mapSecId == gUnknown_085A1C34[i])
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue