summaryrefslogtreecommitdiff
path: root/src/map_name_popup.c
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2020-03-29 08:56:38 -0400
committerPikalaxALT <PikalaxALT@gmail.com>2020-03-29 08:56:38 -0400
commit9cfc34f2ec26d45085d9c4006b21406f8f968ed6 (patch)
treeec15c56d3b09c2cec74ac907110c9111e18e8729 /src/map_name_popup.c
parenta027218bc68f3951e438da078419aaa09048c885 (diff)
Address review comments
Diffstat (limited to 'src/map_name_popup.c')
-rw-r--r--src/map_name_popup.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/map_name_popup.c b/src/map_name_popup.c
index df2f9f88f..87df371ce 100644
--- a/src/map_name_popup.c
+++ b/src/map_name_popup.c
@@ -151,9 +151,9 @@ static u16 MapNamePopupCreateWindow(bool32 palintoFadedBuffer)
};
u16 windowId;
u16 r6 = 0x01D;
- if (gMapHeader.flags != 0)
+ if (gMapHeader.floorNum != 0)
{
- if (gMapHeader.flags != 0x7F)
+ if (gMapHeader.floorNum != 0x7F)
{
windowTemplate.width += 5;
r6 = 0x027;
@@ -187,29 +187,29 @@ static void MapNamePopupPrintMapNameOnWindow(u16 windowId)
u32 maxWidth = 112;
u32 xpos;
u8 *ptr = GetMapName(mapName, gMapHeader.regionMapSectionId, 0);
- if (gMapHeader.flags != 0)
+ if (gMapHeader.floorNum != 0)
{
- ptr = MapNamePopupAppendFloorNum(ptr, gMapHeader.flags);
- maxWidth = gMapHeader.flags != 0x7F ? 152 : 176;
+ ptr = MapNamePopupAppendFloorNum(ptr, gMapHeader.floorNum);
+ maxWidth = gMapHeader.floorNum != 0x7F ? 152 : 176;
}
xpos = (maxWidth - GetStringWidth(2, mapName, -1)) / 2;
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
AddTextPrinterParameterized(windowId, 2, mapName, xpos, 2, 0xFF, NULL);
}
-static u8 *MapNamePopupAppendFloorNum(u8 *dest, s8 flags)
+static u8 *MapNamePopupAppendFloorNum(u8 *dest, s8 floorNum)
{
- if (flags == 0)
+ if (floorNum == 0)
return dest;
*dest++ = CHAR_SPACE;
- if (flags == 0x7F)
+ if (floorNum == 0x7F)
return StringCopy(dest, gUnknown_841D18D);
- if (flags < 0)
+ if (floorNum < 0)
{
*dest++ = CHAR_B;
- flags *= -1;
+ floorNum *= -1;
}
- dest = ConvertIntToDecimalStringN(dest, flags, STR_CONV_MODE_LEFT_ALIGN, 2);
+ dest = ConvertIntToDecimalStringN(dest, floorNum, STR_CONV_MODE_LEFT_ALIGN, 2);
*dest++ = CHAR_F;
*dest = EOS;
return dest;