aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2007-09-02 23:25:39 +0000
committerFilippos Karapetis2007-09-02 23:25:39 +0000
commit314d7c1736d9a99a367bfa213d15c4bd20afd05f (patch)
treeba42b47b5bd61d06a55a7f4bc1dcf4f8ae9062e6 /engines
parent2dd4f61b5e4ebbe3a4c33a8c8994b3fafdf75642 (diff)
downloadscummvm-rg350-314d7c1736d9a99a367bfa213d15c4bd20afd05f.tar.gz
scummvm-rg350-314d7c1736d9a99a367bfa213d15c4bd20afd05f.tar.bz2
scummvm-rg350-314d7c1736d9a99a367bfa213d15c4bd20afd05f.zip
Implemented clearScreen() for preagi games
svn-id: r28837
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/agi.h3
-rw-r--r--engines/agi/preagi_common.cpp5
-rw-r--r--engines/agi/preagi_mickey.cpp10
3 files changed, 13 insertions, 5 deletions
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index ac61dc8e77..f1fd96b80a 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -995,6 +995,9 @@ public:
int16 p4, int16 p5, int16 p6, int16 p7) {}
void releaseImageStack() {}
+ // Screen
+ void clearScreen(int attr);
+
// Keyboard
void waitAnyKeyAnim();
int getSelection(int type);
diff --git a/engines/agi/preagi_common.cpp b/engines/agi/preagi_common.cpp
index 20159dcb71..c04315652d 100644
--- a/engines/agi/preagi_common.cpp
+++ b/engines/agi/preagi_common.cpp
@@ -42,6 +42,11 @@
namespace Agi {
+// Screen functions
+void PreAgiEngine::clearScreen(int attr) {
+ _gfx->clearScreen((attr & 0xF0) / 0x10);
+}
+
// String functions
void PreAgiEngine::drawStr(int row, int col, int attr, const char *buffer) {
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp
index e017744a5d..7d14ad1bc5 100644
--- a/engines/agi/preagi_mickey.cpp
+++ b/engines/agi/preagi_mickey.cpp
@@ -571,7 +571,7 @@ void Mickey::PlaySound(ENUM_MSA_SOUND iSound) {
void Mickey::debug() {
char szLine[41] = {0};
- //ClearScreen(IDA_DEFAULT); // TODO
+ _vm->clearScreen(IDA_DEFAULT);
sprintf(szLine, IDS_MSA_DEBUG_ROOM, game.iRoom);
_vm->drawStr(5, 10, IDA_DEFAULT, szLine);
@@ -924,7 +924,7 @@ void Mickey::printStory() {
readExe(IDO_MSA_GAME_STORY, (uint8 *)buffer, sizeof(buffer));
- //ClearScreen(IDA_DEFAULT); // TODO
+ _vm->clearScreen(IDA_DEFAULT);
for (iRow = 0; iRow < 25; iRow++) {
strcpy(szLine, buffer + pBuf);
_vm->drawStr(iRow, 0, IDA_DEFAULT, szLine);
@@ -934,7 +934,7 @@ void Mickey::printStory() {
_vm->_system->updateScreen(); // TODO: this should go in the game's main loop
_vm->waitAnyKey();
- //ClearScreen(IDA_DEFAULT); // TODO
+ _vm->clearScreen(IDA_DEFAULT);
for (iRow = 0; iRow < 21; iRow++) {
strcpy(szLine, buffer + pBuf);
_vm->drawStr(iRow, 0, IDA_DEFAULT, szLine); // TODO
@@ -1105,7 +1105,7 @@ void Mickey::inventory() {
sprintf(szCrystals, IDS_MSA_CRYSTALS, IDS_MSA_CRYSTAL_NO[game.nXtals]);
- // ClearScreen(IDA_DEFAULT);
+ _vm->clearScreen(IDA_DEFAULT);
_vm->drawStr(IDI_MSA_ROW_INV_TITLE, IDI_MSA_COL_INV_TITLE, IDA_DEFAULT, IDS_MSA_INVENTORY);
_vm->drawStr(IDI_MSA_ROW_INV_CRYSTALS, IDI_MSA_COL_INV_ITEMS, IDA_DEFAULT, szCrystals);
@@ -1119,7 +1119,7 @@ void Mickey::inventory() {
_vm->_system->updateScreen(); // TODO: this should go in the game's main loop
_vm->waitAnyKey();
- //ClearScreen(IDA_DEFAULT); // TODO
+ _vm->clearScreen(IDA_DEFAULT);
}
void Mickey::randomize() {