pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/editor object_selector.cxx,1.24,1.25


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/editor object_selector.cxx,1.24,1.25 plfobj.cxx,1.12,1.13 plfobj.hxx,1.10,1.11
Date: 25 Sep 2002 17:21:40 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/editor
In directory dark:/tmp/cvs-serv28111/editor

Modified Files:
        object_selector.cxx plfobj.cxx plfobj.hxx 
Log Message:
splitted Liquid


Index: object_selector.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_selector.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- object_selector.cxx 21 Sep 2002 16:52:40 -0000      1.24
+++ object_selector.cxx 25 Sep 2002 17:21:38 -0000      1.25
@@ -17,29 +17,30 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-#include <ClanLib/Core/System/system.h>
 #include <ClanLib/Core/IOData/directory_scanner.h>
-#include <ClanLib/Display/Input/mouse.h>
+#include <ClanLib/Core/Resources/resource_manager.h>
+#include <ClanLib/Core/System/system.h>
 #include <ClanLib/Display/Display/display.h>
 #include <ClanLib/Display/Font/font.h>
-#include <ClanLib/Core/Resources/resource_manager.h>
 #include <ClanLib/Display/Input/inputbuffer.h>
+#include <ClanLib/Display/Input/mouse.h>
 #include "../console.hxx"
 #include "../globals.hxx"
-#include "../pingus_resource.hxx"
 #include "../loading.hxx"
-#include "string_reader.hxx"
-#include "weather_obj.hxx"
-#include "object_selector.hxx"
-#include "thumb_cache.hxx"
-#include "editor_groundpiece_obj.hxx"
-#include "plfobj.hxx"
 #include "../my_gettext.hxx"
-#include "../system.hxx"
 #include "../path_manager.hxx"
+#include "../pingus_resource.hxx"
 #include "../string_converter.hxx"
+#include "../system.hxx"
+#include "editor_groundpiece_obj.hxx"
+#include "object_selector.hxx"
+#include "plfobj.hxx"
+#include "string_reader.hxx"
+#include "thumb_cache.hxx"
+#include "weather_obj.hxx"
 
 #include "../worldobjsdata/hotspot_data.hxx"
+#include "../worldobjsdata/liquid_data.hxx"
 #include "../worldobjsdata/solid_color_background_data.hxx"
 #include "../worldobjsdata/starfield_background_data.hxx"
 #include "../worldobjsdata/surface_background_data.hxx"

Index: plfobj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/plfobj.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- plfobj.cxx  11 Sep 2002 12:45:58 -0000      1.12
+++ plfobj.cxx  25 Sep 2002 17:21:38 -0000      1.13
@@ -128,64 +128,4 @@
   return str;
 }
 
-
-LiquidObj::LiquidObj(const LiquidData& data)
-  : SpriteEditorObj (data.desc.res_name, data.desc.datafile),
-    LiquidData (data)
-{
-  if (old_width_handling)
-    {
-      width = (width + sprite.get_width ()) / sprite.get_width ();
-      old_width_handling = false;
-    }
-
-  pos_ref = &pos;
-}
-
-EditorObj*
-LiquidObj::duplicate()
-{
-  return new LiquidObj(static_cast<LiquidData>(*this));
-}
-
-void
-LiquidObj::draw (EditorNS::EditorView * view)
-{
-  for(int i = 0; i < width; ++i)
-    view->draw (sprite, pos + CL_Vector (i * sprite.get_width (), 0));
-}
-
-void
-LiquidObj::draw_mark (EditorNS::EditorView * view) 
-{
-  view->draw_rect(int(pos.x),
-                 int(pos.y),
-                 int(pos.x + sprite.get_width () * width),
-                 int(pos.y + sprite.get_height()),
-                 1.0, 1.0, 1.0, 0.0);
-}
-
-std::string  
-LiquidObj::status_line()
-{
-  char str[32];
-  
-  snprintf(str, 32, "%4.2f:%4.2f:%3.2f:%2d", pos.x, pos.y, pos.z, speed);
-
-  return std::string(str);
-}
-
-void 
-LiquidObj::make_larger ()
-{
-  LiquidData::width += 1;
-}
-
-void 
-LiquidObj::make_smaller ()
-{
-  if (LiquidData::width > 1)
-    LiquidData::width -= 1;
-}
-
 /* EOF */

Index: plfobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/plfobj.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- plfobj.hxx  11 Sep 2002 12:45:58 -0000      1.10
+++ plfobj.hxx  25 Sep 2002 17:21:38 -0000      1.11
@@ -20,7 +20,6 @@
 #ifndef HEADER_PINGUS_EDITOR_PLFOBJ_HXX
 #define HEADER_PINGUS_EDITOR_PLFOBJ_HXX
 
-#include "../liquid_data.hxx"
 #include "../entrance_data.hxx"
 #include "../exit_data.hxx"
 #include "sprite_editorobj.hxx"
@@ -54,30 +53,6 @@
 private:
   ExitObj (const ExitObj&);
   ExitObj operator= (const ExitObj&);
-};
-
-
-class LiquidObj : public SpriteEditorObj,
-                 protected LiquidData
-{
-public:
-  LiquidObj(const LiquidData& data);
-
-  EditorObj* duplicate();
-  void draw (EditorNS::EditorView * view);
-  void draw_mark (EditorNS::EditorView * view);
-  void save(std::ostream& plf, std::ofstream* psm);
-  void write_xml(std::ostream& xml) { LiquidData::write_xml (xml); }
-  std::string  status_line();
-
-  int get_width () { return  sprite.get_width () * width; }
-
-  void make_larger ();
-  void make_smaller ();
-  
-private:
-  LiquidObj (const LiquidObj&);
-  LiquidObj operator= (const LiquidObj&);
 };
 
 #endif





reply via email to

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