aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/preagi_common.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2007-09-18 17:01:45 +0000
committerEugene Sandulenko2007-09-18 17:01:45 +0000
commit34ceaf208fc03ac738be1ef022177815f78a9a2c (patch)
tree894b622605cb3f87c7cf8755c025ba9e15fd84da /engines/agi/preagi_common.cpp
parentbf75630b425e358dfe9fe4b32492595ce4528494 (diff)
downloadscummvm-rg350-34ceaf208fc03ac738be1ef022177815f78a9a2c.tar.gz
scummvm-rg350-34ceaf208fc03ac738be1ef022177815f78a9a2c.tar.bz2
scummvm-rg350-34ceaf208fc03ac738be1ef022177815f78a9a2c.zip
Fix menu and tutorial it Troll's Tale
svn-id: r28941
Diffstat (limited to 'engines/agi/preagi_common.cpp')
-rw-r--r--engines/agi/preagi_common.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/engines/agi/preagi_common.cpp b/engines/agi/preagi_common.cpp
index 164cc775f2..9ad494e410 100644
--- a/engines/agi/preagi_common.cpp
+++ b/engines/agi/preagi_common.cpp
@@ -36,8 +36,9 @@
namespace Agi {
// Screen functions
-void PreAgiEngine::clearScreen(int attr) {
- _defaultColor = attr;
+void PreAgiEngine::clearScreen(int attr, bool overrideDefault) {
+ if (overrideDefault)
+ _defaultColor = attr;
_gfx->clearScreen((attr & 0xF0) / 0x10);
}
@@ -85,7 +86,12 @@ void PreAgiEngine::drawStrMiddle(int row, int attr, const char *buffer) {
}
void PreAgiEngine::clearTextArea() {
- for (int row = IDI_MAX_ROW_PIC; row < 200 / 8; row++) {
+ int start = IDI_MAX_ROW_PIC;
+
+ if (getGameID() == GID_TROLL)
+ start = 21;
+
+ for (int row = start; row < 200 / 8; row++) {
clearRow(row);
}
}
@@ -126,7 +132,7 @@ int PreAgiEngine::getSelection(SelectionTypes type) {
case Common::EVENT_QUIT:
_system->quit();
case Common::EVENT_LBUTTONUP:
- if (type == 0)
+ if (type == kSelYesNo)
return 1;
case Common::EVENT_RBUTTONUP:
return 0;
@@ -158,7 +164,7 @@ int PreAgiEngine::getSelection(SelectionTypes type) {
default:
if (type == kSelYesNo) {
return 2;
- } else {
+ } else if (type == kSelNumber) {
return 10;
}
}