diff options
-rw-r--r-- | engines/drascula/animation.cpp | 106 | ||||
-rw-r--r-- | engines/drascula/converse.cpp | 2 | ||||
-rw-r--r-- | engines/drascula/drascula.cpp | 43 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 18 | ||||
-rw-r--r-- | engines/drascula/graphics.cpp | 31 | ||||
-rw-r--r-- | engines/drascula/interface.cpp | 15 | ||||
-rw-r--r-- | engines/drascula/objects.cpp | 22 | ||||
-rw-r--r-- | engines/drascula/rooms.cpp | 48 | ||||
-rw-r--r-- | engines/drascula/saveload.cpp | 10 | ||||
-rw-r--r-- | engines/drascula/sound.cpp | 13 |
10 files changed, 139 insertions, 169 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 65d009f421..06c7c89717 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -402,9 +402,6 @@ void DrasculaEngine::animation_2_1() { if (animate("ag.bin", 14)) break; - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -413,9 +410,6 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - if (_lang == kSpanish) - textSurface = extraSurface; - loadPic(97, extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -598,9 +592,6 @@ void DrasculaEngine::animation_2_1() { // John Hacker talks with the bartender to book a room void DrasculaEngine::animation_3_1() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface); talk(192); @@ -626,17 +617,11 @@ void DrasculaEngine::animation_3_1() { flags[0] = 1; - if (_lang == kSpanish) - textSurface = extraSurface; - loadPic(97, extraSurface); } // John Hacker talks with the pianist void DrasculaEngine::animation_4_1() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an12.alg", extraSurface); talk(205); @@ -668,9 +653,6 @@ void DrasculaEngine::animation_4_1() { talk_pianist(4); talk(209); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[11] = 0; loadPic(97, extraSurface); } @@ -725,9 +707,6 @@ void DrasculaEngine::animation_4_2() { loadPic("ciego4.alg", backSurface); loadPic("ciego5.alg", frontSurface); - if (_lang == kSpanish) - textSurface = frontSurface; - copyBackground(); updateScreen(); @@ -771,10 +750,7 @@ void DrasculaEngine::animation_4_2() { loadPic(96, frontSurface); loadPic(97, extraSurface); loadPic(99, backSurface); - withoutVerb(); - - if (_lang == kSpanish) - textSurface = extraSurface; + selectVerb(0); flags[9] = 0; flags[4] = 1; @@ -825,24 +801,16 @@ void DrasculaEngine::animation_16_2() { if (key != 0) goto asco; - if (_lang != kSpanish) - color_abc(kColorDarkGreen); + color_abc(kColorDarkGreen); loadPic("his1.alg", bgSurface, HALF_PAL); - if (_lang == kSpanish) - black(); - copyBackground(); - if (_lang != kSpanish) - centerText(_texthis[1], 180, 180); + centerText(_texthis[1], 180, 180); updateScreen(); - if (_lang == kSpanish) - fadeFromBlack(1); - key = getScan(); if (key != 0) goto asco; @@ -865,8 +833,7 @@ void DrasculaEngine::animation_16_2() { loadPic("his2.alg", bgSurface, HALF_PAL); copyBackground(); - if (_lang != kSpanish) - centerText(_texthis[2], 180, 180); + centerText(_texthis[2], 180, 180); updateScreen(); key = getScan(); @@ -891,8 +858,7 @@ void DrasculaEngine::animation_16_2() { loadPic("his3.alg", bgSurface, HALF_PAL); copyBackground(); - if (_lang != kSpanish) - centerText(_texthis[3], 180, 180); + centerText(_texthis[3], 180, 180); updateScreen(); key = getScan(); @@ -916,8 +882,7 @@ void DrasculaEngine::animation_16_2() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface3, screenSurface); - if (_lang != kSpanish) - centerText(_texthis[1], 180, 180); + centerText(_texthis[1], 180, 180); updateScreen(); key = getScan(); @@ -1117,7 +1082,7 @@ void DrasculaEngine::animation_25_2() { void DrasculaEngine::animation_27_2() { flags[22] = 1; - withoutVerb(); + selectVerb(0); removeObject(kItemEarWithEarPlug); addObject(kItemEarplugs); @@ -1202,7 +1167,7 @@ void DrasculaEngine::animation_31_2() { flags[38] = 0; flags[36] = 1; - withoutVerb(); + selectVerb(0); removeObject(kItemLeaves); removeObject(kItemBubbleGum); removeObject(kItemTissues); @@ -1423,7 +1388,7 @@ void DrasculaEngine::animation_5_5(){ int flyX[] = {1, 63, 125, 187, 249}; int pixelX = curX - 53, pixelY = curY - 9; - withoutVerb(); + selectVerb(0); removeObject(8); gotoObject(curX - 19, curY + curHeight); @@ -1602,7 +1567,7 @@ void DrasculaEngine::animation_12_5() { characterMoved = 0; curX = -1; objExit = 104; - withoutVerb(); + selectVerb(0); enterRoom(57); } @@ -1730,9 +1695,6 @@ void DrasculaEngine::animation_1_6() { trackDrascula = 0; talk_drascula(35); - if (_lang == kSpanish) - textSurface = extraSurface; - clearRoom(); enterRoom(102); activatePendulum(); @@ -1761,7 +1723,7 @@ void DrasculaEngine::animation_5_6() { void DrasculaEngine::animation_6_6() { animate("rct.bin", 11); clearRoom(); - withoutVerb(); + selectVerb(0); removeObject(20); loadPic(96, frontSurface); loadPic(97, frontSurface); @@ -1770,7 +1732,7 @@ void DrasculaEngine::animation_6_6() { doBreak = 1; objExit = 104; curX = -1; - withoutVerb(); + selectVerb(0); enterRoom(58); hare_se_ve = 1; trackProtagonist = 1; @@ -1874,9 +1836,6 @@ void DrasculaEngine::animation_19_6() { } void DrasculaEngine::animation_12_2() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an12.alg", extraSurface); talk(356); @@ -1902,17 +1861,11 @@ void DrasculaEngine::animation_12_2() { talk_pianist(5); converse(1); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[11] = 0; loadPic(974, extraSurface); } void DrasculaEngine::animation_26_2() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an12.alg", extraSurface); talk(392); @@ -1963,9 +1916,6 @@ void DrasculaEngine::animation_26_2() { pickObject(11); removeObject(kItemBook); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[11] = 0; flags[39] = 1; loadPic(974, extraSurface); @@ -1973,9 +1923,6 @@ void DrasculaEngine::animation_26_2() { } void DrasculaEngine::animation_11_2() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface); talk(352); @@ -1988,9 +1935,6 @@ void DrasculaEngine::animation_11_2() { pause(40); talk_bartender(82); - if (_lang == kSpanish) - textSurface = extraSurface; - loadPic(974, extraSurface); } @@ -2112,9 +2056,6 @@ void DrasculaEngine::animation_34_2() { } void DrasculaEngine::animation_36_2() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface); talk(404); @@ -2125,9 +2066,6 @@ void DrasculaEngine::animation_36_2() { pause(40); talk_bartender(82); - if (_lang == kSpanish) - textSurface = extraSurface; - loadPic(974, extraSurface); } @@ -2220,16 +2158,13 @@ void DrasculaEngine::animation_5_2() { flags[8] = 1; curX = curX - 4; talk_sync(_text[46], "46.als", "4442444244244"); - withoutVerb(); + selectVerb(0); } void DrasculaEngine::animation_6_2() { stopMusic(); flags[9] = 1; - if (_lang == kSpanish) - textSurface = frontSurface; - clearRoom(); loadPic("ciego1.alg", bgSurface, HALF_PAL); // ciego = blind loadPic("ciego2.alg", drawSurface3); @@ -2262,10 +2197,7 @@ void DrasculaEngine::animation_6_2() { loadPic(96, frontSurface); loadPic(97, extraSurface); loadPic(99, backSurface); - withoutVerb(); - - if (_lang == kSpanish) - textSurface = extraSurface; + selectVerb(0); flags[9] = 0; } @@ -2285,9 +2217,6 @@ void DrasculaEngine::animation_33_2() { loadPic("ciego4.alg", backSurface); loadPic("ciego5.alg", frontSurface); - if (_lang == kSpanish) - textSurface = frontSurface; - copyBackground(); updateScreen(); @@ -2314,10 +2243,7 @@ void DrasculaEngine::animation_33_2() { loadPic(96, frontSurface); loadPic(97, extraSurface); loadPic(99, backSurface); - withoutVerb(); - - if (_lang == kSpanish) - textSurface = extraSurface; + selectVerb(0); flags[33] = 1; flags[9] = 0; @@ -2428,7 +2354,7 @@ void DrasculaEngine::animation_6_4() { loadPic(96, frontSurface); loadPic(roomDisk, drawSurface3); loadPic(roomNumber, bgSurface, HALF_PAL); - withoutVerb(); + selectVerb(0); updateRoom(); } diff --git a/engines/drascula/converse.cpp b/engines/drascula/converse.cpp index 950c73c241..dee5868142 100644 --- a/engines/drascula/converse.cpp +++ b/engines/drascula/converse.cpp @@ -122,7 +122,7 @@ void DrasculaEngine::converse(int index) { breakOut = 0; - withoutVerb(); + selectVerb(0); getStringFromLine(buffer, size, phrase1); getStringFromLine(buffer, size, phrase2); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index fd16f783ac..42eb66288f 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -180,7 +180,7 @@ int DrasculaEngine::init() { int DrasculaEngine::go() { currentChapter = 1; // values from 1 to 6 will start each part of game - hay_que_load = 0; + loadedDifferentChapter = 0; checkCD(); @@ -223,9 +223,6 @@ int DrasculaEngine::go() { withVoices = 0; selectionMade = 0; - if (currentChapter != 6) - loadPic(95, tableSurface); - if (currentChapter != 3) loadPic(96, frontSurface, COMPLETE_PAL); @@ -236,7 +233,7 @@ int DrasculaEngine::go() { loadPic("aux13.alg", bgSurface, COMPLETE_PAL); loadPic(96, frontSurface); } else if (currentChapter == 4) { - if (hay_que_load == 0) + if (loadedDifferentChapter == 0) animation_ray(); loadPic(96, frontSurface); clearRoom(); @@ -246,10 +243,15 @@ int DrasculaEngine::go() { drasculaX = 62, drasculaY = 99, trackDrascula = 1; actorFrames[kFramePendulum] = 0; flag_tv = 0; - - loadPic(95, tableSurface); } + loadPic(95, tableSurface); + for (i = 0; i < 25; i++) + memcpy(crosshairCursor + i * 40, tableSurface + 225 + (56 + i) * 320, 40); + + if (_lang == kSpanish) + loadPic(974, tableSurface); + if (currentChapter != 2) { loadPic(99, backSurface); loadPic(97, extraSurface); @@ -290,11 +292,6 @@ bool DrasculaEngine::runCurrentChapter() { rightMouseButton = 0; - if (_lang == kSpanish) - textSurface = extraSurface; - else - textSurface = tableSurface; - previousMusic = -1; if (currentChapter != 2) { @@ -323,14 +320,14 @@ bool DrasculaEngine::runCurrentChapter() { if (currentChapter == 1) { pickObject(28); - if (hay_que_load == 0) + if (loadedDifferentChapter == 0) animation_1_1(); - withoutVerb(); + selectVerb(0); loadPic("2aux62.alg", drawSurface2); trackProtagonist = 1; objExit = 104; - if (hay_que_load != 0) { + if (loadedDifferentChapter != 0) { if (!loadGame(saveName)) { return true; } @@ -344,7 +341,7 @@ bool DrasculaEngine::runCurrentChapter() { addObject(kItemPhone); trackProtagonist = 3; objExit = 162; - if (hay_que_load == 0) + if (loadedDifferentChapter == 0) enterRoom(14); else { if (!loadGame(saveName)) { @@ -362,7 +359,7 @@ bool DrasculaEngine::runCurrentChapter() { flags[1] = 1; trackProtagonist = 1; objExit = 99; - if (hay_que_load == 0) + if (loadedDifferentChapter == 0) enterRoom(20); else { if (!loadGame(saveName)) { @@ -376,7 +373,7 @@ bool DrasculaEngine::runCurrentChapter() { addObject(kItemReefer2); addObject(kItemOneCoin2); objExit = 100; - if (hay_que_load == 0) { + if (loadedDifferentChapter == 0) { enterRoom(21); trackProtagonist = 0; curX = 235; @@ -398,7 +395,7 @@ bool DrasculaEngine::runCurrentChapter() { addObject(20); trackProtagonist = 1; objExit = 100; - if (hay_que_load == 0) { + if (loadedDifferentChapter == 0) { enterRoom(45); } else { if (!loadGame(saveName)) { @@ -411,7 +408,7 @@ bool DrasculaEngine::runCurrentChapter() { trackProtagonist = 1; objExit = 104; - if (hay_que_load == 0) { + if (loadedDifferentChapter == 0) { enterRoom(58); animation_1_6(); } else { @@ -422,6 +419,8 @@ bool DrasculaEngine::runCurrentChapter() { } } + showCursor(); + while (1) { if (characterMoved == 0) { stepX = STEP_X; @@ -523,7 +522,7 @@ bool DrasculaEngine::runCurrentChapter() { #ifndef _WIN32_WCE updateEvents(); #endif - withoutVerb(); + selectVerb(0); } if (leftMouseButton == 1 && menuBar == 1) { @@ -559,7 +558,7 @@ bool DrasculaEngine::runCurrentChapter() { if (!saveLoadScreen()) return true; } else if (key == Common::KEYCODE_F8) { - withoutVerb(); + selectVerb(0); } else if (key == Common::KEYCODE_v) { withVoices = 1; print_abc(_textsys[2], 96, 86); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 739dd03855..b356fe1221 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -177,6 +177,11 @@ enum TalkSequenceCommands { kTalkerBartender = 16 }; +enum MouseCursors { + kCursorCrosshair = 0, + kCursorCurrentItem = 1 +}; + struct TalkSequenceCommand { int chapter; int sequence; @@ -319,6 +324,9 @@ public: DacPalette256 brightPalette; DacPalette256 darkPalette; + byte *crosshairCursor; + byte *mouseCursor; + // Graphics buffers/pointers byte *VGA; byte *bgSurface; @@ -365,7 +373,8 @@ public: int flags[NUM_FLAGS]; int frame_y; - int curX, curY, characterMoved, curDirection, trackProtagonist, num_frame, hare_se_ve; + int curX, curY, characterMoved, curDirection, trackProtagonist, num_frame; + int hare_se_ve; // TODO: what is this for? int roomX, roomY, checkFlags; int doBreak; int stepX, stepY; @@ -390,7 +399,7 @@ public: int framesWithoutAction; int term_int; int currentChapter; - int hay_que_load; + int loadedDifferentChapter; char saveName[13]; int _color; int musicStopped; @@ -414,7 +423,6 @@ public: void openDoor(int nflag, int doorNum); void showMap(); - void withoutVerb(); void enterRoom(int); void clearRoom(); void gotoObject(int, int); @@ -494,7 +502,9 @@ public: bool exitRoom(int); bool pickupObject(); bool checkAction(int); - void setCursorTable(); + void setCursor(int cursor); + void showCursor(); + void hideCursor(); void enterName(); bool soundIsActive(); void waitFrameSSN(); diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index 6fc7e54bc4..e11181e798 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -24,6 +24,7 @@ */ #include "drascula/drascula.h" +#include "graphics/cursorman.h" namespace Drascula { @@ -47,6 +48,10 @@ void DrasculaEngine::allocMemory() { assert(tableSurface); extraSurface = (byte *)malloc(64000); assert(extraSurface); + crosshairCursor = (byte *)malloc(40 * 25); + assert(crosshairCursor); + mouseCursor = (byte *)malloc(OBJWIDTH * OBJHEIGHT); + assert(mouseCursor); } void DrasculaEngine::freeMemory() { @@ -58,6 +63,8 @@ void DrasculaEngine::freeMemory() { free(drawSurface3); free(extraSurface); free(frontSurface); + free(crosshairCursor); + free(mouseCursor); } void DrasculaEngine::moveCursor() { @@ -78,14 +85,26 @@ void DrasculaEngine::moveCursor() { showMenu(); else if (menuBar == 1) clearMenu(); +} + +void DrasculaEngine::setCursor(int cursor) { + switch (cursor) { + case kCursorCrosshair: + CursorMan.replaceCursor((const byte *)crosshairCursor, 40, 25, 0, 0); + break; + case kCursorCurrentItem: + CursorMan.replaceCursor((const byte *)mouseCursor, OBJWIDTH, OBJHEIGHT, 20, 17); + default: + break; + } +} - int cursorPos[6] = { 0, 0, mouseX - 20, mouseY - 17, OBJWIDTH, OBJHEIGHT }; - copyRectClip(cursorPos, drawSurface3, screenSurface); +void DrasculaEngine::showCursor() { + CursorMan.showMouse(true); } -void DrasculaEngine::setCursorTable() { - int cursorPos[6] = { 225, 56, mouseX - 20, mouseY - 12, 40, 25 }; - copyRectClip(cursorPos, tableSurface, screenSurface); +void DrasculaEngine::hideCursor() { + CursorMan.showMouse(false); } void DrasculaEngine::loadPic(const char *NamePcc, byte *targetSurface, int colorCount) { @@ -244,7 +263,7 @@ void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { } // for int textPos[6] = { letterX, letterY, screenX, screenY, CHAR_WIDTH, CHAR_HEIGHT }; - copyRectClip(textPos, textSurface, screenSurface); + copyRectClip(textPos, tableSurface, screenSurface); screenX = screenX + CHAR_WIDTH; if (screenX > 317) { diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp index cfa3e0c346..072dd5da71 100644 --- a/engines/drascula/interface.cpp +++ b/engines/drascula/interface.cpp @@ -36,7 +36,7 @@ void DrasculaEngine::selectVerbFromBar() { } // no verb selected - withoutVerb(); + selectVerb(0); } void DrasculaEngine::selectVerb(int verb) { @@ -50,10 +50,17 @@ void DrasculaEngine::selectVerb(int verb) { addObject(pickedObject); } - copyBackground(OBJWIDTH * verb, c, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); + for (int i = 0; i < OBJHEIGHT; i++) + memcpy(mouseCursor + i * OBJWIDTH, backSurface + OBJWIDTH * verb + (c + i) * 320, OBJWIDTH); + setCursor(kCursorCurrentItem); - takeObject = 1; - pickedObject = verb; + if (verb > 0) { + takeObject = 1; + pickedObject = verb; + } else { + takeObject = 0; + hasName = 0; + } } bool DrasculaEngine::confirmExit() { diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp index cb031026f9..409b1eb96f 100644 --- a/engines/drascula/objects.cpp +++ b/engines/drascula/objects.cpp @@ -51,7 +51,9 @@ void DrasculaEngine::chooseObject(int object) { if (takeObject == 1 && menuScreen == 0) addObject(pickedObject); } - copyBackground(_x1d_menu[object], _y1d_menu[object], 0, 0, OBJWIDTH,OBJHEIGHT, backSurface, drawSurface3); + for (int i = 0; i < OBJHEIGHT; i++) + memcpy(mouseCursor + i * OBJWIDTH, backSurface + _x1d_menu[object] + (_y1d_menu[object] + i) * 320, OBJWIDTH); + setCursor(kCursorCurrentItem); takeObject = 1; pickedObject = object; } @@ -70,22 +72,6 @@ int DrasculaEngine::removeObject(int obj) { return result; } -void DrasculaEngine::withoutVerb() { - int c = (menuScreen == 1) ? 0 : 171; - - if (currentChapter == 5) { - if (takeObject == 1 && pickedObject != 16) - addObject(pickedObject); - } else { - if (takeObject == 1) - addObject(pickedObject); - } - copyBackground(0, c, 0, 0, OBJWIDTH,OBJHEIGHT, backSurface, drawSurface3); - - takeObject = 0; - hasName = 0; -} - void DrasculaEngine::gotoObject(int pointX, int pointY) { if (currentChapter == 5 || currentChapter == 6) { if (hare_se_ve == 0) { @@ -186,7 +172,7 @@ bool DrasculaEngine::pickupObject() { } updateEvents(); if (takeObject == 0) - withoutVerb(); + selectVerb(0); return false; } diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 79804e1f9f..365ac06f8e 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -554,7 +554,7 @@ bool DrasculaEngine::room_21(int fl) { } else if(pickedObject == 7 && fl == 101) { flags[28] = 1; openDoor(0, 1); - withoutVerb(); + selectVerb(0); } else if (pickedObject == 21 && fl == 179) { animate("st.bin", 14); fadeToBlack(1); @@ -576,7 +576,7 @@ bool DrasculaEngine::room_22(int fl) { playSound(1); hiccup(14); finishSound(); - withoutVerb(); + selectVerb(0); removeObject(22); updateVisible(); trackProtagonist = 3; @@ -687,7 +687,7 @@ bool DrasculaEngine::room_27(int fl) { else if (pickedObject == 17 && fl == 116) { flags[23] = 1; openDoor(5,3); - withoutVerb(); + selectVerb(0); } else if (fl == 150) talk(460); else @@ -816,16 +816,16 @@ bool DrasculaEngine::room_53(int fl) { } else if (pickedObject == 12 && fl == 52) { flags[3] = 1; talk(401); - withoutVerb(); + selectVerb(0); removeObject(12); } else if (pickedObject == 15 && fl == 52) { flags[4] = 1; talk(401); - withoutVerb(); + selectVerb(0); removeObject(15); } else if (pickedObject == 16 && fl == 121) { flags[2] = 1; - withoutVerb(); + selectVerb(0); updateVisible(); pickedObject = kVerbMove; } else if (pickedObject == 16) { @@ -864,7 +864,7 @@ bool DrasculaEngine::room_54(int fl) { } else if (pickedObject == 10 && fl == 119) { pause(4); talk(436); - withoutVerb(); + selectVerb(0); removeObject(10); } else hasAnswer = 0; @@ -968,7 +968,7 @@ bool DrasculaEngine::room_59(int fl) { loadPic(59, bgSurface, HALF_PAL); trackProtagonist = 3; talk(245); - withoutVerb(); + selectVerb(0); flags[11] = 1; } } else @@ -991,11 +991,11 @@ bool DrasculaEngine::room_60(int fl) { talk(266); talk_bartender(1, 1); converse(12); - withoutVerb(); + selectVerb(0); pickedObject = 0; } else if (pickedObject == 21 && fl == 56) { flags[6] = 1; - withoutVerb(); + selectVerb(0); removeObject(21); animate("beb.bin", 10); } else if (pickedObject == 9 && fl == 56 && flags[6] == 1) { @@ -1482,6 +1482,7 @@ void DrasculaEngine::update_102() { } bool DrasculaEngine::checkAction(int fl) { + hideCursor(); characterMoved = 0; updateRoom(); updateScreen(); @@ -1500,7 +1501,7 @@ bool DrasculaEngine::checkAction(int fl) { || (pickedObject == kVerbOpen && fl == 22 && flags[23] == 0)) { talk(164); flags[23] = 1; - withoutVerb(); + selectVerb(0); addObject(kItemMoney); addObject(kItemTwoCoins); } else if (pickedObject == kVerbLook && fl == 22 && flags[23] == 1) @@ -1511,7 +1512,7 @@ bool DrasculaEngine::checkAction(int fl) { hasAnswer = 0; } else if (currentChapter == 4) { if ((pickedObject == 18 && fl == 19) || (pickedObject == 19 && fl == 18)) { - withoutVerb(); + selectVerb(0); chooseObject(21); removeObject(18); removeObject(19); @@ -1547,8 +1548,10 @@ bool DrasculaEngine::checkAction(int fl) { hasAnswer = 0; } else if (currentChapter == 3) { if (roomNumber == 13) { - if (room(13, fl)) + if (room(13, fl)) { + showCursor(); return true; + } } else hasAnswer = 0; } else if (currentChapter == 4) { @@ -1559,14 +1562,18 @@ bool DrasculaEngine::checkAction(int fl) { else if (pickedObject == 12 && fl == 50 && flags[18] == 0) talk(487); else if (roomNumber == 21) { - if (room(21, fl)) + if (room(21, fl)) { + showCursor(); return true; + } } else hasAnswer = 0; } else if (currentChapter == 5) { if (roomNumber == 56) { - if (room(56, fl)) + if (room(56, fl)) { + showCursor(); return true; + } } else hasAnswer = 0; } else if (currentChapter == 6) { @@ -1577,8 +1584,10 @@ bool DrasculaEngine::checkAction(int fl) { else if (roomNumber == 102) room(102, fl); else if (roomNumber == 60) { - if (room(60, fl)) + if (room(60, fl)) { + showCursor(); return true; + } } else hasAnswer = 0; @@ -1594,6 +1603,7 @@ bool DrasculaEngine::checkAction(int fl) { if (hasAnswer == 0 && (hasName == 1 || menuScreen == 1)) room(0, -1); + showCursor(); return false; } @@ -1619,6 +1629,7 @@ bool DrasculaEngine::room(int rN, int fl) { void DrasculaEngine::enterRoom(int roomIndex) { debug(2, "Entering room %d", roomIndex); + showCursor(); char fileName[20]; sprintf(fileName, "%d.ald", roomIndex); @@ -1872,6 +1883,7 @@ void DrasculaEngine::clearRoom() { bool DrasculaEngine::exitRoom(int l) { debug(2, "Exiting room from door %d", l); + hideCursor(); int roomNum = 0; @@ -2022,7 +2034,7 @@ void DrasculaEngine::openDoor(int nflag, int doorNum) { updateRoom(); updateScreen(); finishSound(); - withoutVerb(); + selectVerb(0); } } @@ -2035,7 +2047,7 @@ void DrasculaEngine::closeDoor(int nflag, int doorNum) { updateRoom(); updateScreen(); finishSound(); - withoutVerb(); + selectVerb(0); } } diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp index 5e3885b702..526f8eb038 100644 --- a/engines/drascula/saveload.cpp +++ b/engines/drascula/saveload.cpp @@ -60,6 +60,7 @@ bool DrasculaEngine::saveLoadScreen() { select[0] = 0; _system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true); + setCursor(kCursorCrosshair); for (;;) { y = 27; @@ -69,7 +70,6 @@ bool DrasculaEngine::saveLoadScreen() { y = y + 9; } print_abc(select, 117, 15); - setCursorTable(); updateScreen(); y = 27; @@ -172,6 +172,8 @@ bool DrasculaEngine::saveLoadScreen() { delay(5); } + selectVerb(0); + clearRoom(); loadPic(roomNumber, bgSurface, HALF_PAL); selectionMade = 0; @@ -198,7 +200,7 @@ bool DrasculaEngine::loadGame(const char *gameName) { if (savedChapter != currentChapter) { strcpy(saveName, gameName); currentChapter = savedChapter - 1; - hay_que_load = 1; + loadedDifferentChapter = 1; return false; } sav->read(currentData, 20); @@ -216,10 +218,10 @@ bool DrasculaEngine::loadGame(const char *gameName) { takeObject = sav->readSint32LE(); pickedObject = sav->readSint32LE(); - hay_que_load = 0; + loadedDifferentChapter = 0; sscanf(currentData, "%d.ald", &roomNum); enterRoom(roomNum); - withoutVerb(); + selectVerb(0); return true; } diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp index 2eb40e2e30..f490f1e25d 100644 --- a/engines/drascula/sound.cpp +++ b/engines/drascula/sound.cpp @@ -37,9 +37,15 @@ void DrasculaEngine::updateVolume(Audio::Mixer::SoundType soundType, int prevVol } void DrasculaEngine::volumeControls() { + if (_lang == kSpanish) + loadPic(95, tableSurface); + copyRect(1, 56, 73, 63, 177, 97, tableSurface, screenSurface); updateScreen(73, 63, 73, 63, 177, 97, screenSurface); + setCursor(kCursorCrosshair); + showCursor(); + for (;;) { int masterVolume = CLIP((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16), 0, 15); int voiceVolume = CLIP((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16), 0, 15); @@ -57,8 +63,6 @@ void DrasculaEngine::volumeControls() { copyBackground(183, 56, 138, voiceVolumeY, 39, 2 + voiceVolume * 4, tableSurface, screenSurface); copyBackground(183, 56, 194, musicVolumeY, 39, 2 + musicVolume * 4, tableSurface, screenSurface); - setCursorTable(); - updateScreen(); updateEvents(); @@ -84,6 +88,11 @@ void DrasculaEngine::volumeControls() { } + if (_lang == kSpanish) + loadPic(974, tableSurface); + + selectVerb(0); + updateEvents(); } |