summaryrefslogtreecommitdiff
path: root/src/region_map.c
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-07-12 01:39:28 -0400
committerGitHub <noreply@github.com>2021-07-12 01:39:28 -0400
commita274cc6a76a59768bcfaef345d55a39f6c1ddbac (patch)
treee6977a9d8066e946148b8d1dfcf95e721b59e54f /src/region_map.c
parent810ca5f8ff79aeec6ffe8e982f4786aade616b4d (diff)
parent876a89eba4903e5ef1ccad22b1ee52023fb24513 (diff)
Merge branch 'master' into flatten_sprite_pos
Diffstat (limited to 'src/region_map.c')
-rw-r--r--src/region_map.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/region_map.c b/src/region_map.c
index 6ef991921..1a25d140c 100644
--- a/src/region_map.c
+++ b/src/region_map.c
@@ -71,7 +71,7 @@ static EWRAM_DATA struct {
bool8 choseFlyLocation;
} *sFlyMap = NULL;
-static bool32 gUnknown_03001180;
+static bool32 sDrawFlyDestTextWindow;
// Static ROM declarations
@@ -621,7 +621,7 @@ bool8 LoadRegionMapGfx(void)
return TRUE;
}
-void sub_8123030(u16 color, u32 coeff)
+void BlendRegionMap(u16 color, u32 coeff)
{
BlendPalettes(0x380, coeff, color);
CpuCopy16(gPlttBufferFaded + 0x70, gPlttBufferUnfaded + 0x70, 0x60);
@@ -1696,7 +1696,7 @@ void CB2_OpenFlyMap(void)
CreateRegionMapPlayerIcon(1, 1);
sFlyMap->mapSecId = sFlyMap->regionMap.mapSecId;
StringFill(sFlyMap->nameBuffer, CHAR_SPACE, MAP_NAME_LENGTH);
- gUnknown_03001180 = TRUE;
+ sDrawFlyDestTextWindow = TRUE;
DrawFlyDestTextWindow();
gMain.state++;
break;
@@ -1782,30 +1782,32 @@ static void DrawFlyDestTextWindow(void)
name = sMultiNameFlyDestinations[i].name[sFlyMap->regionMap.posWithinMapSec];
AddTextPrinterParameterized(1, 1, name, GetStringRightAlignXOffset(1, name, 96), 17, 0, NULL);
ScheduleBgCopyTilemapToVram(0);
- gUnknown_03001180 = TRUE;
+ sDrawFlyDestTextWindow = TRUE;
}
break;
}
}
if (!namePrinted)
{
- if (gUnknown_03001180 == TRUE)
+ if (sDrawFlyDestTextWindow == TRUE)
{
ClearStdWindowAndFrameToTransparent(1, FALSE);
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 101, 13);
}
else
{
+ // Window is already drawn, just empty it
FillWindowPixelBuffer(0, PIXEL_FILL(1));
}
AddTextPrinterParameterized(0, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
ScheduleBgCopyTilemapToVram(0);
- gUnknown_03001180 = FALSE;
+ sDrawFlyDestTextWindow = FALSE;
}
}
else
{
- if (gUnknown_03001180 == TRUE)
+ // Selection is on MAPSECTYPE_NONE, draw empty fly destination text window
+ if (sDrawFlyDestTextWindow == TRUE)
{
ClearStdWindowAndFrameToTransparent(1, FALSE);
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 101, 13);
@@ -1813,7 +1815,7 @@ static void DrawFlyDestTextWindow(void)
FillWindowPixelBuffer(0, PIXEL_FILL(1));
CopyWindowToVram(0, 2);
ScheduleBgCopyTilemapToVram(0);
- gUnknown_03001180 = FALSE;
+ sDrawFlyDestTextWindow = FALSE;
}
}