[Scummvm-cvs-logs] CVS: scummvm/queen display.cpp,1.58,1.59 graphics.cpp,1.94,1.95 graphics.h,1.66,1.67 journal.cpp,1.29,1.30 talk.cpp,1.89,1.90 talk.h,1.29,1.30

Gregory Montoir cyx at users.sourceforge.net
Sat Feb 21 01:05:02 CET 2004


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1012/queen

Modified Files:
	display.cpp graphics.cpp graphics.h journal.cpp talk.cpp 
	talk.h 
Log Message:
Fixed arrow dialogue glitches (partial display) in non-english versions. This was due to a (wrong) blitting order of the bobs, arrows are now the last ones.

Index: display.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/display.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- display.cpp	13 Feb 2004 16:27:36 -0000	1.58
+++ display.cpp	21 Feb 2004 08:52:25 -0000	1.59
@@ -836,7 +836,7 @@
 	for (y = GAME_SCREEN_HEIGHT - 1; y > 0; --y) {
 		const TextSlot *pts = &_texts[y];
 		if (!pts->text.isEmpty()) {
-			_vm->display()->drawText(pts->x, y, pts->color, pts->text.c_str(), pts->outlined);
+			drawText(pts->x, y, pts->color, pts->text.c_str(), pts->outlined);
 		}
 	}
 }

Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/graphics.cpp,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- graphics.cpp	13 Feb 2004 22:33:21 -0000	1.94
+++ graphics.cpp	21 Feb 2004 08:52:25 -0000	1.95
@@ -192,11 +192,26 @@
 void Graphics::unpackControlBank() {
 	_vm->bankMan()->load("control.BBK",17);
 	_vm->bankMan()->unpack(1, 1, 17); // Mouse pointer
-	_vm->bankMan()->unpack(3, 3, 17); // Up arrow dialogue
-	_vm->bankMan()->unpack(4, 4, 17); // Down arrow dialogue
+	// unpack arrows frames and change hotspot to be always on top
+	for (int i = 3; i <= 4; ++i) {
+		_vm->bankMan()->unpack(i, i, 17);
+		BobFrame *bf = _vm->bankMan()->fetchFrame(i);
+		bf->yhotspot += 200;
+	}
 	_vm->bankMan()->close(17);
 }
 
+void Graphics::setupArrows() {
+	int scrollX = _vm->display()->horizontalScroll();
+	BobSlot *arrow;
+	arrow = bob(ARROW_BOB_UP);
+	arrow->curPos(303 + 8 + scrollX, 150 + 1 + 200);
+	arrow->frameNum = 3;
+	arrow = bob(ARROW_BOB_DOWN);
+	arrow->curPos(303 + scrollX, 175 + 200);
+	arrow->frameNum = 4;
+}
+
 void Graphics::setupMouseCursor() {
 	BobFrame *bf = _vm->bankMan()->fetchFrame(1);
 	_vm->display()->setMouseCursor(bf->data, bf->width, bf->height);

Index: graphics.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/graphics.h,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- graphics.h	23 Jan 2004 10:34:57 -0000	1.66
+++ graphics.h	21 Feb 2004 08:52:25 -0000	1.67
@@ -95,6 +95,7 @@
 	~Graphics();
 
 	void unpackControlBank();
+	void setupArrows();
 	void setupMouseCursor();
 
 	void drawBob(const BobSlot *bs, const BobFrame *bf, const Box *box, int16 x, int16 y);
@@ -140,6 +141,8 @@
 	void update(uint16 room);
 
 	enum {
+		ARROW_BOB_UP        =  62,
+		ARROW_BOB_DOWN      =  63,
 		MAX_BOBS_NUMBER     =  64,
 		MAX_STRING_LENGTH   = 255,
 		MAX_STRING_SIZE     = (MAX_STRING_LENGTH + 1),

Index: journal.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/journal.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- journal.cpp	24 Jan 2004 22:55:09 -0000	1.29
+++ journal.cpp	21 Feb 2004 08:52:25 -0000	1.30
@@ -467,14 +467,20 @@
 	case 'E':
 		_vm->display()->setTextCentered(144, "English", false);
 		break;
+	case 'F' :
+		_vm->display()->setTextCentered(144, "Fran\x87""ais", false);
+		break;
 	case 'G':
 		_vm->display()->setTextCentered(144, "Deutsch", false);
 		break;
+	case 'H':
+		_vm->display()->setTextCentered(144, "Hebrew", false);
+		break;
 	case 'I':
 		_vm->display()->setTextCentered(144, "Italiano", false);
 		break;
-	case 'F' :
-		_vm->display()->setTextCentered(144, "Fran\x87""ais", false);
+	case 'S':
+		_vm->display()->setTextCentered(144, "Espa\xA4""ol", false);
 		break;
 	}
 	char versionId[13];

Index: talk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/talk.cpp,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- talk.cpp	28 Jan 2004 13:13:58 -0000	1.89
+++ talk.cpp	21 Feb 2004 08:52:25 -0000	1.90
@@ -1279,7 +1279,6 @@
 	// Function TALK_BOB (lines 577-739) in talk.c
 	int selectedSentence = 0;
 
-	int scrollX = _vm->display()->horizontalScroll();
 	int startOption = 1;
 	int optionLines = 0;
 	char optionText[5][MAX_STRING_SIZE];
@@ -1290,20 +1289,11 @@
 
 	_vm->display()->textCurrentColor(INK_TALK_NORMAL);
 
-	// These bobs are up and down arrows
-
-	BobSlot *arrowBobUp 	= _vm->graphics()->bob(ARROW_BOB_UP);
-	BobSlot *arrowBobDown = _vm->graphics()->bob(ARROW_BOB_DOWN);
-
-	arrowBobUp->x         = 303 + 8 + scrollX;
-	arrowBobUp->y         = 150 + 1;
-	arrowBobUp->frameNum  = 3;
+	_vm->graphics()->setupArrows();
+	BobSlot *arrowBobUp   = _vm->graphics()->bob(Graphics::ARROW_BOB_UP);
 	arrowBobUp->active    = false;
-
-	arrowBobDown->x         = 303 + scrollX;
-	arrowBobDown->y         = 175;
-	arrowBobDown->frameNum  = 4;
-	arrowBobDown->active    = false;
+	BobSlot *arrowBobDown = _vm->graphics()->bob(Graphics::ARROW_BOB_DOWN);
+	arrowBobDown->active  = false;
 
 	bool rezone = true;
 

Index: talk.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/talk.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- talk.h	10 Jan 2004 21:56:47 -0000	1.29
+++ talk.h	21 Feb 2004 08:52:25 -0000	1.30
@@ -57,8 +57,6 @@
 	  MAX_STRING_SIZE = (MAX_STRING_LENGTH + 1),
 	  MAX_TEXT_WIDTH = (320-18),
 	  PUSHUP = 4,
-	  ARROW_BOB_UP = 62,
-	  ARROW_BOB_DOWN = 63,
 	  ARROW_ZONE_UP   = 5,
 	  ARROW_ZONE_DOWN = 6,
 	  DOG_HEADER_SIZE = 20,





More information about the Scummvm-git-logs mailing list