ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/entity.h
(Generate patch)

Comparing libgender/entity.h (file contents):
Revision 1.14 by root, Mon Oct 4 02:32:20 2004 UTC vs.
Revision 1.15 by root, Mon Oct 4 07:04:58 2004 UTC

26 entity_base (); 26 entity_base ();
27 virtual ~entity_base (); 27 virtual ~entity_base ();
28}; 28};
29 29
30struct entity_container : entity_base, protected vector<entity_base *> { 30struct entity_container : entity_base, protected vector<entity_base *> {
31 void add (entity_base *e) { push_back (e); e->parent = this; } 31 void add (entity_base *e)
32 {
33 push_back (e);
34 e->parent = this;
35 update_bbox ();
36 }
37
32 void update_bbox (); 38 void update_bbox ();
33 void show (); 39 void show ();
34 void draw (draw_context &ctx); 40 void draw (draw_context &ctx);
35 ~entity_container (); 41 ~entity_container ();
36}; 42};
42 48
43 void set (entity_base *e) 49 void set (entity_base *e)
44 { 50 {
45 this->e = e; 51 this->e = e;
46 e->parent = this; 52 e->parent = this;
53 update_bbox ();
47 } 54 }
48 55
49 void remove () 56 void remove ()
50 { 57 {
51 this->e->parent = 0; 58 this->e->parent = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines