From: Ingo Ruhnke Date: Mon, 26 Apr 2004 17:35:08 +0000 (+0000) Subject: - added loading/fadeout screen placeholder X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=50f4ccac4b8338214381e3947d549a470b73d0a0;p=supertux.git - added loading/fadeout screen placeholder - cleaned up credit code a very little bit SVN-Revision: 756 --- diff --git a/src/intro.cpp b/src/intro.cpp index 70399d8d6..a994f9935 100644 --- a/src/intro.cpp +++ b/src/intro.cpp @@ -33,6 +33,6 @@ void draw_intro() { -display_text_file("intro.txt", "images/background/arctis2.jpg"); +display_text_file("intro.txt", "/images/background/arctis2.jpg"); } diff --git a/src/screen.cpp b/src/screen.cpp index d9243f8db..d323c3f1c 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -17,6 +17,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +#include #include #include #include @@ -314,6 +315,13 @@ void flipscreen(void) SDL_Flip(screen); } +void fadeout() +{ + clearscreen(0, 0, 0); + white_text->draw_align("Loading...", screen->w/2, screen->h/2, A_HMIDDLE, A_TOP); + flipscreen(); +} + void update_rect(SDL_Surface *scr, Sint32 x, Sint32 y, Sint32 w, Sint32 h) { if(!use_gl) diff --git a/src/screen.h b/src/screen.h index bfef0503b..0b4496ed1 100644 --- a/src/screen.h +++ b/src/screen.h @@ -51,5 +51,6 @@ void fillrect(float x, float y, float w, float h, int r, int g, int b, int a); void updatescreen(void); void flipscreen(void); void update_rect(SDL_Surface *scr, Sint32 x, Sint32 y, Sint32 w, Sint32 h); +void fadeout(); #endif /*SUPERTUX_SCREEN_H*/ diff --git a/src/setup.cpp b/src/setup.cpp index 90a9d06bb..449b8e32a 100644 --- a/src/setup.cpp +++ b/src/setup.cpp @@ -499,6 +499,7 @@ bool process_load_game_menu() draw_intro(); } + fadeout(); WorldMapNS::WorldMap worldmap; // Load the game or at least set the savegame_file variable diff --git a/src/text.cpp b/src/text.cpp index 51fe1aeb3..4d952ff46 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -315,13 +315,8 @@ void display_text_file(char *file, Surface* surface) speed = -MAX_VEL; /* draw the credits */ - surface->draw_bg(); - if (strcmp(file, "CREDITS") == 0) - white_big_text->drawf("- SuperTux " VERSION " -", - 0, screen->h-scroll, A_HMIDDLE, A_TOP, 2); - y = 0; for(int i = 0; i < length; i++) { @@ -336,7 +331,7 @@ void display_text_file(char *file, Surface* surface) y += white_text->h+ITEMS_SPACE; break; case '-': - white_big_text->drawf(names.item[i], 0, 60+screen->h+y-scroll, A_HMIDDLE, A_TOP, 3); + white_big_text->drawf(names.item[i]+1, 0, 60+screen->h+y-scroll, A_HMIDDLE, A_TOP, 3); y += white_big_text->h+ITEMS_SPACE; break; default: