/[enigma]/enigma/src/objects.hh
ViewVC logotype

Diff of /enigma/src/objects.hh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by mhawlisch, Fri Apr 4 10:10:14 2003 UTC revision 1.13 by dheck, Fri Apr 4 19:40:01 2003 UTC
# Line 121  namespace world Line 121  namespace world
121    
122          virtual Object *clone()=0;          virtual Object *clone()=0;
123          virtual void dispose()=0;          virtual void dispose()=0;
         virtual void init() {}  
124    
125          virtual const ObjectTraits *get_traits() const { return 0; }          virtual const ObjectTraits *get_traits() const { return 0; }
126      private:      private:
# Line 221  namespace world Line 220  namespace world
220          Floor(const char *kind, double friction, double mfactor);          Floor(const char *kind, double friction, double mfactor);
221    
222          // Object interface          // Object interface
223          Object *clone();          Floor *clone();
224          void dispose();          void dispose();
225          void message(const string& msg, const Value &val);          void message(const string& msg, const Value &val);
226    
# Line 324  namespace world Line 323  namespace world
323   */   */
324  namespace world  namespace world
325  {  {
326      class Actor : public Object, public px::Nocopy {      class Actor : public Object {
327      public:      public:
328          // Actor interface.          // Actor interface.
329          virtual void on_hit(Actor* a) {}          virtual void on_hit(Actor* a) {}
# Line 336  namespace world Line 335  namespace world
335          virtual bool is_on_floor() { return true; }          virtual bool is_on_floor() { return true; }
336                    
337          virtual bool can_drop_items() { return false; }          virtual bool can_drop_items() { return false; }
           
         // Object interface.  
         void init();  
338    
339            virtual void init();
340            
341          // Accessors.          // Accessors.
342          world::ActorInfo *get_actorinfo() { return &actorinfo; }          world::ActorInfo *get_actorinfo() { return &actorinfo; }
343          const px::V2 &get_pos() const { return actorinfo.pos; }          const px::V2 &get_pos() const { return actorinfo.pos; }
# Line 405  namespace world Line 403  namespace world
403         `obj' is used as a template.  */         `obj' is used as a template.  */
404      void Register(Object *obj);      void Register(Object *obj);
405    
406        void Register (const std::string &kind, Object *obj);
407    
408    
409      Object *GetObjectTemplate(const string &kind);      Object *GetObjectTemplate(const string &kind);
410  }  }
   
411  #endif  #endif

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26