[Scummvm-cvs-logs] CVS: scummvm/sword1 control.cpp,1.23,1.24

Robert G?ffringmann lavosspawn at users.sourceforge.net
Wed Jan 7 10:09:03 CET 2004


Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1:/tmp/cvs-serv11325/sword1

Modified Files:
	control.cpp 
Log Message:
some changes for Czech version

Index: control.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/control.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- control.cpp	7 Jan 2004 17:47:45 -0000	1.23
+++ control.cpp	7 Jan 2004 18:08:24 -0000	1.24
@@ -165,7 +165,10 @@
 
 void SwordControl::askForCd(void) {
 	_screenBuf = (uint8*)malloc(640 * 480);
-	_font = (uint8*)_resMan->openFetchRes(SR_FONT);
+	uint32 fontId = SR_FONT;
+	if (SwordEngine::_systemVars.language == BS1_CZECH)
+		fontId = CZECH_SR_FONT;
+	_font = (uint8*)_resMan->openFetchRes(fontId);
 	uint8 *pal = (uint8*)_resMan->openFetchRes(SR_PALETTE);
 	uint8 *palOut = (uint8*)malloc(256 * 4);
 	for (uint16 cnt = 1; cnt < 256; cnt++) {
@@ -210,7 +213,7 @@
 		}
 	} while (notAccepted);
 
-	_resMan->resClose(SR_FONT);
+	_resMan->resClose(fontId);
 	free(_screenBuf);
 }
 
@@ -219,8 +222,14 @@
 	_restoreBuf = NULL;
 	_keyPressed = _numButtons = 0;
 	_screenBuf = (uint8*)malloc(640 * 480);
-	_font = (uint8*)_resMan->openFetchRes(SR_FONT); // todo: czech support
-	_redFont = (uint8*)_resMan->openFetchRes(SR_REDFONT);
+	uint32 fontId = SR_FONT, redFontId = SR_REDFONT;
+	if (SwordEngine::_systemVars.language == BS1_CZECH) {
+		fontId = CZECH_SR_FONT;
+		redFontId = CZECH_SR_REDFONT;
+	}
+	_font = (uint8*)_resMan->openFetchRes(fontId);
+	_redFont = (uint8*)_resMan->openFetchRes(redFontId);
+
 	uint8 *pal = (uint8*)_resMan->openFetchRes(SR_PALETTE);
 	uint8 *palOut = (uint8*)malloc(256 * 4);
 	for (uint16 cnt = 1; cnt < 256; cnt++) {
@@ -276,8 +285,8 @@
 		newMode = getClicks(mode, &retVal);
 	} while ((newMode != 1) && (retVal == 0));
 	destroyButtons();
-	_resMan->resClose(SR_FONT);
-	_resMan->resClose(SR_REDFONT);
+	_resMan->resClose(fontId);
+	_resMan->resClose(redFontId);
 	memset(_screenBuf, 0, 640 * 480);
 	_system->copy_rect(_screenBuf, 640, 0, 0, 640, 480);
 	free(_screenBuf);





More information about the Scummvm-git-logs mailing list