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

Diff of /enigma/src/display.cc

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

revision 1.30 by dheck, Thu Jul 3 21:46:32 2003 UTC revision 1.31 by reallysoft, Sat Jul 5 08:25:39 2003 UTC
# Line 575  DL_Sprites::kill_sprite (SpriteId id) Line 575  DL_Sprites::kill_sprite (SpriteId id)
575      }      }
576  }  }
577    
578  void  void
579  DL_Sprites::draw (px::GC &gc, const WorldArea &a, int x, int y)  DL_Sprites::draw (px::GC &/*gc*/, const WorldArea &/*a*/, int /*x*/, int /*y*/)
580  {}  {}
581    
582    
# Line 824  namespace display Line 824  namespace display
824      inline bool only_image_shadows (Model *models[4], ImageQuad &q) {      inline bool only_image_shadows (Model *models[4], ImageQuad &q) {
825          int nimages=4;          int nimages=4;
826    
827          for (int i=0; i<4; ++i)          for (int i=0; i<4; ++i)
828          {          {
829              if (models[i] == 0)              if (models[i] == 0)
830              {              {
# Line 965  StoneShadowCache::find_in_cache (const I Line 965  StoneShadowCache::find_in_cache (const I
965      return 0;      return 0;
966  }  }
967    
968  /*  /*
969   * Try to lookup the shadow created by the four models in `models[]' in the   * Try to lookup the shadow created by the four models in `models[]' in the
970   * shadow cache.  Of course, because shadows aren't easy in general, there   * shadow cache.  Of course, because shadows aren't easy in general, there
971   * are a few complications.   * are a few complications.
# Line 981  StoneShadowCache::retrieve (Model *model Line 981  StoneShadowCache::retrieve (Model *model
981      ImageQuad images;      ImageQuad images;
982    
983      // Only cache static stone shadows, i.e., those consisting      // Only cache static stone shadows, i.e., those consisting
984      // only of Image models.        // only of Image models.
985      if (only_image_shadows (models, images)) {      if (only_image_shadows (models, images)) {
986          shadow = find_in_cache(images);          shadow = find_in_cache(images);
987          if (!shadow) {          if (!shadow) {
# Line 1096  Model * Line 1096  Model *
1096  DL_Shadows::get_shadow_model(int x, int y)  DL_Shadows::get_shadow_model(int x, int y)
1097  {  {
1098      if (x >= 0 && y >= 0) {      if (x >= 0 && y >= 0) {
1099          if (Model *m = m_grid->get_model(x,y))          if (Model *m = m_grid->get_model(x,y))
1100              return m; //return m->get_shadow();              return m; //return m->get_shadow();
1101      }      }
1102      return 0;      return 0;
# Line 1214  Follower::Follower (DisplayEngine *e) Line 1214  Follower::Follower (DisplayEngine *e)
1214  void  void
1215  Follower::center(const px::V2 &point)  Follower::center(const px::V2 &point)
1216  {  {
1217      set_offset(V2 (int(point[0] / m_hoff) * m_hoff,      set_offset(V2 (int(point[0] / m_hoff) * m_hoff,
1218                     int(point[1] / m_voff) * m_voff));                     int(point[1] / m_voff) * m_voff));
1219  }  }
1220    
# Line 1268  Follower_Screen::tick(double, const px:: Line 1268  Follower_Screen::tick(double, const px::
1268              engine->mark_redraw_screen();              engine->mark_redraw_screen();
1269          else          else
1270              break;              break;
1271      }      }
1272  }  }
1273    
1274    
# Line 1279  Follower_Scrolling::Follower_Scrolling(D Line 1279  Follower_Scrolling::Follower_Scrolling(D
1279    scrollspeed(0), resttime(0)    scrollspeed(0), resttime(0)
1280  {}  {}
1281    
1282  void  void
1283  Follower_Scrolling::center(const px::V2 &point)  Follower_Scrolling::center(const px::V2 &point)
1284  {  {
1285      Follower::center(point);      Follower::center(point);
# Line 1526  GameDisplay::set_follow_mode (FollowMode Line 1526  GameDisplay::set_follow_mode (FollowMode
1526  {  {
1527      switch (m) {      switch (m) {
1528      case FOLLOW_NONE: set_follower(0); break;      case FOLLOW_NONE: set_follower(0); break;
1529      case FOLLOW_SCROLLING:      case FOLLOW_SCROLLING:
1530          set_follower (new Follower_Scrolling(get_engine())); break;          set_follower (new Follower_Scrolling(get_engine())); break;
1531      case FOLLOW_SCREEN:      case FOLLOW_SCREEN:
1532          set_follower (new Follower_Screen(get_engine())); break;          set_follower (new Follower_Screen(get_engine())); break;
1533      };      };
1534  }  }
# Line 1604  GameDisplay::draw_all (GC &gc) Line 1604  GameDisplay::draw_all (GC &gc)
1604      draw_borders(gc);      draw_borders(gc);
1605  }  }
1606    
1607  void  void
1608  GameDisplay::draw_borders (GC &gc)  GameDisplay::draw_borders (GC &gc)
1609  {  {
1610      RectList rl;      RectList rl;

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

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