diff options
author | yinsimei | 2017-06-16 15:49:14 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-13 18:27:45 +0200 |
commit | 536ddf7e89b2b1d3c4541944dff3779c6551c5a7 (patch) | |
tree | 4389f61a4fbc67494a4d10795474de2e52ccdf29 /engines/sludge | |
parent | 0eb18c26276ac15c28fa2fb5f6163999eeeb9caf (diff) | |
download | scummvm-rg350-536ddf7e89b2b1d3c4541944dff3779c6551c5a7.tar.gz scummvm-rg350-536ddf7e89b2b1d3c4541944dff3779c6551c5a7.tar.bz2 scummvm-rg350-536ddf7e89b2b1d3c4541944dff3779c6551c5a7.zip |
SLUDGE: change struct texture to Surface
Diffstat (limited to 'engines/sludge')
-rw-r--r-- | engines/sludge/backdrop.cpp | 14 | ||||
-rw-r--r-- | engines/sludge/backdrop.h | 2 | ||||
-rw-r--r-- | engines/sludge/graphics.h | 9 |
3 files changed, 8 insertions, 17 deletions
diff --git a/engines/sludge/backdrop.cpp b/engines/sludge/backdrop.cpp index 850a23d1ef..3904cf5f86 100644 --- a/engines/sludge/backdrop.cpp +++ b/engines/sludge/backdrop.cpp @@ -57,7 +57,7 @@ GLfloat backdropTexH = 1.0; GLuint snapshotTextureName = 0; #endif -texture lightMap; +Graphics::Surface lightMap; Graphics::Surface backdropSurface; float snapTexW = 1.0; @@ -215,8 +215,8 @@ void killBackDrop() { } void killLightMap() { - if (lightMap.surface.getPixels()) { - lightMap.surface.free(); + if (lightMap.getPixels()) { + lightMap.free(); } lightMapNumber = 0; #if 0 @@ -619,14 +619,14 @@ bool loadLightMap(int v) { killLightMap(); lightMapNumber = v; - if (!ImgLoader::loadImage(bigDataFile, &lightMap.surface)) + if (!ImgLoader::loadImage(bigDataFile, &lightMap)) return false; - int newPicWidth = lightMap.surface.w; - int newPicHeight = lightMap.surface.h; + int newPicWidth = lightMap.w; + int newPicHeight = lightMap.h; if (lightMapMode == LIGHTMAPMODE_HOTSPOT) { - if (lightMap.surface.w != sceneWidth || lightMap.surface.h != sceneHeight) { + if (lightMap.w != sceneWidth || lightMap.h != sceneHeight) { return fatal("Light map width and height don't match scene width and height. That is required for lightmaps in HOTSPOT mode."); } } diff --git a/engines/sludge/backdrop.h b/engines/sludge/backdrop.h index a381389339..e614c4af2f 100644 --- a/engines/sludge/backdrop.h +++ b/engines/sludge/backdrop.h @@ -73,7 +73,7 @@ bool getRGBIntoStack(unsigned int x, unsigned int y, stackHandler *sH); void killLightMap(); bool loadLightMap(int v); -extern texture lightMap; +extern Graphics::Surface lightMap; // And background parallax scrolling diff --git a/engines/sludge/graphics.h b/engines/sludge/graphics.h index b6d82ab47f..444d8a4534 100644 --- a/engines/sludge/graphics.h +++ b/engines/sludge/graphics.h @@ -26,15 +26,6 @@ namespace Sludge { -struct texture { -#if 0 - GLubyte *data; - GLuint name; - double texW, texH; -#endif - Graphics::Surface surface; -}; - #if 0 struct shaders { GLuint paste; |