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 editor.hxx,1.14,1.15 object_se


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/editor editor.hxx,1.14,1.15 object_selector.cxx,1.9,1.10 object_selector.hxx,1.7,1.8 plfobj.cxx,1.9,1.10 plfobj.hxx,1.8,1.9 rect_editorobj.cxx,1.3,1.4 rect_editorobj.hxx,1.3,1.4 sprite_editorobj.cxx,1.3,1.4 sprite_editorobj.hxx,1.3,1.4 start_pos.hxx,1.5,1.6 weather_obj.hxx,1.5,1.6
Date: 6 Sep 2002 17:33:31 -0000

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

Modified Files:
        editor.hxx object_selector.cxx object_selector.hxx plfobj.cxx 
        plfobj.hxx rect_editorobj.cxx rect_editorobj.hxx 
        sprite_editorobj.cxx sprite_editorobj.hxx start_pos.hxx 
        weather_obj.hxx 
Log Message:
- removed Trap/TrapData/TrapObj - editor needs to be updated
- various clean up


Index: editor.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor.hxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- editor.hxx  5 Sep 2002 12:24:02 -0000       1.14
+++ editor.hxx  6 Sep 2002 17:33:29 -0000       1.15
@@ -124,7 +124,7 @@
   CL_GUIManager* get_gui_manager ();
 
   // overloaded Screen stuff
-  void draw (GraphicContext& gc) { draw(); }
+  void draw (GraphicContext& gc) { draw(); UNUSED_ARG(gc); }
   void draw ();
   void update (const GameDelta& delta);
 

Index: object_selector.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_selector.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- object_selector.cxx 17 Aug 2002 17:56:23 -0000      1.9
+++ object_selector.cxx 6 Sep 2002 17:33:29 -0000       1.10
@@ -80,7 +80,7 @@
 
   return select_obj_type();
 }
-
+/*
 EditorObjLst
 ObjectSelector::get_trap()
 {
@@ -136,6 +136,7 @@
   // object_selector.cxx:107: warning: control reaches end of non-void 
function `ObjectSelector::get_trap()'
   return trap.create_EditorObj ();
 }
+*/
 
 EditorObjLst
 ObjectSelector::get_groundpiece(const GroundpieceData::GPType & gptype)
@@ -385,7 +386,7 @@
 
   CL_Display::clear_display();
   font->print_left(20, 20, _("Which object do you want?"));
-  font->print_left(20, 50, _("t - Trap"));
+  //font->print_left(20, 50, _("t - Trap"));
   font->print_left(20, 70, _("g - Groundpiece (ground)"));
   font->print_left(20, 90, _("s - Groundpiece (solid)"));
   font->print_left(20,110, _("b - Groundpiece (bridge)"));
@@ -408,8 +409,8 @@
     {
       switch (read_key()) 
        {
-       case CL_KEY_T:
-         return get_trap();
+       //case CL_KEY_T:
+         //return get_trap();
 
        case CL_KEY_B:
          return get_groundpiece(GroundpieceData::GP_BRIDGE);

Index: object_selector.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_selector.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- object_selector.hxx 23 Aug 2002 15:49:54 -0000      1.7
+++ object_selector.hxx 6 Sep 2002 17:33:29 -0000       1.8
@@ -53,7 +53,7 @@
   std::string read_string(const std::string &, const std::string &);
   
   EditorObjLst get_obj(int, int);
-  EditorObjLst get_trap();
+  //EditorObjLst get_trap();
   EditorObjLst get_groundpiece(const GroundpieceData::GPType & gptype);
   EditorObjLst get_hotspot(const std::string&);
   EditorObjLst get_entrance();

Index: plfobj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/plfobj.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- plfobj.cxx  4 Sep 2002 14:55:12 -0000       1.9
+++ plfobj.cxx  6 Sep 2002 17:33:29 -0000       1.10
@@ -127,67 +127,6 @@
   return str;
 }
 
-TrapObj::TrapObj(const TrapData& data)
-  : SpriteEditorObj (pos),
-    TrapData (data)
-{
-  frame = 0;
-
-  if (type == "guillotine") {
-    sprite = Sprite("Traps/guillotineidle", "traps");
-    //sprite.set_align_center_bottom ();
-  } else if (type == "fake_exit") {
-    sprite = Sprite("Traps/fake_exit", "traps");
-    sprite.set_align_center_bottom ();
-  } else if (type == "laser_exit") {
-    frame = 5;
-    pos.z = -100;
-    sprite = Sprite("Traps/laser_exit", "traps");
-    sprite.set_align_center_bottom ();
-  } else if (type == "spike") {
-    pos.z = -100;
-    sprite = Sprite("Traps/spike", "traps");
-    //sprite.set_align_center_bottom ();
-    frame = 5;
-  } else if (type == "hammer") {
-    sprite = Sprite("Traps/hammer", "traps");
-    sprite.set_align_center_bottom ();
-  } else if (type == "smasher") {
-    pos.z = 100;
-    sprite = Sprite("Traps/smasher", "traps");
-    //sprite.set_align_center_bottom ();
-  } else if (type == "bumper") {
-    pos.z = -100;
-    sprite = Sprite("Traps/bumper", "traps");
-    sprite.set_align_center_bottom ();
-  } else if (type == "teleport") {
-    pos.z = 100;
-    sprite = Sprite("Traps/teleporter", "traps");
-    sprite.set_align_center_bottom ();
-  } else {
-    PingusError::raise("'" + type + "': trap is not implemented in editor");
-  }
-}
-
-EditorObj*
-TrapObj::duplicate()
-{
-  return new TrapObj(static_cast<TrapData>(*this));
-}
-
-void
-TrapObj::draw (EditorView * view)
-{
-    view->draw(sprite, pos, frame);
-}
-
-std::string  
-TrapObj::status_line()
-{
-  char str[1024];
-  sprintf (str, "TrapObj: %4.2fx%4.2fx%4.2f", pos.x, pos.y, pos.z);
-  return str;
-}
 
 LiquidObj::LiquidObj(const LiquidData& data)
   : SpriteEditorObj (data.desc.res_name, data.desc.datafile, pos),

Index: plfobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/plfobj.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- plfobj.hxx  4 Sep 2002 14:55:12 -0000       1.8
+++ plfobj.hxx  6 Sep 2002 17:33:29 -0000       1.9
@@ -23,7 +23,6 @@
 #include "../liquid_data.hxx"
 #include "../entrance_data.hxx"
 #include "../exit_data.hxx"
-#include "../trap_data.hxx"
 #include "sprite_editorobj.hxx"
 
 class EntranceObj : public SpriteEditorObj,
@@ -57,24 +56,6 @@
   ExitObj operator= (const ExitObj&);
 };
 
-
-class TrapObj : public SpriteEditorObj,
-               protected TrapData
-{
-private:
-  int frame;
-public:
-  TrapObj (const TrapData&);
-
-  EditorObj* duplicate ();
-  void write_xml (std::ostream& xml) { TrapData::write_xml (xml); }
-  void draw (EditorView * view);
-  std::string status_line ();
-  
-private:
-  TrapObj (const TrapObj&);
-  TrapObj operator= (const TrapObj&);
-};
 
 class LiquidObj : public SpriteEditorObj,
                  protected LiquidData

Index: rect_editorobj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/rect_editorobj.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- rect_editorobj.cxx  23 Aug 2002 15:49:54 -0000      1.3
+++ rect_editorobj.cxx  6 Sep 2002 17:33:29 -0000       1.4
@@ -36,10 +36,6 @@
     EditorObj::operator=(old);
 }
 
-RectEditorObj::~RectEditorObj()
-{
-}
-
 void
 RectEditorObj::draw_mark (EditorView * view) 
 {

Index: rect_editorobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/rect_editorobj.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- rect_editorobj.hxx  23 Aug 2002 15:49:54 -0000      1.3
+++ rect_editorobj.hxx  6 Sep 2002 17:33:29 -0000       1.4
@@ -28,7 +28,6 @@
 {
 public:
   RectEditorObj ();
-  virtual ~RectEditorObj ();
 
   /** Returns the position of the upper left corner of the object */
   virtual CL_Vector get_upper_left_corner () =0;

Index: sprite_editorobj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/sprite_editorobj.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sprite_editorobj.cxx        23 Aug 2002 15:49:54 -0000      1.3
+++ sprite_editorobj.cxx        6 Sep 2002 17:33:29 -0000       1.4
@@ -60,8 +60,9 @@
     }
 }
 
-SpriteEditorObj::~SpriteEditorObj ()
-{
+float
+SpriteEditorObj::get_z_pos() {
+  return pos_ref.z;
 }
 
 void 

Index: sprite_editorobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/sprite_editorobj.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sprite_editorobj.hxx        23 Aug 2002 15:49:54 -0000      1.3
+++ sprite_editorobj.hxx        6 Sep 2002 17:33:29 -0000       1.4
@@ -20,10 +20,10 @@
 #ifndef HEADER_PINGUS_EDITOR_SPRITE_EDITOROBJ_HXX
 #define HEADER_PINGUS_EDITOR_SPRITE_EDITOROBJ_HXX
 
-#include <ClanLib/Core/Math/cl_vector.h>
 #include "../sprite.hxx"
 #include "rect_editorobj.hxx"
 
+class CL_Vector;
 
 class SpriteEditorObj : public RectEditorObj
 {
@@ -41,24 +41,22 @@
   SpriteEditorObj (const ResDescriptor&,
                   CL_Vector& arg_pos);
 
-  virtual ~SpriteEditorObj ();
-
   /// Return the object width
   virtual int get_width() { return sprite.get_width (); }
   /// Return the object height
   virtual int get_height() { return sprite.get_height (); }
 
-  virtual float get_z_pos() { return pos_ref.z; }
+  virtual float get_z_pos();
 
   virtual CL_Vector get_upper_left_corner();
 
-  virtual void draw(EditorView *);
+  virtual void draw (EditorView *);
 
-  virtual void set_position_offset(const CL_Vector& offset);
+  virtual void set_position_offset (const CL_Vector& offset);
 
   /** This will be overritten to provide pixel exact click
       detection */
-  virtual bool   is_over(const CL_Vector&);
+  virtual bool   is_over (const CL_Vector&);
   
 protected:
   SpriteEditorObj (const SpriteEditorObj& old);
@@ -68,6 +66,3 @@
 #endif
 
 /* EOF */
-
-
-

Index: start_pos.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/start_pos.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- start_pos.hxx       23 Aug 2002 15:49:55 -0000      1.5
+++ start_pos.hxx       6 Sep 2002 17:33:29 -0000       1.6
@@ -20,6 +20,7 @@
 #ifndef HEADER_PINGUS_EDITOR_START_POS_HXX
 #define HEADER_PINGUS_EDITOR_START_POS_HXX
 
+#include <ClanLib/Core/Math/cl_vector.h>
 #include "sprite_editorobj.hxx"
 
 class StartPos : public SpriteEditorObj

Index: weather_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/weather_obj.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- weather_obj.hxx     23 Aug 2002 15:49:55 -0000      1.5
+++ weather_obj.hxx     6 Sep 2002 17:33:29 -0000       1.6
@@ -20,6 +20,7 @@
 #ifndef HEADER_PINGUS_EDITOR_WEATHER_OBJ_HXX
 #define HEADER_PINGUS_EDITOR_WEATHER_OBJ_HXX
 
+#include <ClanLib/Core/Math/cl_vector.h>
 #include "../weather_data.hxx"
 #include "sprite_editorobj.hxx"
 





reply via email to

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