diff options
author | Simei Yin | 2017-07-15 17:05:40 +0200 |
---|---|---|
committer | Simei Yin | 2017-07-15 17:51:57 +0200 |
commit | 59f915710679f007f99a33caadf30aee44d6f37a (patch) | |
tree | d4b30ac537e00b7cdb23b1f39bc281d1e726159e | |
parent | 8c8e5c44d8d84f27e2d41829364266c9968f4d98 (diff) | |
download | scummvm-rg350-59f915710679f007f99a33caadf30aee44d6f37a.tar.gz scummvm-rg350-59f915710679f007f99a33caadf30aee44d6f37a.tar.bz2 scummvm-rg350-59f915710679f007f99a33caadf30aee44d6f37a.zip |
SLUDGE: Remove gl-related graphics.h
-rw-r--r-- | engines/sludge/backdrop.cpp | 3 | ||||
-rw-r--r-- | engines/sludge/backdrop.h | 3 | ||||
-rw-r--r-- | engines/sludge/bg_effects.cpp | 1 | ||||
-rw-r--r-- | engines/sludge/builtin.cpp | 3 | ||||
-rw-r--r-- | engines/sludge/freeze.cpp | 8 | ||||
-rw-r--r-- | engines/sludge/graphics.cpp | 500 | ||||
-rw-r--r-- | engines/sludge/graphics.h | 44 | ||||
-rw-r--r-- | engines/sludge/main_loop.cpp | 1 | ||||
-rw-r--r-- | engines/sludge/module.mk | 1 | ||||
-rw-r--r-- | engines/sludge/movie.cpp | 1 | ||||
-rw-r--r-- | engines/sludge/newfatal.cpp | 1 | ||||
-rw-r--r-- | engines/sludge/sludger.cpp | 1 | ||||
-rw-r--r-- | engines/sludge/sprites.cpp | 1 | ||||
-rw-r--r-- | engines/sludge/thumbnail.cpp | 1 | ||||
-rw-r--r-- | engines/sludge/transition.cpp | 1 | ||||
-rw-r--r-- | engines/sludge/zbuffer.cpp | 1 |
16 files changed, 3 insertions, 568 deletions
diff --git a/engines/sludge/backdrop.cpp b/engines/sludge/backdrop.cpp index c1830d884f..f0ab6ef020 100644 --- a/engines/sludge/backdrop.cpp +++ b/engines/sludge/backdrop.cpp @@ -35,7 +35,6 @@ #include "sludge/statusba.h" #include "sludge/talk.h" #include "sludge/zbuffer.h" -#include "sludge/graphics.h" #include "sludge/sludge.h" #include "sludge/sludger.h" #include "sludge/variable.h" @@ -69,6 +68,7 @@ Graphics::Surface snapshotSurface; float snapTexW = 1.0; float snapTexH = 1.0; +uint winWidth, winHeight; int lightMapMode = LIGHTMAPMODE_PIXEL; parallaxLayer *parallaxStuff = NULL; int cameraPX = 0, cameraPY = 0; @@ -164,7 +164,6 @@ bool reserveBackdrop() { cameraZoom = 1.0; input.mouseX = (int)((float)input.mouseX / cameraZoom); input.mouseY = (int)((float)input.mouseY / cameraZoom); - setPixelCoords(false); #if 0 int picWidth = sceneWidth; int picHeight = sceneHeight; diff --git a/engines/sludge/backdrop.h b/engines/sludge/backdrop.h index 30d5fe2218..d2393563b3 100644 --- a/engines/sludge/backdrop.h +++ b/engines/sludge/backdrop.h @@ -23,7 +23,8 @@ #ifndef SLUDGE_BACKDROP_H #define SLUDGE_BACKDROP_H -#include "sludge/graphics.h" +#include "graphics/surface.h" + #include "sludge/variable.h" namespace Sludge { diff --git a/engines/sludge/bg_effects.cpp b/engines/sludge/bg_effects.cpp index 0ec538dc49..0168e91b42 100644 --- a/engines/sludge/bg_effects.cpp +++ b/engines/sludge/bg_effects.cpp @@ -25,7 +25,6 @@ #include "sludge/allfiles.h" #include "sludge/backdrop.h" -#include "sludge/graphics.h" #include "sludge/moreio.h" #include "sludge/newfatal.h" diff --git a/engines/sludge/builtin.cpp b/engines/sludge/builtin.cpp index d93d8b4858..61590a5f0f 100644 --- a/engines/sludge/builtin.cpp +++ b/engines/sludge/builtin.cpp @@ -48,7 +48,6 @@ #include "sludge/freeze.h" #include "sludge/language.h" #include "sludge/thumbnail.h" -#include "sludge/graphics.h" #include "sludge/sludge.h" #include "sludge/utf8.h" @@ -492,7 +491,6 @@ builtIn(zoomCamera) { cameraZoom = (float)winWidth / sceneWidth; if ((float)winHeight / cameraZoom > sceneHeight) cameraZoom = (float)winHeight / sceneHeight; - setPixelCoords(false); input.mouseX = input.mouseX / cameraZoom; input.mouseY = input.mouseY / cameraZoom; @@ -965,7 +963,6 @@ builtIn(launch) { if (g_sludge->launchMe.empty()) return BR_ERROR; } - setGraphicsWindow(false); setVariable(fun->reg, SVT_INT, 1); launchResult = &fun->reg; diff --git a/engines/sludge/freeze.cpp b/engines/sludge/freeze.cpp index 01bc9a669e..35dcd56dca 100644 --- a/engines/sludge/freeze.cpp +++ b/engines/sludge/freeze.cpp @@ -20,7 +20,6 @@ * */ #include "sludge/allfiles.h" -#include "sludge/graphics.h" #include "sludge/newfatal.h" #include "sludge/sprites.h" #include "sludge/sprbanks.h" @@ -87,12 +86,6 @@ bool freeze() { // Grab a copy of the current scene freezeGraphics(); - int picWidth = sceneWidth; - int picHeight = sceneHeight; - if (!NPOT_textures) { - picWidth = getNextPOT(picWidth); - picHeight = getNextPOT(picHeight); - } newFreezer->backdropSurface.copyFrom(backdropSurface); newFreezer->sceneWidth = sceneWidth; newFreezer->sceneHeight = sceneHeight; @@ -175,7 +168,6 @@ void unfreeze(bool killImage) { cameraZoom = frozenStuff->cameraZoom; input.mouseX = (int)(input.mouseX / cameraZoom); input.mouseY = (int)(input.mouseY / cameraZoom); - setPixelCoords(false); killAllPeople(); allPeople = frozenStuff->allPeople; diff --git a/engines/sludge/graphics.cpp b/engines/sludge/graphics.cpp deleted file mode 100644 index d43ae4e872..0000000000 --- a/engines/sludge/graphics.cpp +++ /dev/null @@ -1,500 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#include "sludge/allfiles.h" -#include "sludge/graphics.h" -#include "sludge/language.h" -#include "sludge/newfatal.h" -#include "sludge/sprbanks.h" -#include "sludge/zbuffer.h" -#include "sludge/backdrop.h" -#include "sludge/movie.h" - -namespace Sludge { - -uint winWidth, winHeight; -int viewportHeight, viewportWidth; -int viewportOffsetX = 0, viewportOffsetY = 0; - -extern float cameraZoom; - -bool NPOT_textures = true; - -extern int specialSettings; - -void setMovieViewport(); - -extern uint sceneWidth, sceneHeight; -extern zBufferData zBuffer; -extern int lightMapNumber; - -// This is for swapping settings between rendering to texture or to the screen -void setPixelCoords(bool pixels) { -#if 0 - static int current = -1; -// if (current == pixels) return; - current = pixels; - - glBindTexture(GL_TEXTURE_2D, backdropTextureName); - - if (pixels) { - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - - glClear(GL_COLOR_BUFFER_BIT); - - const GLfloat bPMVMatrix[] = { - 2.0f / viewportWidth, .0, .0, .0, - .0, 2.0f / viewportHeight, .0, .0, - .0, .0, 1.0f, .0, - -1.0, -1.0f, .0, 1.0f - - }; - for (int i = 0; i < 16; i++) { - aPMVMatrix[i] = bPMVMatrix[i]; - } - } else { - if (gameSettings.antiAlias < 0) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - } else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - } - - GLfloat w = (GLfloat) winWidth / cameraZoom; - GLfloat h = (GLfloat) winHeight / cameraZoom; - - const GLfloat bPMVMatrix[] = { - 2.0f / w, .0, .0, .0, - .0, -2.0f / h, .0, .0, - .0, .0, 1.0f, .0, - -1.0, 1.0f, .0, 1.0f - - }; - for (int i = 0; i < 16; i++) { - aPMVMatrix[i] = bPMVMatrix[i]; - } - } -#endif -} - -// This is for setting windowed or fullscreen graphics. -// Used for switching, and for initial window creation. -void setGraphicsWindow(bool fullscreen, bool restoreGraphics, bool resize) { -#if defined(PANDORA) - fullscreen = true; -#endif -#if 0 - GLubyte *snapTexture = NULL; - - Uint32 videoflags = 0; - - if (! desktopW) { - - // Get video hardware information - const SDL_VideoInfo *videoInfo = SDL_GetVideoInfo(); - desktopW = videoInfo->current_w; - desktopH = videoInfo->current_h; - - } else if (restoreGraphics && fullscreen == runningFullscreen & ! resize) return; - - runningFullscreen = fullscreen; - - if (restoreGraphics) { - /* - * Save the textures - */ - if (backdropTextureName) { - if (backdropTexture) delete backdropTexture; - int picWidth = sceneWidth; - int picHeight = sceneHeight; - if (! NPOT_textures) { - picWidth = getNextPOT(picWidth); - picHeight = getNextPOT(picHeight); - } - backdropTexture = new GLubyte [picHeight * picWidth * 4]; - if (! checkNew(backdropTexture)) return; - - saveTexture(backdropTextureName, backdropTexture); - } - if (snapshotTextureName) { - int picWidth = winWidth; - int picHeight = winHeight; - if (! NPOT_textures) { - picWidth = getNextPOT(picWidth); - picHeight = getNextPOT(picHeight); - } - snapTexture = new GLubyte [picHeight * picWidth * 4]; - if (! checkNew(snapTexture)) return; - - saveTexture(snapshotTextureName, snapTexture); - } - } - - /* - * Set the graphics mode - */ - float winAspect = (float) winWidth / winHeight; - - if (fullscreen) { - specialSettings &= ~SPECIAL_INVISIBLE; - - videoflags = SDL_SWSURFACE | SDL_FULLSCREEN; - - if (gameSettings.fixedPixels) { - viewportWidth = realWinWidth = winWidth; - viewportHeight = realWinHeight = winHeight; - viewportOffsetY = 0; - viewportOffsetX = 0; - } else { - realWinWidth = desktopW; - realWinHeight = desktopH; - - float realAspect = (float) realWinWidth / realWinHeight; - - if (realAspect > winAspect) { - viewportHeight = realWinHeight; - viewportWidth = (int)(realWinHeight * winAspect); - viewportOffsetY = 0; - viewportOffsetX = (realWinWidth - viewportWidth) / 2; - } else { - viewportWidth = realWinWidth; - viewportHeight = (int)((float) realWinWidth / winAspect); - viewportOffsetY = (realWinHeight - viewportHeight) / 2; - viewportOffsetX = 0; - } - } - - } else { - videoflags = SDL_SWSURFACE; - - if (resize) { - float realAspect = (float) desktopW / desktopH; - - if (realAspect > winAspect) { - realWinWidth = (int)(realWinHeight * winAspect); - } else { - realWinHeight = (int)(realWinWidth / winAspect); - } - - realAspect = (float) realWinWidth / realWinHeight; - - if (realAspect > winAspect) { - viewportHeight = realWinHeight; - viewportWidth = (int)(realWinHeight * winAspect); - viewportOffsetY = 0; - viewportOffsetX = (realWinWidth - viewportWidth) / 2; - } else { - viewportWidth = realWinWidth; - viewportHeight = (int)((float) realWinWidth / winAspect); - viewportOffsetY = (realWinHeight - viewportHeight) / 2; - viewportOffsetX = 0; - } - } else { - - if (gameSettings.fixedPixels) { - viewportWidth = realWinWidth = winWidth; - viewportHeight = realWinHeight = winHeight; - viewportOffsetY = 0; - viewportOffsetX = 0; - } else { - realWinHeight = desktopH * 3 / 4; - realWinWidth = (int)(realWinHeight * winAspect); - - if (realWinWidth > desktopW) { - realWinWidth = desktopW; - realWinHeight = (int)((float) realWinWidth / winAspect); - } - - viewportHeight = realWinHeight; - viewportWidth = realWinWidth; - viewportOffsetY = 0; - viewportOffsetX = 0; - } - } - } - - debugHeader(); - - if (SDL_SetVideoMode(realWinWidth, realWinHeight, 32, videoflags) == 0) { - msgBox("Startup Error: Couldn't set video mode.", SDL_GetError()); - SDL_Quit(); - exit(2); - } - debugOut("Video mode %d %d set successfully.\n", realWinWidth, realWinHeight); - - if (EGL_Open()) { - msgBox("Startup Error", "Couldn't initialize EGL."); - SDL_Quit(); - exit(1); - } - EGL_Init(); - - GLint uniform; - const char *Vertex; - const char *Fragment; - - Vertex = shaderFileRead("scale.vert"); - - /* const GLubyte *str; - int glDerivativesAvailable; - str = glGetString (GL_EXTENSIONS); - glDerivativesAvailable = (strstr((const char *)str, "GL_OES_standard_derivatives") != NULL); - if (!glDerivativesAvailable) { - debugOut("Extension \"GL_OES_standard_derivatives\" not available. Advanced anti-aliasing is not possible. Using linear anti-aliasing instead."); - gameSettings.antiAlias = -1; - */ - Fragment = shaderFileRead("scale_noaa.frag"); -// } - - Fragment = joinStrings("precision mediump float;\n", Fragment); - - if (! Vertex || ! Fragment) { - fatal("Error loading \"scale\" shader program!", "Try re-installing the game. (scale.frag, scale_noaa.frag or scale.vert was not found.)"); - gameSettings.antiAlias = -1; - shader.smartScaler = 0; - } else { - - shader.smartScaler = buildShaders(Vertex, Fragment); - - if (! shader.smartScaler) { - fatal("Error building \"scale\" shader program!"); - gameSettings.antiAlias = -1; - shader.smartScaler = 0; - } else { - debugOut("Built shader program: %d (smartScaler)\n", shader.smartScaler); - - glUseProgram(shader.smartScaler); - uniform = glGetUniformLocation(shader.smartScaler, "Texture"); - if (uniform >= 0) glUniform1i(uniform, 0); - uniform = glGetUniformLocation(shader.smartScaler, "lightTexture"); - if (uniform >= 0) glUniform1i(uniform, 1); - uniform = glGetUniformLocation(shader.smartScaler, "useLightTexture"); - if (uniform >= 0) glUniform1i(uniform, 0); - uniform = glGetUniformLocation(shader.smartScaler, "antialias"); - if (uniform >= 0) glUniform1i(uniform, 0); - uniform = glGetUniformLocation(shader.smartScaler, "scale"); - - float scale = (float)realWinWidth / (float)winWidth * 0.25; - if (scale > 1.0) scale = 1.0; - if (uniform >= 0) glUniform1f(uniform, scale); - - } - } - - Vertex = shaderFileRead("fixScaleSprite.vert"); - Fragment = shaderFileRead("fixScaleSprite.frag"); - - Fragment = joinStrings("precision mediump float;\n", Fragment); - - if (! Vertex || ! Fragment) { - fatal("Error loading \"fixScaleSprite\" shader program!", "Try re-installing the game. (fixScaleSprite.frag or fixScaleSprite.vert was not found.)"); - shader.paste = 0; - } else { - - shader.paste = buildShaders(Vertex, Fragment); - if (! shader.paste) { - fatal("Error building \"fixScaleSprite\" shader program!"); - } else { - debugOut("Built shader program: %d (fixScaleSprite)\n", shader.paste); - - glUseProgram(shader.paste); - uniform = glGetUniformLocation(shader.paste, "tex0"); - if (uniform >= 0) glUniform1i(uniform, 0); - uniform = glGetUniformLocation(shader.paste, "tex1"); - if (uniform >= 0) glUniform1i(uniform, 1); - uniform = glGetUniformLocation(shader.paste, "tex2"); - if (uniform >= 0) glUniform1i(uniform, 2); - uniform = glGetUniformLocation(shader.paste, "useLightTexture"); - if (uniform >= 0) glUniform1i(uniform, 0); - - } - } - - Vertex = shaderFileRead("yuv.vert"); - Fragment = shaderFileRead("yuv.frag"); - - Fragment = joinStrings("precision mediump float;\n", Fragment); - - if (! Vertex || ! Fragment) { - fatal("Error loading \"yuv\" shader program!", "Try re-installing the game. (yuv.frag or yuv.vert was not found.)"); - shader.yuv = 0; - } else { - - shader.yuv = buildShaders(Vertex, Fragment); - if (! shader.yuv) { - fatal("Error building \"yuv\" shader program!"); - } else { - debugOut("Built shader program: %d (yuv)\n", shader.yuv); - - glUseProgram(shader.yuv); - uniform = glGetUniformLocation(shader.yuv, "Ytex"); - if (uniform >= 0) glUniform1i(uniform, 0); - uniform = glGetUniformLocation(shader.yuv, "Utex"); - if (uniform >= 0) glUniform1i(uniform, 1); - uniform = glGetUniformLocation(shader.yuv, "Vtex"); - if (uniform >= 0) glUniform1i(uniform, 2); - - } - } - - Vertex = shaderFileRead("texture.vert"); - Fragment = shaderFileRead("texture.frag"); - - Fragment = joinStrings("precision mediump float;\n", Fragment); - - if (! Vertex || ! Fragment) { - fatal("Error loading \"texture\" shader program!", "Try re-installing the game. (texture.frag or texture.vert was not found.)"); - shader.texture = 0; - } else { - - shader.texture = buildShaders(Vertex, Fragment); - if (! shader.texture) { - fatal("Error building \"texture\" shader program!"); - } else { - debugOut("Built shader program: %d (texture)\n", shader.texture); - - glUseProgram(shader.texture); - uniform = glGetUniformLocation(shader.texture, "sampler2d"); - if (uniform >= 0) glUniform1i(uniform, 0); - uniform = glGetUniformLocation(shader.texture, "zBuffer"); - if (uniform >= 0) glUniform1i(uniform, 0); - uniform = glGetUniformLocation(shader.texture, "zBufferLayer"); - if (uniform >= 0) glUniform1f(uniform, 0.); - uniform = glGetUniformLocation(shader.texture, "modulateColor"); - if (uniform >= 0) glUniform1i(uniform, 0); - } - } - - Vertex = shaderFileRead("color.vert"); - Fragment = shaderFileRead("color.frag"); - - Fragment = joinStrings("precision mediump float;\n", Fragment); - - if (! Vertex || ! Fragment) { - fatal("Error loading \"color\" shader program!", "Try re-installing the game. (color.frag or color.vert was not found.)"); - shader.color = 0; - } else { - - shader.color = buildShaders(Vertex, Fragment); - if (! shader.color) { - fatal("Error building \"color\" shader program!"); - } else { - debugOut("Built shader program: %d (color)\n", shader.color); - glUseProgram(shader.color); - } - } - glUseProgram(0); - - glViewport(viewportOffsetX, viewportOffsetY, viewportWidth, viewportHeight); - - /* - * Set up OpenGL for 2D rendering. - */ - glDisable(GL_DEPTH_TEST); - glDisable(GL_CULL_FACE); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - setPixelCoords(false); - - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - if (restoreGraphics) { - /* - * Restore the textures - */ - if (backdropTextureName) { - if (!glIsTexture(backdropTextureName)) { - glGenTextures(1, &backdropTextureName); - } - glBindTexture(GL_TEXTURE_2D, backdropTextureName); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - - if (gameSettings.antiAlias < 0) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - } else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - } - // Restore the backdrop - texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, sceneWidth, sceneHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, backdropTexture, backdropTextureName); - - } - if (snapshotTextureName) { - if (!glIsTexture(snapshotTextureName)) { - glGenTextures(1, &snapshotTextureName); - } - glBindTexture(GL_TEXTURE_2D, snapshotTextureName); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - - // Restore the backdrop - texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, winWidth, winHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, snapTexture, snapshotTextureName); - delete snapTexture; - } - - if (yTextureName) { - if (!glIsTexture(yTextureName)) { - glGenTextures(1, &yTextureName); - glGenTextures(1, &uTextureName); - glGenTextures(1, &vTextureName); - } - } - - reloadSpriteTextures(); - reloadParallaxTextures(); - zBuffer.texName = 0; - if (zBuffer.numPanels) { - setZBuffer(zBuffer.originalNum); - } - lightMap.name = 0; - if (lightMapNumber) { - loadLightMap(lightMapNumber); - } - - sludgeDisplay(); - } - - if (movieIsPlaying) - setMovieViewport(); -#endif -} - -// I found this function on a coding forum on the 'net. -// Looks a bit weird, but it should work. -int getNextPOT(int n) { - --n; - n |= n >> 16; - n |= n >> 8; - n |= n >> 4; - n |= n >> 2; - n |= n >> 1; - ++n; - return n; -} - -} // End of namespace Sludge diff --git a/engines/sludge/graphics.h b/engines/sludge/graphics.h deleted file mode 100644 index 463d3842ec..0000000000 --- a/engines/sludge/graphics.h +++ /dev/null @@ -1,44 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ -#ifndef SLUDGE_GRAPHICS_H -#define SLUDGE_GRAPHICS_H - -#include "graphics/surface.h" - -namespace Sludge { - -extern uint winWidth, winHeight; -extern int viewportHeight, viewportWidth; -extern int viewportOffsetX, viewportOffsetY; -extern int realWinWidth, realWinHeight; - -extern bool NPOT_textures; - -void setPixelCoords(bool pixels); -void setGraphicsWindow(bool fullscreen, bool restoreGraphics = true, bool resize = false); - -int getNextPOT(int n); - -} - // End of namespace Sludge - -#endif diff --git a/engines/sludge/main_loop.cpp b/engines/sludge/main_loop.cpp index 614d3a930e..51b3913c1a 100644 --- a/engines/sludge/main_loop.cpp +++ b/engines/sludge/main_loop.cpp @@ -43,7 +43,6 @@ #include "sludge/timing.h" #include "sludge/sound.h" #include "sludge/sludger.h" -#include "sludge/graphics.h" #include "sludge/helpers.h" #include "sludge/sludge.h" #include "sludge/specialsettings.h" diff --git a/engines/sludge/module.mk b/engines/sludge/module.mk index f96a5b68da..704f7f7a1c 100644 --- a/engines/sludge/module.mk +++ b/engines/sludge/module.mk @@ -11,7 +11,6 @@ MODULE_OBJS := \ floor.o \ freeze.o \ fonttext.o \ - graphics.o \ helpers.o \ hsi.o \ imgloader.o \ diff --git a/engines/sludge/movie.cpp b/engines/sludge/movie.cpp index c569fb4284..bb56a45b33 100644 --- a/engines/sludge/movie.cpp +++ b/engines/sludge/movie.cpp @@ -39,7 +39,6 @@ #include "sludge/newfatal.h" #include "sludge/timing.h" -#include "sludge/graphics.h" #include "sludge/movie.h" #include "sludge/sound.h" diff --git a/engines/sludge/newfatal.cpp b/engines/sludge/newfatal.cpp index f224256b58..027c9b015f 100644 --- a/engines/sludge/newfatal.cpp +++ b/engines/sludge/newfatal.cpp @@ -25,7 +25,6 @@ #include "sludge/allfiles.h" #include "sludge/sound.h" #include "sludge/errors.h" -#include "sludge/graphics.h" #include "sludge/sludge.h" #include "sludge/version.h" diff --git a/engines/sludge/sludger.cpp b/engines/sludge/sludger.cpp index 49edb2b4ff..9364aab540 100644 --- a/engines/sludge/sludger.cpp +++ b/engines/sludge/sludger.cpp @@ -45,7 +45,6 @@ #include "sludge/fileset.h" #include "sludge/transition.h" #include "sludge/language.h" -#include "sludge/graphics.h" #include "sludge/variable.h" #include "sludge/sludge.h" #include "sludge/specialsettings.h" diff --git a/engines/sludge/sprites.cpp b/engines/sludge/sprites.cpp index 62257854ff..1b9b977118 100644 --- a/engines/sludge/sprites.cpp +++ b/engines/sludge/sprites.cpp @@ -32,7 +32,6 @@ #include "sludge/backdrop.h" #include "sludge/sludger.h" #include "sludge/zbuffer.h" -#include "sludge/graphics.h" #include "sludge/imgloader.h" #include "sludge/sludge.h" diff --git a/engines/sludge/thumbnail.cpp b/engines/sludge/thumbnail.cpp index eb026b7b6b..820e5af7a9 100644 --- a/engines/sludge/thumbnail.cpp +++ b/engines/sludge/thumbnail.cpp @@ -25,7 +25,6 @@ #include "sludge/moreio.h" #include "sludge/sludger.h" #include "sludge/backdrop.h" -#include "sludge/graphics.h" #include "sludge/newfatal.h" #include "sludge/version.h" diff --git a/engines/sludge/transition.cpp b/engines/sludge/transition.cpp index c3665e3e58..83ec7dfd8b 100644 --- a/engines/sludge/transition.cpp +++ b/engines/sludge/transition.cpp @@ -22,7 +22,6 @@ #include "sludge/allfiles.h" #include "sludge/backdrop.h" -#include "sludge/graphics.h" #include "sludge/newfatal.h" #if 0 diff --git a/engines/sludge/zbuffer.cpp b/engines/sludge/zbuffer.cpp index e09e57d6f1..ea9fdfee80 100644 --- a/engines/sludge/zbuffer.cpp +++ b/engines/sludge/zbuffer.cpp @@ -29,7 +29,6 @@ #include "sludge/fileset.h" #include "sludge/moreio.h" #include "sludge/newfatal.h" -#include "sludge/graphics.h" #include "sludge/sludge.h" #include "sludge/sprites.h" |