From 733e758fcb16b824742450fe0d2a003abb977729 Mon Sep 17 00:00:00 2001 From: yinsimei Date: Thu, 1 Jun 2017 17:37:11 +0200 Subject: SLUDGE: move backdrop display code to backdrop.cpp --- engines/sludge/backdrop.cpp | 4 ++++ engines/sludge/main_loop.cpp | 4 ---- engines/sludge/sludger.cpp | 9 ++++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/engines/sludge/backdrop.cpp b/engines/sludge/backdrop.cpp index a6cf71f407..bd087766c9 100644 --- a/engines/sludge/backdrop.cpp +++ b/engines/sludge/backdrop.cpp @@ -536,6 +536,10 @@ inline int sortOutPCamera(int cX, int fX, int sceneMax, int boxMax) { } void drawBackDrop() { + g_system->copyRectToScreen(backdropSurface.getPixels(), + backdropSurface.pitch, 0, 0, backdropSurface.w, + backdropSurface.h); + g_system->updateScreen(); #if 0 setPrimaryColor(1.0, 1.0, 1.0, 1.0); diff --git a/engines/sludge/main_loop.cpp b/engines/sludge/main_loop.cpp index 2c4648b26c..55e2fc6f6d 100644 --- a/engines/sludge/main_loop.cpp +++ b/engines/sludge/main_loop.cpp @@ -479,10 +479,6 @@ int main_loop(char *filename) walkAllPeople(); handleInput(); sludgeDisplay(); - g_system->copyRectToScreen(backdropSurface.getPixels(), - backdropSurface.pitch, 0, 0, backdropSurface.w, - backdropSurface.h); - g_system->updateScreen(); g_system->delayMillis(100); #if 0 Wait_Frame(); diff --git a/engines/sludge/sludger.cpp b/engines/sludge/sludger.cpp index 7fe21192e4..f44cbbcbbf 100644 --- a/engines/sludge/sludger.cpp +++ b/engines/sludge/sludger.cpp @@ -702,19 +702,22 @@ void sludgeDisplay() { // glClearColor(0.5, 0.5, 1.0, 0.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);// Clear The Screen glDepthMask(GL_FALSE); - +#endif drawBackDrop();// Draw the room drawZBuffer(cameraX, cameraY, false); - +#if 0 glEnable(GL_DEPTH_TEST); +#endif drawPeople();// Then add any moving characters... +#if 0 glDisable(GL_DEPTH_TEST); +#endif viewSpeech();// ...and anything being said drawStatusBar(); displayCursor(); if (brightnessLevel < 255) fixBrightness();// This is for transitionLevel special effects - +#if 0 glFlush(); #if !defined(HAVE_GLES2) SDL_GL_SwapBuffers(); -- cgit v1.2.3