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

Diff of /enigma/src/d_engine.hh

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

revision 1.9 by dheck, Fri Jun 13 17:02:58 2003 UTC revision 1.10 by dheck, Sun Jun 15 10:30:01 2003 UTC
# Line 76  namespace display Line 76  namespace display
76          /*          /*
77          ** Coordinate conversion          ** Coordinate conversion
78          */          */
   
79          void      world_to_screen (const px::V2 & pos, int *x, int *y);          void      world_to_screen (const px::V2 & pos, int *x, int *y);
80          WorldArea screen_to_world (const ScreenArea &a);          WorldArea screen_to_world (const ScreenArea &a);
81          ScreenArea world_to_screen (const WorldArea &a);          ScreenArea world_to_screen (const WorldArea &a);
# Line 97  namespace display Line 96  namespace display
96          void draw_all (px::GC &gc);          void draw_all (px::GC &gc);
97    
98      private:      private:
99            void update_layer (DisplayLayer *l, WorldArea wa);
         void draw_field (px::GC &gc, int x, int y);  
100    
101          /*          /*
102          ** Variables          ** Variables
# Line 139  namespace display Line 137  namespace display
137          ** DisplayLayer interface.          ** DisplayLayer interface.
138          */          */
139          virtual void draw (px::GC &gc, const WorldArea &a, int x, int y) = 0;          virtual void draw (px::GC &gc, const WorldArea &a, int x, int y) = 0;
140            virtual void draw_onepass (px::GC &gc) {}
141  //        virtual void notify_expose (px::Rect &area) {}  //        virtual void notify_expose (px::Rect &area) {}
142          virtual void tick (double /*dtime*/) {}          virtual void tick (double /*dtime*/) {}
143          virtual void new_world (int /*w*/, int /*h*/) {}          virtual void new_world (int /*w*/, int /*h*/) {}
# Line 232  namespace display Line 231  namespace display
231          ** DisplayLayer interface          ** DisplayLayer interface
232          */          */
233          void draw (px::GC &gc, const WorldArea &a, int x, int y);          void draw (px::GC &gc, const WorldArea &a, int x, int y);
234            void draw_onepass (px::GC &gc);
235          void new_world (int, int);          void new_world (int, int);
236    
237          /*          /*
# Line 335  namespace display Line 335  namespace display
335          {          {
336          }          }
337    
338          void draw (px::GC &gc, const WorldArea &a, int x, int y);          void draw (px::GC &gc, const WorldArea &a, int x, int y)
339            {}
340            void draw_onepass (px::GC &gc);
341    
342          RubberHandle add_line (const V2 &p1, const V2 &p2);          RubberHandle add_line (const V2 &p1, const V2 &p2);
343          void set_startpoint (unsigned id, const V2 &p1);          void set_startpoint (unsigned id, const V2 &p1);
# Line 400  namespace display Line 402  namespace display
402  //----------------------------------------  //----------------------------------------
403      class Follower {      class Follower {
404      public:      public:
405          Follower (DisplayEngine *e) { m_engine = e; }          Follower (DisplayEngine *e);
406          virtual ~Follower() {}          virtual ~Follower() {}
407          virtual void tick(double dtime, const px::V2 &point) = 0;          virtual void tick(double dtime, const px::V2 &point) = 0;
408          virtual void center(const px::V2 &point) = 0;          virtual void center(const px::V2 &point);
409    
410        protected:
411  //         void set_engine(DisplayEngine *e) { m_engine = e; }  //         void set_engine(DisplayEngine *e) { m_engine = e; }
412          DisplayEngine *get_engine() const { return m_engine; }          DisplayEngine *get_engine() const { return m_engine; }
413            bool set_offset (V2 offs);
414            int get_hoff() const { return m_hoff; }
415            int get_voff() const { return m_voff; }
416    
417      private:      private:
418          DisplayEngine *m_engine;          DisplayEngine *m_engine;
419            int m_hoff, m_voff;
420      };      };
421    
422      class Follower_Screen : public Follower {      class Follower_Screen : public Follower {
423      public:      public:
424          Follower_Screen(DisplayEngine *e);          Follower_Screen(DisplayEngine *e);
425          void tick(double dtime, const px::V2 &point);          void tick(double dtime, const px::V2 &point);
         void center(const px::V2 &point);  
     private:  
         bool set_offset (px::V2 offs);  
         int m_hoff, m_voff;  
426      };      };
427    
428      class Follower_Scrolling : public Follower {      class Follower_Scrolling : public Follower {

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

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