/[paragui]/paragui/src/draw/drawtile.cpp
ViewVC logotype

Diff of /paragui/src/draw/drawtile.cpp

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

revision 1.3.6.1 by braindead, Fri Nov 1 10:43:36 2002 UTC revision 1.3.6.1.2.1 by braindead, Tue Dec 2 15:27:58 2003 UTC
# Line 29  Line 29 
29  */  */
30    
31  #include "pgdraw.h"  #include "pgdraw.h"
32    #include <cmath>
33    
34  using namespace std;  using namespace std;
35    
# Line 43  void PG_Draw::DrawTile(SDL_Surface* surf Line 44  void PG_Draw::DrawTile(SDL_Surface* surf
44      if (!tilemap->w || !tilemap->h || !surface->w || !surface->h)      if (!tilemap->w || !tilemap->h || !surface->w || !surface->h)
45              return;              return;
46    
47      int dx = abs(drawrect.x - ref.x);      int dx = abs((double)(drawrect.x - ref.x));
48      int dy = abs(drawrect.y - ref.y);      int dy = abs((double)(drawrect.y - ref.y));
49    
50          index1.x = dx / tilemap->w;          index1.x = dx / tilemap->w;
51          index1.y = dy / tilemap->h;          index1.y = dy / tilemap->h;

Legend:
Removed from v.1.3.6.1  
changed lines
  Added in v.1.3.6.1.2.1

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