Skip to content

Commit

Permalink
SLUDGE: move backdrop display code to backdrop.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
yinsimei authored and sev- committed Jul 13, 2017
1 parent cd42e48 commit 733e758
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 4 additions & 0 deletions engines/sludge/backdrop.cpp
Expand Up @@ -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);

Expand Down
4 changes: 0 additions & 4 deletions engines/sludge/main_loop.cpp
Expand Up @@ -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();
Expand Down
9 changes: 6 additions & 3 deletions engines/sludge/sludger.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 733e758

Please sign in to comment.