[Super-tux-commit] supertux/src/screen font.cpp,1.10,1.11
Brought to you by:
wkendrick
From: Ricardo C. <rm...@us...> - 2004-07-16 19:22:34
|
Update of /cvsroot/super-tux/supertux/src/screen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16643/src/screen Modified Files: font.cpp Log Message: Implemented a new special-tile field that should replaced the depricated level field in world maps. Also extended display_text_file(). special-tile can have the following flags: [integer] x / y - necessary to say where the tile is located [string] extro-filename - read the given file * [integer] swap-x / swap-y - say coordinates for swapping * [string] map-message - show a message in the world map viewer [string] goto-world - change the world to the given one * [boolean] flip-level - flip vertically the level (of course, only works when there is a level) [boolean] exit-game - quit game * [string] level - feed a level to this tile * - if there is a level, open it only if the level is successful Index: font.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen/font.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- font.cpp 10 Jul 2004 14:22:58 -0000 1.10 +++ font.cpp 16 Jul 2004 19:22:26 -0000 1.11 @@ -27,6 +27,8 @@ #include "font.h" #include "drawing_context.h" #include "../lispreader.h" +#include "../musicref.h" +#include "../resources.h" Font::Font(const std::string& file, FontType ntype, int nw, int nh, int nshadowsize) @@ -146,8 +148,18 @@ reader->read_string("text", text, true); std::string background_file; reader->read_string("background", background_file, true); + std::string music_file; + reader->read_string("music", music_file, true); + std::string show_after_text; + reader->read_string("show-after", show_after_text, true); delete reader; + if(!music_file.empty()) + { + MusicRef theme = sound_manager->load_music(datadir + "/music/" + music_file); + sound_manager->play_music(theme); + } + // Split text string lines into a vector names.clear(); unsigned int i, l; @@ -264,5 +276,10 @@ SDL_EnableKeyRepeat(0, 0); // disables key repeating delete background; + + if(!show_after_text.empty()) + { + display_text_file(show_after_text, scroll_speed); + } } |