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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Sep 18 18:46:32 CEST 2007


Revision: 28940
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28940&view=rev
Author:   thebluegr
Date:     2007-09-18 09:46:32 -0700 (Tue, 18 Sep 2007)

Log Message:
-----------
Fixed the font height of the text in the help screens of the IHNM demo. Clean-up of some opcodes

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

Modified: scummvm/trunk/engines/saga/sfuncs.cpp
===================================================================
--- scummvm/trunk/engines/saga/sfuncs.cpp	2007-09-18 16:20:44 UTC (rev 28939)
+++ scummvm/trunk/engines/saga/sfuncs.cpp	2007-09-18 16:46:32 UTC (rev 28940)
@@ -280,9 +280,9 @@
 		// WORKAROUND for two incorrect object sprites in the IHNM demo
 		// (the mirror and the icon in Ted's part). Set them correctly here
 		if (_vm->getGameId() == GID_IHNM_DEMO) {
-			if (obj->_spriteListResourceId == 4 && objectId == 16408)
+			if (objectId == 16408)
 				obj->_spriteListResourceId = 24;
-			if (obj->_spriteListResourceId == 3 && objectId == 16409)
+			if (objectId == 16409)
 				obj->_spriteListResourceId = 25;
 		}
 
@@ -802,10 +802,10 @@
 // Script function #32 (0x20)
 void Script::sfDropObject(SCRIPTFUNC_PARAMS) {
 	uint16 objectId = thread->pop();
-	uint16 spriteId = thread->pop();
-	int16 x = thread->pop();
-	int16 y = thread->pop();
 	ObjectData *obj = _vm->_actor->getObj(objectId);
+	uint16 spriteId = thread->pop();
+	obj->_location.x = thread->pop();
+	obj->_location.y = thread->pop();
 
 	if (obj->_sceneNumber == ITE_SCENE_INV) {
 		_vm->_interface->removeFromInventory(objectId);
@@ -831,9 +831,6 @@
 	} else {
 		obj->_spriteListResourceId = OBJ_SPRITE_BASE + spriteId;
 	}
-
-	obj->_location.x = x;
-	obj->_location.y = y;
 }
 
 // Script function #33 (0x21)
@@ -1781,8 +1778,7 @@
 }
 
 void Script::sfAddIHNMDemoHelpTextLine(SCRIPTFUNC_PARAMS) {
-	int stringId = thread->pop();
-	//int textHeight = _vm->_font->getHeight(kKnownFontVerb, thread->_strings->getString(stringId), 226, kFontCentered);
+	int stringId = thread->pop();	
 	TextListEntry textEntry;
 	Event event;
 
@@ -1804,7 +1800,7 @@
 	event.data = _psychicProfileTextEntry;
 	_vm->_events->queue(&event);
 
-	_ihnmDemoCurrentY += 10;
+	_ihnmDemoCurrentY += _vm->_font->getHeight(kKnownFontVerb, thread->_strings->getString(stringId), 226, kFontCentered);
 }
 
 void Script::sfShowIHNMDemoHelpPage(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