[Scummvm-cvs-logs] SF.net SVN: scummvm: [28399] scummvm/trunk/engines/saga

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Aug 2 03:56:46 CEST 2007


Revision: 28399
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28399&view=rev
Author:   thebluegr
Date:     2007-08-01 18:56:45 -0700 (Wed, 01 Aug 2007)

Log Message:
-----------
The help screens in the IHNM demo are shown a bit more correctly now, though they're still buggy

Modified Paths:
--------------
    scummvm/trunk/engines/saga/scene.cpp
    scummvm/trunk/engines/saga/script.h
    scummvm/trunk/engines/saga/sfuncs.cpp

Modified: scummvm/trunk/engines/saga/scene.cpp
===================================================================
--- scummvm/trunk/engines/saga/scene.cpp	2007-08-02 01:04:44 UTC (rev 28398)
+++ scummvm/trunk/engines/saga/scene.cpp	2007-08-02 01:56:45 UTC (rev 28399)
@@ -1424,6 +1424,7 @@
 		textEntry.flags = (FontEffectFlags)(kFontCentered);
 		textEntry.text = text;
 
+		_vm->_scene->_textList.clear();
 		TextListEntry *_psychicProfileTextEntry = _vm->_scene->_textList.addEntry(textEntry);
 
 		event.type = kEvTOneshot;

Modified: scummvm/trunk/engines/saga/script.h
===================================================================
--- scummvm/trunk/engines/saga/script.h	2007-08-02 01:04:44 UTC (rev 28398)
+++ scummvm/trunk/engines/saga/script.h	2007-08-02 01:56:45 UTC (rev 28399)
@@ -444,6 +444,7 @@
 	int _stickyVerb;
 	int _leftButtonVerb;
 	int _rightButtonVerb;
+	int _ihnmDemoCurrentY;
 
 public:
 	uint16 _pendingObject[2];

Modified: scummvm/trunk/engines/saga/sfuncs.cpp
===================================================================
--- scummvm/trunk/engines/saga/sfuncs.cpp	2007-08-02 01:04:44 UTC (rev 28398)
+++ scummvm/trunk/engines/saga/sfuncs.cpp	2007-08-02 01:56:45 UTC (rev 28399)
@@ -2001,6 +2001,7 @@
 void Script::sfShowIHNMDemoHelp(SCRIPTFUNC_PARAMS) {
 	thread->wait(kWaitTypePlacard);
 
+	_ihnmDemoCurrentY = 0;
 	_vm->_scene->showPsychicProfile(NULL);
 }
 
@@ -2011,9 +2012,6 @@
 
 	stringId = thread->pop();
 
-	// FIXME: This is called multiple times in a row, one for each page of the help screens. We should wait
-	// somehow before showing the next page
-
 	textHeight = _vm->_font->getHeight(kKnownFontVerb, thread->_strings->getString(stringId), 226, kFontCentered);
 
 	textEntry.knownColor = kKnownColorBlack;
@@ -2021,11 +2019,14 @@
 	textEntry.rect.left = 245;
 	textEntry.rect.setHeight(210 + 76);
 	textEntry.rect.setWidth(226);
-	textEntry.rect.top = 210 - textHeight;
+	textEntry.rect.top = 76 + _ihnmDemoCurrentY;
 	textEntry.font = kKnownFontVerb;
 	textEntry.flags = (FontEffectFlags)(kFontCentered);
 	textEntry.text = thread->_strings->getString(stringId);
 
+	if (_ihnmDemoCurrentY == 0)
+		_vm->_scene->_textList.clear();
+
 	TextListEntry *_psychicProfileTextEntry = _vm->_scene->_textList.addEntry(textEntry);
 
 	event.type = kEvTOneshot;
@@ -2034,16 +2035,22 @@
 	event.data = _psychicProfileTextEntry;
 
 	_vm->_events->queue(&event);
+
+	_ihnmDemoCurrentY += 10;
 }
 
 void Script::sfClearIHNMDemoHelpText(SCRIPTFUNC_PARAMS) {
 	thread->wait(kWaitTypePlacard);
 
+	warning("TODO: sfClearIHNMDemoHelpText");
+
 	// This is called a while after the psychic profile is
 	// opened in the IHNM demo, to flip through the help system pages
-	_vm->_scene->clearPsychicProfile();
+	_vm->_scene->clearPlacard();
 	// FIXME: The demo uses mode 8 when changing pages
 	//_vm->_interface->setMode(8);
+	_vm->_interface->setMode(7);
+	_ihnmDemoCurrentY = 0;
 }
 
 void Script::sfVstopFX(SCRIPTFUNC_PARAMS) {


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