]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/cutscene.cpp
Added .gitignore to ignore certain files + fixed access rights on Makefile* as
[quix0rs-blobwars.git] / src / cutscene.cpp
index 75baa4de8a0e32d14a97eb4cfaa693b31ce1b27c..68672b6b0a3a779f139dbfa3dce9fce8a8d80c8a 100644 (file)
@@ -1,5 +1,6 @@
 /*
 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
@@ -20,6 +21,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "cutscene.h"
 
+List sceneList;
+
 void createSceneList()
 {
        char sceneLine[1024] = "";
@@ -61,7 +64,7 @@ void createSceneList()
                        line = strtok(NULL, "\n");
                }
                
-               if (strcmp(line, "@none@") != 0)
+               if (scene && strcmp(line, "@none@") != 0)
                {
                        scene->appendText(line);
                }
@@ -75,7 +78,7 @@ bool setupScene(const char *stagename)
        char sceneLine[1024];
 
        if (!engine.loadData(_("data/ending")))
-               graphics.showErrorAndExit("Couldn't load cutscene data file (%s)", _("data/ending"));
+               return graphics.showErrorAndExit("Couldn't load cutscene data file (%s)", _("data/ending")), false;
 
        char *line = strtok((char*)engine.dataBuffer, "\n");
        int i = 0;
@@ -135,7 +138,7 @@ void showScene(bool allowSkip)
        
        float panelAlpha = 0;
        
-       SDL_SetSurfaceAlphaMod(panel, 0);
+       SDL_SetAlpha(panel, 0);
        
        engine.clearInput();
        engine.flushInput();
@@ -164,10 +167,10 @@ void showScene(bool allowSkip)
                if (panelAlpha < 256)
                {
                        panelAlpha += (1 * engine.getTimeDifference());
-                       SDL_SetSurfaceAlphaMod(panel, panelAlpha);
+                       SDL_SetAlpha(panel, panelAlpha);
                        if (image != NULL)
                        {
-                               SDL_SetSurfaceAlphaMod(image, panelAlpha);
+                               SDL_SetAlpha(image, panelAlpha);
                                graphics.blit(image, 0, 0, graphics.screen, false);
                        }
                        graphics.blit(panel, 0, 390, graphics.screen, false);