aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2007-09-18 16:46:32 +0000
committerFilippos Karapetis2007-09-18 16:46:32 +0000
commitbf75630b425e358dfe9fe4b32492595ce4528494 (patch)
tree6a1b59d09f9f0602f2424a6e80fbc8d61b64c9bc
parent13a73a70b6309323e5d5efc8f417c679e630ba9a (diff)
downloadscummvm-rg350-bf75630b425e358dfe9fe4b32492595ce4528494.tar.gz
scummvm-rg350-bf75630b425e358dfe9fe4b32492595ce4528494.tar.bz2
scummvm-rg350-bf75630b425e358dfe9fe4b32492595ce4528494.zip
Fixed the font height of the text in the help screens of the IHNM demo. Clean-up of some opcodes
svn-id: r28940
-rw-r--r--engines/saga/sfuncs.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp
index bb120f5000..74f192c7f7 100644
--- a/engines/saga/sfuncs.cpp
+++ b/engines/saga/sfuncs.cpp
@@ -280,9 +280,9 @@ void Script::sfTakeObject(SCRIPTFUNC_PARAMS) {
// 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 @@ void Script::sfSceneEq(SCRIPTFUNC_PARAMS) {
// 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 @@ void Script::sfDropObject(SCRIPTFUNC_PARAMS) {
} 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::sfShowIHNMDemoHelpBg(SCRIPTFUNC_PARAMS) {
}
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 @@ void Script::sfAddIHNMDemoHelpTextLine(SCRIPTFUNC_PARAMS) {
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) {