X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmap.cpp;h=d0206ccc524584e33f0ab6487fa336c89cd52daf;hb=c82ce5aefd7d98727d8ddd43c091f7c617b0a7a5;hp=e7083c8ca8d45a84793f5b16c322101d00cbcdda;hpb=6d93c744add4c06b85cf6c6d7e6317536a5c8ec1;p=quix0rs-blobwars.git diff --git a/src/map.cpp b/src/map.cpp old mode 100755 new mode 100644 index e7083c8..d0206cc --- a/src/map.cpp +++ b/src/map.cpp @@ -1,5 +1,6 @@ /* -Copyright (C) 2004 Parallel Realities +Copyright (C) 2004-2011 Parallel Realities +Copyright (C) 2011-2015 Perpendicular Dimensions This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -51,7 +52,7 @@ void drawMap() { graphics.blit(graphics.tile[brick], r.x, r.y, graphics.screen, false); - #if !USEPAK + #if DEBUG if ((brick >= MAP_NORESET) && (brick < MAP_DECORATION)) { graphics.drawRect(r.x, r.y, 32, 4, graphics.yellow, graphics.screen); @@ -293,7 +294,7 @@ void showMap(int centerX, int centerY) SDL_Surface *panel = graphics.createSurface(320, 240); SDL_Surface *background = graphics.loadImage("gfx/main/mapBackground.png"); - SDL_SetAlpha(background, SDL_SRCALPHA|SDL_RLEACCEL, 130); + SDL_SetAlpha(background, 130); graphics.blit(background, 0, 0, panel, false); @@ -393,13 +394,15 @@ void showMap(int centerX, int centerY) graphics.drawString(_("Enemies"), 430, 410, TXT_LEFT, graphics.screen); graphics.setFontSize(1); - sprintf(string, "%s - %.2d:%.2d:%.2d", _("Mission Time"), game.currentMissionHours, game.currentMissionMinutes, game.currentMissionSeconds); + snprintf(string, sizeof string, "%s - %.2d:%.2d:%.2d", _("Mission Time"), game.currentMissionHours, game.currentMissionMinutes, game.currentMissionSeconds); graphics.drawString(string, 320, 60, TXT_CENTERED, graphics.screen); graphics.drawString(_("Press Button to Continue..."), 320, 450, TXT_CENTERED, graphics.screen); engine.flushInput(); engine.clearInput(); + doMusicInfo(-1); + while (true) { engine.getInput(); @@ -410,7 +413,7 @@ void showMap(int centerX, int centerY) graphics.drawRect(160, 120, 320, 240, graphics.black, graphics.white, graphics.screen); graphics.blit(panel, 160, 120, graphics.screen, false); - if ((config.isControl(CONTROL::MAP)) || (config.isControl(CONTROL::PAUSE)) || (engine.keyState[SDLK_ESCAPE])) + if ((config.isControl(CONTROL::MAP)) || (config.isControl(CONTROL::PAUSE)) || (engine.keyState[SDL_SCANCODE_ESCAPE])) { break; } @@ -647,7 +650,7 @@ void parseMapDataLine(const char *line, int y) while (true) { - *line++; + line++; if (*line == ' ') break;