[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/worldmap worldmap.cxx,1.40,1.41
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/worldmap worldmap.cxx,1.40,1.41 |
Date: |
5 Apr 2003 20:59:40 -0000 |
Update of /var/lib/cvs/Games/Pingus/src/worldmap
In directory dark:/tmp/cvs-serv5328/src/worldmap
Modified Files:
worldmap.cxx
Log Message:
added trigger to show story on finishing the last level
Index: worldmap.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/worldmap.cxx,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- worldmap.cxx 2 Apr 2003 19:11:28 -0000 1.40
+++ worldmap.cxx 5 Apr 2003 20:59:38 -0000 1.41
@@ -44,6 +44,11 @@
#include "../plf_handle.hxx"
#include "../plf.hxx"
#include "../math.hxx"
+#include "../stat_manager.hxx"
+
+#include "../story.hxx"
+#include "../story_screen.hxx"
+#include "../gui/screen_manager.hxx"
namespace WorldMapNS {
@@ -397,8 +402,28 @@
void
WorldMap::update_locked_nodes()
-{
+{ // FIXME: This shouldn't be a polling function
path_graph->graph.for_each_node(unlock_nodes(path_graph));
+
+ bool credits_unlocked = false;
+ StatManager::instance()->get_bool("credits-unlocked", credits_unlocked);
+
+ if (!credits_unlocked)
+ {
+ Dot* dot = path_graph->get_dot(path_graph->lookup_node("leveldot_19"));
+ if (dot)
+ {
+ if (dot->finished())
+ {
+ ScreenManager::instance()->replace_screen(new
StoryScreen(Story::credits), true);
+ StatManager::instance()->set_bool("credits-unlocked", true);
+ }
+ }
+ else
+ {
+ std::cout << "Error: WorldMap: Last level missing" << std::endl;
+ }
+ }
}
} // namespace WorldMapNS
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/worldmap worldmap.cxx,1.40,1.41,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src story_screen.cxx,1.11,1.12
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs worldobj_group.cxx,1.6,NONE worldobj_group.hxx,1.6,NONE
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src story_screen.cxx,1.11,1.12
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs worldobj_group.cxx,1.6,NONE worldobj_group.hxx,1.6,NONE
- Index(es):