Get 640x480 and Japanese builds working again

This commit is contained in:
Clownacy 2020-09-16 21:00:41 +01:00
parent fe76fe6dea
commit aac1c9c844
9 changed files with 18 additions and 4 deletions

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

Before

Width:  |  Height:  |  Size: 455 KiB

After

Width:  |  Height:  |  Size: 455 KiB

View file

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 197 KiB

View file

@ -657,7 +657,7 @@ int RestoreSurfaces(void)
void InitTextObject(const char *name) void InitTextObject(const char *name)
{ {
(void)name; // Unused in this branch (void)name; // Unused in this branch
/*
std::string path = gDataPath + "/Font/font"; std::string path = gDataPath + "/Font/font";
// Get font size // Get font size
@ -705,10 +705,24 @@ void InitTextObject(const char *name)
#endif #endif
} }
// font = LoadFont(path.c_str(), width, height); font = LoadFont(path.c_str(), width, height);
*/
std::string bitmap_path;
std::string metadata_path;
switch (mag)
{
case 1:
bitmap_path = gDataPath + "/Font/font_bitmap_6x12.png";
metadata_path = gDataPath + "/Font/font_bitmap_6x12.dat";
break;
case 2:
bitmap_path = gDataPath + "/Font/font_bitmap_10x20.png";
metadata_path = gDataPath + "/Font/font_bitmap_10x20.dat";
break;
}
std::string bitmap_path = gDataPath + "/Font/couriernew2.PNG";
std::string metadata_path = gDataPath + "/Font/couriernew2.dat";
font = LoadBitmapFont(bitmap_path.c_str(), metadata_path.c_str()); font = LoadBitmapFont(bitmap_path.c_str(), metadata_path.c_str());
} }