[Scummvm-cvs-logs] CVS: residual driver_gl.cpp,1.7,1.8 lua.cpp,1.44,1.45

Pawel Kolodziejski aquadran at users.sourceforge.net
Fri Mar 19 23:56:00 CET 2004


Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17881

Modified Files:
	driver_gl.cpp lua.cpp 
Log Message:
added speech mode stuff, and fixed position for overlay mode smush

Index: driver_gl.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_gl.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- driver_gl.cpp	29 Feb 2004 18:38:26 -0000	1.7
+++ driver_gl.cpp	20 Mar 2004 07:45:34 -0000	1.8
@@ -233,24 +233,22 @@
 	glDepthMask(GL_FALSE);
 	glEnable(GL_SCISSOR_TEST);
 
-	offsetY = 480 - offsetY - _smushHeight;
 	int curTexIdx = 0;
 	for (int y = 0; y < _smushHeight; y += BITMAP_TEXTURE_SIZE) {
 		for (int x = 0; x < _smushWidth; x += BITMAP_TEXTURE_SIZE) {
 			int t_width = (x + BITMAP_TEXTURE_SIZE >= _smushWidth) ? (_smushWidth - x) : BITMAP_TEXTURE_SIZE;
 			int t_height = (y + BITMAP_TEXTURE_SIZE >= _smushHeight) ? (_smushHeight - y) : BITMAP_TEXTURE_SIZE;
 			glBindTexture(GL_TEXTURE_2D, _smushTexIds[curTexIdx]);
-			glScissor(x, 480 - (y + t_height), x + t_width, 480 - y);
+			glScissor(x + offsetX, 480 - (y + t_height + offsetY), x + offsetX + t_width, 480 - (y + offsetY));
 			glBegin(GL_QUADS);
 			glTexCoord2f(0, 0);
-
-			glVertex2i(x, y);
+			glVertex2i(x + offsetX, y + offsetY);
 			glTexCoord2f(1.0, 0.0);
-			glVertex2i(x + BITMAP_TEXTURE_SIZE, y);
+			glVertex2i(x + offsetX + BITMAP_TEXTURE_SIZE, y + offsetY);
 			glTexCoord2f(1.0, 1.0);
-			glVertex2i(x + BITMAP_TEXTURE_SIZE, y + BITMAP_TEXTURE_SIZE);
+			glVertex2i(x + offsetX + BITMAP_TEXTURE_SIZE, y + offsetY + BITMAP_TEXTURE_SIZE);
 			glTexCoord2f(0.0, 1.0);
-			glVertex2i(x, y + BITMAP_TEXTURE_SIZE);
+			glVertex2i(x + offsetX, y + offsetY + BITMAP_TEXTURE_SIZE);
 			glEnd();
 			curTexIdx++;
 		}

Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- lua.cpp	20 Mar 2004 05:47:21 -0000	1.44
+++ lua.cpp	20 Mar 2004 07:45:34 -0000	1.45
@@ -1026,6 +1026,17 @@
 	lua_pushnumber(100);	// Dummy Y
 }
 
+static void SetSpeechMode() {
+	int mode = check_int(1);
+	if ((mode >= 1) && (mode <= 3))
+ 		Engine::instance()->setSpeechMode(mode);
+}
+
+static void GetSpeechMode() {
+	int mode = Engine::instance()->getSpeechMode();
+ 	lua_pushnumber(mode);
+}
+
 static void StartFullscreenMovie() {
 	bool mode = getbool(2);
 	Engine::instance()->setMode(ENGINE_MODE_SMUSH);
@@ -1034,8 +1045,8 @@
 
 static void StartMovie() {
 	bool mode = getbool(2);
-	int x = lua_getparam(3);
-	int y = lua_getparam(4);
+	int x = check_int(3);
+	int y = check_int(4);
 	Engine::instance()->setMode(ENGINE_MODE_NORMAL);
 	pushbool(g_smush->play(luaL_check_string(1), x, y));
 }
@@ -1174,8 +1185,6 @@
 	"SetActorShadowPlane",
 	"ActivateActorShadow",
 	"SetShadowColor",
-	"GetSpeechMode",
-	"SetSpeechMode",
 	"Display",
 	"CleanBuffer",
 	"DimRegion",
@@ -1517,7 +1526,9 @@
 	{ "StartFullscreenMovie", StartFullscreenMovie },
 	{ "IsFullscreenMoviePlaying", IsFullscreenMoviePlaying },
 	{ "NewObjectState", NewObjectState }, 
-	{ "FreeObjectState", FreeObjectState }
+	{ "FreeObjectState", FreeObjectState },
+	{ "GetSpeechMode", GetSpeechMode },
+	{ "SetSpeechMode", SetSpeechMode }
 };
 
 void register_lua() {





More information about the Scummvm-git-logs mailing list