[Scummvm-cvs-logs] SF.net SVN: scummvm:[34488] scummvm/trunk/engines/drascula

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Sep 11 11:31:46 CEST 2008


Revision: 34488
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34488&view=rev
Author:   thebluegr
Date:     2008-09-11 09:31:45 +0000 (Thu, 11 Sep 2008)

Log Message:
-----------
- The game's cursor is now handled via ScummVM's cursor manager, instead of the game itself (this means that there might be regressions where the cursor is visible when it shouldn't be)
- Removed the textSurface pointer, which was used in the Spanish version. Non-Spanish versions of the game hold the font data in the tableSurface buffer (which contains picture 96). The font data for Spanish versions is in picture 974. Now both versions load their font data from the tableSurface buffer
- hay_que_load -> loadedDifferentChapter
- Merged withoutVerb() and selectVerb()
This is a big change, it might lead to regressions!

Modified Paths:
--------------
    scummvm/trunk/engines/drascula/animation.cpp
    scummvm/trunk/engines/drascula/converse.cpp
    scummvm/trunk/engines/drascula/drascula.cpp
    scummvm/trunk/engines/drascula/drascula.h
    scummvm/trunk/engines/drascula/graphics.cpp
    scummvm/trunk/engines/drascula/interface.cpp
    scummvm/trunk/engines/drascula/objects.cpp
    scummvm/trunk/engines/drascula/rooms.cpp
    scummvm/trunk/engines/drascula/saveload.cpp
    scummvm/trunk/engines/drascula/sound.cpp

Modified: scummvm/trunk/engines/drascula/animation.cpp
===================================================================
--- scummvm/trunk/engines/drascula/animation.cpp	2008-09-11 09:28:14 UTC (rev 34487)
+++ scummvm/trunk/engines/drascula/animation.cpp	2008-09-11 09:31:45 UTC (rev 34488)
@@ -402,9 +402,6 @@
 		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 @@
 		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 @@
 
 // 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 @@
 
 	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 @@
 	talk_pianist(4);
 	talk(209);
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	flags[11] = 0;
 	loadPic(97, extraSurface);
 }
@@ -725,9 +707,6 @@
 	loadPic("ciego4.alg", backSurface);
 	loadPic("ciego5.alg", frontSurface);
 
-	if (_lang == kSpanish)
-		textSurface = frontSurface;
-
 	copyBackground();
 	updateScreen();
 
@@ -771,11 +750,8 @@
 	loadPic(96, frontSurface);
 	loadPic(97, extraSurface);
 	loadPic(99, backSurface);
-	withoutVerb();
+	selectVerb(0);
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	flags[9] = 0;
 	flags[4] = 1;
 }
@@ -825,24 +801,16 @@
 	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 @@
 	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 @@
 	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 @@
 
 	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_27_2() {
 	flags[22] = 1;
 
-	withoutVerb();
+	selectVerb(0);
 	removeObject(kItemEarWithEarPlug);
 	addObject(kItemEarplugs);
 
@@ -1202,7 +1167,7 @@
 
 	flags[38] = 0;
 	flags[36] = 1;
-	withoutVerb();
+	selectVerb(0);
 	removeObject(kItemLeaves);
 	removeObject(kItemBubbleGum);
 	removeObject(kItemTissues);
@@ -1423,7 +1388,7 @@
 	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 @@
 	characterMoved = 0;
 	curX = -1;
 	objExit = 104;
-	withoutVerb();
+	selectVerb(0);
 	enterRoom(57);
 }
 
@@ -1730,9 +1695,6 @@
 	trackDrascula = 0;
 	talk_drascula(35);
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	clearRoom();
 	enterRoom(102);
 	activatePendulum();
@@ -1761,7 +1723,7 @@
 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 @@
 	doBreak = 1;
 	objExit = 104;
 	curX = -1;
-	withoutVerb();
+	selectVerb(0);
 	enterRoom(58);
 	hare_se_ve = 1;
 	trackProtagonist = 1;
@@ -1874,9 +1836,6 @@
 }
 
 void DrasculaEngine::animation_12_2() {
-	if (_lang == kSpanish)
-		textSurface = frontSurface;
-
 	loadPic("an12.alg", extraSurface);
 
 	talk(356);
@@ -1902,17 +1861,11 @@
 	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 @@
 	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_11_2() {
-	if (_lang == kSpanish)
-		textSurface = frontSurface;
-
 	loadPic("an11y13.alg", extraSurface);
 
 	talk(352);
@@ -1988,9 +1935,6 @@
 	pause(40);
 	talk_bartender(82);
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	loadPic(974, extraSurface);
 }
 
@@ -2112,9 +2056,6 @@
 }
 
 void DrasculaEngine::animation_36_2() {
-	if (_lang == kSpanish)
-		textSurface = frontSurface;
-
 	loadPic("an11y13.alg", extraSurface);
 
 	talk(404);
@@ -2125,9 +2066,6 @@
 	pause(40);
 	talk_bartender(82);
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	loadPic(974, extraSurface);
 }
 
@@ -2220,16 +2158,13 @@
 	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,11 +2197,8 @@
 	loadPic(96, frontSurface);
 	loadPic(97, extraSurface);
 	loadPic(99, backSurface);
-	withoutVerb();
+	selectVerb(0);
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	flags[9] = 0;
 }
 
@@ -2285,9 +2217,6 @@
 	loadPic("ciego4.alg", backSurface);
 	loadPic("ciego5.alg", frontSurface);
 
-	if (_lang == kSpanish)
-		textSurface = frontSurface;
-
 	copyBackground();
 	updateScreen();
 
@@ -2314,11 +2243,8 @@
 	loadPic(96, frontSurface);
 	loadPic(97, extraSurface);
 	loadPic(99, backSurface);
-	withoutVerb();
+	selectVerb(0);
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	flags[33] = 1;
 	flags[9] = 0;
 }
@@ -2428,7 +2354,7 @@
 	loadPic(96, frontSurface);
 	loadPic(roomDisk, drawSurface3);
 	loadPic(roomNumber, bgSurface, HALF_PAL);
-	withoutVerb();
+	selectVerb(0);
 	updateRoom();
 }
 

Modified: scummvm/trunk/engines/drascula/converse.cpp
===================================================================
--- scummvm/trunk/engines/drascula/converse.cpp	2008-09-11 09:28:14 UTC (rev 34487)
+++ scummvm/trunk/engines/drascula/converse.cpp	2008-09-11 09:31:45 UTC (rev 34488)
@@ -122,7 +122,7 @@
 
 	breakOut = 0;
 
-	withoutVerb();
+	selectVerb(0);
 
 	getStringFromLine(buffer, size, phrase1);
 	getStringFromLine(buffer, size, phrase2);

Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp	2008-09-11 09:28:14 UTC (rev 34487)
+++ scummvm/trunk/engines/drascula/drascula.cpp	2008-09-11 09:31:45 UTC (rev 34488)
@@ -180,7 +180,7 @@
 
 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 @@
 		withVoices = 0;
 		selectionMade = 0;
 
-		if (currentChapter != 6)
-			loadPic(95, tableSurface);
-
 		if (currentChapter != 3)
 			loadPic(96, frontSurface, COMPLETE_PAL);
 
@@ -236,7 +233,7 @@
 			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 @@
 			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 @@
 
 	rightMouseButton = 0;
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-	else
-		textSurface = tableSurface;
-
 	previousMusic = -1;
 
 	if (currentChapter != 2) {
@@ -323,14 +320,14 @@
 	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 @@
 		addObject(kItemPhone);
 		trackProtagonist = 3;
 		objExit = 162;
-		if (hay_que_load == 0)
+		if (loadedDifferentChapter == 0)
 			enterRoom(14);
 		else {
 			if (!loadGame(saveName)) {
@@ -362,7 +359,7 @@
 		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 @@
 		addObject(kItemReefer2);
 		addObject(kItemOneCoin2);
 		objExit = 100;
-		if (hay_que_load == 0) {
+		if (loadedDifferentChapter == 0) {
 			enterRoom(21);
 			trackProtagonist = 0;
 			curX = 235;
@@ -398,7 +395,7 @@
 		addObject(20);
 		trackProtagonist = 1;
 		objExit = 100;
-		if (hay_que_load == 0) {
+		if (loadedDifferentChapter == 0) {
 			enterRoom(45);
 		} else {
 			if (!loadGame(saveName)) {
@@ -411,7 +408,7 @@
 
 		trackProtagonist = 1;
 		objExit = 104;
-		if (hay_que_load == 0) {
+		if (loadedDifferentChapter == 0) {
 			enterRoom(58);
 			animation_1_6();
 		} else {
@@ -422,6 +419,8 @@
 		}
 	}
 
+	showCursor();
+
 	while (1) {
 		if (characterMoved == 0) {
 			stepX = STEP_X;
@@ -523,7 +522,7 @@
 #ifndef _WIN32_WCE
 			updateEvents();
 #endif
-			withoutVerb();
+			selectVerb(0);
 		}
 
 		if (leftMouseButton == 1 && menuBar == 1) {
@@ -559,7 +558,7 @@
 			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);

Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h	2008-09-11 09:28:14 UTC (rev 34487)
+++ scummvm/trunk/engines/drascula/drascula.h	2008-09-11 09:31:45 UTC (rev 34488)
@@ -177,6 +177,11 @@
 	kTalkerBartender = 16
 };
 
+enum MouseCursors {
+	kCursorCrosshair = 0,
+	kCursorCurrentItem = 1
+};
+
 struct TalkSequenceCommand {
 	int chapter;
 	int sequence;
@@ -319,6 +324,9 @@
 	DacPalette256 brightPalette;
 	DacPalette256 darkPalette;
 
+	byte *crosshairCursor;
+	byte *mouseCursor;
+
 	// Graphics buffers/pointers
 	byte *VGA;
 	byte *bgSurface;
@@ -365,7 +373,8 @@
 	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 @@
 	int framesWithoutAction;
 	int term_int;
 	int currentChapter;
-	int hay_que_load;
+	int loadedDifferentChapter;
 	char saveName[13];
 	int _color;
 	int musicStopped;
@@ -414,7 +423,6 @@
 	void openDoor(int nflag, int doorNum);
 	void showMap();
 
-	void withoutVerb();
 	void enterRoom(int);
 	void clearRoom();
 	void gotoObject(int, int);
@@ -494,7 +502,9 @@
 	bool exitRoom(int);
 	bool pickupObject();
 	bool checkAction(int);
-	void setCursorTable();
+	void setCursor(int cursor);
+	void showCursor();
+	void hideCursor();
 	void enterName();
 	bool soundIsActive();
 	void waitFrameSSN();

Modified: scummvm/trunk/engines/drascula/graphics.cpp
===================================================================
--- scummvm/trunk/engines/drascula/graphics.cpp	2008-09-11 09:28:14 UTC (rev 34487)
+++ scummvm/trunk/engines/drascula/graphics.cpp	2008-09-11 09:31:45 UTC (rev 34488)
@@ -24,6 +24,7 @@
  */
 
 #include "drascula/drascula.h"
+#include "graphics/cursorman.h"
 
 namespace Drascula {
 
@@ -47,6 +48,10 @@
 	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 @@
 	free(drawSurface3);
 	free(extraSurface);
 	free(frontSurface);
+	free(crosshairCursor);
+	free(mouseCursor);
 }
 
 void DrasculaEngine::moveCursor() {
@@ -78,16 +85,28 @@
 		showMenu();
 	else if (menuBar == 1)
 		clearMenu();
+}
 
-	int cursorPos[6] = { 0, 0, mouseX - 20, mouseY - 17, OBJWIDTH, OBJHEIGHT };
-	copyRectClip(cursorPos, drawSurface3, screenSurface);
+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;
+	}
 }
 
-void DrasculaEngine::setCursorTable() {
-	int cursorPos[6] = { 225, 56, mouseX - 20, mouseY - 12, 40, 25 };
-	copyRectClip(cursorPos, tableSurface, screenSurface);
+void DrasculaEngine::showCursor() {
+	CursorMan.showMouse(true);
 }
 
+void DrasculaEngine::hideCursor() {
+	CursorMan.showMouse(false);
+}
+
 void DrasculaEngine::loadPic(const char *NamePcc, byte *targetSurface, int colorCount) {
 	uint dataSize = 0;
 	byte *pcxData;
@@ -244,7 +263,7 @@
 		}	// 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) {

Modified: scummvm/trunk/engines/drascula/interface.cpp
===================================================================
--- scummvm/trunk/engines/drascula/interface.cpp	2008-09-11 09:28:14 UTC (rev 34487)
+++ scummvm/trunk/engines/drascula/interface.cpp	2008-09-11 09:31:45 UTC (rev 34488)
@@ -36,7 +36,7 @@
 	}
 
 	// no verb selected
-	withoutVerb();
+	selectVerb(0);
 }
 
 void DrasculaEngine::selectVerb(int verb) {
@@ -50,10 +50,17 @@
 			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() {

Modified: scummvm/trunk/engines/drascula/objects.cpp
===================================================================
--- scummvm/trunk/engines/drascula/objects.cpp	2008-09-11 09:28:14 UTC (rev 34487)
+++ scummvm/trunk/engines/drascula/objects.cpp	2008-09-11 09:31:45 UTC (rev 34488)
@@ -51,7 +51,9 @@
 		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 @@
 	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 @@
 	}
 	updateEvents();
 	if (takeObject == 0)
-		withoutVerb();
+		selectVerb(0);
 
 	return false;
 }

Modified: scummvm/trunk/engines/drascula/rooms.cpp
===================================================================
--- scummvm/trunk/engines/drascula/rooms.cpp	2008-09-11 09:28:14 UTC (rev 34487)
+++ scummvm/trunk/engines/drascula/rooms.cpp	2008-09-11 09:31:45 UTC (rev 34488)
@@ -554,7 +554,7 @@
 	} 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 @@
 		playSound(1);
 		hiccup(14);
 		finishSound();
-		withoutVerb();
+		selectVerb(0);
 		removeObject(22);
 		updateVisible();
 		trackProtagonist = 3;
@@ -687,7 +687,7 @@
 	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 @@
 	} 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 @@
 	} else if (pickedObject == 10 && fl == 119) {
 		pause(4);
 		talk(436);
-		withoutVerb();
+		selectVerb(0);
 		removeObject(10);
 	} else
 		hasAnswer = 0;
@@ -968,7 +968,7 @@
 			loadPic(59, bgSurface, HALF_PAL);
 			trackProtagonist = 3;
 			talk(245);
-			withoutVerb();
+			selectVerb(0);
 			flags[11] = 1;
 		}
 	} else
@@ -991,11 +991,11 @@
 		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 @@
 }
 
 bool DrasculaEngine::checkAction(int fl) {
+	hideCursor();
 	characterMoved = 0;
 	updateRoom();
 	updateScreen();
@@ -1500,7 +1501,7 @@
 				|| (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 @@
 			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 @@
 				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 @@
 			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 @@
 			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 @@
 	if (hasAnswer == 0 && (hasName == 1 || menuScreen == 1))
 		room(0, -1);
 
+	showCursor();
 	return false;
 }
 
@@ -1619,6 +1629,7 @@
 
 void DrasculaEngine::enterRoom(int roomIndex) {
 	debug(2, "Entering room %d", roomIndex);
+	showCursor();
 
 	char fileName[20];
 	sprintf(fileName, "%d.ald", roomIndex);
@@ -1872,6 +1883,7 @@
 
 bool DrasculaEngine::exitRoom(int l) {
 	debug(2, "Exiting room from door %d", l);
+	hideCursor();
 
 	int roomNum = 0;
 
@@ -2022,7 +2034,7 @@
 		updateRoom();
 		updateScreen();
 		finishSound();
-		withoutVerb();
+		selectVerb(0);
 	}
 }
 
@@ -2035,7 +2047,7 @@
 		updateRoom();
 		updateScreen();
 		finishSound();
-		withoutVerb();
+		selectVerb(0);
 	}
 }
 

Modified: scummvm/trunk/engines/drascula/saveload.cpp
===================================================================
--- scummvm/trunk/engines/drascula/saveload.cpp	2008-09-11 09:28:14 UTC (rev 34487)
+++ scummvm/trunk/engines/drascula/saveload.cpp	2008-09-11 09:31:45 UTC (rev 34488)
@@ -60,6 +60,7 @@
 	select[0] = 0;
 
 	_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
+	setCursor(kCursorCrosshair);
 
 	for (;;) {
 		y = 27;
@@ -69,7 +70,6 @@
 			y = y + 9;
 		}
 		print_abc(select, 117, 15);
-		setCursorTable();
 		updateScreen();
 		y = 27;
 
@@ -172,6 +172,8 @@
 		delay(5);
 	}
 
+	selectVerb(0);
+
 	clearRoom();
 	loadPic(roomNumber, bgSurface, HALF_PAL);
 	selectionMade = 0;
@@ -198,7 +200,7 @@
 	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 @@
 
 	takeObject = sav->readSint32LE();
 	pickedObject = sav->readSint32LE();
-	hay_que_load = 0;
+	loadedDifferentChapter = 0;
 	sscanf(currentData, "%d.ald", &roomNum);
 	enterRoom(roomNum);
-	withoutVerb();
+	selectVerb(0);
 
 	return true;
 }

Modified: scummvm/trunk/engines/drascula/sound.cpp
===================================================================
--- scummvm/trunk/engines/drascula/sound.cpp	2008-09-11 09:28:14 UTC (rev 34487)
+++ scummvm/trunk/engines/drascula/sound.cpp	2008-09-11 09:31:45 UTC (rev 34488)
@@ -37,9 +37,15 @@
 }
 
 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 @@
 		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 @@
 
 	}
 
+	if (_lang == kSpanish)
+		loadPic(974, tableSurface);
+
+	selectVerb(0);
+
 	updateEvents();
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list