pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/worldmap level_dot.cxx,1.13,1.14 sta


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/worldmap level_dot.cxx,1.13,1.14 stat.hxx,1.10,1.11
Date: 26 Mar 2003 12:01:19 -0000

Update of /var/lib/cvs/Games/Pingus/src/worldmap
In directory dark:/tmp/cvs-serv10395/src/worldmap

Modified Files:
        level_dot.cxx stat.hxx 
Log Message:
added savegame support

Index: level_dot.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/level_dot.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- level_dot.cxx       25 Mar 2003 23:15:23 -0000      1.13
+++ level_dot.cxx       26 Mar 2003 12:01:17 -0000      1.14
@@ -26,6 +26,7 @@
 #include "../path_manager.hxx"
 #include "../start_screen.hxx"
 #include "../plf_res_mgr.hxx"
+#include "../savegame_manager.hxx"
 #include "level_dot.hxx"
 
 namespace WorldMapNS {
@@ -66,7 +67,21 @@
 LevelDot::draw(GraphicContext& gc)
 {
   //std::cout << "Drawing level dat: " << pos << std::endl;
-  gc.draw (green_dot_sur, pos);
+  Savegame* savegame = SavegameManager::instance()->get(levelname);
+  if (savegame 
+      && (savegame->status == Savegame::FINISHED
+          || savegame->status == Savegame::ACCESSIBLE))
+    {
+      gc.draw (green_dot_sur, pos);
+      if (savegame->status == Savegame::FINISHED)
+        {
+          // Draw Flag
+        }
+    }
+  else
+    {
+      gc.draw (red_dot_sur, pos);
+    }
 }
 
 void

Index: stat.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldmap/stat.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- stat.hxx    12 Oct 2002 23:34:43 -0000      1.10
+++ stat.hxx    26 Mar 2003 12:01:17 -0000      1.11
@@ -64,17 +64,14 @@
   PingusWorldMapStat (std::string worldmap_name);
   ~PingusWorldMapStat ();  
 
-  /** Save the given nodes status to the file from which they are
-      loaded */
-  //void save (std::list<boost::shared_ptr<Node> >& nodes);
-
-  /// @return true if the node is finished
+  /** @return true if the node is finished */
   bool finished (int id);
   
-  /// @return true if the node with the given id is accessible, false otherwise
+  /** @return true if the node with the given id is accessible, false
+      otherwise */
   bool accessible (int id);
 
-  bool empty () { return is_empty; } 
+  bool empty () { return is_empty; }
   
 private:
   PingusWorldMapStat (const PingusWorldMapStat&);





reply via email to

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