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++)
{
for (int x = 0 ; x < 64 ; x++)
{
- color = -1;
+ int color = graphics.black;
if (map.data[x1 + x][y1 + y] == MAP_AIR)
{
- color = -1;
+ color = graphics.black;
}
else if (map.data[x1 + x][y1 + y] == MAP_WATER)
{
- color = -1;
+ color = graphics.black;
}
else if (map.data[x1 + x][y1 + y] == MAP_SLIME)
{
}
else if (map.data[x1 + x][y1 + y] >= MAP_DECORATION)
{
- color = -1;
+ color = graphics.black;
if (map.data[x1 + x][y1 + y - 1] == MAP_WATER)
{
color = graphics.darkGreen;
}
- if (color > -1)
+ if (color != graphics.black)
{
graphics.drawRect(x * 5, y * 5, 5, 5, color, panel);
}
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;
}