SLUDGE: move backdrop display code to backdrop.cpp

This commit is contained in:
yinsimei 2017-06-01 17:37:11 +02:00 committed by Eugene Sandulenko
parent cd42e483de
commit 733e758fcb
3 changed files with 10 additions and 7 deletions

View File

@ -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);

View File

@ -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();

View File

@ -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();