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

Diff of /enigma/src/display.hh

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

revision 1.6 by dheck, Wed Mar 5 22:05:02 2003 UTC revision 1.7 by dheck, Thu Mar 13 17:58:33 2003 UTC
# Line 63  namespace display Line 63  namespace display
63          virtual bool has_changed(px::Rect &changed_region) { return false; }          virtual bool has_changed(px::Rect &changed_region) { return false; }
64    
65          virtual Model *clone()=0;          virtual Model *clone()=0;
 //         virtual Surface *get_image() = 0;  
 //         virtual Surface *get_shade() = 0;  
66      };      };
67    
68      void InitModels();      void InitModels();
# Line 121  namespace display Line 119  namespace display
119    
120      typedef unsigned int SpriteId;      typedef unsigned int SpriteId;
121    
122            class DL_Sprites;
     void AddEffect (const px::V3 &pos, const char *modelname);  
123    
124      /* Create a new sprite.  If modelname==0, the sprite is deemed invisible.  */      class SpriteHandle {
125      SpriteId    AddSprite (const px::V3 &pos, const char *modelname=0);          DL_Sprites *layer;
126            unsigned id;
127        public:
128            SpriteHandle (DL_Sprites *l, unsigned spriteid)
129            : layer(l), id(spriteid)
130            {}
131            SpriteHandle() : layer(0), id(0) {}
132    
133      void        MoveSprite (SpriteId id, const px::V3 &newpos);          void kill();
134      void        ReplaceSprite (SpriteId id, const char *modelname);          void move (const px::V2 &newpos) const;
135      void        KillSprite (SpriteId id);          void replace_model (Model *m) const;
136      Model*      GetModel (SpriteId id);          Model *get_model () const;
137            void set_callback (ModelCallback *cb) const;
138        };
139    
140        void AddEffect (const px::V2 &pos, const char *modelname);
141    
142      void SetCallback(SpriteId id, ModelCallback *cb);      /*! Create a new sprite.  If modelname==0, the sprite is considered
143          invisible.  */
144        SpriteHandle AddSprite (const px::V2 &pos, const char *modelname=0);
145    
146            
147      void FollowSprite(SpriteId id);      void SetReferencePoint (const px::V2 &point);
148      FollowMode SetFollowMode(FollowMode m);      void SetFollowMode (FollowMode m);
149        void FocusReferencePoint();
150  }  }
151    
152  //----------------------------------------  //----------------------------------------
# Line 144  namespace display Line 154  namespace display
154  //----------------------------------------  //----------------------------------------
155  namespace  display  namespace  display
156  {  {
157        class DL_Lines;
158    
159      class RubberHandle {      class RubberHandle {
160      public:      public:
161          RubberHandle (unsigned);          RubberHandle (DL_Lines *layer=0, unsigned id=0);
162          operator unsigned() { return id; }          operator unsigned() { return id; }
163    
164          void update_first (const px::V2 &p1);          void update_first (const px::V2 &p1);
165          void update_second (const px::V2 &p2);          void update_second (const px::V2 &p2);
166          void kill();          void kill();
167    
168            DL_Lines *line_layer;
169          unsigned id;          unsigned id;
170      };      };
171    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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