pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r3677 - in trunk/pingus/src: . worldmap


From: grumbel at BerliOS
Subject: [Pingus-CVS] r3677 - in trunk/pingus/src: . worldmap
Date: Sat, 5 Jul 2008 04:24:09 +0200

Author: grumbel
Date: 2008-07-05 04:24:08 +0200 (Sat, 05 Jul 2008)
New Revision: 3677

Modified:
   trunk/pingus/src/story_screen.cpp
   trunk/pingus/src/worldmap/worldmap_screen.cpp
Log:
Fixed crash issue when viewing story

Modified: trunk/pingus/src/story_screen.cpp
===================================================================
--- trunk/pingus/src/story_screen.cpp   2008-07-05 02:03:29 UTC (rev 3676)
+++ trunk/pingus/src/story_screen.cpp   2008-07-05 02:24:08 UTC (rev 3677)
@@ -189,7 +189,7 @@
 void
 StoryScreen::on_escape_press ()
 {
-  ScreenManager::instance()->replace_screen(new WorldmapNS::WorldmapScreen(), 
true);
+  ScreenManager::instance()->pop_screen();
 }
 
 void
@@ -228,9 +228,10 @@
         }
       else
         {
+#if 0 // FIXME: Sat Jul  5 04:17:01 2008    
+          //Out of story pages - figure out which one this was (start or end)
           std::string which_story = "start";
-          
-#if 0 // FIXME: Fri Jul  4 10:34:19 2008
+
           //Out of story pages - figure out which one this was (start or end)
           if (story == 
WorldmapNS::WorldmapScreen::instance()->get_worldmap()->get_intro_story())
             which_story = "start";
@@ -240,7 +241,6 @@
           // Record that player has seen this story.
           
StatManager::instance()->set_bool(WorldmapNS::WorldmapScreen::instance()->get_worldmap()->get_shortname()
                                             + "-" + which_story + 
"story-seen", true);
-
           bool credits_seen = false;
           //Check if this is the last worldmap
           if (which_story == "end" &&
@@ -255,9 +255,10 @@
             }
           else
             {
-              ScreenManager::instance()->replace_screen(new 
WorldmapNS::WorldmapScreen()), true);
+              ScreenManager::instance()->replace_screen(new 
WorldmapNS::WorldmapScreen(), true);
             }
-#endif
+#endif 
+          ScreenManager::instance()->pop_screen();
         }
     }
 }

Modified: trunk/pingus/src/worldmap/worldmap_screen.cpp
===================================================================
--- trunk/pingus/src/worldmap/worldmap_screen.cpp       2008-07-05 02:03:29 UTC 
(rev 3676)
+++ trunk/pingus/src/worldmap/worldmap_screen.cpp       2008-07-05 02:24:08 UTC 
(rev 3677)
@@ -298,13 +298,13 @@
 void
 WorldmapScreen::show_intro_story()
 {
-  ScreenManager::instance()->replace_screen (new 
StoryScreen(worldmap->get_worldmap().get_intro_story()), true);
+  ScreenManager::instance()->push_screen(new 
StoryScreen(worldmap->get_worldmap().get_intro_story()), true);
 }
 
 void
 WorldmapScreen::show_end_story()
 {
-  ScreenManager::instance()->replace_screen (new 
StoryScreen(worldmap->get_worldmap().get_end_story()), true);
+  ScreenManager::instance()->push_screen(new 
StoryScreen(worldmap->get_worldmap().get_end_story()), true);
 }
 
 } // namespace WorldmapNS





reply via email to

[Prev in Thread] Current Thread [Next in Thread]