cleanup of deps against display: intro does not need a display

This commit is contained in:
Yann Dirson 2005-03-20 16:27:44 +00:00
parent 33cec75d2f
commit eed2a54914
3 changed files with 5 additions and 7 deletions

View file

@ -13,7 +13,6 @@
#include "global.hpp"
#include "display.hpp"
#include "events.hpp"
#include "font.hpp"
#include "game_config.hpp"
@ -39,7 +38,7 @@ namespace {
bool show_intro_part(CVideo &video, const config& part,
const std::string& scenario);
void show_intro(display& screen, const config& data, const config& level)
void show_intro(CVideo &video, const config& data, const config& level)
{
std::cerr << "showing intro sequence...\n";
@ -56,7 +55,7 @@ void show_intro(display& screen, const config& data, const config& level)
std::pair<const std::string*, const config*> item = *i;
if(*item.first == "part") {
showing = show_intro_part(screen.video(), (*item.second), scenario);
showing = show_intro_part(video, (*item.second), scenario);
} else if(*item.first == "if") {
const std::string type = game_events::conditional_passed(
NULL, *item.second) ? "then":"else";
@ -66,7 +65,7 @@ void show_intro(display& screen, const config& data, const config& level)
return;
}
const config& selection = *thens;
show_intro(screen, selection, level);
show_intro(video, selection, level);
}
}

View file

@ -15,7 +15,6 @@
class config;
class CVideo;
class display;
#include "SDL.h"
#include <string>
@ -32,7 +31,7 @@ class display;
//
//each part of the sequence will be displayed in turn, with the
//user able to go to the next part, or skip it entirely.
void show_intro(display& screen, const config& data, const config& level);
void show_intro(CVideo &video, const config& data, const config& level);
void the_end(CVideo& screen);

View file

@ -405,7 +405,7 @@ LEVEL_RESULT play_level(const game_data& gameinfo, const config& game_config,
if(recorder.skipping() == false) {
for(std::vector<config*>::const_iterator story_i = story.begin(); story_i != story.end(); ++story_i) {
show_intro(gui,**story_i, *level);
show_intro(gui.video(),**story_i, *level);
}
}