mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 09:18:38 +00:00
Move code to ignore invalid characters.
svn-id: r31238
This commit is contained in:
parent
eeb4c75244
commit
10be4b2a6d
@ -1582,20 +1582,12 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) {
|
||||
h = 13;
|
||||
w = feebleFontSize[chr - 32];
|
||||
|
||||
// Ignore invalid characters
|
||||
if (chr - 32 > 195)
|
||||
return;
|
||||
|
||||
src = feeble_windowFont + (chr - 32) * 13;
|
||||
} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
|
||||
dst = (byte *)screen->pixels + y * _dxSurfacePitch + x + window->textColumnOffset;
|
||||
h = 8;
|
||||
w = 6;
|
||||
|
||||
// Ignore invalid characters
|
||||
if (chr - 32 > 98)
|
||||
return;
|
||||
|
||||
switch (_language) {
|
||||
case Common::CZ_CZE:
|
||||
src = czech_simonFont + (chr - 32) * 8;
|
||||
@ -1632,10 +1624,6 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) {
|
||||
h = 8;
|
||||
w = 6;
|
||||
|
||||
// Ignore invalid characters
|
||||
if (chr - 32 > 98)
|
||||
return;
|
||||
|
||||
// TODO: Add font tables for German
|
||||
switch (_language) {
|
||||
case Common::ES_ESP:
|
||||
|
@ -527,11 +527,19 @@ void AGOSEngine::windowPutChar(WindowBlock *window, byte c, byte b) {
|
||||
}
|
||||
} else if (c >= 32) {
|
||||
if (getGameType() == GType_FF || getGameType() == GType_PP) {
|
||||
// Ignore invalid characters
|
||||
if (c - 32 > 195)
|
||||
return;
|
||||
|
||||
windowDrawChar(window, window->textColumn + window->x, window->textRow + window->y, c);
|
||||
window->textColumn += getFeebleFontSize(c);
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore invalid characters
|
||||
if (c - 32 > 98)
|
||||
return;
|
||||
|
||||
if (window->textLength == window->textMaxLength) {
|
||||
windowNewLine(window);
|
||||
} else if (window->textRow == window->height) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user