through UnhideRegionMapPlayerIcon
This commit is contained in:
@@ -362,7 +362,7 @@ sub_813CD04: @ 813CD04
|
|||||||
adds r1, r3, 0
|
adds r1, r3, 0
|
||||||
bl get_mapheader_by_bank_and_number
|
bl get_mapheader_by_bank_and_number
|
||||||
ldrb r0, [r0, 0x14]
|
ldrb r0, [r0, 0x14]
|
||||||
bl sub_8123F9C
|
bl CorrectSpecialMapSecId
|
||||||
ldr r2, [r4]
|
ldr r2, [r4]
|
||||||
movs r1, 0x88
|
movs r1, 0x88
|
||||||
lsls r1, 1
|
lsls r1, 1
|
||||||
@@ -653,7 +653,7 @@ _0813CF5A:
|
|||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
adds r1, r6, 0
|
adds r1, r6, 0
|
||||||
str r3, [sp]
|
str r3, [sp]
|
||||||
bl sub_8123E9C
|
bl GetRegionMapSectionIdAt
|
||||||
ldr r3, [sp]
|
ldr r3, [sp]
|
||||||
ldr r2, [r3]
|
ldr r2, [r3]
|
||||||
mov r7, r9
|
mov r7, r9
|
||||||
@@ -1338,11 +1338,11 @@ _0813D4F8:
|
|||||||
bl sub_8122D88
|
bl sub_8122D88
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl sub_8124288
|
bl CreateRegionMapPlayerIcon
|
||||||
movs r1, 0x8
|
movs r1, 0x8
|
||||||
negs r1, r1
|
negs r1, r1
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
bl sub_8123824
|
bl PokedexAreaScreen_UpdateRegionMapVariablesAndVideoRegs
|
||||||
b _0813D584
|
b _0813D584
|
||||||
.pool
|
.pool
|
||||||
_0813D520:
|
_0813D520:
|
||||||
|
|||||||
@@ -10991,7 +10991,7 @@ _081CC784:
|
|||||||
bne _081CC7AC
|
bne _081CC7AC
|
||||||
movs r0, 0x4
|
movs r0, 0x4
|
||||||
movs r1, 0x9
|
movs r1, 0x9
|
||||||
bl sub_8124288
|
bl CreateRegionMapPlayerIcon
|
||||||
movs r0, 0x5
|
movs r0, 0x5
|
||||||
movs r1, 0xA
|
movs r1, 0xA
|
||||||
bl CreateRegionMapCursor
|
bl CreateRegionMapCursor
|
||||||
|
|||||||
@@ -5,94 +5,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_81243B0
|
|
||||||
sub_81243B0: @ 81243B0
|
|
||||||
push {lr}
|
|
||||||
ldr r3, =gRegionMap
|
|
||||||
ldr r0, [r3]
|
|
||||||
ldr r2, [r0, 0x20]
|
|
||||||
cmp r2, 0
|
|
||||||
beq _081243CE
|
|
||||||
adds r2, 0x3E
|
|
||||||
ldrb r0, [r2]
|
|
||||||
movs r1, 0x4
|
|
||||||
orrs r0, r1
|
|
||||||
strb r0, [r2]
|
|
||||||
ldr r0, [r3]
|
|
||||||
ldr r1, [r0, 0x20]
|
|
||||||
ldr r0, =SpriteCallbackDummy
|
|
||||||
str r0, [r1, 0x1C]
|
|
||||||
_081243CE:
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.pool
|
|
||||||
thumb_func_end sub_81243B0
|
|
||||||
|
|
||||||
thumb_func_start sub_81243DC
|
|
||||||
sub_81243DC: @ 81243DC
|
|
||||||
push {lr}
|
|
||||||
ldr r0, =gRegionMap
|
|
||||||
ldr r3, [r0]
|
|
||||||
ldr r1, [r3, 0x20]
|
|
||||||
cmp r1, 0
|
|
||||||
beq _08124452
|
|
||||||
adds r0, r3, 0
|
|
||||||
adds r0, 0x78
|
|
||||||
ldrb r0, [r0]
|
|
||||||
cmp r0, 0x1
|
|
||||||
bne _0812441C
|
|
||||||
adds r0, r3, 0
|
|
||||||
adds r0, 0x74
|
|
||||||
ldrh r0, [r0]
|
|
||||||
lsls r0, 4
|
|
||||||
subs r0, 0x30
|
|
||||||
strh r0, [r1, 0x20]
|
|
||||||
ldr r1, [r3, 0x20]
|
|
||||||
adds r0, r3, 0
|
|
||||||
adds r0, 0x76
|
|
||||||
ldrh r0, [r0]
|
|
||||||
lsls r0, 4
|
|
||||||
subs r0, 0x42
|
|
||||||
strh r0, [r1, 0x22]
|
|
||||||
ldr r1, [r3, 0x20]
|
|
||||||
ldr r0, =sub_812445C
|
|
||||||
b _08124444
|
|
||||||
.pool
|
|
||||||
_0812441C:
|
|
||||||
adds r0, r3, 0
|
|
||||||
adds r0, 0x74
|
|
||||||
ldrh r0, [r0]
|
|
||||||
lsls r0, 3
|
|
||||||
adds r0, 0x4
|
|
||||||
movs r2, 0
|
|
||||||
strh r0, [r1, 0x20]
|
|
||||||
ldr r1, [r3, 0x20]
|
|
||||||
adds r0, r3, 0
|
|
||||||
adds r0, 0x76
|
|
||||||
ldrh r0, [r0]
|
|
||||||
lsls r0, 3
|
|
||||||
adds r0, 0x4
|
|
||||||
strh r0, [r1, 0x22]
|
|
||||||
ldr r0, [r3, 0x20]
|
|
||||||
strh r2, [r0, 0x24]
|
|
||||||
ldr r0, [r3, 0x20]
|
|
||||||
strh r2, [r0, 0x26]
|
|
||||||
ldr r1, [r3, 0x20]
|
|
||||||
ldr r0, =sub_81244EC
|
|
||||||
_08124444:
|
|
||||||
str r0, [r1, 0x1C]
|
|
||||||
adds r1, 0x3E
|
|
||||||
ldrb r2, [r1]
|
|
||||||
movs r0, 0x5
|
|
||||||
negs r0, r0
|
|
||||||
ands r0, r2
|
|
||||||
strb r0, [r1]
|
|
||||||
_08124452:
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.pool
|
|
||||||
thumb_func_end sub_81243DC
|
|
||||||
|
|
||||||
thumb_func_start sub_812445C
|
thumb_func_start sub_812445C
|
||||||
sub_812445C: @ 812445C
|
sub_812445C: @ 812445C
|
||||||
push {r4,lr}
|
push {r4,lr}
|
||||||
@@ -521,7 +433,7 @@ _0812479C:
|
|||||||
bl CreateRegionMapCursor
|
bl CreateRegionMapCursor
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl sub_8124288
|
bl CreateRegionMapPlayerIcon
|
||||||
ldr r0, [r4]
|
ldr r0, [r4]
|
||||||
ldrh r1, [r0, 0x8]
|
ldrh r1, [r0, 0x8]
|
||||||
strh r1, [r0, 0x6]
|
strh r1, [r0, 0x6]
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ enum {
|
|||||||
struct RegionMap {
|
struct RegionMap {
|
||||||
/*0x000*/ u16 mapSecId;
|
/*0x000*/ u16 mapSecId;
|
||||||
/*0x002*/ u8 iconDrawType;
|
/*0x002*/ u8 iconDrawType;
|
||||||
/*0x003*/ u8 unk_003;
|
/*0x003*/ u8 posWithinMapSec;
|
||||||
/*0x004*/ u8 mapSecName[0x14];
|
/*0x004*/ u8 mapSecName[0x14];
|
||||||
/*0x018*/ u8 (*inputCallback)(void);
|
/*0x018*/ u8 (*inputCallback)(void);
|
||||||
/*0x01c*/ struct Sprite *cursorSprite;
|
/*0x01c*/ struct Sprite *cursorSprite;
|
||||||
@@ -303,9 +303,10 @@ bool8 sub_8122DB0(void);
|
|||||||
void UpdateRegionMapVideoRegs(void);
|
void UpdateRegionMapVideoRegs(void);
|
||||||
void InitRegionMap(struct RegionMap *regionMap, u8 argument);
|
void InitRegionMap(struct RegionMap *regionMap, u8 argument);
|
||||||
u8 sub_81230AC(void);
|
u8 sub_81230AC(void);
|
||||||
|
bool8 sub_8123514(void);
|
||||||
void FreeRegionMapIconResources(void);
|
void FreeRegionMapIconResources(void);
|
||||||
u16 sub_8123E9C(u16 x, u16 y);
|
u16 GetRegionMapSectionIdAt(u16 x, u16 y);
|
||||||
void sub_8124288(u16 x, u16 y);
|
void CreateRegionMapPlayerIcon(u16 x, u16 y);
|
||||||
void CreateRegionMapCursor(u16 tileTag, u16 paletteTag);
|
void CreateRegionMapCursor(u16 tileTag, u16 paletteTag);
|
||||||
bool32 sub_8124668(u16 mapSecId);
|
bool32 sub_8124668(u16 mapSecId);
|
||||||
void GetMapName(u8 *, u16, u16);
|
void GetMapName(u8 *, u16, u16);
|
||||||
|
|||||||
@@ -23,15 +23,15 @@ static EWRAM_DATA struct {
|
|||||||
u32 filler_004;
|
u32 filler_004;
|
||||||
struct RegionMap regionMap;
|
struct RegionMap regionMap;
|
||||||
u16 state;
|
u16 state;
|
||||||
} *gUnknown_0203BCD0 = NULL;
|
} *sFieldRegionMapHandler = NULL;
|
||||||
|
|
||||||
// Static ROM declarations
|
// Static ROM declarations
|
||||||
|
|
||||||
static void sub_81701C4(void);
|
static void MCB2_InitRegionMapRegisters(void);
|
||||||
static void sub_8170260(void);
|
static void VBCB_FieldUpdateRegionMap(void);
|
||||||
static void sub_8170274(void);
|
static void MCB2_FieldUpdateRegionMap(void);
|
||||||
static void sub_8170290(void);
|
static void FieldUpdateRegionMap(void);
|
||||||
static void sub_8170428(void);
|
static void PrintRegionMapSecName(void);
|
||||||
|
|
||||||
// .rodata
|
// .rodata
|
||||||
|
|
||||||
@@ -68,13 +68,13 @@ static const struct WindowTemplate gUnknown_085E5070[] = {
|
|||||||
void sub_817018C(MainCallback callback)
|
void sub_817018C(MainCallback callback)
|
||||||
{
|
{
|
||||||
SetVBlankCallback(NULL);
|
SetVBlankCallback(NULL);
|
||||||
gUnknown_0203BCD0 = malloc(sizeof(*gUnknown_0203BCD0));
|
sFieldRegionMapHandler = malloc(sizeof(*sFieldRegionMapHandler));
|
||||||
gUnknown_0203BCD0->state = 0;
|
sFieldRegionMapHandler->state = 0;
|
||||||
gUnknown_0203BCD0->callback = callback;
|
sFieldRegionMapHandler->callback = callback;
|
||||||
SetMainCallback2(sub_81701C4);
|
SetMainCallback2(MCB2_InitRegionMapRegisters);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_81701C4(void)
|
static void MCB2_InitRegionMapRegisters(void)
|
||||||
{
|
{
|
||||||
SetGpuReg(REG_OFFSET_DISPCNT, 0);
|
SetGpuReg(REG_OFFSET_DISPCNT, 0);
|
||||||
SetGpuReg(REG_OFFSET_BG0HOFS, 0);
|
SetGpuReg(REG_OFFSET_BG0HOFS, 0);
|
||||||
@@ -93,37 +93,37 @@ static void sub_81701C4(void)
|
|||||||
DeactivateAllTextPrinters();
|
DeactivateAllTextPrinters();
|
||||||
sub_809882C(0, 0x27, 0xd0);
|
sub_809882C(0, 0x27, 0xd0);
|
||||||
clear_scheduled_bg_copies_to_vram();
|
clear_scheduled_bg_copies_to_vram();
|
||||||
SetMainCallback2(sub_8170274);
|
SetMainCallback2(MCB2_FieldUpdateRegionMap);
|
||||||
SetVBlankCallback(sub_8170260);
|
SetVBlankCallback(VBCB_FieldUpdateRegionMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8170260(void)
|
static void VBCB_FieldUpdateRegionMap(void)
|
||||||
{
|
{
|
||||||
LoadOam();
|
LoadOam();
|
||||||
ProcessSpriteCopyRequests();
|
ProcessSpriteCopyRequests();
|
||||||
TransferPlttBuffer();
|
TransferPlttBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8170274(void)
|
static void MCB2_FieldUpdateRegionMap(void)
|
||||||
{
|
{
|
||||||
sub_8170290();
|
FieldUpdateRegionMap();
|
||||||
AnimateSprites();
|
AnimateSprites();
|
||||||
BuildOamBuffer();
|
BuildOamBuffer();
|
||||||
UpdatePaletteFade();
|
UpdatePaletteFade();
|
||||||
do_scheduled_bg_tilemap_copies_to_vram();
|
do_scheduled_bg_tilemap_copies_to_vram();
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8170290(void)
|
static void FieldUpdateRegionMap(void)
|
||||||
{
|
{
|
||||||
u8 offset;
|
u8 offset;
|
||||||
|
|
||||||
switch (gUnknown_0203BCD0->state)
|
switch (sFieldRegionMapHandler->state)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
InitRegionMap(&gUnknown_0203BCD0->regionMap, 0);
|
InitRegionMap(&sFieldRegionMapHandler->regionMap, 0);
|
||||||
sub_8124288(0, 0);
|
CreateRegionMapPlayerIcon(0, 0);
|
||||||
CreateRegionMapCursor(1, 1);
|
CreateRegionMapCursor(1, 1);
|
||||||
gUnknown_0203BCD0->state ++;
|
sFieldRegionMapHandler->state ++;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
SetWindowBorderStyle(1, 0, 0x27, 0xd);
|
SetWindowBorderStyle(1, 0, 0x27, 0xd);
|
||||||
@@ -131,47 +131,47 @@ void sub_8170290(void)
|
|||||||
PrintTextOnWindow(1, 1, gText_Hoenn, offset, 1, 0, NULL);
|
PrintTextOnWindow(1, 1, gText_Hoenn, offset, 1, 0, NULL);
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
SetWindowBorderStyle(0, 0, 0x27, 0xd);
|
SetWindowBorderStyle(0, 0, 0x27, 0xd);
|
||||||
sub_8170428();
|
PrintRegionMapSecName();
|
||||||
BeginNormalPaletteFade(-1, 0, 16, 0, 0);
|
BeginNormalPaletteFade(-1, 0, 16, 0, 0);
|
||||||
gUnknown_0203BCD0->state ++;
|
sFieldRegionMapHandler->state ++;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON);
|
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON);
|
||||||
ShowBg(0);
|
ShowBg(0);
|
||||||
ShowBg(2);
|
ShowBg(2);
|
||||||
gUnknown_0203BCD0->state ++;
|
sFieldRegionMapHandler->state ++;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
gUnknown_0203BCD0->state ++;
|
sFieldRegionMapHandler->state ++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
switch (sub_81230AC())
|
switch (sub_81230AC())
|
||||||
{
|
{
|
||||||
case INPUT_EVENT_MOVE_END:
|
case INPUT_EVENT_MOVE_END:
|
||||||
sub_8170428();
|
PrintRegionMapSecName();
|
||||||
break;
|
break;
|
||||||
case INPUT_EVENT_A_BUTTON:
|
case INPUT_EVENT_A_BUTTON:
|
||||||
case INPUT_EVENT_B_BUTTON:
|
case INPUT_EVENT_B_BUTTON:
|
||||||
gUnknown_0203BCD0->state ++;
|
sFieldRegionMapHandler->state ++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
BeginNormalPaletteFade(-1, 0, 0, 16, 0);
|
BeginNormalPaletteFade(-1, 0, 0, 16, 0);
|
||||||
gUnknown_0203BCD0->state ++;
|
sFieldRegionMapHandler->state ++;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
if (!gPaletteFade.active)
|
if (!gPaletteFade.active)
|
||||||
{
|
{
|
||||||
FreeRegionMapIconResources();
|
FreeRegionMapIconResources();
|
||||||
SetMainCallback2(gUnknown_0203BCD0->callback);
|
SetMainCallback2(sFieldRegionMapHandler->callback);
|
||||||
if (gUnknown_0203BCD0 != NULL)
|
if (sFieldRegionMapHandler != NULL)
|
||||||
{
|
{
|
||||||
free(gUnknown_0203BCD0);
|
free(sFieldRegionMapHandler);
|
||||||
gUnknown_0203BCD0 = NULL;
|
sFieldRegionMapHandler = NULL;
|
||||||
}
|
}
|
||||||
FreeAllWindowBuffers();
|
FreeAllWindowBuffers();
|
||||||
}
|
}
|
||||||
@@ -179,12 +179,12 @@ void sub_8170290(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8170428(void)
|
static void PrintRegionMapSecName(void)
|
||||||
{
|
{
|
||||||
if (gUnknown_0203BCD0->regionMap.iconDrawType != 0)
|
if (sFieldRegionMapHandler->regionMap.iconDrawType != MAPSECTYPE_NONE)
|
||||||
{
|
{
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, 0x11);
|
||||||
PrintTextOnWindow(0, 1, gUnknown_0203BCD0->regionMap.mapSecName, 0, 1, 0, NULL);
|
PrintTextOnWindow(0, 1, sFieldRegionMapHandler->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||||
schedule_bg_copy_tilemap_to_vram(0);
|
schedule_bg_copy_tilemap_to_vram(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
158
src/region_map.c
158
src/region_map.c
@@ -45,20 +45,20 @@ static u8 MoveRegionMapCursor_Full(void);
|
|||||||
static u8 ProcessRegionMapInput_Zoomed(void);
|
static u8 ProcessRegionMapInput_Zoomed(void);
|
||||||
static u8 MoveRegionMapCursor_Zoomed(void);
|
static u8 MoveRegionMapCursor_Zoomed(void);
|
||||||
static void CalcZoomScrollParams(s16 scrollX, s16 scrollY, s16 c, s16 d, u16 e, u16 f, u8 rotation);
|
static void CalcZoomScrollParams(s16 scrollX, s16 scrollY, s16 c, s16 d, u16 e, u16 f, u8 rotation);
|
||||||
u16 GetRegionMapSectionIdAt(u16 x, u16 y);
|
static u16 GetRegionMapSectionIdAt_Internal(u16 x, u16 y);
|
||||||
static void sub_812378C(s16 x, s16 y);
|
static void RegionMap_SetBG2XAndBG2Y(s16 x, s16 y);
|
||||||
static void sub_81238AC(void);
|
static void RegionMap_InitializeStateBasedOnPlayerLocation(void);
|
||||||
static void sub_8123C00(void);
|
static void RegionMap_InitializeStateBasedOnSSTidalLocation(void);
|
||||||
static u8 get_flagnr_blue_points(u16 mapSecId);
|
static u8 get_flagnr_blue_points(u16 mapSecId);
|
||||||
u16 sub_8123EB4(u16 mapSecId);
|
static u16 CorrectSpecialMapSecId_Internal(u16 mapSecId);
|
||||||
static u16 sub_8123F04(void);
|
static u16 RegionMap_GetTerraCaveMapSecId(void);
|
||||||
static void sub_8123F30(u16 *x, u16 *y);
|
static void RegionMap_GetMarineCaveCoords(u16 *x, u16 *y);
|
||||||
static bool32 sub_8123F74(u8 mapSecId);
|
static bool32 RegionMap_IsPlayerInCave(u8 mapSecId);
|
||||||
static void sub_8123FB0(void);
|
static void RegionMap_GetPositionOfCursorWithinMapSection(void);
|
||||||
static bool8 sub_8124038(u16 y);
|
static bool8 RegionMap_IsMapSecIdInNextRow(u16 y);
|
||||||
static void sub_8124238(void);
|
static void FreeRegionMapCursorSprite(void);
|
||||||
void sub_81243B0(void);
|
static void HideRegionMapPlayerIcon(void);
|
||||||
void sub_81243DC(void);
|
static void UnhideRegionMapPlayerIcon(void);
|
||||||
void sub_812445C(struct Sprite *sprite);
|
void sub_812445C(struct Sprite *sprite);
|
||||||
void sub_81244EC(struct Sprite *sprite);
|
void sub_81244EC(struct Sprite *sprite);
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ void sub_8122CF8(struct RegionMap *regionMap, struct BgTemplate *template, bool8
|
|||||||
void sub_8122D88(struct RegionMap *regionMap)
|
void sub_8122D88(struct RegionMap *regionMap)
|
||||||
{
|
{
|
||||||
gRegionMap = regionMap;
|
gRegionMap = regionMap;
|
||||||
sub_81238AC();
|
RegionMap_InitializeStateBasedOnPlayerLocation();
|
||||||
gRegionMap->playerIconSpritePosX = gRegionMap->cursorPosX;
|
gRegionMap->playerIconSpritePosX = gRegionMap->cursorPosX;
|
||||||
gRegionMap->playerIconSpritePosY = gRegionMap->cursorPosY;
|
gRegionMap->playerIconSpritePosY = gRegionMap->cursorPosY;
|
||||||
}
|
}
|
||||||
@@ -163,10 +163,10 @@ bool8 sub_8122DB0(void)
|
|||||||
LZ77UnCompWram(gUnknown_0859F650, gRegionMap->cursorLargeImage);
|
LZ77UnCompWram(gUnknown_0859F650, gRegionMap->cursorLargeImage);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
sub_81238AC();
|
RegionMap_InitializeStateBasedOnPlayerLocation();
|
||||||
gRegionMap->playerIconSpritePosX = gRegionMap->cursorPosX;
|
gRegionMap->playerIconSpritePosX = gRegionMap->cursorPosX;
|
||||||
gRegionMap->playerIconSpritePosY = gRegionMap->cursorPosY;
|
gRegionMap->playerIconSpritePosY = gRegionMap->cursorPosY;
|
||||||
gRegionMap->mapSecId = sub_8123EB4(gRegionMap->mapSecId);
|
gRegionMap->mapSecId = CorrectSpecialMapSecId_Internal(gRegionMap->mapSecId);
|
||||||
gRegionMap->iconDrawType = get_flagnr_blue_points(gRegionMap->mapSecId);
|
gRegionMap->iconDrawType = get_flagnr_blue_points(gRegionMap->mapSecId);
|
||||||
GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16);
|
GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16);
|
||||||
break;
|
break;
|
||||||
@@ -185,7 +185,7 @@ bool8 sub_8122DB0(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
sub_8123FB0();
|
RegionMap_GetPositionOfCursorWithinMapSection();
|
||||||
UpdateRegionMapVideoRegs();
|
UpdateRegionMapVideoRegs();
|
||||||
gRegionMap->cursorSprite = NULL;
|
gRegionMap->cursorSprite = NULL;
|
||||||
gRegionMap->playerIconSprite = NULL;
|
gRegionMap->playerIconSprite = NULL;
|
||||||
@@ -302,14 +302,14 @@ static u8 MoveRegionMapCursor_Full(void)
|
|||||||
{
|
{
|
||||||
gRegionMap->cursorPosY --;
|
gRegionMap->cursorPosY --;
|
||||||
}
|
}
|
||||||
mapSecId = GetRegionMapSectionIdAt(gRegionMap->cursorPosX, gRegionMap->cursorPosY);
|
mapSecId = GetRegionMapSectionIdAt_Internal(gRegionMap->cursorPosX, gRegionMap->cursorPosY);
|
||||||
gRegionMap->iconDrawType = get_flagnr_blue_points(mapSecId);
|
gRegionMap->iconDrawType = get_flagnr_blue_points(mapSecId);
|
||||||
if (mapSecId != gRegionMap->mapSecId)
|
if (mapSecId != gRegionMap->mapSecId)
|
||||||
{
|
{
|
||||||
gRegionMap->mapSecId = mapSecId;
|
gRegionMap->mapSecId = mapSecId;
|
||||||
GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16);
|
GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16);
|
||||||
}
|
}
|
||||||
sub_8123FB0();
|
RegionMap_GetPositionOfCursorWithinMapSection();
|
||||||
gRegionMap->inputCallback = ProcessRegionMapInput_Full;
|
gRegionMap->inputCallback = ProcessRegionMapInput_Full;
|
||||||
return INPUT_EVENT_MOVE_END;
|
return INPUT_EVENT_MOVE_END;
|
||||||
}
|
}
|
||||||
@@ -365,7 +365,7 @@ static u8 MoveRegionMapCursor_Zoomed(void)
|
|||||||
|
|
||||||
gRegionMap->scrollY += gRegionMap->zoomedCursorDeltaY;
|
gRegionMap->scrollY += gRegionMap->zoomedCursorDeltaY;
|
||||||
gRegionMap->scrollX += gRegionMap->zoomedCursorDeltaX;
|
gRegionMap->scrollX += gRegionMap->zoomedCursorDeltaX;
|
||||||
sub_812378C(gRegionMap->scrollX, gRegionMap->scrollY);
|
RegionMap_SetBG2XAndBG2Y(gRegionMap->scrollX, gRegionMap->scrollY);
|
||||||
gRegionMap->zoomedCursorMovementFrameCounter ++;
|
gRegionMap->zoomedCursorMovementFrameCounter ++;
|
||||||
if (gRegionMap->zoomedCursorMovementFrameCounter == 8)
|
if (gRegionMap->zoomedCursorMovementFrameCounter == 8)
|
||||||
{
|
{
|
||||||
@@ -375,14 +375,14 @@ static u8 MoveRegionMapCursor_Zoomed(void)
|
|||||||
{
|
{
|
||||||
gRegionMap->zoomedCursorPosX = x;
|
gRegionMap->zoomedCursorPosX = x;
|
||||||
gRegionMap->zoomedCursorPosY = y;
|
gRegionMap->zoomedCursorPosY = y;
|
||||||
mapSecId = GetRegionMapSectionIdAt(x, y);
|
mapSecId = GetRegionMapSectionIdAt_Internal(x, y);
|
||||||
gRegionMap->iconDrawType = get_flagnr_blue_points(mapSecId);
|
gRegionMap->iconDrawType = get_flagnr_blue_points(mapSecId);
|
||||||
if (mapSecId != gRegionMap->mapSecId)
|
if (mapSecId != gRegionMap->mapSecId)
|
||||||
{
|
{
|
||||||
gRegionMap->mapSecId = mapSecId;
|
gRegionMap->mapSecId = mapSecId;
|
||||||
GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16);
|
GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16);
|
||||||
}
|
}
|
||||||
sub_8123FB0();
|
RegionMap_GetPositionOfCursorWithinMapSection();
|
||||||
}
|
}
|
||||||
gRegionMap->zoomedCursorMovementFrameCounter = 0;
|
gRegionMap->zoomedCursorMovementFrameCounter = 0;
|
||||||
gRegionMap->inputCallback = ProcessRegionMapInput_Zoomed;
|
gRegionMap->inputCallback = ProcessRegionMapInput_Zoomed;
|
||||||
@@ -422,13 +422,13 @@ void sub_8123418(void)
|
|||||||
gRegionMap->unk_050 = 0x800;
|
gRegionMap->unk_050 = 0x800;
|
||||||
}
|
}
|
||||||
gRegionMap->unk_06e = 0;
|
gRegionMap->unk_06e = 0;
|
||||||
sub_8124238();
|
FreeRegionMapCursorSprite();
|
||||||
sub_81243B0();
|
HideRegionMapPlayerIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 sub_8123514(void)
|
bool8 sub_8123514(void)
|
||||||
{
|
{
|
||||||
u8 r4;
|
bool8 r4;
|
||||||
|
|
||||||
if (gRegionMap->unk_06e >= 16)
|
if (gRegionMap->unk_06e >= 16)
|
||||||
{
|
{
|
||||||
@@ -445,8 +445,8 @@ u8 sub_8123514(void)
|
|||||||
gRegionMap->zoomed = !gRegionMap->zoomed;
|
gRegionMap->zoomed = !gRegionMap->zoomed;
|
||||||
gRegionMap->inputCallback = (gRegionMap->zoomed == FALSE) ? ProcessRegionMapInput_Full : ProcessRegionMapInput_Zoomed;
|
gRegionMap->inputCallback = (gRegionMap->zoomed == FALSE) ? ProcessRegionMapInput_Full : ProcessRegionMapInput_Zoomed;
|
||||||
CreateRegionMapCursor(gRegionMap->cursorTileTag, gRegionMap->cursorPaletteTag);
|
CreateRegionMapCursor(gRegionMap->cursorTileTag, gRegionMap->cursorPaletteTag);
|
||||||
sub_81243DC();
|
UnhideRegionMapPlayerIcon();
|
||||||
r4 = 0;
|
r4 = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -481,7 +481,7 @@ u8 sub_8123514(void)
|
|||||||
gRegionMap->unk_050 = 0;
|
gRegionMap->unk_050 = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
r4 = 1;
|
r4 = TRUE;
|
||||||
}
|
}
|
||||||
CalcZoomScrollParams(gRegionMap->scrollX, gRegionMap->scrollY, 0x38, 0x48, gRegionMap->unk_04c >> 8, gRegionMap->unk_04c >> 8, 0);
|
CalcZoomScrollParams(gRegionMap->scrollX, gRegionMap->scrollY, 0x38, 0x48, gRegionMap->unk_04c >> 8, gRegionMap->unk_04c >> 8, 0);
|
||||||
return r4;
|
return r4;
|
||||||
@@ -510,7 +510,7 @@ static void CalcZoomScrollParams(s16 scrollX, s16 scrollY, s16 c, s16 d, u16 e,
|
|||||||
gRegionMap->needUpdateVideoRegs = TRUE;
|
gRegionMap->needUpdateVideoRegs = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_812378C(s16 x, s16 y)
|
static void RegionMap_SetBG2XAndBG2Y(s16 x, s16 y)
|
||||||
{
|
{
|
||||||
gRegionMap->bg2x = (x << 8) + 0x1c00;
|
gRegionMap->bg2x = (x << 8) + 0x1c00;
|
||||||
gRegionMap->bg2y = (y << 8) + 0x2400;
|
gRegionMap->bg2y = (y << 8) + 0x2400;
|
||||||
@@ -533,7 +533,7 @@ void UpdateRegionMapVideoRegs(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8123824(s16 x, s16 y)
|
void PokedexAreaScreen_UpdateRegionMapVariablesAndVideoRegs(s16 x, s16 y)
|
||||||
{
|
{
|
||||||
CalcZoomScrollParams(x, y, 0x38, 0x48, 0x100, 0x100, 0);
|
CalcZoomScrollParams(x, y, 0x38, 0x48, 0x100, 0x100, 0);
|
||||||
UpdateRegionMapVideoRegs();
|
UpdateRegionMapVideoRegs();
|
||||||
@@ -544,7 +544,7 @@ void sub_8123824(s16 x, s16 y)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 GetRegionMapSectionIdAt(u16 x, u16 y)
|
static u16 GetRegionMapSectionIdAt_Internal(u16 x, u16 y)
|
||||||
{
|
{
|
||||||
if (y < MAPCURSOR_Y_MIN || y > MAPCURSOR_Y_MAX || x < MAPCURSOR_X_MIN || x > MAPCURSOR_X_MAX)
|
if (y < MAPCURSOR_Y_MIN || y > MAPCURSOR_Y_MAX || x < MAPCURSOR_X_MIN || x > MAPCURSOR_X_MAX)
|
||||||
{
|
{
|
||||||
@@ -555,7 +555,7 @@ u16 GetRegionMapSectionIdAt(u16 x, u16 y)
|
|||||||
return gUnknown_085A096C[x + y * MAP_WIDTH];
|
return gUnknown_085A096C[x + y * MAP_WIDTH];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_81238AC(void)
|
static void RegionMap_InitializeStateBasedOnPlayerLocation(void)
|
||||||
{
|
{
|
||||||
const struct MapHeader *mapHeader;
|
const struct MapHeader *mapHeader;
|
||||||
u16 mapWidth;
|
u16 mapWidth;
|
||||||
@@ -571,7 +571,7 @@ static void sub_81238AC(void)
|
|||||||
|| gSaveBlock1Ptr->location.mapNum == MAP_ID_SS_TIDAL_LOWER_DECK
|
|| gSaveBlock1Ptr->location.mapNum == MAP_ID_SS_TIDAL_LOWER_DECK
|
||||||
|| gSaveBlock1Ptr->location.mapNum == MAP_ID_SS_TIDAL_ROOMS))
|
|| gSaveBlock1Ptr->location.mapNum == MAP_ID_SS_TIDAL_ROOMS))
|
||||||
{
|
{
|
||||||
sub_8123C00();
|
RegionMap_InitializeStateBasedOnSSTidalLocation();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -639,7 +639,7 @@ static void sub_81238AC(void)
|
|||||||
mapHeader = get_mapheader_by_bank_and_number(r4->mapGroup, r4->mapNum);
|
mapHeader = get_mapheader_by_bank_and_number(r4->mapGroup, r4->mapNum);
|
||||||
gRegionMap->mapSecId = mapHeader->regionMapSectionId;
|
gRegionMap->mapSecId = mapHeader->regionMapSectionId;
|
||||||
}
|
}
|
||||||
if (sub_8123F74(gRegionMap->mapSecId))
|
if (RegionMap_IsPlayerInCave(gRegionMap->mapSecId))
|
||||||
{
|
{
|
||||||
gRegionMap->playerIsInCave = TRUE;
|
gRegionMap->playerIsInCave = TRUE;
|
||||||
}
|
}
|
||||||
@@ -723,14 +723,14 @@ static void sub_81238AC(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MAPSEC_UNDERWATER_MARINE_CAVE:
|
case MAPSEC_UNDERWATER_MARINE_CAVE:
|
||||||
sub_8123F30(&gRegionMap->cursorPosX, &gRegionMap->cursorPosY);
|
RegionMap_GetMarineCaveCoords(&gRegionMap->cursorPosX, &gRegionMap->cursorPosY);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gRegionMap->cursorPosX = gRegionMapEntries[gRegionMap->mapSecId].x + x + MAPCURSOR_X_MIN;
|
gRegionMap->cursorPosX = gRegionMapEntries[gRegionMap->mapSecId].x + x + MAPCURSOR_X_MIN;
|
||||||
gRegionMap->cursorPosY = gRegionMapEntries[gRegionMap->mapSecId].y + y + MAPCURSOR_Y_MIN;
|
gRegionMap->cursorPosY = gRegionMapEntries[gRegionMap->mapSecId].y + y + MAPCURSOR_Y_MIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8123C00(void)
|
static void RegionMap_InitializeStateBasedOnSSTidalLocation(void)
|
||||||
{
|
{
|
||||||
u16 y;
|
u16 y;
|
||||||
u16 x;
|
u16 x;
|
||||||
@@ -829,12 +829,12 @@ static u8 get_flagnr_blue_points(u16 mapSecId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 sub_8123E9C(u16 x, u16 y)
|
u16 GetRegionMapSectionIdAt(u16 x, u16 y)
|
||||||
{
|
{
|
||||||
return GetRegionMapSectionIdAt(x, y);
|
return GetRegionMapSectionIdAt_Internal(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 sub_8123EB4(u16 mapSecId)
|
static u16 CorrectSpecialMapSecId_Internal(u16 mapSecId)
|
||||||
{
|
{
|
||||||
u32 i;
|
u32 i;
|
||||||
|
|
||||||
@@ -842,7 +842,7 @@ u16 sub_8123EB4(u16 mapSecId)
|
|||||||
{
|
{
|
||||||
if (gUnknown_085A1B84[i] == mapSecId)
|
if (gUnknown_085A1B84[i] == mapSecId)
|
||||||
{
|
{
|
||||||
return sub_8123F04();
|
return RegionMap_GetTerraCaveMapSecId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (i = 0; gUnknown_085A1B24[i][0] != MAPSEC_NONE; i ++)
|
for (i = 0; gUnknown_085A1B24[i][0] != MAPSEC_NONE; i ++)
|
||||||
@@ -855,7 +855,7 @@ u16 sub_8123EB4(u16 mapSecId)
|
|||||||
return mapSecId;
|
return mapSecId;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u16 sub_8123F04(void)
|
static u16 RegionMap_GetTerraCaveMapSecId(void)
|
||||||
{
|
{
|
||||||
s16 idx;
|
s16 idx;
|
||||||
|
|
||||||
@@ -867,7 +867,7 @@ static u16 sub_8123F04(void)
|
|||||||
return gUnknown_085A1B8A[idx];
|
return gUnknown_085A1B8A[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8123F30(u16 *x, u16 *y)
|
static void RegionMap_GetMarineCaveCoords(u16 *x, u16 *y)
|
||||||
{
|
{
|
||||||
u16 idx;
|
u16 idx;
|
||||||
|
|
||||||
@@ -881,7 +881,7 @@ static void sub_8123F30(u16 *x, u16 *y)
|
|||||||
*y = gUnknown_085A1BAC[idx].y + MAPCURSOR_Y_MIN;
|
*y = gUnknown_085A1BAC[idx].y + MAPCURSOR_Y_MIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool32 sub_8123F74(u8 mapSecId)
|
static bool32 RegionMap_IsPlayerInCave(u8 mapSecId)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -895,20 +895,20 @@ static bool32 sub_8123F74(u8 mapSecId)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 sub_8123F9C(u16 mapSecId)
|
u16 CorrectSpecialMapSecId(u16 mapSecId)
|
||||||
{
|
{
|
||||||
return sub_8123EB4(mapSecId);
|
return CorrectSpecialMapSecId_Internal(mapSecId);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8123FB0(void)
|
static void RegionMap_GetPositionOfCursorWithinMapSection(void)
|
||||||
{
|
{
|
||||||
u16 x;
|
u16 x;
|
||||||
u16 y;
|
u16 y;
|
||||||
u16 unk_003;
|
u16 posWithinMapSec;
|
||||||
|
|
||||||
if (gRegionMap->mapSecId == MAPSEC_NONE)
|
if (gRegionMap->mapSecId == MAPSEC_NONE)
|
||||||
{
|
{
|
||||||
gRegionMap->unk_003 = 0;
|
gRegionMap->posWithinMapSec = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!gRegionMap->zoomed)
|
if (!gRegionMap->zoomed)
|
||||||
@@ -921,12 +921,12 @@ static void sub_8123FB0(void)
|
|||||||
x = gRegionMap->zoomedCursorPosX;
|
x = gRegionMap->zoomedCursorPosX;
|
||||||
y = gRegionMap->zoomedCursorPosY;
|
y = gRegionMap->zoomedCursorPosY;
|
||||||
}
|
}
|
||||||
unk_003 = 0;
|
posWithinMapSec = 0;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
if (x <= MAPCURSOR_X_MIN)
|
if (x <= MAPCURSOR_X_MIN)
|
||||||
{
|
{
|
||||||
if (sub_8124038(y))
|
if (RegionMap_IsMapSecIdInNextRow(y))
|
||||||
{
|
{
|
||||||
y --;
|
y --;
|
||||||
x = MAPCURSOR_X_MAX + 1;
|
x = MAPCURSOR_X_MAX + 1;
|
||||||
@@ -939,26 +939,26 @@ static void sub_8123FB0(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
x --;
|
x --;
|
||||||
if (GetRegionMapSectionIdAt(x, y) == gRegionMap->mapSecId)
|
if (GetRegionMapSectionIdAt_Internal(x, y) == gRegionMap->mapSecId)
|
||||||
{
|
{
|
||||||
unk_003 ++;
|
posWithinMapSec ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gRegionMap->unk_003 = unk_003;
|
gRegionMap->posWithinMapSec = posWithinMapSec;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 sub_8124038(u16 y)
|
static bool8 RegionMap_IsMapSecIdInNextRow(u16 y)
|
||||||
{
|
{
|
||||||
u16 x;
|
u16 x;
|
||||||
|
|
||||||
if (y -- == 0)
|
if (y -- == 0)
|
||||||
{
|
{
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
}
|
||||||
for (x = MAPCURSOR_X_MIN; x <= MAPCURSOR_X_MAX; x ++)
|
for (x = MAPCURSOR_X_MIN; x <= MAPCURSOR_X_MAX; x ++)
|
||||||
{
|
{
|
||||||
if (GetRegionMapSectionIdAt(x, y) == gRegionMap->mapSecId)
|
if (GetRegionMapSectionIdAt_Internal(x, y) == gRegionMap->mapSecId)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -966,7 +966,7 @@ static bool8 sub_8124038(u16 y)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8124088(struct Sprite *sprite)
|
static void SpriteCallback_CursorFull(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (gRegionMap->cursorMovementFrameCounter != 0)
|
if (gRegionMap->cursorMovementFrameCounter != 0)
|
||||||
{
|
{
|
||||||
@@ -976,7 +976,7 @@ static void sub_8124088(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TaskDummy8(struct Sprite *sprite)
|
static void SpriteCallback_CursorZoomed(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1000,13 +1000,13 @@ void CreateRegionMapCursor(u16 tileTag, u16 paletteTag)
|
|||||||
{
|
{
|
||||||
sheet.data = gRegionMap->cursorSmallImage;
|
sheet.data = gRegionMap->cursorSmallImage;
|
||||||
sheet.size = sizeof(gRegionMap->cursorSmallImage);
|
sheet.size = sizeof(gRegionMap->cursorSmallImage);
|
||||||
template.callback = sub_8124088;
|
template.callback = SpriteCallback_CursorFull;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sheet.data = gRegionMap->cursorLargeImage;
|
sheet.data = gRegionMap->cursorLargeImage;
|
||||||
sheet.size = sizeof(gRegionMap->cursorLargeImage);
|
sheet.size = sizeof(gRegionMap->cursorLargeImage);
|
||||||
template.callback = TaskDummy8;
|
template.callback = SpriteCallback_CursorZoomed;
|
||||||
}
|
}
|
||||||
LoadSpriteSheet(&sheet);
|
LoadSpriteSheet(&sheet);
|
||||||
LoadSpritePalette(&palette);
|
LoadSpritePalette(&palette);
|
||||||
@@ -1033,7 +1033,7 @@ void CreateRegionMapCursor(u16 tileTag, u16 paletteTag)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8124238(void)
|
static void FreeRegionMapCursorSprite(void)
|
||||||
{
|
{
|
||||||
if (gRegionMap->cursorSprite != NULL)
|
if (gRegionMap->cursorSprite != NULL)
|
||||||
{
|
{
|
||||||
@@ -1053,7 +1053,7 @@ void sub_8124278(void)
|
|||||||
gRegionMap->cursorSprite->data3 = FALSE;
|
gRegionMap->cursorSprite->data3 = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8124288(u16 tileTag, u16 paletteTag)
|
void CreateRegionMapPlayerIcon(u16 tileTag, u16 paletteTag)
|
||||||
{
|
{
|
||||||
u8 spriteId;
|
u8 spriteId;
|
||||||
struct SpriteSheet sheet = {gUnknown_085A084C, 0x80, tileTag};
|
struct SpriteSheet sheet = {gUnknown_085A084C, 0x80, tileTag};
|
||||||
@@ -1087,3 +1087,35 @@ void sub_8124288(u16 tileTag, u16 paletteTag)
|
|||||||
gRegionMap->playerIconSprite->callback = sub_812445C;
|
gRegionMap->playerIconSprite->callback = sub_812445C;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void HideRegionMapPlayerIcon(void)
|
||||||
|
{
|
||||||
|
if (gRegionMap->playerIconSprite != NULL)
|
||||||
|
{
|
||||||
|
gRegionMap->playerIconSprite->invisible = TRUE;
|
||||||
|
gRegionMap->playerIconSprite->callback = SpriteCallbackDummy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void UnhideRegionMapPlayerIcon(void)
|
||||||
|
{
|
||||||
|
if (gRegionMap->playerIconSprite != NULL)
|
||||||
|
{
|
||||||
|
if (gRegionMap->zoomed == TRUE)
|
||||||
|
{
|
||||||
|
gRegionMap->playerIconSprite->pos1.x = gRegionMap->playerIconSpritePosX * 16 - 0x30;
|
||||||
|
gRegionMap->playerIconSprite->pos1.y = gRegionMap->playerIconSpritePosY * 16 - 0x42;
|
||||||
|
gRegionMap->playerIconSprite->callback = sub_812445C;
|
||||||
|
gRegionMap->playerIconSprite->invisible = FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gRegionMap->playerIconSprite->pos1.x = gRegionMap->playerIconSpritePosX * 8 + 4;
|
||||||
|
gRegionMap->playerIconSprite->pos1.y = gRegionMap->playerIconSpritePosY * 8 + 4;
|
||||||
|
gRegionMap->playerIconSprite->pos2.x = 0;
|
||||||
|
gRegionMap->playerIconSprite->pos2.y = 0;
|
||||||
|
gRegionMap->playerIconSprite->callback = sub_81244EC;
|
||||||
|
gRegionMap->playerIconSprite->invisible = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user