aboutsummaryrefslogtreecommitdiff
path: root/engines/drascula/interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/drascula/interface.cpp')
-rw-r--r--engines/drascula/interface.cpp50
1 files changed, 2 insertions, 48 deletions
diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp
index 4b8db63bb7..70212db9e8 100644
--- a/engines/drascula/interface.cpp
+++ b/engines/drascula/interface.cpp
@@ -153,52 +153,6 @@ void DrasculaEngine::clearMenu() {
}
}
-void DrasculaEngine::enterName() {
- Common::KeyCode key;
- flushKeyBuffer();
- int v = 0, h = 0;
- char select2[23];
- strcpy(select2, " ");
- while (!shouldQuit()) {
- select2[v] = '-';
- copyBackground(115, 14, 115, 14, 176, 9, bgSurface, screenSurface);
- print_abc(select2, 117, 15);
- updateScreen();
-
- key = getScan();
-
- if (key != 0) {
- if (key >= 0 && key <= 0xFF && isAlpha(key))
- select2[v] = tolower(key);
- else if ((key >= Common::KEYCODE_0 && key <= Common::KEYCODE_9) || key == Common::KEYCODE_SPACE)
- select2[v] = key;
- else if (key == Common::KEYCODE_ESCAPE)
- break;
- else if (key == Common::KEYCODE_RETURN) {
- select2[v] = '\0';
- h = 1;
- break;
- } else if (key == Common::KEYCODE_BACKSPACE)
- select2[v] = '\0';
- else
- v--;
-
- if (key == Common::KEYCODE_BACKSPACE)
- v--;
- else
- v++;
- }
- if (v == 22)
- v = 21;
- else if (v == -1)
- v = 0;
- }
- if (h == 1) {
- strcpy(select, select2);
- selectionMade = 1;
- }
-}
-
bool DrasculaEngine::checkMenuFlags() {
int n = whichObject();
if (n != 0) {
@@ -213,8 +167,8 @@ void DrasculaEngine::showMap() {
_hasName = false;
for (int l = 0; l < numRoomObjs; l++) {
- if (mouseX > x1[l] && mouseY > y1[l]
- && mouseX < x2[l] && mouseY < y2[l]
+ if (mouseX > _objectX1[l] && mouseY > _objectY1[l]
+ && mouseX < _objectX2[l] && mouseY < _objectY2[l]
&& visible[l] == 1) {
strcpy(textName, objName[l]);
_hasName = true;