[Scummvm-cvs-logs] CVS: residual scene.cpp,1.24,1.25 lua.cpp,1.55,1.56 actor.cpp,1.26,1.27
Daniel Schepler
dschepler at users.sourceforge.net
Thu Mar 25 20:54:08 CET 2004
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25292
Modified Files:
scene.cpp lua.cpp actor.cpp
Log Message:
Ignore nclip and fclip for now; see comments in code for details.
Accept SetActorRestChore(handle, nil) to disable the rest chore.
These changes make the Land of the Living scene playable.
Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/scene.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- scene.cpp 25 Mar 2004 09:33:17 -0000 1.24
+++ scene.cpp 26 Mar 2004 04:42:27 -0000 1.25
@@ -148,7 +148,15 @@
}
void Scene::Setup::setupCamera() const {
- g_driver->setupCamera(fov_, nclip_, fclip_, roll_);
+ // Ignore nclip_ and fclip_ for now. This fixes:
+ // (a) Nothing was being displayed in the Land of the Living
+ // diner because lr.set set nclip to 0.
+ // (b) The zbuffers for setups with different nclip or
+ // fclip values. If it turns out that the clipping planes
+ // are important at some point, we'll need to modify the
+ // zbuffer transformation in bitmap.cpp to take nclip_ and
+ // fclip_ into account.
+ g_driver->setupCamera(fov_, 0.01f, 3276.8f, roll_);
g_driver->positionCamera(pos_, interest_);
}
Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- lua.cpp 25 Mar 2004 15:43:05 -0000 1.55
+++ lua.cpp 26 Mar 2004 04:42:27 -0000 1.56
@@ -278,8 +278,17 @@
static void SetActorRestChore() {
Actor *act = check_actor(1);
- int chore = check_int(2);
- Costume *costume = get_costume(act, 3, "SetActorRestChore");
+ int chore;
+ Costume *costume;
+
+ if (lua_isnil(lua_getparam(2))) {
+ chore = -1;
+ costume = NULL;
+ }
+ else {
+ chore = check_int(2);
+ costume = get_costume(act, 3, "SetActorRestChore");
+ }
act->setRestChore(chore, costume);
}
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/actor.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- actor.cpp 25 Mar 2004 15:43:05 -0000 1.26
+++ actor.cpp 26 Mar 2004 04:42:27 -0000 1.27
@@ -120,7 +120,8 @@
restCostume_->stopChore(restChore_);
restCostume_ = cost;
restChore_ = chore;
- restCostume_->playChoreLooping(restChore_);
+ if (restChore_ >= 0)
+ restCostume_->playChoreLooping(restChore_);
}
void Actor::setWalkChore(int chore, Costume *cost) {
More information about the Scummvm-git-logs
mailing list