projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add code to debug collision rectangles
[supertux.git]
/
src
/
textscroller.cpp
diff --git
a/src/textscroller.cpp
b/src/textscroller.cpp
index
c46dde3
..
2c7139d
100644
(file)
--- a/
src/textscroller.cpp
+++ b/
src/textscroller.cpp
@@
-22,7
+22,7
@@
#include "textscroller.hpp"
#include <stdexcept>
#include "textscroller.hpp"
#include <stdexcept>
-#include "
ms
g.hpp"
+#include "
lo
g.hpp"
#include "mainloop.hpp"
#include "resources.hpp"
#include "video/font.hpp"
#include "mainloop.hpp"
#include "resources.hpp"
#include "video/font.hpp"
@@
-35,7
+35,6
@@
#include "audio/sound_manager.hpp"
#include "main.hpp"
#include "control/joystickkeyboardcontroller.hpp"
#include "audio/sound_manager.hpp"
#include "main.hpp"
#include "control/joystickkeyboardcontroller.hpp"
-#include "exceptions.hpp"
static const float DEFAULT_SPEED = 20;
static const float LEFT_BORDER = 50;
static const float DEFAULT_SPEED = 20;
static const float LEFT_BORDER = 50;
@@
-84,8
+83,9
@@
TextScroller::TextScroller(const std::string& filename)
text_lisp->get("speed", defaultspeed);
text_lisp->get("music", music);
} catch(std::exception& e) {
text_lisp->get("speed", defaultspeed);
text_lisp->get("music", music);
} catch(std::exception& e) {
- msg_warning("Couldn't load file '" << filename << "': " << e.what());
- return;
+ std::ostringstream msg;
+ msg << "Couldn't load file '" << filename << "': " << e.what() << std::endl;
+ throw std::runtime_error(msg.str());
}
// Split text string lines into a vector
}
// Split text string lines into a vector
@@
-175,7
+175,7
@@
TextScroller::draw(DrawingContext& context)
break;
}
default:
break;
}
default:
-
msg_warning("text contains an unformated line")
;
+
log_warning << "text contains an unformated line" << std::endl
;
font = white_text;
center = false;
break;
font = white_text;
center = false;
break;
@@
-230,7
+230,7
@@
InfoBox::InfoBox(const std::string& text)
}
catch (std::exception& e)
{
}
catch (std::exception& e)
{
-
msg_warning("Could not load scrolling images: " << e.what())
;
+
log_warning << "Could not load scrolling images: " << e.what() << std::endl
;
arrow_scrollup = 0;
arrow_scrolldown = 0;
}
arrow_scrollup = 0;
arrow_scrolldown = 0;
}
@@
-288,7
+288,7
@@
InfoBox::draw(DrawingContext& context)
break;
}
default:
break;
}
default:
-
msg_warning("text contains an unformatted line")
;
+
log_warning << "text contains an unformatted line" << std::endl
;
font = normal_font;
center = false;
break;
font = normal_font;
center = false;
break;