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

Diff of /enigma/objects.hh

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

revision 1.19 by dheck, Wed Oct 23 19:25:36 2002 UTC revision 1.20 by dheck, Sun Nov 3 14:22:02 2002 UTC
# Line 66  namespace world Line 66  namespace world
66    
67          bool string_attrib(const string &name, string *val) const;          bool string_attrib(const string &name, string *val) const;
68          int int_attrib(const string &name) const;          int int_attrib(const string &name) const;
69            bool int_attrib(const string &name, int *val) const;
70          bool double_attrib (const string &name, double *val) const;          bool double_attrib (const string &name, double *val) const;
71    
72          virtual Object *clone()=0;          virtual Object *clone()=0;
73          virtual void dispose()=0;          virtual void dispose()=0;
74            virtual void init() {}
75    
76          const string &get_kind() const { return kind_; }          const string &get_kind() const { return kind_; }
77      private:      private:
# Line 268  namespace world Line 270  namespace world
270          virtual bool is_dead() = 0;          virtual bool is_dead() = 0;
271          virtual bool is_flying() { return false; }          virtual bool is_flying() { return false; }
272    
273            // Object interface.
274            void init();
275    
276          // Accessors.          // Accessors.
277          world::ActorInfo *get_actorinfo() { return &actorinfo; }          world::ActorInfo *get_actorinfo() { return &actorinfo; }
278          const px::V3 &get_pos() const { return actorinfo.pos; }          const px::V3 &get_pos() const { return actorinfo.pos; }
# Line 282  namespace world Line 287  namespace world
287              actorinfo.forceacc += f;              actorinfo.forceacc += f;
288          }          }
289    
290            display::SpriteId get_spriteid() const { return sprite_id; }
291    
292      protected:      protected:
293          Actor(const char *name, const px::V3 &pos);          Actor(const char *name, const px::V3 &pos);
294    
295          void set_model(const char *mname, const px::V3 &pos);          void set_model(const string &mname, const px::V3 &pos);
296          void set_model(const char *mname);          void set_model(const string &mname);
297          void set_attrib(const string &key, const Value &val);          void set_attrib(const string &key, const Value &val);
298    
         display::SpriteId get_spriteid() const { return sprite_id; }  
   
299      private:      private:
300          virtual void on_motion(px::V3 newpos) {}          virtual void on_motion(px::V3 newpos) {}
301          world::ActorInfo actorinfo;          world::ActorInfo actorinfo;

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

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