[Scummvm-cvs-logs] CVS: residual lua.cpp,1.16,1.17 walkplane.cpp,1.3,1.4 walkplane.h,1.2,1.3
Daniel Schepler
dschepler at users.sourceforge.net
Fri Aug 22 02:49:40 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: residual main.cpp,1.3,1.4 Makefile.cross,1.2,1.3 Makefile.mingw,1.5,1.6
- Next message: [Scummvm-cvs-logs] CVS: residual actor.cpp,1.5,1.6 actor.h,1.2,1.3 lua.cpp,1.15,1.16 mixer.cpp,1.1,1.2 mixer.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1:/tmp/cvs-serv28326
Modified Files:
lua.cpp walkplane.cpp walkplane.h
Log Message:
Rough implementation of sector visibility.
Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- lua.cpp 21 Aug 2003 06:51:02 -0000 1.16
+++ lua.cpp 21 Aug 2003 09:15:52 -0000 1.17
@@ -496,7 +496,7 @@
int numSectors = Engine::instance()->currScene()->getSectorCount();
for (int i = 0; i < numSectors; i++) {
Sector *sector = Engine::instance()->currScene()->getSectorBase(i);
- if (sector->type() & sectorFlag) {
+ if (sector->visible() && (sector->type() & sectorFlag)) {
if (sector->isPointInSector(act->pos())) {
lua_pushnumber(sector->id());
lua_pushstring(const_cast<char *>(sector->name()));
@@ -517,7 +517,7 @@
for (i=0; i<numSectors; i++) {
Sector *sector = Engine::instance()->currScene()->getSectorBase(i);
- if (strstr(sector->name(), name)) {
+ if (sector->visible() && strstr(sector->name(), name)) {
if (sector->isPointInSector(act->pos())) {
lua_pushnumber(sector->id());
lua_pushstring((char*)sector->name());
Index: walkplane.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/walkplane.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- walkplane.cpp 20 Aug 2003 07:44:54 -0000 1.3
+++ walkplane.cpp 21 Aug 2003 09:15:52 -0000 1.4
@@ -62,7 +62,12 @@
error("Unknown sector type '%s' in room setup", buf);
ts.scanString(" default visibility %256s", 1, buf);
- visibility_ = buf;
+ if (strcmp(buf, "visible") == 0)
+ visible_ = true;
+ else if (strcmp(buf, "invisible") == 0)
+ visible_ = false;
+ else
+ error("Invalid visibility spec: %s\n", buf);
ts.scanString(" height %f", 1, &height_);
ts.scanString(" numvertices %d", 1, &numVertices_);
vertices_ = new Vector3d[numVertices_ + 1];
Index: walkplane.h
===================================================================
RCS file: /cvsroot/scummvm/residual/walkplane.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- walkplane.h 20 Aug 2003 00:35:37 -0000 1.2
+++ walkplane.h 21 Aug 2003 09:15:52 -0000 1.3
@@ -34,6 +34,7 @@
const char *name() const { return name_.c_str(); }
const int id() const { return id_; }
const int type() const { return type_; } // FIXME: Implement type de-masking
+ bool visible() const { return visible_; }
bool isPointInSector(Vector3d point) const;
private:
@@ -41,7 +42,7 @@
std::string name_;
int type_;
- std::string visibility_;
+ bool visible_;
Vector3d *vertices_;
float height_;
};
- Previous message: [Scummvm-cvs-logs] CVS: residual main.cpp,1.3,1.4 Makefile.cross,1.2,1.3 Makefile.mingw,1.5,1.6
- Next message: [Scummvm-cvs-logs] CVS: residual actor.cpp,1.5,1.6 actor.h,1.2,1.3 lua.cpp,1.15,1.16 mixer.cpp,1.1,1.2 mixer.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list