[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src intro.cpp
From: |
Guillaume Melquiond |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src intro.cpp |
Date: |
Mon, 28 Mar 2005 04:44:06 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Guillaume Melquiond <address@hidden> 05/03/28 09:44:06
Modified files:
src : intro.cpp
Log message:
Die cerr, die!
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/intro.cpp.diff?tr1=1.75&tr2=1.76&r1=text&r2=text
Patches:
Index: wesnoth/src/intro.cpp
diff -u wesnoth/src/intro.cpp:1.75 wesnoth/src/intro.cpp:1.76
--- wesnoth/src/intro.cpp:1.75 Sun Mar 27 23:06:17 2005
+++ wesnoth/src/intro.cpp Mon Mar 28 09:44:05 2005
@@ -1,4 +1,4 @@
-/* $Id: intro.cpp,v 1.75 2005/03/27 23:06:17 gruikya Exp $ */
+/* $Id: intro.cpp,v 1.76 2005/03/28 09:44:05 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -21,6 +21,7 @@
#include "image.hpp"
#include "intro.hpp"
#include "key.hpp"
+#include "log.hpp"
#include "sdl_utils.hpp"
#include "sound.hpp"
#include "util.hpp"
@@ -32,6 +33,8 @@
#include <sstream>
#include <vector>
+#define LOG_NG LOG_STREAM(info, engine)
+
namespace {
const int min_room_at_bottom = 150;
}
@@ -41,7 +44,7 @@
void show_intro(display &disp, const config& data, const config& level)
{
- std::cerr << "showing intro sequence...\n";
+ LOG_NG << "showing intro sequence...\n";
//stop the screen being resized while we're in this function
const events::resize_lock stop_resizing;
@@ -62,7 +65,7 @@
NULL, item.second) ? "then":"else";
const config* const thens = (*item.second).child(type);
if(thens == NULL) {
- std::cerr << "no intro story this way...\n";
+ LOG_NG << "no intro story this way...\n";
return;
}
const config& selection = *thens;
@@ -70,13 +73,13 @@
}
}
- std::cerr << "intro sequence finished...\n";
+ LOG_NG << "intro sequence finished...\n";
}
bool show_intro_part(display &disp, const config& part,
const std::string& scenario)
{
- std::cerr << "showing intro part\n";
+ LOG_NG << "showing intro part\n";
CVideo &video = disp.video();
const std::string& music_file = part["music"];
@@ -186,7 +189,6 @@
if(pass == false) {
for(int i = 0; i != 50; ++i) {
if(key[SDLK_ESCAPE] ||
next_button.pressed() || skip_button.pressed()) {
- std::cerr << "escape
pressed..\n";
return false;
}
@@ -199,7 +201,6 @@
int a, b;
const int mouse_flags =
SDL_GetMouseState(&a,&b);
if(key[SDLK_RETURN] || key[SDLK_SPACE]
|| mouse_flags) {
- std::cerr << "key pressed..\n";
pass = true;
continue;
}
@@ -209,7 +210,6 @@
}
if(key[SDLK_ESCAPE] || next_button.pressed() ||
skip_button.pressed()) {
- std::cerr << "escape pressed..\n";
pass = true;
continue;
}
@@ -219,8 +219,6 @@
const std::string& story = part["story"];
utils::utf8_iterator itor(story);
- std::cerr << story << std::endl;
-
bool skip = false, last_key = true;
int xpos = textx, ypos = texty;