diff --git a/engines/grim/gfx_base.h b/engines/grim/gfx_base.h index cf813ad8c95..ecc5297a2ba 100644 --- a/engines/grim/gfx_base.h +++ b/engines/grim/gfx_base.h @@ -79,7 +79,7 @@ public: * @param screenH the height of the context * @param fullscreen true if fullscreen is desired, false otherwise. */ - virtual byte *setupScreen(int screenW, int screenH, bool fullscreen) = 0; + virtual void setupScreen(int screenW, int screenH, bool fullscreen) = 0; /** * Query whether the current context is hardware-accelerated diff --git a/engines/grim/gfx_opengl.cpp b/engines/grim/gfx_opengl.cpp index a65fda48cac..f41ab1b68f0 100644 --- a/engines/grim/gfx_opengl.cpp +++ b/engines/grim/gfx_opengl.cpp @@ -129,7 +129,7 @@ GfxOpenGL::~GfxOpenGL() { } } -byte *GfxOpenGL::setupScreen(int screenW, int screenH, bool fullscreen) { +void GfxOpenGL::setupScreen(int screenW, int screenH, bool fullscreen) { _screenWidth = screenW; _screenHeight = screenH; _scaleW = _screenWidth / (float)_gameWidth; @@ -159,8 +159,6 @@ byte *GfxOpenGL::setupScreen(int screenW, int screenH, bool fullscreen) { initExtensions(); glGetIntegerv(GL_MAX_LIGHTS, &_maxLights); - - return nullptr; } void GfxOpenGL::initExtensions() { diff --git a/engines/grim/gfx_opengl.h b/engines/grim/gfx_opengl.h index fc5c54ae127..4cb789a4fa5 100644 --- a/engines/grim/gfx_opengl.h +++ b/engines/grim/gfx_opengl.h @@ -47,7 +47,7 @@ public: GfxOpenGL(); virtual ~GfxOpenGL(); - byte *setupScreen(int screenW, int screenH, bool fullscreen) override; + void setupScreen(int screenW, int screenH, bool fullscreen) override; const char *getVideoDeviceName() override; diff --git a/engines/grim/gfx_opengl_shaders.cpp b/engines/grim/gfx_opengl_shaders.cpp index 7e14316de33..70e644d2b07 100644 --- a/engines/grim/gfx_opengl_shaders.cpp +++ b/engines/grim/gfx_opengl_shaders.cpp @@ -406,7 +406,7 @@ void GfxOpenGLS::setupShaders() { } } -byte *GfxOpenGLS::setupScreen(int screenW, int screenH, bool fullscreen) { +void GfxOpenGLS::setupScreen(int screenW, int screenH, bool fullscreen) { _screenWidth = screenW; _screenHeight = screenH; _scaleW = _screenWidth / (float)_gameWidth; @@ -430,7 +430,6 @@ byte *GfxOpenGLS::setupScreen(int screenW, int screenH, bool fullscreen) { // color map and the following are using textures. glDepthFunc(GL_LEQUAL); } - return NULL; } void GfxOpenGLS::setupCameraFrustum(float fov, float nclip, float fclip) { diff --git a/engines/grim/gfx_opengl_shaders.h b/engines/grim/gfx_opengl_shaders.h index af8a082f45b..35f832c3f16 100644 --- a/engines/grim/gfx_opengl_shaders.h +++ b/engines/grim/gfx_opengl_shaders.h @@ -43,7 +43,7 @@ public: * @param screenH the height of the context * @param fullscreen true if fullscreen is desired, false otherwise. */ - virtual byte *setupScreen(int screenW, int screenH, bool fullscreen) override; + virtual void setupScreen(int screenW, int screenH, bool fullscreen) override; /** * Query whether the current context is hardware-accelerated diff --git a/engines/grim/gfx_tinygl.cpp b/engines/grim/gfx_tinygl.cpp index f61105cca8f..13bd6430a74 100644 --- a/engines/grim/gfx_tinygl.cpp +++ b/engines/grim/gfx_tinygl.cpp @@ -77,9 +77,8 @@ GfxTinyGL::~GfxTinyGL() { } } -byte *GfxTinyGL::setupScreen(int screenW, int screenH, bool fullscreen) { +void GfxTinyGL::setupScreen(int screenW, int screenH, bool fullscreen) { Graphics::PixelBuffer buf = g_system->getScreenPixelBuffer(); - byte *buffer = buf.getRawBuffer(); _screenWidth = screenW; _screenHeight = screenH; @@ -103,8 +102,6 @@ byte *GfxTinyGL::setupScreen(int screenW, int screenH, bool fullscreen) { tglLightModelfv(TGL_LIGHT_MODEL_AMBIENT, ambientSource); TGLfloat diffuseReflectance[] = { 1.0f, 1.0f, 1.0f, 1.0f }; tglMaterialfv(TGL_FRONT, TGL_DIFFUSE, diffuseReflectance); - - return buffer; } const char *GfxTinyGL::getVideoDeviceName() { diff --git a/engines/grim/gfx_tinygl.h b/engines/grim/gfx_tinygl.h index b7b03c8c577..0e470d1ce7a 100644 --- a/engines/grim/gfx_tinygl.h +++ b/engines/grim/gfx_tinygl.h @@ -39,7 +39,7 @@ public: GfxTinyGL(); virtual ~GfxTinyGL(); - byte *setupScreen(int screenW, int screenH, bool fullscreen) override; + void setupScreen(int screenW, int screenH, bool fullscreen) override; const char *getVideoDeviceName() override;