[Scummvm-cvs-logs] CVS: residual driver.h,1.7,1.8 driver_gl.cpp,1.44,1.45 driver_gl.h,1.20,1.21 driver_tinygl.cpp,1.14,1.15 driver_tinygl.h,1.7,1.8 lua.cpp,1.118,1.119

Pawel Kolodziejski aquadran at users.sourceforge.net
Thu Apr 7 00:05:07 CEST 2005


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

Modified Files:
	driver.h driver_gl.cpp driver_gl.h driver_tinygl.cpp 
	driver_tinygl.h lua.cpp 
Log Message:
few changes to working in progress DimScreen and BlastRect

Index: driver.h
===================================================================
RCS file: /cvsroot/scummvm/residual/driver.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- driver.h	28 Mar 2005 01:54:21 -0000	1.7
+++ driver.h	7 Apr 2005 07:04:36 -0000	1.8
@@ -37,6 +37,7 @@
 		_screenHeight = screenH;
 		_screenBPP = screenBPP;
 		_isFullscreen = fullscreen;
+		_dim = false;
 	}
 
 	struct TextObjectHandle {
@@ -77,6 +78,10 @@
 
 	virtual void drawDepthBitmap(int x, int y, int w, int h, char *data) = 0;
 
+	virtual void getSnapshot(int x, int y, int w, int h, char **data, int flags) = 0;
+	virtual void enableDim(int x, int y, int w, int h) = 0;
+	virtual void disableDim(int x, int y, int w, int h) = 0;
+
 	virtual void drawEmergString(int x, int y, const char *text, const Color &fgColor) = 0;
 	virtual void loadEmergFont() = 0;
 	virtual TextObjectHandle *createTextBitmap(uint8 *bitmap, int width, int height, const Color &fgColor) = 0;
@@ -89,6 +94,9 @@
 protected:
 	int _screenWidth, _screenHeight, _screenBPP;
 	bool _isFullscreen;
+	bool _dim;
+
+	virtual void drawDim() = 0;
 };
 
 extern Driver *g_driver;

Index: driver_gl.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_gl.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- driver_gl.cpp	5 Apr 2005 04:33:56 -0000	1.44
+++ driver_gl.cpp	7 Apr 2005 07:04:36 -0000	1.45
@@ -680,3 +680,9 @@
 	glDeleteTextures(handle->numTex, (GLuint *)handle->texIds);
 	delete[] (GLuint *)handle->texIds;
 }
+
+void DriverGL::getSnapshot(int x, int y, int w, int h, char **data, int flags) {
+}
+
+void DriverGL::drawDim() {
+}

Index: driver_gl.h
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_gl.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- driver_gl.h	28 Mar 2005 01:54:21 -0000	1.20
+++ driver_gl.h	7 Apr 2005 07:04:36 -0000	1.21
@@ -63,6 +63,10 @@
 	void drawDepthBitmap(int x, int y, int w, int h, char *data);
 	void drawBitmap();
 
+	void getSnapshot(int x, int y, int w, int h, char **data, int flags);
+	void enableDim(int x, int y, int w, int h) { _dim = true; }
+	void disableDim(int x, int y, int w, int h) { _dim = false; }
+
 	void drawEmergString(int x, int y, const char *text, const Color &fgColor);
 	void loadEmergFont();
 	TextObjectHandle *createTextBitmap(uint8 *bitmap, int width, int height, const Color &fgColor);
@@ -72,6 +76,9 @@
 	void prepareSmushFrame(int width, int height, byte *bitmap);
 	void drawSmushFrame(int offsetX, int offsetY);
 
+protected:
+	void drawDim();
+
 private:
 	GLuint _emergFont;
 	int _smushNumTex;

Index: driver_tinygl.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_tinygl.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- driver_tinygl.cpp	5 Apr 2005 04:33:56 -0000	1.14
+++ driver_tinygl.cpp	7 Apr 2005 07:04:36 -0000	1.15
@@ -468,3 +468,9 @@
 	delete handle->bitmapData;
 	SDL_FreeSurface((SDL_Surface *)handle->surface);
 }
+
+void DriverTinyGL::getSnapshot(int x, int y, int w, int h, char **data, int flags) {
+}
+
+void DriverTinyGL::drawDim() {
+}

Index: driver_tinygl.h
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_tinygl.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- driver_tinygl.h	28 Mar 2005 01:54:21 -0000	1.7
+++ driver_tinygl.h	7 Apr 2005 07:04:36 -0000	1.8
@@ -65,6 +65,10 @@
 	void drawDepthBitmap(int x, int y, int w, int h, char *data);
 	void drawBitmap();
 
+	void getSnapshot(int x, int y, int w, int h, char **data, int flags);
+	void enableDim(int x, int y, int w, int h) { _dim = true; }
+	void disableDim(int x, int y, int w, int h) { _dim = false; }
+
 	void drawEmergString(int x, int y, const char *text, const Color &fgColor);
 	void loadEmergFont();
 	TextObjectHandle *createTextBitmap(uint8 *bitmap, int width, int height, const Color &fgColor);
@@ -74,6 +78,9 @@
 	void prepareSmushFrame(int width, int height, byte *bitmap);
 	void drawSmushFrame(int offsetX, int offsetY);
 
+protected:
+	void drawDim();
+
 private:
 	ZBuffer *_zb;
 	SDL_Surface *_screen;

Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -d -r1.118 -r1.119
--- lua.cpp	5 Apr 2005 13:50:53 -0000	1.118
+++ lua.cpp	7 Apr 2005 07:04:36 -0000	1.119
@@ -1540,6 +1540,40 @@
 	g_smush->pause(lua_isnil(lua_getparam(1)) != 0);
 }
 
+static void BlastRect() {
+	int x1 = check_int(1);
+	int y1 = check_int(2);
+	int x2 = check_int(3);
+	int y2 = check_int(4);
+	lua_Object tableObj = lua_getparam(5);
+	Color color;
+	color._vals[0] = 255;
+	color._vals[1] = 255;
+	color._vals[2] = 255;
+	bool filled = false;
+
+	if (lua_istable(tableObj)){
+		lua_pushobject(tableObj);
+		lua_pushstring("color");
+		lua_Object colorObj = lua_gettable();
+		if (lua_isuserdata(colorObj) && lua_tag(colorObj) == MKID('COLR')) {
+			color = static_cast<Color *>(lua_getuserdata(colorObj));
+		}
+
+		lua_pushobject(tableObj);
+		lua_pushstring("filled");
+		lua_Object objFilled = lua_gettable();
+		if (!lua_isnil(objFilled)) 
+			filled = true;
+	}
+
+	//g_driver->CreateFilledRectangle(x1, x2, y1, y2, color, filled);
+}
+
+static void DimScreen() {
+	warning("DimScreen()");
+}
+
 static void GetDiskFreeSpace() {
 	// amount of free space in MB, used for creating saves
 	lua_pushnumber(50);
@@ -1751,7 +1785,6 @@
 STUB_FUNC(SetTextSpeed)
 STUB_FUNC(GetSaveGameData)
 STUB_FUNC(SubmitSaveGameData)
-STUB_FUNC(BlastRect)
 STUB_FUNC(BlastImage)
 STUB_FUNC(FreeImage)
 STUB_FUNC(GetImage)
@@ -1782,7 +1815,6 @@
 STUB_FUNC(ActivateActorShadow)
 STUB_FUNC(SetShadowColor)
 STUB_FUNC(DimRegion)
-STUB_FUNC(DimScreen)
 STUB_FUNC(ForceRefresh)
 STUB_FUNC(SetGamma)
 STUB_FUNC(LightMgrStartup)





More information about the Scummvm-git-logs mailing list