Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22445/src
Modified Files:
intro.cpp setup.cpp
Log Message:
Intro file should be the one to handle the intro sequence, even if it is only one line of code.
I think we shouldn't get rid of it, because in the future it should be improved and maybe support some sort of scripting.
Index: setup.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/setup.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- setup.cpp 26 Apr 2004 14:15:48 -0000 1.60
+++ setup.cpp 26 Apr 2004 14:20:22 -0000 1.61
@@ -496,7 +496,7 @@
if (access(slotfile, F_OK) != 0)
{
- display_text_file("intro.txt", "images/background/arctis2.jpg");
+ draw_intro();
}
WorldMapNS::WorldMap worldmap;
Index: intro.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/intro.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- intro.cpp 25 Apr 2004 14:27:49 -0000 1.16
+++ intro.cpp 26 Apr 2004 14:20:22 -0000 1.17
@@ -26,66 +26,13 @@
#include <SDL.h>
#include <SDL_image.h>
-#include <sys/types.h>
-#include <ctype.h>
-
#include "defines.h"
#include "globals.h"
#include "intro.h"
-#include "screen.h"
#include "text.h"
-#include "texture.h"
-#include "timer.h"
-
-char * intro_text[] = {
- "Tux and Gown were having a nice picnic..",
- "when suddenly...",
- "Gown is beamed away!!!",
- "This looks like a job for ---"
- };
-
void draw_intro()
{
- bool done = false;
-
- while (!done)
- {
- SDL_Event event;
- drawgradient(Color(155, 200, 255), Color(255, 255, 255));
-
- gold_text->draw_align("Gwen gets captured!", screen->w/2, 15, A_HMIDDLE, A_TOP);
-
- white_text->draw
- ("\n" //
- "Tux and Gwen were out having a nice\n"
- "picnic on the ice fields of Antarctica.\n"
- "Suddenly, a creature jumped from\n"
- "behind an ice bush, there was a flash,\n"
- "and Tux fell asleep!\n"
- "\n" //
- "When Tux wakes up, he finds that Gwen\n"
- "is missing. Where she lay before now\n"
- "lies a letter. \"Tux, my arch enemy!\"\n"
- "says the letter. \"I have captured\n"
- "your beautiful Gwen and have taken her\n"
- "to my fortress. The path to my fortress\n"
- "is littered with my minions. Give up on the\n"
- "thought of trying to reclaim her, you\n"
- "haven't a chance! -Nolok\"\n"
- "\n"
- "Tux looks and see Nolok's fortress in\n"
- "the distance. Determined to save his\n"
- "beloved Gwen, he begins his journey.",
- -5, 30);
-
- white_small_text->draw_align("Press any button to continue!",
- screen->w/2, screen->h - 20, A_HMIDDLE, A_TOP);
-
- flipscreen();
- SDL_Delay(100);
-
- done = wait_for_event(event,0);
- }
+display_text_file("intro.txt", "images/background/arctis2.jpg");
}
|