mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
Partial editbox support for high scores
This commit is contained in:
@@ -57,4 +57,25 @@ namespace MacRoman
|
||||
else
|
||||
return mac_roman_2uni[character - 0x80];
|
||||
}
|
||||
|
||||
bool FromUnicode(uint8_t &outChar, uint16_t codePoint)
|
||||
{
|
||||
if (codePoint < 0x80)
|
||||
{
|
||||
outChar = static_cast<uint8_t>(codePoint);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned int i = 0; i < 128; i++)
|
||||
{
|
||||
if (mac_roman_2uni[i] == codePoint)
|
||||
{
|
||||
outChar = static_cast<uint8_t>(i + 0x80);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -4,5 +4,6 @@
|
||||
|
||||
namespace MacRoman
|
||||
{
|
||||
uint16_t ToUnicode(uint8_t character);
|
||||
uint16_t ToUnicode(uint8_t character);
|
||||
bool FromUnicode(uint8_t &outChar, uint16_t codePoint);
|
||||
}
|
||||
|
Reference in New Issue
Block a user