Skip to content

Commit db13317

Browse files
committed
Fix default worldmap font
1 parent 8deb855 commit db13317

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/world_map.cc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4711,8 +4711,12 @@ int worldmapWindowInit()
47114711
CacheEntry* frmHandle;
47124712

47134713
_wmLastRndTime = _get_time();
4714+
4715+
// SFALL: Fix default worldmap font.
4716+
// CE: This setting affects only city names. In Sfall it's configurable via
4717+
// WorldMapFontPatch and is turned off by default.
47144718
_fontnum = fontGetCurrent();
4715-
fontSetCurrent(0);
4719+
fontSetCurrent(101);
47164720

47174721
_map_save_in_game(true);
47184722

@@ -5772,11 +5776,6 @@ int _wmMatchWorldPosToArea(int a1, int a2, int* a3)
57725776
return 0;
57735777
}
57745778

5775-
// FIXME: This function does not set current font, which is a bit unusual for a
5776-
// function which draw text. I doubt it was done on purpose, likely simply
5777-
// forgotten. Because of this, city names are rendered with current font, which
5778-
// can be any, but in this case it uses default text font, not interface font.
5779-
//
57805779
// 0x4C3FA8
57815780
int worldmapWindowRenderCity(CityInfo* city, CitySizeDescription* citySizeDescription, unsigned char* dest, int x, int y)
57825781
{
@@ -5792,7 +5791,8 @@ int worldmapWindowRenderCity(CityInfo* city, CitySizeDescription* citySizeDescri
57925791
_circleBlendTable,
57935792
_commonGrayTable);
57945793

5795-
int nameY = y + citySizeDescription->height + 1;
5794+
// CE: Slightly increase whitespace between cirle and city name.
5795+
int nameY = y + citySizeDescription->height + 3;
57965796
int maxY = 464 - fontGetLineHeight();
57975797
if (nameY < maxY) {
57985798
MessageListItem messageListItem;
@@ -6316,7 +6316,8 @@ int worldmapCityMapViewRefresh()
63166316
if (messageListGetItem(&gWorldmapMessageList, &messageListItem)) {
63176317
if (messageListItem.text != NULL) {
63186318
int width = fontGetStringWidth(messageListItem.text);
6319-
windowDrawText(gWorldmapWindow, messageListItem.text, width, gWorldmapHotspotUpFrmWidth / 2 + entrance->x - width / 2, gWorldmapHotspotUpFrmHeight + entrance->y + 2, _colorTable[992] | 0x2010000);
6319+
// CE: Slightly increase whitespace between marker and entrance name.
6320+
windowDrawText(gWorldmapWindow, messageListItem.text, width, gWorldmapHotspotUpFrmWidth / 2 + entrance->x - width / 2, gWorldmapHotspotUpFrmHeight + entrance->y + 4, _colorTable[992] | 0x2010000);
63206321
}
63216322
}
63226323
}

0 commit comments

Comments
 (0)