windstille-devel
[Top][All Lists]
Advanced

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

[Windstille-devel] rev 361 - trunk/src


From: Ingo Ruhnke
Subject: [Windstille-devel] rev 361 - trunk/src
Date: Sat, 29 May 2004 03:03:35 +0200

Author: grumbel
Date: 2004-05-29 03:03:35 +0200 (Sat, 29 May 2004)
New Revision: 361

Modified:
   trunk/src/editor.py
   trunk/src/flexlay.i
   trunk/src/layer.cxx
   trunk/src/layer.hxx
   trunk/src/python_meta_data.cxx
   trunk/src/python_meta_data.hxx
   trunk/src/supertux.py
   trunk/src/tileset.cxx
Log:
- some additional stuff

Modified: trunk/src/editor.py
===================================================================
--- trunk/src/editor.py 2004-05-29 00:13:19 UTC (rev 360)
+++ trunk/src/editor.py 2004-05-29 01:03:35 UTC (rev 361)
@@ -102,19 +102,19 @@
 undo_icon = Icon(CL_Point(32*5.1+2, 2), 
make_sprite("../data/images/icons24/stock_undo.png"), "Some tooltip", willow);
 redo_icon = Icon(CL_Point(32*6.1+2, 2), 
make_sprite("../data/images/icons24/stock_redo.png"), "Some tooltip", willow);
 
-undo_icon.set_callback(m.undo)
-redo_icon.set_callback(m.redo)
+undo_icon.set_callback(workspace.get_map().undo)
+redo_icon.set_callback(workspace.get_map().redo)
 
 undo_icon.disable()
 redo_icon.disable()
 
 def on_map_change():
-    if (m.undo_stack_size() > 0):
+    if (workspace.get_map().undo_stack_size() > 0):
         undo_icon.enable()
     else:
         undo_icon.disable()
 
-    if (m.redo_stack_size() > 0):
+    if (workspace.get_map().redo_stack_size() > 0):
         redo_icon.enable()
     else:
         redo_icon.disable()        

Modified: trunk/src/flexlay.i
===================================================================
--- trunk/src/flexlay.i 2004-05-29 00:13:19 UTC (rev 360)
+++ trunk/src/flexlay.i 2004-05-29 01:03:35 UTC (rev 361)
@@ -17,6 +17,8 @@
 #include "tile.hxx"
 #include "tile_brush.hxx"
 #include "editor.hxx"
+#include "meta_data.hxx"
+#include "python_meta_data.hxx"
 
 #include "layer.hxx"
 #include "tilemap_layer.hxx"
@@ -59,6 +61,8 @@
 %include "tile.hxx"
 %include "tile_brush.hxx"
 %include "editor.hxx"
+%include "meta_data.hxx"
+%include "python_meta_data.hxx"
  
 %include "layer.hxx"
 %include "tilemap_layer.hxx"
@@ -83,5 +87,6 @@
 %include "menu.hxx"
 %include "menubar.hxx"
 %include "scrollbar.hxx"
+
  
 /* EOF */

Modified: trunk/src/layer.cxx
===================================================================
--- trunk/src/layer.cxx 2004-05-29 00:13:19 UTC (rev 360)
+++ trunk/src/layer.cxx 2004-05-29 01:03:35 UTC (rev 361)
@@ -23,24 +23,15 @@
 
 Layer::Layer()
 {
-  std::cout << "Layer(empty: " << impl.get() << ")" << std::endl;
 }
 
-Layer::Layer(const Layer& copy)
-  : impl(copy.impl)
-{
-  std::cout << "Layer(copy: " << impl.get() << ")" << std::endl;
-}
-
 Layer::Layer(SharedPtr<LayerImpl> i)
   : impl(i)
 {
-  std::cout << "Layer(#" << impl.get() << ")" << std::endl;
 }
 
 Layer::~Layer()
 {
-  std::cout << "~Layer(" << impl.get() << ")" << std::endl;
 }
 
 void

Modified: trunk/src/layer.hxx
===================================================================
--- trunk/src/layer.hxx 2004-05-29 00:13:19 UTC (rev 360)
+++ trunk/src/layer.hxx 2004-05-29 01:03:35 UTC (rev 361)
@@ -36,7 +36,6 @@
 private:
 public:
   Layer();
-  Layer(const Layer& copy);
   Layer(SharedPtr<LayerImpl> i);
   ~Layer();
 

Modified: trunk/src/python_meta_data.cxx
===================================================================
--- trunk/src/python_meta_data.cxx      2004-05-29 00:13:19 UTC (rev 360)
+++ trunk/src/python_meta_data.cxx      2004-05-29 01:03:35 UTC (rev 361)
@@ -19,16 +19,24 @@
 
 #include <iostream>
 #include "python_meta_data.hxx"
+#include "meta_data_impl.hxx"
 
-PythonObject get_python_object(const MetaData& data_obj)
+typedef MetaDataGeneric<PythonObject> PythonMetaData;
+
+MetaData make_metadata(PyObject* obj)
 {
+  return MetaData(SharedPtr<MetaDataImpl>(new 
PythonMetaData(PythonObject(obj))));
+}
+
+PyObject* get_python_object(const MetaData& data_obj)
+{
   MetaDataImpl*    data = data_obj.get_impl().get();
   if (data)
     {
       PythonMetaData* pyobj = dynamic_cast<PythonMetaData*>(data);
       if (pyobj)
         {
-          return pyobj->data;
+          return pyobj->data.ptr();
         }
       else
         {

Modified: trunk/src/python_meta_data.hxx
===================================================================
--- trunk/src/python_meta_data.hxx      2004-05-29 00:13:19 UTC (rev 360)
+++ trunk/src/python_meta_data.hxx      2004-05-29 01:03:35 UTC (rev 361)
@@ -22,12 +22,10 @@
 
 #include "python_object.hxx"
 #include "meta_data.hxx"
-#include "meta_data_impl.hxx"
 
-typedef MetaDataGeneric<PythonObject> PythonMetaData;
+MetaData  make_metadata(PyObject* obj);
+PyObject* get_python_object(const MetaData& data);
 
-PythonObject get_python_object(const MetaData& data);
-
 #endif
 
 /* EOF */

Modified: trunk/src/supertux.py
===================================================================
--- trunk/src/supertux.py       2004-05-29 00:13:19 UTC (rev 360)
+++ trunk/src/supertux.py       2004-05-29 01:03:35 UTC (rev 361)
@@ -84,11 +84,7 @@
         self.editormap.add_layer(self.background.to_layer())
         self.editormap.add_layer(self.objects.to_layer())
 
-    def __del__(self):
-        print "SuperTuxLevel:__del__"
-
     def activate(self, workspace):
-        #editor_tilemap_set_current(self.interactive.to_layer())
         workspace.set_map(self.editormap)
 
 class SuperTuxGUI:

Modified: trunk/src/tileset.cxx
===================================================================
--- trunk/src/tileset.cxx       2004-05-29 00:13:19 UTC (rev 360)
+++ trunk/src/tileset.cxx       2004-05-29 01:03:35 UTC (rev 361)
@@ -41,7 +41,6 @@
 
   ~TilesetImpl()
   {
-    std::cout << "Tileset: destroy" << std::endl;
     for(Tiles::iterator i = tiles.begin(); i != tiles.end(); ++i)
       {
         delete *i;
@@ -55,7 +54,6 @@
 Tileset::Tileset()
   : impl(new TilesetImpl())
 {
-  std::cout << "Tileset::Tileset()" << std::endl;
   impl->tile_size = 1;
 }
 
@@ -63,7 +61,6 @@
   : impl(new TilesetImpl())
 {
   assert(tile_size_ > 0);
-  std::cout << "Tileset::Tileset(" << tile_size_ << ")" << std::endl;
   impl->tile_size = tile_size_;
 }
 





reply via email to

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