From 625f2d250a63ea6cef76daf1ae59d718d9104827 Mon Sep 17 00:00:00 2001 From: Futuray-pgm Date: Thu, 4 Jul 2024 21:51:02 +0200 Subject: [PATCH] Update tutorial system - Part 5 (end) : Game.cpp Update tutorial system to made it works (I hope). --- src/game.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index 0f20f34..12da355 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2302,26 +2302,20 @@ void the_game( ); } - // Tutorial TODO + // FIXME { - vlprintf(CN_INFO,"Tuto Begin"); + vlprintf(CN_INFO,"Tutorial Begin"); core::dimension2d screensize = driver->getScreenSize(); s32 x = (screensize.Width/2); s32 y = (screensize.Height/2); LocalPlayer* player = client.getLocalPlayer(); - vlprintf(CN_INFO,"Tuto 1 OK"); - Tutorial* tuto = player->tutorial; - vlprintf(CN_INFO,"Tuto 1 get OK & "); - vlprintf(CN_INFO, (char*)std::to_string(tuto->getCurrentTutorialNumber()).c_str()); + Tutorial *tuto = player->tutorial; std::string tutotext = tuto->getCurrentTutorialText(); - vlprintf(CN_INFO,"Tuto 1 bis OK"); std::wstring text = narrow_to_wide(tutotext); - vlprintf(CN_INFO,"Tuto 1 bis bis OK"); core::dimension2d textsize = guienv->getSkin()->getFont()->getDimension(text.c_str()); - vlprintf(CN_INFO,"Tuto 2 OK"); core::rect rect((x-412)-(textsize.Width/2), y+10, (x-412)+(textsize.Width/2), y+10+textsize.Height); guienv->addStaticText(text.c_str(),rect); - vlprintf(CN_INFO,"Tuto 3 OK"); //chatline_add(&chat_lines,narrow_to_wide(gettext("HUD shown")),-103.00); + vlprintf(CN_INFO,"Tutorial works"); } }