aboutsummaryrefslogtreecommitdiff
path: root/saga/sfuncs.cpp
diff options
context:
space:
mode:
authorAndrew Kurushin2005-07-08 16:56:03 +0000
committerAndrew Kurushin2005-07-08 16:56:03 +0000
commitd944bd7793d1e366bf3555cea3c11a488b9eecaf (patch)
treed60c38c67d9341749021e838fd698378ca6b71a1 /saga/sfuncs.cpp
parent7e0033983fef78e6d1597fc601a700aa2aafe27e (diff)
downloadscummvm-rg350-d944bd7793d1e366bf3555cea3c11a488b9eecaf.tar.gz
scummvm-rg350-d944bd7793d1e366bf3555cea3c11a488b9eecaf.tar.bz2
scummvm-rg350-d944bd7793d1e366bf3555cea3c11a488b9eecaf.zip
implemented per scene actors clipping
so last sequence should look much better (not perfect) svn-id: r18516
Diffstat (limited to 'saga/sfuncs.cpp')
-rw-r--r--saga/sfuncs.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp
index cfba54aaad..95f38cb098 100644
--- a/saga/sfuncs.cpp
+++ b/saga/sfuncs.cpp
@@ -1050,7 +1050,7 @@ void Script::sfPlaceActor(SCRIPTFUNC_PARAMS) {
frameType = thread->pop();
frameOffset = thread->pop();
- debug(1, "sfPlaceActor(%d, %d, %d, %d, %d, %d)", actorId, actorLocation.x,
+ debug(1, "sfPlaceActor(id = %d, x=%d, y=%d, dir=%d, frameType=%d, frameOffset=%d)", actorId, actorLocation.x,
actorLocation.y, actorDirection, frameType, frameOffset);
if (_vm->getGameType() == GType_IHNM) {
@@ -1241,7 +1241,7 @@ void Script::sfPlacard(SCRIPTFUNC_PARAMS) {
event.data = back_buf;
event.param = 138;
event.param2 = 0;
- event.param3 = _vm->getSceneHeight();
+ event.param3 = _vm->getClippedSceneHeight();
event.param4 = 0;
event.param5 = _vm->getDisplayWidth();
@@ -1258,7 +1258,7 @@ void Script::sfPlacard(SCRIPTFUNC_PARAMS) {
text_entry.color = kITEColorBrightWhite;
text_entry.effect_color = kITEColorBlack;
text_entry.text_x = _vm->getDisplayWidth() / 2;
- text_entry.text_y = (_vm->getSceneHeight() - _vm->_font->getHeight(MEDIUM_FONT_ID)) / 2;
+ text_entry.text_y = (_vm->getClippedSceneHeight() - _vm->_font->getHeight(MEDIUM_FONT_ID)) / 2;
text_entry.font_id = MEDIUM_FONT_ID;
text_entry.flags = FONT_OUTLINE | FONT_CENTERED;
text_entry.string = thread->_strings->getString(stringId);
@@ -1556,19 +1556,17 @@ void Script::sfGetActorY(SCRIPTFUNC_PARAMS) {
// Script function #62 (0x3E)
void Script::sfEraseDelta(SCRIPTFUNC_PARAMS) {
BUFFER_INFO bufferInfo;
- SCENE_BGINFO backGroundInfo;
+ BGInfo backGroundInfo;
Point backGroundPoint;
_vm->_render->getBufferInfo(&bufferInfo);
- _vm->_scene->getBGInfo(&backGroundInfo);
- backGroundPoint.x = backGroundInfo.bg_x;
- backGroundPoint.y = backGroundInfo.bg_y;
+ _vm->_scene->getBGInfo(backGroundInfo);
+ backGroundPoint.x = backGroundInfo.bounds.left;
+ backGroundPoint.y = backGroundInfo.bounds.top;
bufToBuffer(bufferInfo.bg_buf, bufferInfo.bg_buf_w, bufferInfo.bg_buf_h,
- backGroundInfo.bg_buf, backGroundInfo.bg_w, backGroundInfo.bg_h,
+ backGroundInfo.buffer, backGroundInfo.bounds.width(), backGroundInfo.bounds.height(),
NULL, &backGroundPoint);
-
-
}
// Script function #63 (0x3F)