[Scummvm-cvs-logs] SF.net SVN: scummvm:[53361] scummvm/trunk/engines/sword25/gfx/image

sev at users.sourceforge.net sev at users.sourceforge.net
Wed Oct 13 01:54:08 CEST 2010


Revision: 53361
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53361&view=rev
Author:   sev
Date:     2010-10-12 23:54:07 +0000 (Tue, 12 Oct 2010)

Log Message:
-----------
SWORD25: Rename GLImage to RenderedImage

Modified Paths:
--------------
    scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp
    scummvm/trunk/engines/sword25/gfx/image/renderedimage.h
    scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp

Modified: scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp	2010-10-12 23:53:41 UTC (rev 53360)
+++ scummvm/trunk/engines/sword25/gfx/image/renderedimage.cpp	2010-10-12 23:54:07 UTC (rev 53361)
@@ -38,19 +38,19 @@
 
 #include "sword25/package/packagemanager.h"
 #include "sword25/gfx/image/imageloader.h"
-#include "sword25/gfx/image/glimage.h"
+#include "sword25/gfx/image/renderedimage.h"
 
 #include "common/system.h"
 
 namespace Sword25 {
 
-#define BS_LOG_PREFIX "GLIMAGE"
+#define BS_LOG_PREFIX "RENDEREDIMAGE"
 
 // -----------------------------------------------------------------------------
 // CONSTRUCTION / DESTRUCTION
 // -----------------------------------------------------------------------------
 
-GLImage::GLImage(const Common::String &filename, bool &result) :
+RenderedImage::RenderedImage(const Common::String &filename, bool &result) :
 	_data(0),
 	_width(0),
 	_height(0) {
@@ -96,7 +96,7 @@
 
 // -----------------------------------------------------------------------------
 
-GLImage::GLImage(uint width, uint height, bool &result) :
+RenderedImage::RenderedImage(uint width, uint height, bool &result) :
 	_width(width),
 	_height(height) {
 
@@ -111,7 +111,7 @@
 	return;
 }
 
-GLImage::GLImage() : _width(0), _height(0), _data(0) {
+RenderedImage::RenderedImage() : _width(0), _height(0), _data(0) {
 	_backSurface = (static_cast<GraphicEngine *>(Kernel::GetInstance()->GetService("gfx")))->getSurface();
 
 	_doCleanup = false;
@@ -121,21 +121,21 @@
 
 // -----------------------------------------------------------------------------
 
-GLImage::~GLImage() {
+RenderedImage::~RenderedImage() {
 	if (_doCleanup)
 		delete[] _data;
 }
 
 // -----------------------------------------------------------------------------
 
-bool GLImage::fill(const Common::Rect *pFillRect, uint color) {
+bool RenderedImage::fill(const Common::Rect *pFillRect, uint color) {
 	BS_LOG_ERRORLN("Fill() is not supported.");
 	return false;
 }
 
 // -----------------------------------------------------------------------------
 
-bool GLImage::setContent(const byte *pixeldata, uint size, uint offset, uint stride) {
+bool RenderedImage::setContent(const byte *pixeldata, uint size, uint offset, uint stride) {
 	// \xDCberpr\xFCfen, ob PixelData ausreichend viele Pixel enth\xE4lt um ein Bild der Gr\xF6\xDFe Width * Height zu erzeugen
 	if (size < static_cast<uint>(_width * _height * 4)) {
 		BS_LOG_ERRORLN("PixelData vector is too small to define a 32 bit %dx%d image.", _width, _height);
@@ -154,21 +154,21 @@
 	return true;
 }
 
-void GLImage::replaceContent(byte *pixeldata, int width, int height) {
+void RenderedImage::replaceContent(byte *pixeldata, int width, int height) {
 	_width = width;
 	_height = height;
 	_data = pixeldata;
 }
 // -----------------------------------------------------------------------------
 
-uint GLImage::getPixel(int x, int y) {
+uint RenderedImage::getPixel(int x, int y) {
 	BS_LOG_ERRORLN("GetPixel() is not supported. Returning black.");
 	return 0;
 }
 
 // -----------------------------------------------------------------------------
 
-bool GLImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRect, uint color, int width, int height) {
+bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRect, uint color, int width, int height) {
 	int ca = (color >> 24) & 0xff;
 
 	// Check if we need to draw anything at all
@@ -341,7 +341,7 @@
  * @param scaleFactor	Scale amount. Must be between 0 and 1.0 (but not zero)
  * @remarks Caller is responsible for freeing the returned surface
  */
-Graphics::Surface *GLImage::scale(const Graphics::Surface &srcImage, int xSize, int ySize) {
+Graphics::Surface *RenderedImage::scale(const Graphics::Surface &srcImage, int xSize, int ySize) {
 	Graphics::Surface *s = new Graphics::Surface();
 	s->create(xSize, ySize, srcImage.bytesPerPixel);
 
@@ -371,7 +371,7 @@
  * Returns an array indicating which pixels of a source image horizontally or vertically get
  * included in a scaled image
  */
-int *GLImage::scaleLine(int size, int srcSize) {
+int *RenderedImage::scaleLine(int size, int srcSize) {
 	int scale = 100 * size / srcSize;
 	assert(scale > 0);
 	int *v = new int[size];

Modified: scummvm/trunk/engines/sword25/gfx/image/renderedimage.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/renderedimage.h	2010-10-12 23:53:41 UTC (rev 53360)
+++ scummvm/trunk/engines/sword25/gfx/image/renderedimage.h	2010-10-12 23:54:07 UTC (rev 53361)
@@ -32,8 +32,8 @@
  *
  */
 
-#ifndef SWORD25_GL_IMAGE_H
-#define SWORD25_GL_IMAGE_H
+#ifndef SWORD25_RENDERED_IMAGE_H
+#define SWORD25_RENDERED_IMAGE_H
 
 // -----------------------------------------------------------------------------
 // INCLUDES
@@ -45,32 +45,22 @@
 
 namespace Sword25 {
 
-// -----------------------------------------------------------------------------
-// FORWARD DECLARATION
-// -----------------------------------------------------------------------------
-
-typedef void *GLS_Sprite;
-
-// -----------------------------------------------------------------------------
-// CLASS DEFINITION
-// -----------------------------------------------------------------------------
-
-class GLImage : public Image {
+class RenderedImage : public Image {
 public:
-	GLImage(const Common::String &filename, bool &result);
+	RenderedImage(const Common::String &filename, bool &result);
 
 	/**
-	    @brief Erzeugt ein leeres BS_GLImage
+	    @brief Erzeugt ein leeres BS_RenderedImage
 
 	    @param Width die Breite des zu erzeugenden Bildes.
 	    @param Height die H\xF6he des zu erzeugenden Bildes
 	    @param Result gibt dem Aufrufer bekannt, ob der Konstruktor erfolgreich ausgef\xFChrt wurde. Wenn es nach dem Aufruf false enthalten sollte,
 	                  d\xFCrfen keine Methoden am Objekt aufgerufen werden und das Objekt ist sofort zu zerst\xF6ren.
 	*/
-	GLImage(uint width, uint height, bool &result);
-	GLImage();
+	RenderedImage(uint width, uint height, bool &result);
+	RenderedImage();
 
-	virtual ~GLImage();
+	virtual ~RenderedImage();
 
 	virtual int getWidth() const {
 		return _width;

Modified: scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp	2010-10-12 23:53:41 UTC (rev 53360)
+++ scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp	2010-10-12 23:54:07 UTC (rev 53361)
@@ -38,13 +38,12 @@
 
 #include "sword25/kernel/bs_stdint.h"
 #include "sword25/gfx/image/vectorimage.h"
+#include "sword25/gfx/image/renderedimage.h"
 
 #include "graphics/colormasks.h"
 
 #include "art.h"
 
-#include "sword25/gfx/image/glimage.h"
-
 namespace Sword25 {
 
 #define BS_LOG_PREFIX "VECTORIMAGE"
@@ -626,7 +625,7 @@
 		oldWidth = width;
 	}
 
-	GLImage *rend = new GLImage();
+	RenderedImage *rend = new RenderedImage();
 
 	rend->replaceContent(_pixelData, width, height);
 	rend->blit(posX, posY, flipping, pPartRect, color, width, height);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list