[Scummvm-cvs-logs] CVS: residual driver.h,1.5,1.6 driver_gl.cpp,1.39,1.40 driver_gl.h,1.18,1.19 driver_tinygl.cpp,1.9,1.10 driver_tinygl.h,1.5,1.6 textobject.cpp,1.19,1.20

Pawel Kolodziejski aquadran at users.sourceforge.net
Sun Mar 20 06:03:39 CET 2005


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

Modified Files:
	driver.h driver_gl.cpp driver_gl.h driver_tinygl.cpp 
	driver_tinygl.h textobject.cpp 
Log Message:
changed driver func, and moved free bitmap data after driver conversion

Index: driver.h
===================================================================
RCS file: /cvsroot/scummvm/residual/driver.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- driver.h	20 Mar 2005 13:51:40 -0000	1.5
+++ driver.h	20 Mar 2005 14:03:08 -0000	1.6
@@ -72,7 +72,7 @@
 
 	virtual void drawEmergString(int x, int y, const char *text, const Color &fgColor) = 0;
 	virtual void loadEmergFont() = 0;
-	virtual TextObjectHandle *prepareToTextBitmap(uint8 *bitmap, int width, int height, const Color &fgColor) = 0;
+	virtual TextObjectHandle *createTextBitmap(uint8 *bitmap, int width, int height, const Color &fgColor) = 0;
 	virtual void drawTextBitmap(int x, int y, TextObjectHandle *handle) = 0;
 	virtual void destroyTextBitmap(TextObjectHandle *handle) = 0;
 

Index: driver_gl.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_gl.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- driver_gl.cpp	20 Mar 2005 13:51:40 -0000	1.39
+++ driver_gl.cpp	20 Mar 2005 14:03:08 -0000	1.40
@@ -543,7 +543,7 @@
 	glPopMatrix();
 }
 
-Driver::TextObjectHandle *DriverGL::prepareToTextBitmap(uint8 *data, int width, int height, const Color &fgColor) {
+Driver::TextObjectHandle *DriverGL::createTextBitmap(uint8 *data, int width, int height, const Color &fgColor) {
 	TextObjectHandle *handle = new TextObjectHandle();
 	handle->width = width;
 	handle->height = height;

Index: driver_gl.h
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_gl.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- driver_gl.h	20 Mar 2005 13:51:40 -0000	1.18
+++ driver_gl.h	20 Mar 2005 14:03:08 -0000	1.19
@@ -63,7 +63,7 @@
 
 	void drawEmergString(int x, int y, const char *text, const Color &fgColor);
 	void loadEmergFont();
-	TextObjectHandle *prepareToTextBitmap(uint8 *bitmap, int width, int height, const Color &fgColor);
+	TextObjectHandle *createTextBitmap(uint8 *bitmap, int width, int height, const Color &fgColor);
 	void drawTextBitmap(int x, int y, TextObjectHandle *handle);
 	void destroyTextBitmap(TextObjectHandle *handle);
 

Index: driver_tinygl.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_tinygl.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- driver_tinygl.cpp	20 Mar 2005 13:51:40 -0000	1.9
+++ driver_tinygl.cpp	20 Mar 2005 14:03:08 -0000	1.10
@@ -398,7 +398,7 @@
 void DriverTinyGL::drawEmergString(int /*x*/, int /*y*/, const char * /*text*/, const Color &/*fgColor*/) {
 }
 
-Driver::TextObjectHandle *DriverTinyGL::prepareToTextBitmap(uint8 *data, int width, int height, const Color &fgColor) {
+Driver::TextObjectHandle *DriverTinyGL::createTextBitmap(uint8 *data, int width, int height, const Color &fgColor) {
 	TextObjectHandle *handle = new TextObjectHandle();
 	handle->width = width;
 	handle->height = height;

Index: driver_tinygl.h
===================================================================
RCS file: /cvsroot/scummvm/residual/driver_tinygl.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- driver_tinygl.h	20 Mar 2005 13:51:40 -0000	1.5
+++ driver_tinygl.h	20 Mar 2005 14:03:08 -0000	1.6
@@ -66,7 +66,7 @@
 
 	void drawEmergString(int x, int y, const char *text, const Color &fgColor);
 	void loadEmergFont();
-	TextObjectHandle *prepareToTextBitmap(uint8 *bitmap, int width, int height, const Color &fgColor);
+	TextObjectHandle *createTextBitmap(uint8 *bitmap, int width, int height, const Color &fgColor);
 	void drawTextBitmap(int x, int y, TextObjectHandle *handle);
 	void destroyTextBitmap(TextObjectHandle *handle);
 

Index: textobject.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/textobject.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- textobject.cpp	20 Mar 2005 13:51:40 -0000	1.19
+++ textobject.cpp	20 Mar 2005 14:03:08 -0000	1.20
@@ -92,15 +92,15 @@
 		}
 	}
 
-	_textObjectHandle = g_driver->prepareToTextBitmap(_textBitmap, _bitmapWidth, _bitmapHeight, _fgColor);
+	_textObjectHandle = g_driver->createTextBitmap(_textBitmap, _bitmapWidth, _bitmapHeight, _fgColor);
 
+	delete[] _textBitmap;
 	_created = true;
 	g_engine->registerTextObject(this);
 }
 
 void TextObject::destroyBitmap() {
 	if (_textObjectHandle) {
-		delete[] _textBitmap;
 		g_driver->destroyTextBitmap(_textObjectHandle);
 		delete _textObjectHandle;
 		_textObjectHandle = NULL;





More information about the Scummvm-git-logs mailing list