[Scummvm-cvs-logs] CVS: scummvm/saga font.h,1.16,1.17 input.cpp,1.49,1.50 render.cpp,1.70,1.71

Eugene Sandulenko sev at users.sourceforge.net
Sun Aug 7 07:55:08 CEST 2005


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

Modified Files:
	font.h input.cpp render.cpp 
Log Message:
Fix bug #1252289 'ITE: Crash with "paws game"'. And now game pauze is 
mapped to key 'z'.


Index: font.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/font.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- font.h	30 Jul 2005 21:11:21 -0000	1.16
+++ font.h	7 Aug 2005 14:54:11 -0000	1.17
@@ -118,6 +118,11 @@
 			error("Font::validate: Invalid font id.");
 		}
 	}
+
+	bool loaded(FontId fontId) {
+		return !((fontId < 0) || (fontId >= _loadedFonts));
+	}
+
  private:
 
 	void loadFont(uint32 fontResourceId);

Index: input.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/input.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- input.cpp	19 Jul 2005 19:05:44 -0000	1.49
+++ input.cpp	7 Aug 2005 14:54:11 -0000	1.50
@@ -100,7 +100,7 @@
 				_actor->abortSpeech();
 				break;
 			case 19:  // pause
-			case 'p':
+			case 'z':
 				_render->toggleFlag(RF_RENDERPAUSE);
 				break;
 			default:

Index: render.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/render.cpp,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- render.cpp	29 Jul 2005 17:57:59 -0000	1.70
+++ render.cpp	7 Aug 2005 14:54:11 -0000	1.71
@@ -145,10 +145,12 @@
 
 	// Display "paused game" message, if applicable
 	if (_flags & RF_RENDERPAUSE) {
-		textPoint.x = (backBufferSurface->w - _vm->_font->getStringWidth(kBigFont, pauseString, 0, kFontOutline)) / 2;
+		FontId fontId = _vm->_font->loaded(kBigFont) ? kBigFont : kMediumFont;
+
+		textPoint.x = (backBufferSurface->w - _vm->_font->getStringWidth(fontId, pauseString, 0, kFontOutline)) / 2;
 		textPoint.y = 90;
 
-		_vm->_font->textDraw(kBigFont, backBufferSurface, pauseString, textPoint, kITEColorBrightWhite, kITEColorBlack, kFontOutline);
+		_vm->_font->textDraw(fontId, backBufferSurface, pauseString, textPoint, kITEColorBrightWhite, kITEColorBlack, kFontOutline);
 	}
 
 	// Update user interface





More information about the Scummvm-git-logs mailing list