[Scummvm-cvs-logs] CVS: residual lua.cpp,1.46,1.47 objectstate.h,1.1,1.2
Daniel Schepler
dschepler at users.sourceforge.net
Mon Mar 22 01:03:02 CET 2004
- Previous message: [Scummvm-cvs-logs] CVS: residual smush.cpp,1.33,1.34
- Next message: [Scummvm-cvs-logs] CVS: residual Makefile,1.15,1.16 TODO,1.30,1.31 bitmap.cpp,1.18,1.19 bitmap.h,1.5,1.6 costume.cpp,1.12,1.13 engine.cpp,1.23,1.24 lua.cpp,1.47,1.48 main.cpp,1.22,1.23 objectstate.h,1.2,1.3 resource.h,1.6,1.7 scene.cpp,1.19,1.20 scene.h,1.13,1.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21347
Modified Files:
lua.cpp objectstate.h
Log Message:
Display a bit more information on NewObjectState calls.
Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- lua.cpp 21 Mar 2004 15:16:56 -0000 1.46
+++ lua.cpp 22 Mar 2004 08:51:54 -0000 1.47
@@ -100,6 +100,13 @@
return val;
}
+static inline ObjectState::Position check_objstate_pos(int num) {
+ int val = check_int(num);
+ if (val < 1 || val > 3)
+ luaL_argerror(num, "object state position out of range");
+ return (ObjectState::Position) val;
+}
+
static inline bool getbool(int num) {
return ! lua_isnil(lua_getparam(num));
}
@@ -1069,23 +1076,25 @@
// Objectstate functions
static void NewObjectState() {
+ enum ObjectPosition {
+ OBJSTATE_UNDERLAY = 1,
+ OBJSTATE_OVERLAY = 2,
+ OBJSTATE_STATE = 3
+ };
ObjectState *object = NULL;
int setupID = check_int(1); // Setup ID
- int unk1 = check_int(2); // ??
+ ObjectState::Position pos = check_objstate_pos(2); // When to draw
char *bitmap = luaL_check_string(3); // Bitmap
- char *zbitmap; // Zbuffer Bitmap
+ char *zbitmap = NULL; // Zbuffer Bitmap
bool unk2 = getbool(5); // ?
- int unk3 = 0;
+ bool unk3 = getbool(6);
if (!lua_isnil(lua_getparam(4)))
zbitmap = luaL_check_string(4);
- if (!unk2)
- unk3 = check_int(6); // ?
-
#ifndef OSX
- warning("Stub: newObjectState(%d, %s, %s)", setupID, bitmap, zbitmap);
+ warning("Stub: newObjectState(%d, %d, %s, %s)", setupID, pos, bitmap, zbitmap);
#endif
// object = scene.addObjectState;
// lua_pushusertag(object, object_tag);
Index: objectstate.h
===================================================================
RCS file: /cvsroot/scummvm/residual/objectstate.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- objectstate.h 19 Mar 2004 12:33:09 -0000 1.1
+++ objectstate.h 22 Mar 2004 08:51:54 -0000 1.2
@@ -9,5 +9,12 @@
class ObjectState {
public:
+ enum Position {
+ OBJSTATE_UNDERLAY = 1,
+ OBJSTATE_OVERLAY = 2,
+ OBJSTATE_STATE = 3
+ };
};
+
+
#endif
- Previous message: [Scummvm-cvs-logs] CVS: residual smush.cpp,1.33,1.34
- Next message: [Scummvm-cvs-logs] CVS: residual Makefile,1.15,1.16 TODO,1.30,1.31 bitmap.cpp,1.18,1.19 bitmap.h,1.5,1.6 costume.cpp,1.12,1.13 engine.cpp,1.23,1.24 lua.cpp,1.47,1.48 main.cpp,1.22,1.23 objectstate.h,1.2,1.3 resource.h,1.6,1.7 scene.cpp,1.19,1.20 scene.h,1.13,1.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list