Index: src/Game.cpp =================================================================== --- src/Game.cpp (wersja 29) +++ src/Game.cpp (kopia robocza) @@ -42,6 +42,8 @@ indicatorX = NONE, indicatorY = NONE; +int missingpixels = 0; + int gameNum; int saveGameSpot; bool finishedLevel; @@ -59,7 +61,8 @@ selectionRect, spiceIndicatorPos, topBarPos, - topBarFillerPos; + topBarFillerPos, + missingpixelsPos; SDL_Surface* fogSurf; SDL_Surface* hiddenSurf; @@ -1654,9 +1657,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 = @@ -3346,6 +3346,17 @@ drawLocation; + if (missingpixels) + { + drawLocation.x = 0; + drawLocation.y = 0; + drawLocation.w = missingpixels; + if (fullscreenMode) + drawLocation.h = screen->h-1; + else + drawLocation.h = screen->h - topBarPos.h -1; + SDL_FillRect(screen, &drawLocation, COLOUR_BLACK); + } //debugCount = 0; TerrainClass* cell; @@ -4376,12 +4387,18 @@ if (fullscreenMode) { fullscreenMode = false; - dborder->maxX -= gameBarPos.w; + if (missingpixels) + { + dborder->minX = missingpixels; + dborder->maxX = dborder->maxX + missingpixels;// Still problems with tuning it properly - gameBarPos.w ; + } + else + dborder->maxX -= gameBarPos.w; //altered - - dborder->minY -= topBarPos.h - TOPBAR_MASKED_AREA_HEIGHT; - + dborder->minY += topBarPos.h-TOPBAR_MASKED_AREA_HEIGHT; + dborder->maxY = dborder->minY + screen->h; + missingpixels = 0; } else { @@ -4393,13 +4410,17 @@ dborder->maxX = map->sizeX*BLOCKSIZE-1; dborder->minX = map->sizeX*BLOCKSIZE - screen->w; } + if ((map->sizeX*BLOCKSIZE)< screen->w ) + missingpixels = screen->w - (map->sizeX*BLOCKSIZE); //altered 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