/*
-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
#include "cutscene.h"
+List sceneList;
+
void createSceneList()
{
char sceneLine[1024] = "";
line = strtok(NULL, "\n");
if (strcmp(line, "@none@") != 0)
{
- strncpy(scene->sprite, line, sizeof scene->sprite);
+ strlcpy(scene->sprite, line, sizeof scene->sprite);
debug(("Loading cutscene image %s\n", scene->sprite));
graphics.quickSprite(scene->sprite, graphics.loadImage(scene->sprite));
}
line = strtok(NULL, "\n");
}
- if (strcmp(line, "@none@") != 0)
+ if (scene && strcmp(line, "@none@") != 0)
{
scene->appendText(line);
}
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;
float panelAlpha = 0;
- SDL_SetAlpha(panel, SDL_SRCALPHA|SDL_RLEACCEL, 0);
+ SDL_SetAlpha(panel, 0);
engine.clearInput();
engine.flushInput();
if (panelAlpha < 256)
{
panelAlpha += (1 * engine.getTimeDifference());
- SDL_SetAlpha(panel, SDL_SRCALPHA|SDL_RLEACCEL, (int)panelAlpha);
+ SDL_SetAlpha(panel, panelAlpha);
if (image != NULL)
{
- SDL_SetAlpha(image, SDL_SRCALPHA|SDL_RLEACCEL, (int)panelAlpha);
+ SDL_SetAlpha(image, panelAlpha);
graphics.blit(image, 0, 0, graphics.screen, false);
}
graphics.blit(panel, 0, 390, graphics.screen, false);