Cleanup.
svn-id: r26769
This commit is contained in:
parent
c4c9ff5533
commit
1a69604e82
12 changed files with 947 additions and 779 deletions
|
@ -243,4 +243,38 @@ void AGOSEngine::waitWindow(WindowBlock *window) {
|
|||
undefineBox(0x7FFF);
|
||||
}
|
||||
|
||||
void AGOSEngine::writeChar(WindowBlock *window, int x, int y, int offs, int val) {
|
||||
int chr;
|
||||
|
||||
// Clear background of first digit
|
||||
window->textColumnOffset = offs;
|
||||
window->text_color = 0;
|
||||
windowDrawChar(window, x * 8, y, 129);
|
||||
|
||||
if (val != -1) {
|
||||
// Print first digit
|
||||
chr = val / 10 + 48;
|
||||
window->text_color = 15;
|
||||
windowDrawChar(window, x * 8, y, chr);
|
||||
}
|
||||
|
||||
offs += 6;
|
||||
if (offs >= 7) {
|
||||
offs -= 8;
|
||||
x++;
|
||||
}
|
||||
|
||||
// Clear background of second digit
|
||||
window->textColumnOffset = offs;
|
||||
window->text_color = 0;
|
||||
windowDrawChar(window, x * 8, y, 129);
|
||||
|
||||
if (val != -1) {
|
||||
// Print second digit
|
||||
chr = val % 10 + 48;
|
||||
window->text_color = 15;
|
||||
windowDrawChar(window, x * 8, y, chr);
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace AGOS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue