enigma-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-cvs] enigma/src display.hh,1.25,1.26 display.cc,1.38,1.39


From: Daniel Heck <address@hidden>
Subject: [Enigma-cvs] enigma/src display.hh,1.25,1.26 display.cc,1.38,1.39
Date: Thu, 20 Nov 2003 20:22:36 +0000

Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv32697/src

Modified Files:
        display.hh display.cc 
Log Message:

- Changed AddEffect() to return SpriteHandle.


Index: display.hh
===================================================================
RCS file: /cvsroot/enigma/enigma/src/display.hh,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** display.hh  16 Nov 2003 19:20:27 -0000      1.25
--- display.hh  20 Nov 2003 20:22:33 -0000      1.26
***************
*** 152,156 ****
      };
  
!     void AddEffect (const px::V2 &pos, const char *modelname);
  
      /*! Create a new sprite.  If modelname==0, the sprite is considered
--- 152,157 ----
      };
  
!     /*! Add a new effect sprite. */
!     SpriteHandle AddEffect (const px::V2 &pos, const char *modelname);
  
      /*! Create a new sprite.  If modelname==0, the sprite is considered

Index: display.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/display.cc,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** display.cc  16 Nov 2003 19:17:58 -0000      1.38
--- display.cc  20 Nov 2003 20:22:34 -0000      1.39
***************
*** 377,388 ****
  }
  
! DL_Grid::~DL_Grid()
! {
      delete_sequence (m_models.begin(), m_models.end());
  }
  
! void
! DL_Grid::new_world (int w, int h)
! {
      ModelLayer::new_world (w, h);
      delete_sequence (m_models.begin(), m_models.end());
--- 377,385 ----
  }
  
! DL_Grid::~DL_Grid() {
      delete_sequence (m_models.begin(), m_models.end());
  }
  
! void DL_Grid::new_world (int w, int h) {
      ModelLayer::new_world (w, h);
      delete_sequence (m_models.begin(), m_models.end());
***************
*** 390,396 ****
  }
  
! void
! DL_Grid::mark_redraw (int x, int y)
! {
      get_engine()->mark_redraw_area (WorldArea (x, y, 2, 2));
  }
--- 387,391 ----
  }
  
! void DL_Grid::mark_redraw (int x, int y) {
      get_engine()->mark_redraw_area (WorldArea (x, y, 2, 2));
  }
***************
*** 572,578 ****
  }
  
! void
! DL_Sprites::replace_sprite (SpriteId id, Model *m)
! {
      Sprite *sprite = sprites[id];
  
--- 567,571 ----
  }
  
! void DL_Sprites::replace_sprite (SpriteId id, Model *m) {
      Sprite *sprite = sprites[id];
  
***************
*** 606,619 ****
  
  
! void
! DL_Sprites::draw_onepass (px::GC &gc) //, const WorldArea &a, int /*x*/, int 
/*y*/)
! {
  //    clip (gc, get_engine()->world_to_screen(a));
      draw_sprites (false, gc);
  }
  
! void
! DL_Sprites::draw_sprites (bool shades, GC &gc)
! {
      SpriteList &sl = sprites;
  
--- 599,609 ----
  
  
! void DL_Sprites::draw_onepass (px::GC &gc) {
!     //, const WorldArea &a, int /*x*/, int /*y*/) {
  //    clip (gc, get_engine()->world_to_screen(a));
      draw_sprites (false, gc);
  }
  
! void DL_Sprites::draw_sprites (bool shades, GC &gc) {
      SpriteList &sl = sprites;
  
***************
*** 640,646 ****
  }
  
! void
! DL_Sprites::redraw_sprite_region (SpriteId id)
! {
      Sprite *s = sprites[id];
      int x1 = static_cast<int> (s->pos[0]-0.5);
--- 630,634 ----
  }
  
! void DL_Sprites::redraw_sprite_region (SpriteId id) {
      Sprite *s = sprites[id];
      int x1 = static_cast<int> (s->pos[0]-0.5);
***************
*** 689,695 ****
     as possible.
  */
! void
! DL_Lines::mark_redraw_line (const Line &r)
! {
      const double maxboxsize = 1.0; //0.5;
  
--- 677,681 ----
     as possible.
  */
! void DL_Lines::mark_redraw_line (const Line &r) {
      const double maxboxsize = 1.0; //0.5;
  
***************
*** 748,754 ****
  }
  
! void
! DL_Lines::kill_line (unsigned id)
! {
      mark_redraw_line (m_rubbers[id]);
      LineMap::iterator i=m_rubbers.find(id);
--- 734,738 ----
  }
  
! void DL_Lines::kill_line (unsigned id) {
      mark_redraw_line (m_rubbers[id]);
      LineMap::iterator i=m_rubbers.find(id);
***************
*** 915,921 ****
  }
  
! void
! StoneShadowCache::clear()
! {
      for (CacheList::iterator i = m_cache.begin(); i!=m_cache.end(); ++i)
          delete (*i)->image;
--- 899,903 ----
  }
  
! void StoneShadowCache::clear() {
      for (CacheList::iterator i = m_cache.begin(); i!=m_cache.end(); ++i)
          delete (*i)->image;
***************
*** 1088,1094 ****
  }
  
! void
! DL_Shadows::new_world(int /*w*/, int /*h*/)
! {
      m_cache->clear();
  }
--- 1070,1074 ----
  }
  
! void DL_Shadows::new_world(int /*w*/, int /*h*/) {
      m_cache->clear();
  }
***************
*** 1247,1260 ****
  }
  
! void
! Follower::center(const px::V2 &point)
! {
      set_offset(V2 (int(point[0] / m_hoff) * m_hoff,
                   int(point[1] / m_voff) * m_voff));
  }
  
! bool
! Follower::set_offset (V2 offs)
! {
      DisplayEngine *e = get_engine();
      offs[0] = max (offs[0], 0.0);
--- 1227,1236 ----
  }
  
! void Follower::center(const px::V2 &point) {
      set_offset(V2 (int(point[0] / m_hoff) * m_hoff,
                   int(point[1] / m_voff) * m_voff));
  }
  
! bool Follower::set_offset (V2 offs) {
      DisplayEngine *e = get_engine();
      offs[0] = max (offs[0], 0.0);
***************
*** 1274,1282 ****
  
  
! /* Determine whether the screen must be scrolled or not, and change
!    the coordinate origin of the screen accordingly. */
! void
! Follower_Screen::tick(double, const px::V2 &point)
! {
      DisplayEngine *engine = get_engine();
      ScreenArea gamearea = engine->get_area();
--- 1250,1256 ----
  
  
! /*! Determine whether the screen must be scrolled or not, and change
!   the coordinate origin of the screen accordingly. */
! void Follower_Screen::tick(double, const px::V2 &point) {
      DisplayEngine *engine = get_engine();
      ScreenArea gamearea = engine->get_area();
***************
*** 1471,1490 ****
  }
  
! void
! CommonDisplay::new_world (int w, int h)
! {
      get_engine()->new_world (w, h);
  }
  
! void
! CommonDisplay::redraw()
! {
      get_engine()->update_screen();
  }
  
  
! void
! CommonDisplay::set_floor (int x, int y, Model *m)
! {
      floor_layer->set_model (x, y, m);
  }
--- 1445,1458 ----
  }
  
! void CommonDisplay::new_world (int w, int h) {
      get_engine()->new_world (w, h);
  }
  
! void CommonDisplay::redraw() {
      get_engine()->update_screen();
  }
  
  
! void CommonDisplay::set_floor (int x, int y, Model *m) {
      floor_layer->set_model (x, y, m);
  }
***************
*** 1598,1603 ****
  }
  
! void
! GameDisplay::redraw(px::Screen *screen)
  {
      GC gc(screen->get_surface());
--- 1566,1570 ----
  }
  
! void GameDisplay::redraw(px::Screen *screen)
  {
      GC gc(screen->get_surface());
***************
*** 1627,1632 ****
  }
  
! void
! GameDisplay::draw_all (GC &gc)
  {
      get_engine()->draw_all(gc);
--- 1594,1598 ----
  }
  
! void GameDisplay::draw_all (GC &gc)
  {
      get_engine()->draw_all(gc);
***************
*** 1673,1679 ****
  //----------------------------------------------------------------------
  
! void
! display::Init()
! {
      InitModels();
  
--- 1639,1643 ----
  //----------------------------------------------------------------------
  
! void display::Init() {
      InitModels();
  
***************
*** 1682,1688 ****
  }
  
! void
! display::Shutdown()
! {
      delete gamedpy;
      ShutdownModels();
--- 1646,1650 ----
  }
  
! void display::Shutdown() {
      delete gamedpy;
      ShutdownModels();
***************
*** 1737,1742 ****
  }
  
! void display::AddEffect (const V2& pos, const char *modelname) {
!     gamedpy->add_effect (pos, MakeModel(modelname));
  }
  
--- 1699,1704 ----
  }
  
! SpriteHandle display::AddEffect (const V2& pos, const char *modelname) {
!     return gamedpy->add_effect (pos, MakeModel(modelname));
  }
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]