]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/intro.cpp
Added .gitignore to ignore certain files + fixed access rights on Makefile* as
[quix0rs-blobwars.git] / src / intro.cpp
index 42916b025d3b9c49c8ce2ab59c230a3f77da6043..697daf2fd6d348ff415c1653610ea5200c3f0807 100644 (file)
@@ -1,5 +1,6 @@
 /*
-Copyright (C) 2004-2010 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
@@ -37,7 +38,7 @@ void playIntro(int tx, int ty, int delay)
 
                if (!line[i])
                {
-                       graphics.showErrorAndExit("Malformed Intro Data", "");
+                       return graphics.showErrorAndExit("Malformed Intro Data", "");
                }
 
                text[i] = NULL;
@@ -109,7 +110,7 @@ void showIntroError()
                graphics.updateScreen();
                engine.getInput();
                config.populate();
-               if (engine.keyState[SDLK_ESCAPE])
+               if (engine.keyState[SDL_SCANCODE_ESCAPE])
                        break;
                SDL_Delay(16);
        }
@@ -162,11 +163,11 @@ int doIntro()
 
        audio.playMusic();
 
-       char *line = strtok((char*)engine.dataBuffer, "\n");
+       strtok((char*)engine.dataBuffer, "\n");
 
        while (true)
        {
-               line = strtok(NULL, "\n");
+               char *line = strtok(NULL, "\n");
                sscanf(line, "%d %d %d", &x, &y, &delay);
 
                if (delay == -1)