]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/map.cpp
Added .gitignore to ignore certain files + fixed access rights on Makefile* as
[quix0rs-blobwars.git] / src / map.cpp
index 8c3a765b5a71b2c8945062344d944178f2622490..45559d3959ac9d70491aafddd9bc55246a436d28 100644 (file)
@@ -298,8 +298,6 @@ void showMap(int centerX, int centerY)
        
        graphics.blit(background, 0, 0, panel, false);
        
-       int color = graphics.black;
-       
        for (int y = 0 ; y < 48 ; y++)
        {
                for (int x = 0 ; x < 64 ; x++)
@@ -317,7 +315,7 @@ void showMap(int centerX, int centerY)
        {
                for (int x = 0 ; x < 64 ; x++)
                {
-                       color = graphics.black;
+                       int color = graphics.black;
 
                        if (map.data[x1 + x][y1 + y] == MAP_AIR)
                        {
@@ -415,6 +413,9 @@ void showMap(int centerX, int centerY)
 
                if ((config.isControl(CONTROL::MAP)) || (config.isControl(CONTROL::PAUSE)) || (engine.keyState[SDL_SCANCODE_ESCAPE]))
                {
+                       engine.keyState[SDL_SCANCODE_ESCAPE] = 0;
+                       config.resetControl(CONTROL::MAP);
+                       config.resetControl(CONTROL::PAUSE);
                        break;
                }