aboutsummaryrefslogtreecommitdiff
path: root/engines/saga/interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/saga/interface.cpp')
-rw-r--r--engines/saga/interface.cpp286
1 files changed, 149 insertions, 137 deletions
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index 8cfd993391..e6854b1c05 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -229,6 +229,12 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) {
_vm->_sprite->loadList(_vm->getResourceDescription()->mainPanelSpritesResourceId, _mainPanel.sprites);
// Option panel sprites
_vm->_sprite->loadList(_vm->getResourceDescription()->optionPanelSpritesResourceId, _optionPanel.sprites);
+ // Save panel sprites
+ _vm->_sprite->loadList(_vm->getResourceDescription()->warningPanelSpritesResourceId, _savePanel.sprites);
+ // Load panel sprites
+ _vm->_sprite->loadList(_vm->getResourceDescription()->warningPanelSpritesResourceId, _loadPanel.sprites);
+ // Quit panel sprites
+ _vm->_sprite->loadList(_vm->getResourceDescription()->warningPanelSpritesResourceId, _quitPanel.sprites);
if (_vm->getGameType() == GType_ITE) {
_vm->_sprite->loadList(_vm->getResourceDescription()->defaultPortraitsResourceId, _defPortraits);
@@ -342,18 +348,10 @@ int Interface::activate() {
} else if (_panelMode == kPanelNull && _vm->getGameId() == GID_IHNM_DEMO) {
_saveReminderState = 1;
}
+ _vm->_gfx->showCursor(true);
draw();
}
- if (_vm->getGameId() != GID_IHNM_DEMO) {
- _vm->_gfx->showCursor(true);
- } else {
- if (_vm->_scene->currentSceneNumber() >= 144 && _vm->_scene->currentSceneNumber() <= 149) {
- // Don't show the mouse cursor in the non-interactive part of the IHNM demo
- } else {
- _vm->_gfx->showCursor(true);
- }
- }
return SUCCESS;
}
@@ -369,7 +367,7 @@ int Interface::deactivate() {
}
void Interface::rememberMode() {
- debug(1, "rememberMode(%d)", _savedMode);
+ debug(1, "rememberMode(%d)", _panelMode);
_savedMode = _panelMode;
}
@@ -400,9 +398,6 @@ void Interface::setMode(int mode) {
if (_vm->getGameId() == GID_IHNM_DEMO) {
_inMainMode = true;
_saveReminderState = 1;
- if ((_vm->_scene->currentSceneNumber() >= 144 && _vm->_scene->currentSceneNumber() <= 149) ||
- _vm->_scene->currentSceneNumber() == 0 || _vm->_scene->currentSceneNumber() == -1)
- _vm->_gfx->showCursor(false);
}
} else if (mode == kPanelOption) {
// Show the cursor in the IHNM demo
@@ -420,8 +415,8 @@ void Interface::setMode(int mode) {
switch (_panelMode) {
case kPanelMain:
- if (_vm->getGameType() == GType_IHNM)
- warning("FIXME: Implement IHNM differences from ExecuteInventoryPanel");
+ // FIXME: Implement IHNM differences from ExecuteInventoryPanel for IHNM (though I believe they're already
+ // implemented)
_mainPanel.currentButton = NULL;
break;
@@ -481,22 +476,22 @@ void Interface::setMode(int mode) {
draw();
}
-bool Interface::processAscii(uint16 ascii) {
+bool Interface::processAscii(Common::KeyState keystate) {
// TODO: Checking for Esc and Enter below is a bit hackish, and
// and probably only works with the English version. Maybe we should
// add a flag to the button so it can indicate if it's the default or
// cancel button?
-
+ uint16 ascii = keystate.ascii;
int i;
PanelButton *panelButton;
if (_statusTextInput) {
- processStatusTextInput(ascii);
+ processStatusTextInput(keystate);
return true;
}
switch (_panelMode) {
case kPanelNull:
- if (ascii == 27) { // Esc
+ if (keystate.keycode == Common::KEYCODE_ESCAPE) {
if (_vm->_scene->isInIntro()) {
_vm->_scene->skipScene();
} else {
@@ -506,26 +501,22 @@ bool Interface::processAscii(uint16 ascii) {
return true;
}
- if (_vm->getGameId() == GID_IHNM_DEMO) {
- if (_vm->_scene->currentSceneNumber() >= 144 && _vm->_scene->currentSceneNumber() <= 149)
- _vm->_scene->showIHNMDemoSpecialScreen();
- }
+ if (_vm->_scene->isNonInteractiveIHNMDemoPart())
+ _vm->_scene->showIHNMDemoSpecialScreen();
break;
case kPanelCutaway:
- if (ascii == 27) { // Esc
+ if (keystate.keycode == Common::KEYCODE_ESCAPE) {
if (!_disableAbortSpeeches)
_vm->_actor->abortAllSpeeches();
_vm->_scene->cutawaySkip();
return true;
}
- if (_vm->getGameId() == GID_IHNM_DEMO) {
- if (_vm->_scene->currentSceneNumber() >= 144 && _vm->_scene->currentSceneNumber() <= 149)
- _vm->_scene->showIHNMDemoSpecialScreen();
- }
+ if (_vm->_scene->isNonInteractiveIHNMDemoPart())
+ _vm->_scene->showIHNMDemoSpecialScreen();
break;
case kPanelVideo:
- if (ascii == 27) { // Esc
+ if (keystate.keycode == Common::KEYCODE_ESCAPE) {
if (_vm->_scene->isInIntro()) {
_vm->_scene->skipScene();
} else {
@@ -536,14 +527,12 @@ bool Interface::processAscii(uint16 ascii) {
return true;
}
- if (_vm->getGameId() == GID_IHNM_DEMO) {
- if (_vm->_scene->currentSceneNumber() >= 144 && _vm->_scene->currentSceneNumber() <= 149)
- _vm->_scene->showIHNMDemoSpecialScreen();
- }
+ if (_vm->_scene->isNonInteractiveIHNMDemoPart())
+ _vm->_scene->showIHNMDemoSpecialScreen();
break;
case kPanelOption:
// TODO: check input dialog keys
- if (ascii == 27 || ascii == 13) { // Esc or Enter
+ if (keystate.keycode == Common::KEYCODE_ESCAPE || keystate.keycode == Common::KEYCODE_RETURN) { // Esc or Enter
ascii = 'c'; //continue
}
@@ -558,13 +547,13 @@ bool Interface::processAscii(uint16 ascii) {
}
break;
case kPanelSave:
- if (_textInput && processTextInput(ascii)) {
+ if (_textInput && processTextInput(keystate)) {
return true;
}
- if (ascii == 27) { // Esc
+ if (keystate.keycode == Common::KEYCODE_ESCAPE) {
ascii = 'c'; // cancel
- } else if (ascii == 13) { // Enter
+ } else if (keystate.keycode == Common::KEYCODE_RETURN) { // Enter
ascii = 's'; // save
}
@@ -579,9 +568,9 @@ bool Interface::processAscii(uint16 ascii) {
}
break;
case kPanelQuit:
- if (ascii == 27) { // Esc
+ if (keystate.keycode == Common::KEYCODE_ESCAPE) {
ascii = 'c'; // cancel
- } else if (ascii == 13) { // Enter
+ } else if (keystate.keycode == Common::KEYCODE_RETURN) { // Enter
ascii = 'q'; // quit
}
@@ -619,8 +608,7 @@ bool Interface::processAscii(uint16 ascii) {
return true;
}
}
- if (ascii == 15) // ctrl-o
- {
+ if (keystate.keycode == Common::KEYCODE_o && keystate.flags == Common::KBD_CTRL) { // ctrl-o
if (_saveReminderState > 0) {
setMode(kPanelOption);
return true;
@@ -663,7 +651,7 @@ bool Interface::processAscii(uint16 ascii) {
mapPanelClean();
break;
case kPanelSceneSubstitute:
- if (ascii == 13) {
+ if (keystate.keycode == Common::KEYCODE_RETURN) {
_vm->_render->clearFlag(RF_DEMO_SUBST);
_vm->_gfx->setPalette(_mapSavedPal);
setMode(kPanelMain);
@@ -678,11 +666,11 @@ bool Interface::processAscii(uint16 ascii) {
break;
case kPanelProtect:
if (_vm->getGameType() == GType_ITE) {
- if (_textInput && processTextInput(ascii)) {
+ if (_textInput && processTextInput(keystate)) {
return true;
}
- if (ascii == 27 || ascii == 13) { // Esc or Enter
+ if (keystate.keycode == Common::KEYCODE_ESCAPE || keystate.keycode == Common::KEYCODE_RETURN) {
_vm->_script->wakeUpThreads(kWaitTypeRequest);
_vm->_interface->setMode(kPanelMain);
@@ -725,7 +713,7 @@ void Interface::setStatusText(const char *text, int statusColor) {
assert(text != NULL);
assert(strlen(text) < STATUS_TEXT_LEN);
- if (_vm->_render->getFlags() & (RF_PLACARD | RF_MAP))
+ if (_vm->_render->getFlags() & RF_MAP || _vm->_interface->getMode() == kPanelPlacard)
return;
strncpy(_statusText, text, STATUS_TEXT_LEN);
@@ -801,16 +789,6 @@ void Interface::draw() {
converseDisplayTextLines(backBuffer);
}
- if (_vm->getGameType() == GType_IHNM) {
- if (_vm->_spiritualBarometer > 255)
- _vm->_gfx->setPaletteColor(kIHNMColorPortrait, 0xff, 0xff, 0xff);
- else
- _vm->_gfx->setPaletteColor(kIHNMColorPortrait,
- _vm->_spiritualBarometer * _portraitBgColor.red / 256,
- _vm->_spiritualBarometer * _portraitBgColor.green / 256,
- _vm->_spiritualBarometer * _portraitBgColor.blue / 256);
- }
-
if (_panelMode == kPanelMain || _panelMode == kPanelConverse ||
_lockedMode == kPanelMain || _lockedMode == kPanelConverse ||
(_panelMode == kPanelNull && _vm->getGameId() == GID_IHNM_DEMO)) {
@@ -841,14 +819,19 @@ void Interface::calcOptionSaveSlider() {
int totalFiles = _vm->getSaveFilesCount();
int visibleFiles = _vm->getDisplayInfo().optionSaveFileVisible;
int height = _optionSaveFileSlider->height;
- int sliderHeight;
+ int sliderHeight = 13; // IHNM's save file list slider has a fixed height
int pos;
if (totalFiles < visibleFiles) {
totalFiles = visibleFiles;
}
- sliderHeight = visibleFiles * height / totalFiles;
+ if (_vm->getGameType() == GType_ITE) {
+ // ITE's save file list slider has a dynamically computed height, depending on
+ // the number of save games
+ sliderHeight = visibleFiles * height / totalFiles;
+ }
+
if (sliderHeight < 7) {
sliderHeight = 7;
}
@@ -931,6 +914,7 @@ void Interface::drawOption() {
PanelButton *panelButton;
Point textPoint;
Point point;
+ Point sliderPoint;
int spritenum = 0;
backBuffer = _vm->_gfx->getBackBuffer();
@@ -959,7 +943,15 @@ void Interface::drawOption() {
backBuffer->drawRect(_optionSaveRectTop, kITEColorDarkGrey);
}
- drawButtonBox(backBuffer, _optionSaveRectSlider, kSlider, _optionSaveFileSlider->state > 0);
+ if (_vm->getGameType() == GType_ITE) {
+ drawButtonBox(backBuffer, _optionSaveRectSlider, kSlider, _optionSaveFileSlider->state > 0);
+ } else {
+ panelButton = &_optionPanel.buttons[0];
+ sliderPoint.x = _optionPanel.x + panelButton->xOffset;
+ sliderPoint.y = _optionSaveRectSlider.top;
+ _vm->_sprite->draw(backBuffer, _vm->getDisplayClip(), _optionPanel.sprites, 0 + _optionSaveFileSlider->state, sliderPoint, 256);
+
+ }
if (_optionSaveRectBottom.height() > 0) {
backBuffer->drawRect(_optionSaveRectBottom, kITEColorDarkGrey);
@@ -970,7 +962,10 @@ void Interface::drawOption() {
rect2 = rect;
fontHeight = _vm->_font->getHeight(kKnownFontSmall);
for (j = 0; j < _vm->getDisplayInfo().optionSaveFileVisible; j++) {
- bgColor = kITEColorDarkGrey0C;
+ if (_vm->getGameType() == GType_ITE)
+ bgColor = kITEColorDarkGrey0C;
+ else
+ bgColor = kIHNMColorBlack;
fgColor = kITEColorBrightWhite;
idx = j + _optionSaveFileTop;
@@ -1052,7 +1047,10 @@ void Interface::setQuit(PanelButton *panelButton) {
setMode(kPanelOption);
break;
case kTextQuit:
- _vm->shutDown();
+ if (_vm->getGameId() == GID_IHNM_DEMO)
+ _vm->_scene->creditsScene(); // display sales info for IHNM demo
+ else
+ _vm->shutDown();
break;
}
}
@@ -1118,20 +1116,20 @@ void Interface::setLoad(PanelButton *panelButton) {
}
}
-void Interface::processStatusTextInput(uint16 ascii) {
+void Interface::processStatusTextInput(Common::KeyState keystate) {
- switch (ascii) {
- case 27: // esc
+ switch (keystate.keycode) {
+ case Common::KEYCODE_ESCAPE:
_statusTextInputState = kStatusTextInputAborted;
_statusTextInput = false;
_vm->_script->wakeUpThreads(kWaitTypeStatusTextInput);
break;
- case 13: // return
+ case Common::KEYCODE_RETURN:
_statusTextInputState = kStatusTextInputEntered;
_statusTextInput = false;
_vm->_script->wakeUpThreads(kWaitTypeStatusTextInput);
break;
- case 8: // backspace
+ case Common::KEYCODE_BACKSPACE:
if (_statusTextInputPos == 0) {
break;
}
@@ -1141,36 +1139,36 @@ void Interface::processStatusTextInput(uint16 ascii) {
if (_statusTextInputPos >= STATUS_TEXT_INPUT_MAX) {
break;
}
- if (((ascii >= 'a') && (ascii <='z')) ||
- ((ascii >= '0') && (ascii <='9')) ||
- ((ascii >= 'A') && (ascii <='Z')) ||
- (ascii == ' ')) {
- _statusTextInputString[_statusTextInputPos++] = ascii;
+ if (isalnum(keystate.ascii) || (keystate.ascii == ' ')) {
+ _statusTextInputString[_statusTextInputPos++] = keystate.ascii;
_statusTextInputString[_statusTextInputPos] = 0;
}
}
setStatusText(_statusTextInputString);
}
-bool Interface::processTextInput(uint16 ascii) {
+bool Interface::processTextInput(Common::KeyState keystate) {
char ch[2];
char tempString[SAVE_TITLE_SIZE];
uint tempWidth;
memset(tempString, 0, SAVE_TITLE_SIZE);
ch[1] = 0;
+ // IHNM has a smaller save title size than ITE. We only limit the save title size during text input
+ // in IHNM, to preserve backwards compatibility with older save games
+ uint save_title_size = _vm->getGameType() == GType_ITE ? SAVE_TITLE_SIZE : IHNM_SAVE_TITLE_SIZE;
- switch (ascii) {
- case 13:
+ switch (keystate.keycode) {
+ case Common::KEYCODE_RETURN:
return false;
- case 27: // esc
+ case Common::KEYCODE_ESCAPE:
_textInput = false;
break;
- case 8: // backspace
+ case Common::KEYCODE_BACKSPACE:
if (_textInputPos <= 1) {
break;
}
_textInputPos--;
- case 127: // del
+ case Common::KEYCODE_DELETE:
if (_textInputPos <= _textInputStringLength) {
if (_textInputPos != 1) {
strncpy(tempString, _textInputString, _textInputPos - 1);
@@ -1182,27 +1180,25 @@ bool Interface::processTextInput(uint16 ascii) {
_textInputStringLength = strlen(_textInputString);
}
break;
- case 276: // left
+ case Common::KEYCODE_LEFT:
if (_textInputPos > 1) {
_textInputPos--;
}
break;
- case 275: // right
+ case Common::KEYCODE_RIGHT:
if (_textInputPos <= _textInputStringLength) {
_textInputPos++;
}
break;
default:
- if (((ascii >= 'a') && (ascii <='z')) ||
- ((ascii >= '0') && (ascii <='9')) ||
- ((ascii >= 'A') && (ascii <='Z')) ||
- (ascii == ' ')) {
- if (_textInputStringLength < SAVE_TITLE_SIZE - 1) {
- ch[0] = ascii;
+ if (isalnum(keystate.ascii) || (keystate.ascii == ' ') ||
+ (keystate.ascii == '-') || (keystate.ascii == '_')) {
+ if (_textInputStringLength < save_title_size - 1) {
+ ch[0] = keystate.ascii;
tempWidth = _vm->_font->getStringWidth(kKnownFontSmall, ch, 0, kFontNormal);
tempWidth += _vm->_font->getStringWidth(kKnownFontSmall, _textInputString, 0, kFontNormal);
if (tempWidth > _textInputMaxWidth) {
- break;
+ break;
}
if (_textInputPos != 1) {
strncpy(tempString, _textInputString, _textInputPos - 1);
@@ -1243,10 +1239,10 @@ void Interface::drawTextInput(Surface *ds, InterfacePanel *panel, PanelButton *p
while ((ch[0] = _textInputString[i++]) != 0) {
rect.setWidth(_vm->_font->getStringWidth(kKnownFontSmall, ch, 0, kFontNormal));
if ((i == _textInputPos) && _textInput) {
- fgColor = kITEColorBlack;
- ds->fillRect(rect, kITEColorWhite);
+ fgColor = _vm->KnownColor2ColorId(kKnownColorBlack);
+ ds->fillRect(rect, _vm->KnownColor2ColorId(kKnownColorWhite));
} else {
- fgColor = kITEColorWhite;
+ fgColor = _vm->KnownColor2ColorId(kKnownColorWhite);
}
textPoint.x = rect.left;
textPoint.y = rect.top + 1;
@@ -1257,7 +1253,7 @@ void Interface::drawTextInput(Surface *ds, InterfacePanel *panel, PanelButton *p
if (_textInput && (_textInputPos >= i)) {
ch[0] = ' ';
rect.setWidth(_vm->_font->getStringWidth(kKnownFontSmall, ch, 0, kFontNormal));
- ds->fillRect(rect, kITEColorWhite);
+ ds->fillRect(rect, _vm->KnownColor2ColorId(kKnownColorWhite));
}
}
@@ -1468,11 +1464,22 @@ void Interface::handleOptionClick(const Point& mousePoint) {
void Interface::handleChapterSelectionUpdate(const Point& mousePoint) {
uint16 objectId;
+ int hitZoneIndex;
+ const HitZone * hitZone;
// FIXME: Original handled more object types here.
objectId = _vm->_actor->hitTest(mousePoint, true);
+ if (objectId == ID_NOTHING) {
+ hitZoneIndex = _vm->_scene->_objectMap->hitTest(mousePoint);
+
+ if ((hitZoneIndex != -1)) {
+ hitZone = _vm->_scene->_objectMap->getHitZone(hitZoneIndex);
+ objectId = hitZone->getHitZoneId();
+ }
+ }
+
if (objectId != _vm->_script->_pointerObject) {
_vm->_script->_pointerObject = objectId;
}
@@ -1492,12 +1499,12 @@ void Interface::handleChapterSelectionClick(const Point& mousePoint) {
switch (objectTypeId(obj)) {
case kGameObjectHitZone:
- hitZone = _vm->_scene->_actionMap->getHitZone(objectIdToIndex(obj));
+ hitZone = _vm->_scene->_objectMap->getHitZone(objectIdToIndex(obj));
if (hitZone == NULL)
return;
- if (hitZone->getFlags() & kHitZoneExit)
+ if (hitZone->getFlags() & kHitZoneEnabled)
script = hitZone->getScriptNumber();
break;
@@ -1523,7 +1530,6 @@ void Interface::handleChapterSelectionClick(const Point& mousePoint) {
event.param4 = obj; // Object
event.param5 = 0; // With Object
event.param6 = obj; // Actor
-
_vm->_events->queue(&event);
}
}
@@ -1540,11 +1546,8 @@ void Interface::setOption(PanelButton *panelButton) {
} else {
if (_vm->_scene->currentChapterNumber() == 8) {
setMode(kPanelChapterSelection);
- } else if (_vm->getGameId() == GID_IHNM_DEMO) {
- if (_vm->_scene->currentSceneNumber() >= 144 && _vm->_scene->currentSceneNumber() <= 149)
- setMode(kPanelNull);
- else
- setMode(kPanelMain);
+ } else if (_vm->_scene->isNonInteractiveIHNMDemoPart()) {
+ setMode(kPanelNull);
} else {
setMode(kPanelMain);
}
@@ -1564,11 +1567,9 @@ void Interface::setOption(PanelButton *panelButton) {
}
break;
case kTextSave:
- // Disallow saving in the non-interactive part of the IHNM demo
- if (_vm->getGameId() == GID_IHNM_DEMO) {
- if (_vm->_scene->currentSceneNumber() >= 144 && _vm->_scene->currentSceneNumber() <= 149)
- return;
- }
+ // Disallow saving in the non-interactive part of the IHNM demo (original demo didn't support saving at all)
+ if (_vm->_scene->isNonInteractiveIHNMDemoPart())
+ return;
if (!_vm->isSaveListFull() && (_optionSaveFileTitleNumber == 0)) {
_textInputString[0] = 0;
@@ -1787,10 +1788,8 @@ void Interface::update(const Point& mousePoint, int updateFlag) {
break;
case kPanelNull:
- if (_vm->getGameId() == GID_IHNM_DEMO && (updateFlag & UPDATE_MOUSECLICK)) {
- if (_vm->_scene->currentSceneNumber() >= 144 && _vm->_scene->currentSceneNumber() <= 149)
- _vm->_scene->showIHNMDemoSpecialScreen();
- }
+ if (_vm->_scene->isNonInteractiveIHNMDemoPart() && (updateFlag & UPDATE_MOUSECLICK))
+ _vm->_scene->showIHNMDemoSpecialScreen();
break;
}
@@ -1808,6 +1807,10 @@ void Interface::drawStatusBar() {
if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 8)
return;
+ // Don't draw the status bar while fading out
+ if (_fadeMode == kFadeOut)
+ return;
+
backBuffer = _vm->_gfx->getBackBuffer();
// Erase background of status bar
@@ -1921,7 +1924,6 @@ void Interface::handleMainUpdate(const Point& mousePoint) {
if ((panelButton != NULL) && (panelButton->type == kPanelButtonArrow)) {
if (panelButton->state == 1) {
- //TODO: insert timeout catchup
inventoryChangePos(panelButton->id);
}
changed = true;
@@ -1938,11 +1940,14 @@ void Interface::handleMainUpdate(const Point& mousePoint) {
//inventory stuff
void Interface::inventoryChangePos(int chg) {
- if ((chg < 0 && _inventoryStart + chg >= 0) ||
- (chg > 0 && _inventoryStart < _inventoryEnd)) {
- _inventoryStart += chg;
- draw();
+ // Arrows will scroll the inventory up or down up to 4 items
+ for (int i = 1; i <= 4; i++) {
+ if ((chg < 0 && _inventoryStart + chg >= 0) ||
+ (chg > 0 && _inventoryStart < _inventoryEnd)) {
+ _inventoryStart += chg;
}
+ }
+ draw();
}
void Interface::inventorySetPos(int key) {
@@ -2087,18 +2092,19 @@ void Interface::drawButtonBox(Surface *ds, const Rect& rect, ButtonKind kind, bo
solidColor = down ? kITEColorLightBlue94 : kITEColorLightBlue96;
break;
case kEdit:
- cornerColor = kITEColorLightBlue96;
- frameColor = kITEColorLightBlue96;
- fillColor = kITEColorLightBlue96;
- our = kITEColorDarkBlue8a;
- odl = kITEColorLightBlue94;
- iur = 0x97;
- idl = 0x95;
- if (down) {
- solidColor = kITEColorBlue;
+ if (_vm->getGameType() == GType_ITE) {
+ cornerColor = frameColor = fillColor = kITEColorLightBlue96;
+ our = kITEColorDarkBlue8a;
+ odl = kITEColorLightBlue94;
+ solidColor = down ? kITEColorBlue : kITEColorDarkGrey0C;
} else {
- solidColor = kITEColorDarkGrey0C;
+ cornerColor = frameColor = fillColor = kIHNMColorBlack;
+ our = kIHNMColorBlack;
+ odl = kIHNMColorBlack;
+ solidColor = kIHNMColorBlack;
}
+ iur = 0x97;
+ idl = 0x95;
break;
default:
cornerColor = 0x8b;
@@ -2248,21 +2254,25 @@ void Interface::drawPanelButtonText(Surface *ds, InterfacePanel *panel, PanelBut
litButton = panelButton->state > 0;
if (panel == &_optionPanel) {
- texturePoint.x = _optionPanel.x + panelButton->xOffset;
- texturePoint.y = _optionPanel.y + panelButton->yOffset;
+ texturePoint.x = _optionPanel.x + panelButton->xOffset - 1;
+ texturePoint.y = _optionPanel.y + panelButton->yOffset - 1;
_vm->_sprite->draw(ds, _vm->getDisplayClip(), _optionPanel.sprites, spritenum + 2 + litButton, texturePoint, 256);
} else if (panel == &_quitPanel) {
- texturePoint.x = _quitPanel.x + panelButton->xOffset;
- texturePoint.y = _quitPanel.y + panelButton->yOffset;
- _vm->_sprite->draw(ds, _vm->getDisplayClip(), _optionPanel.sprites, 14 + litButton, texturePoint, 256);
+ texturePoint.x = _quitPanel.x + panelButton->xOffset - 3;
+ texturePoint.y = _quitPanel.y + panelButton->yOffset - 3;
+ _vm->_sprite->draw(ds, _vm->getDisplayClip(), _quitPanel.sprites, litButton, texturePoint, 256);
} else if (panel == &_savePanel) {
- texturePoint.x = _savePanel.x + panelButton->xOffset;
- texturePoint.y = _savePanel.y + panelButton->yOffset;
- _vm->_sprite->draw(ds, _vm->getDisplayClip(), _optionPanel.sprites, 14 + litButton, texturePoint, 256);
+ texturePoint.x = _savePanel.x + panelButton->xOffset - 3;
+ texturePoint.y = _savePanel.y + panelButton->yOffset - 3;
+ _vm->_sprite->draw(ds, _vm->getDisplayClip(), _savePanel.sprites, litButton, texturePoint, 256);
+ // Input text box sprite
+ texturePoint.x = _savePanel.x + _saveEdit->xOffset - 2;
+ texturePoint.y = _savePanel.y + _saveEdit->yOffset - 2;
+ _vm->_sprite->draw(ds, _vm->getDisplayClip(), _savePanel.sprites, 2, texturePoint, 256);
} else if (panel == &_loadPanel) {
- texturePoint.x = _loadPanel.x + panelButton->xOffset;
- texturePoint.y = _loadPanel.y + panelButton->yOffset;
- _vm->_sprite->draw(ds, _vm->getDisplayClip(), _optionPanel.sprites, 14 + litButton, texturePoint, 256);
+ texturePoint.x = _loadPanel.x + panelButton->xOffset - 3;
+ texturePoint.y = _loadPanel.y + panelButton->yOffset - 3;
+ _vm->_sprite->draw(ds, _vm->getDisplayClip(), _loadPanel.sprites, litButton, texturePoint, 256);
} else {
// revert to default behavior
drawButtonBox(ds, rect, kButton, panelButton->state > 0);
@@ -2523,11 +2533,14 @@ void Interface::converseDisplayTextLines(Surface *ds) {
}
void Interface::converseChangePos(int chg) {
- if ((chg < 0 && _converseStartPos + chg >= 0) ||
- (chg > 0 && _converseStartPos < _converseEndPos)) {
- _converseStartPos += chg;
- draw();
+ // Arrows will scroll the converse panel or down up to 4 conversation options
+ for (int i = 1; i <= 4; i++) {
+ if ((chg < 0 && _converseStartPos + chg >= 0) ||
+ (chg > 0 && _converseStartPos < _converseEndPos)) {
+ _converseStartPos += chg;
+ }
}
+ draw();
}
void Interface::converseSetPos(int key) {
@@ -2580,7 +2593,6 @@ void Interface::handleConverseUpdate(const Point& mousePoint) {
if (_conversePanel.currentButton->type == kPanelButtonArrow) {
if (_conversePanel.currentButton->state == 1) {
- //TODO: insert timeout catchup
converseChangePos(_conversePanel.currentButton->id);
}
draw();