X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fintro.cpp;h=d23e600d783c0c7181af7b23faa7c6f970fe496c;hb=8daad02cf03b9cef0bc47c068cf216d5971c543b;hp=c425280651a99769a27964b1d89ab00c6bf9c8f3;hpb=01648ef85cd4e04675eceb8418936de901480c8c;p=supertux.git diff --git a/src/intro.cpp b/src/intro.cpp index c42528065..d23e600d7 100644 --- a/src/intro.cpp +++ b/src/intro.cpp @@ -16,76 +16,19 @@ // You should have received a copy of the GNU General Public License // 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 -#include -#include -#include -#include -#include - -#include -#include - -#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 ---" - }; +#include "app/globals.h" +#include "defines.h" +#include "video/font.h" +#include "video/screen.h" +#include "resources.h" +using namespace SuperTux; 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", 1, white_big_text , white_text, white_small_text, blue_text ); }