pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r2659 - in branches/pingus_sdl/src: . worldmap


From: grumbel at BerliOS
Subject: [Pingus-CVS] r2659 - in branches/pingus_sdl/src: . worldmap
Date: Mon, 15 Jan 2007 22:44:34 +0100

Author: grumbel
Date: 2007-01-15 22:44:34 +0100 (Mon, 15 Jan 2007)
New Revision: 2659

Modified:
   branches/pingus_sdl/src/sexpr_file_reader.cpp
   branches/pingus_sdl/src/worldmap/level_dot.cxx
   branches/pingus_sdl/src/worldmap/surface_drawable.cxx
Log:
- worldmap loads now somewhat more

Modified: branches/pingus_sdl/src/sexpr_file_reader.cpp
===================================================================
--- branches/pingus_sdl/src/sexpr_file_reader.cpp       2007-01-15 21:29:28 UTC 
(rev 2658)
+++ branches/pingus_sdl/src/sexpr_file_reader.cpp       2007-01-15 21:44:34 UTC 
(rev 2659)
@@ -27,6 +27,8 @@
 #include "math/vector3f.hpp"
 #include "math/color.hpp"
 #include "math/size.hpp"
+#include "res_descriptor.hxx"
+#include "resource_modifier.hxx"
 #include "math/vector2i.hpp"
 #include "file_reader_impl.hxx"
 #include "sexpr_file_reader.hpp"
@@ -163,6 +165,14 @@
 
   bool read_desc  (const char* name, ResDescriptor& v) const 
   {
+    lisp::Lisp* sub = get_subsection(name);
+    if (sub)
+      {
+        SExprFileReader reader(sub);
+        reader.read_string("image",  v.res_name);
+        reader.read_enum("modifier", v.modifier, 
ResourceModifierNS::rs_from_string);
+        return true;
+      }
     return false;
   }
 

Modified: branches/pingus_sdl/src/worldmap/level_dot.cxx
===================================================================
--- branches/pingus_sdl/src/worldmap/level_dot.cxx      2007-01-15 21:29:28 UTC 
(rev 2658)
+++ branches/pingus_sdl/src/worldmap/level_dot.cxx      2007-01-15 21:44:34 UTC 
(rev 2659)
@@ -76,9 +76,13 @@
     {
       if (savegame->status == Savegame::FINISHED)
         if (highlight)
-          gc.draw (highlight_green_dot_sur, pos);
+          {
+            gc.draw (highlight_green_dot_sur, pos);
+          }
         else
-          gc.draw (green_dot_sur, pos);
+          {
+            gc.draw (green_dot_sur, pos);
+          }
       else
         if (highlight)
           gc.draw (highlight_red_dot_sur, pos);

Modified: branches/pingus_sdl/src/worldmap/surface_drawable.cxx
===================================================================
--- branches/pingus_sdl/src/worldmap/surface_drawable.cxx       2007-01-15 
21:29:28 UTC (rev 2658)
+++ branches/pingus_sdl/src/worldmap/surface_drawable.cxx       2007-01-15 
21:44:34 UTC (rev 2659)
@@ -39,6 +39,7 @@
   reader.read_bool  ("auto-uncover", auto_uncover);
 
   surface = Resource::load_sprite(desc);
+  std::cout << "XXX Desc: " << desc.res_name << std::endl;
 }
 
 void





reply via email to

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