through sub_8124278

This commit is contained in:
PikalaxALT 2017-10-31 08:44:03 -04:00
parent 6cd0086bf9
commit 9f03434a13
2 changed files with 22 additions and 48 deletions

View File

@ -5,52 +5,6 @@
.text
thumb_func_start sub_8124238
sub_8124238: @ 8124238
push {r4,lr}
ldr r4, =gRegionMap
ldr r0, [r4]
ldr r0, [r0, 0x1C]
cmp r0, 0
beq _0812425C
bl DestroySprite
ldr r0, [r4]
adds r0, 0x58
ldrh r0, [r0]
bl FreeSpriteTilesByTag
ldr r0, [r4]
adds r0, 0x5A
ldrh r0, [r0]
bl FreeSpritePaletteByTag
_0812425C:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8124238
thumb_func_start sub_8124268
sub_8124268: @ 8124268
ldr r0, =gRegionMap
ldr r0, [r0]
ldr r1, [r0, 0x1C]
movs r0, 0x1
strh r0, [r1, 0x34]
bx lr
.pool
thumb_func_end sub_8124268
thumb_func_start sub_8124278
sub_8124278: @ 8124278
ldr r0, =gRegionMap
ldr r0, [r0]
ldr r1, [r0, 0x1C]
movs r0, 0
strh r0, [r1, 0x34]
bx lr
.pool
thumb_func_end sub_8124278
thumb_func_start sub_8124288
sub_8124288: @ 8124288
push {r4-r6,lr}

View File

@ -56,7 +56,7 @@ static void sub_8123F30(u16 *x, u16 *y);
static bool32 sub_8123F74(u8 mapSecId);
static void sub_8123FB0(void);
static bool8 sub_8124038(u16 y);
void sub_8124238(void);
static void sub_8124238(void);
void sub_81243B0(void);
void sub_81243DC(void);
@ -1021,6 +1021,26 @@ void CreateRegionMapCursor(u16 tileTag, u16 paletteTag)
}
gRegionMap->cursorSprite->data1 = 2;
gRegionMap->cursorSprite->data2 = (IndexOfSpritePaletteTag(paletteTag) << 4) + 0x101;
gRegionMap->cursorSprite->data3 = 1;
gRegionMap->cursorSprite->data3 = TRUE;
}
}
static void sub_8124238(void)
{
if (gRegionMap->cursorSprite != NULL)
{
DestroySprite(gRegionMap->cursorSprite);
FreeSpriteTilesByTag(gRegionMap->cursorTileTag);
FreeSpritePaletteByTag(gRegionMap->cursorPaletteTag);
}
}
void sub_8124268(void)
{
gRegionMap->cursorSprite->data3 = TRUE;
}
void sub_8124278(void)
{
gRegionMap->cursorSprite->data3 = FALSE;
}