/[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.8 by reallysoft, Mon May 19 12:14:35 2003 UTC revision 1.9 by dheck, Fri Jun 13 17:02:58 2003 UTC
# Line 52  namespace display Line 52  namespace display
52          */          */
53          void add_layer (DisplayLayer *l);          void add_layer (DisplayLayer *l);
54          void set_tilesize (int w, int h) { m_tilew=w; m_tileh=h; }          void set_tilesize (int w, int h) { m_tilew=w; m_tileh=h; }
55            int get_tilew () const { return m_tilew; }
56            int get_tileh () const { return m_tileh; }
57          void set_screen_area (const px::Rect & r);          void set_screen_area (const px::Rect & r);
58          px::Rect get_area() const { return m_area; }          const px::Rect &get_area() const { return m_area; }
59    
60          int get_width() const { return m_width; }          int get_width() const { return m_width; }
61          int get_height() const { return m_height; }          int get_height() const { return m_height; }
# Line 335  namespace display Line 337  namespace display
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    
         void draw_lines (px::GC &gc);  
   
   
340          RubberHandle add_line (const V2 &p1, const V2 &p2);          RubberHandle add_line (const V2 &p1, const V2 &p2);
341          void set_startpoint (unsigned id, const V2 &p1);          void set_startpoint (unsigned id, const V2 &p1);
342          void set_endpoint (unsigned id, const V2 &p2);          void set_endpoint (unsigned id, const V2 &p2);
# Line 401  namespace display Line 400  namespace display
400  //----------------------------------------  //----------------------------------------
401      class Follower {      class Follower {
402      public:      public:
403            Follower (DisplayEngine *e) { m_engine = e; }
404          virtual ~Follower() {}          virtual ~Follower() {}
405          virtual void tick(double dtime, const px::V2 &point) = 0;          virtual void tick(double dtime, const px::V2 &point) = 0;
406          virtual void center(const px::V2 &point) = 0;          virtual void center(const px::V2 &point) = 0;
407    
408          void set_engine(DisplayEngine *e) { m_engine = e; }  //         void set_engine(DisplayEngine *e) { m_engine = e; }
409          DisplayEngine *get_engine() const { return m_engine; }          DisplayEngine *get_engine() const { return m_engine; }
410      private:      private:
411          DisplayEngine *m_engine;          DisplayEngine *m_engine;
# Line 413  namespace display Line 413  namespace display
413    
414      class Follower_Screen : public Follower {      class Follower_Screen : public Follower {
415      public:      public:
416            Follower_Screen(DisplayEngine *e);
417          void tick(double dtime, const px::V2 &point);          void tick(double dtime, const px::V2 &point);
418          void center(const px::V2 &point);          void center(const px::V2 &point);
419        private:
420            bool set_offset (px::V2 offs);
421            int m_hoff, m_voff;
422      };      };
423    
424      class Follower_Scrolling : public Follower {      class Follower_Scrolling : public Follower {
425      public:      public:
426          Follower_Scrolling();          Follower_Scrolling(DisplayEngine *e);
427          void tick(double dtime, const px::V2 &point);          void tick(double dtime, const px::V2 &point);
428          void center(const px::V2 &point);          void center(const px::V2 &point);
429      private:      private:
# Line 440  namespace display Line 444  namespace display
444          void tick(double dtime);          void tick(double dtime);
445          void new_world (int w, int h);          void new_world (int w, int h);
446    
447            void resize_game_area (int w, int h);
448    
449          /*          /*
450          ** Scrolling          ** Scrolling
451          */          */
# Line 456  namespace display Line 462  namespace display
462          void draw_all (px::GC &gc);          void draw_all (px::GC &gc);
463      private:      private:
464          void set_follower (Follower *f);          void set_follower (Follower *f);
465            void draw_borders (px::GC &gc);
466    
467          /*          /*
468          ** Variables          ** Variables

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

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