Index: src/Game.cpp =================================================================== --- src/Game.cpp (wersja 20) +++ src/Game.cpp (kopia robocza) @@ -44,6 +44,7 @@ int gameNum; int saveGameSpot; +int missingpixels; bool finishedLevel; int drawnMouseX, drawnMouseY; @@ -57,7 +58,8 @@ powerIndicatorPos, selectionRect, spiceIndicatorPos, - topBarPos; + topBarPos, + missingPos; SDL_Surface* fogSurf; SDL_Surface* hiddenSurf; @@ -1652,9 +1654,6 @@ fps = 0; debug = false; - //When shade is set to true map is not revealed at the beginning of the game - shade = true; - builderSelectMode = fullscreenMode = groupCreateMode = menuMode = messageMode = moveDownMode = @@ -3601,8 +3600,14 @@ if (!fullscreenMode) { //SDL_BlitSurface((SDL_Surface *)dataFile[UI_GameBar2].dat, NULL, screen, &gameBarPos); - SDL_BlitSurface(gamebarSurface, NULL, screen, &gameBarPos); - + missingpixels = screen->h - gameBarPos.h; + missingPos.w = gameBarPos.w; + missingPos.h = gameBarPos.h; + missingPos.x = gameBarPos.x; + missingPos.y = missingpixels; + SDL_BlitSurface(gamebarSurface, NULL, screen, &missingPos); + SDL_BlitSurface(gamebarSurface, NULL, screen, &gameBarPos); + if (!SDL_MUSTLOCK(screen) || (SDL_LockSurface(screen) == 0)) { //draw power level indicator @@ -3694,11 +3699,21 @@ drawLocation.x = topBarPos.x; drawLocation.y = topBarPos.y; - drawLocation.w = topBarPos.w; + drawLocation.w = screen->w - gameBarPos.w; drawLocation.h = topBarPos.h - TOPBAR_MASKED_AREA_HEIGHT; - + SDL_FillRect(screen, &drawLocation, COLOUR_BLACK); SDL_BlitSurface(topBarSurface, NULL, screen, &topBarPos); + + missingpixels = screen->w - topBarPos.w - gameBarPos.w; + + missingPos.x = missingpixels+13; + missingPos.y = topBarPos.y; + missingPos.w = topBarPos.w; + missingPos.h = topBarPos.h; + + SDL_BlitSurface(topBarSurface, NULL, screen, &missingPos); + mainButtonsBox.setVisible(!showMentat); mainButtonsBox.draw(); @@ -3814,7 +3829,7 @@ } //DRAW MESSAGEBOX - messageBox.draw(); + messageBox.draw(fullscreenMode); if (showFPS) @@ -4357,9 +4372,9 @@ dborder->maxX -= gameBarPos.w; //altered + dborder->minY += topBarPos.h-TOPBAR_MASKED_AREA_HEIGHT; + dborder->maxY = dborder->minY + screen->h-1; - dborder->minY -= topBarPos.h - TOPBAR_MASKED_AREA_HEIGHT; - } else { @@ -4376,8 +4391,10 @@ dborder->minY -= topBarPos.h; if (dborder->minY < 0) { - dborder->maxY = map->sizeY*BLOCKSIZE - screen->h; - dborder->minY = 0;// map->sizeY*BLOCKSIZE-1; + //dborder->maxY = map->sizeY*BLOCKSIZE - screen->h; + dborder->minY = 0; + dborder->maxY = dborder->minY + screen->h-1; + //dborder->minY = 0;// map->sizeY*BLOCKSIZE-1; } radarMode = false; //once press tab we can no longer be stuck in radar square