Label remaining region_map symbols
This commit is contained in:
parent
e0b58592b2
commit
fe89a4d147
3 changed files with 14 additions and 10 deletions
|
@ -111,7 +111,7 @@ void PokedexAreaScreen_UpdateRegionMapVariablesAndVideoRegs(s16 x, s16 y);
|
||||||
void CB2_OpenFlyMap(void);
|
void CB2_OpenFlyMap(void);
|
||||||
bool8 IsRegionMapZoomed(void);
|
bool8 IsRegionMapZoomed(void);
|
||||||
void TrySetPlayerIconBlink(void);
|
void TrySetPlayerIconBlink(void);
|
||||||
void sub_8123030(u16 color, u32 coeff);
|
void BlendRegionMap(u16 color, u32 coeff);
|
||||||
void SetRegionMapDataForZoom(void);
|
void SetRegionMapDataForZoom(void);
|
||||||
|
|
||||||
extern const struct RegionMapLocation gRegionMapEntries[];
|
extern const struct RegionMapLocation gRegionMapEntries[];
|
||||||
|
|
|
@ -327,7 +327,9 @@ static u32 LoopedTask_OpenRegionMap(s32 taskState)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sub_8123030(RGB_BLACK, 6);
|
// Dim the region map when zoom is disabled
|
||||||
|
// (when the player is off the map)
|
||||||
|
BlendRegionMap(RGB_BLACK, 6);
|
||||||
}
|
}
|
||||||
return LT_INC_AND_PAUSE;
|
return LT_INC_AND_PAUSE;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
|
@ -71,7 +71,7 @@ static EWRAM_DATA struct {
|
||||||
bool8 choseFlyLocation;
|
bool8 choseFlyLocation;
|
||||||
} *sFlyMap = NULL;
|
} *sFlyMap = NULL;
|
||||||
|
|
||||||
static bool32 gUnknown_03001180;
|
static bool32 sDrawFlyDestTextWindow;
|
||||||
|
|
||||||
// Static ROM declarations
|
// Static ROM declarations
|
||||||
|
|
||||||
|
@ -621,7 +621,7 @@ bool8 LoadRegionMapGfx(void)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8123030(u16 color, u32 coeff)
|
void BlendRegionMap(u16 color, u32 coeff)
|
||||||
{
|
{
|
||||||
BlendPalettes(0x380, coeff, color);
|
BlendPalettes(0x380, coeff, color);
|
||||||
CpuCopy16(gPlttBufferFaded + 0x70, gPlttBufferUnfaded + 0x70, 0x60);
|
CpuCopy16(gPlttBufferFaded + 0x70, gPlttBufferUnfaded + 0x70, 0x60);
|
||||||
|
@ -1696,7 +1696,7 @@ void CB2_OpenFlyMap(void)
|
||||||
CreateRegionMapPlayerIcon(1, 1);
|
CreateRegionMapPlayerIcon(1, 1);
|
||||||
sFlyMap->mapSecId = sFlyMap->regionMap.mapSecId;
|
sFlyMap->mapSecId = sFlyMap->regionMap.mapSecId;
|
||||||
StringFill(sFlyMap->nameBuffer, CHAR_SPACE, MAP_NAME_LENGTH);
|
StringFill(sFlyMap->nameBuffer, CHAR_SPACE, MAP_NAME_LENGTH);
|
||||||
gUnknown_03001180 = TRUE;
|
sDrawFlyDestTextWindow = TRUE;
|
||||||
DrawFlyDestTextWindow();
|
DrawFlyDestTextWindow();
|
||||||
gMain.state++;
|
gMain.state++;
|
||||||
break;
|
break;
|
||||||
|
@ -1782,30 +1782,32 @@ static void DrawFlyDestTextWindow(void)
|
||||||
name = sMultiNameFlyDestinations[i].name[sFlyMap->regionMap.posWithinMapSec];
|
name = sMultiNameFlyDestinations[i].name[sFlyMap->regionMap.posWithinMapSec];
|
||||||
AddTextPrinterParameterized(1, 1, name, GetStringRightAlignXOffset(1, name, 96), 17, 0, NULL);
|
AddTextPrinterParameterized(1, 1, name, GetStringRightAlignXOffset(1, name, 96), 17, 0, NULL);
|
||||||
ScheduleBgCopyTilemapToVram(0);
|
ScheduleBgCopyTilemapToVram(0);
|
||||||
gUnknown_03001180 = TRUE;
|
sDrawFlyDestTextWindow = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!namePrinted)
|
if (!namePrinted)
|
||||||
{
|
{
|
||||||
if (gUnknown_03001180 == TRUE)
|
if (sDrawFlyDestTextWindow == TRUE)
|
||||||
{
|
{
|
||||||
ClearStdWindowAndFrameToTransparent(1, FALSE);
|
ClearStdWindowAndFrameToTransparent(1, FALSE);
|
||||||
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 101, 13);
|
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 101, 13);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Window is already drawn, just empty it
|
||||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||||
}
|
}
|
||||||
AddTextPrinterParameterized(0, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
|
AddTextPrinterParameterized(0, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
|
||||||
ScheduleBgCopyTilemapToVram(0);
|
ScheduleBgCopyTilemapToVram(0);
|
||||||
gUnknown_03001180 = FALSE;
|
sDrawFlyDestTextWindow = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (gUnknown_03001180 == TRUE)
|
// Selection is on MAPSECTYPE_NONE, draw empty fly destination text window
|
||||||
|
if (sDrawFlyDestTextWindow == TRUE)
|
||||||
{
|
{
|
||||||
ClearStdWindowAndFrameToTransparent(1, FALSE);
|
ClearStdWindowAndFrameToTransparent(1, FALSE);
|
||||||
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 101, 13);
|
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 101, 13);
|
||||||
|
@ -1813,7 +1815,7 @@ static void DrawFlyDestTextWindow(void)
|
||||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||||
CopyWindowToVram(0, 2);
|
CopyWindowToVram(0, 2);
|
||||||
ScheduleBgCopyTilemapToVram(0);
|
ScheduleBgCopyTilemapToVram(0);
|
||||||
gUnknown_03001180 = FALSE;
|
sDrawFlyDestTextWindow = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue