[Scummvm-cvs-logs] CVS: residual lua.cpp,1.160,1.161 textsplit.cpp,1.11,1.12 smush.cpp,1.67,1.68
Erich Edgar Hoover
compholio at users.sourceforge.net
Sat Dec 24 22:07:01 CET 2005
- Previous message: [Scummvm-cvs-logs] CVS: residual driver_gl.cpp,1.59,1.60 driver_gl.h,1.29,1.30
- Next message: [Scummvm-cvs-logs] CVS: residual savegame.cpp,NONE,1.1 savegame.h,NONE,1.1 lua.cpp,1.161,1.162 engine.cpp,1.97,1.98 engine.h,1.38,1.39 Makefile.common,1.20,1.21
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1827
Modified Files:
lua.cpp textsplit.cpp smush.cpp
Log Message:
Fixed text cleanup upon entering movies, error with missing optional components, simple support for 'alternative movie speed'.
Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -d -r1.160 -r1.161
--- lua.cpp 28 Aug 2005 23:25:14 -0000 1.160
+++ lua.cpp 25 Dec 2005 06:06:37 -0000 1.161
@@ -2422,12 +2422,9 @@
static void ExpireText() {
DEBUG_FUNCTION();
- for (Engine::TextListType::const_iterator i = g_engine->textsBegin(); i != g_engine->textsEnd(); i++) {
- TextObject *textO = *i;
- g_engine->killTextObject(textO);
- delete textO;
- }
- // Cleanup references to deleted text objects
+ // Expire all the text objects
+ g_engine->killTextObjects();
+ // Cleanup actor references to deleted text objects
for (Engine::ActorListType::const_iterator i = g_engine->actorsBegin(); i != g_engine->actorsEnd(); i++)
(*i)->lineCleanup();
}
@@ -2496,7 +2493,7 @@
// Clean out any text objects on the display before running the
// movie, otherwise things like Bruno's "Nice bathrobe." will stay
// on-screen the whole movie
- CleanBuffer();
+ ExpireText();
g_engine->setMode(ENGINE_MODE_SMUSH);
pushbool(g_smush->play(luaL_check_string(1), 0, 0));
}
@@ -2601,8 +2598,13 @@
break;
}
}
- if(!pmodify)
- error("Primitive object not found.");
+ if (!pmodify) {
+ // When Manny exists Don's computer (using ESC) the primitive objects
+ // are destroyed just before the last call to change them
+ if (debugLevel == DEBUG_WARN)
+ warning("Primitive object not found.");
+ return;
+ }
lua_pushobject(tableObj);
lua_pushstring("color");
Index: textsplit.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/textsplit.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- textsplit.cpp 27 Aug 2005 16:08:44 -0000 1.11
+++ textsplit.cpp 25 Dec 2005 06:06:38 -0000 1.12
@@ -63,7 +63,11 @@
}
bool TextSplitter::checkString(const char *needle) {
- if (std::strstr(currentLine(), needle))
+ // checkString also needs to check for extremely optional
+ // components like "object_art" which can be missing entirely
+ if (currentLine() == NULL)
+ return false;
+ else if (std::strstr(currentLine(), needle))
return true;
else
return false;
Index: smush.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/smush.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- smush.cpp 13 Aug 2005 23:43:30 -0000 1.67
+++ smush.cpp 25 Dec 2005 06:06:38 -0000 1.68
@@ -29,7 +29,9 @@
#include <cstring>
#include <zlib.h>
-#define SMUSH_LOOPMOVIE(x) (x & 1)
+#define SMUSH_LOOPMOVIE(x) (x & 0x000001)
+#define SMUSH_ALTSPEED(x) (x & 0x000004)
+
#define ANNO_HEADER "MakeAnim animation type 'Bl16' parameters: "
#define BUFFER_SIZE 16385
@@ -275,11 +277,6 @@
_height = height;
_speed = READ_LE_UINT32(s_header + 14);
- // Videos "copaldie.snm" and "getshcks.snm" seem to have
- // the wrong speed value, the value 66667 (used by the
- // other videos) seems to work whereas "2x" does not.
- // TODO: Find out what needs to go on here.
- //_speed = 66667;
flags = READ_LE_UINT16(s_header + 18);
// Output information for checking out the flags
if (debugLevel == DEBUG_SMUSH || debugLevel == DEBUG_NORMAL || debugLevel == DEBUG_ALL) {
@@ -288,6 +285,15 @@
printf(" %d", (flags & (1 << i)) != 0);
printf("\n");
}
+ // Videos "copaldie.snm" and "getshcks.snm" seem to have
+ // the wrong speed value, the value 66667 (used by the
+ // other videos) seems to work whereas "2x" (68928)
+ // does not quite do it.
+ // TODO: Find out what needs to go on here.
+ if (SMUSH_ALTSPEED(flags)) {
+ printf("Bad time: %d, suggested: %d\n", _speed, 2*_speed);
+ _speed = 66667;
+ }
_videoLooping = SMUSH_LOOPMOVIE(flags);
_startPos = NULL; // Set later
free(s_header);
- Previous message: [Scummvm-cvs-logs] CVS: residual driver_gl.cpp,1.59,1.60 driver_gl.h,1.29,1.30
- Next message: [Scummvm-cvs-logs] CVS: residual savegame.cpp,NONE,1.1 savegame.h,NONE,1.1 lua.cpp,1.161,1.162 engine.cpp,1.97,1.98 engine.h,1.38,1.39 Makefile.common,1.20,1.21
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list