Ignore:
Timestamp:
Nov 10, 2005, 8:08:09 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • shitloads of long -> int32_t changes for 64 bit safety.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/collide.cpp

    r4 r16  
    55{
    66  public :
    7   long total,x1,y1,x2,y2;
     7  int32_t total,x1,y1,x2,y2;
    88  game_object **touch; 
    99  collide_patch *next;
    10   collide_patch(long X1, long Y1, long X2, long Y2, collide_patch *Next)
     10  collide_patch(int32_t X1, int32_t Y1, int32_t X2, int32_t Y2, collide_patch *Next)
    1111  {
    1212    x1=X1; y1=Y1; x2=X2; y2=Y2;
     
    1515    touch=NULL;
    1616  }
    17   void add_collide(long X1, long Y1, long X2, long Y2, game_object *who);
     17  void add_collide(int32_t X1, int32_t Y1, int32_t X2, int32_t Y2, game_object *who);
    1818  collide_patch *copy(collide_patch *Next);
    1919  ~collide_patch() { if (total) jfree(touch); }
     
    3636
    3737
    38 void add_collide(collide_patch *&first, long x1, long y1, long x2, long y2,
     38void add_collide(collide_patch *&first, int32_t x1, int32_t y1, int32_t x2, int32_t y2,
    3939                            game_object *who)
    4040{
     
    148148{
    149149  game_object *target,*rec,*subject;
    150   long sx1,sy1,sx2,sy2,tx1,ty1,tx2,ty2,hitx=0,hity=0,t_centerx;
     150  int32_t sx1,sy1,sx2,sy2,tx1,ty1,tx2,ty2,hitx=0,hity=0,t_centerx;
    151151
    152152  for (int l=0;l<attack_total;l++)
     
    184184            for (t_dat=t_damage->data,j=(int)t_damage->tot-1;j>0 && !rec;j--)
    185185            {
    186               long x1,y1,x2,y2,          // define the two line segments to check
     186              int32_t x1,y1,x2,y2,          // define the two line segments to check
    187187              xp1,yp1,xp2,yp2;
    188188
     
    200200              // ok, now we know which line segemnts to check for intersection
    201201              // now check to see if (x1,y1-x2,y2) intercest with (xp1,yp1-xp2,yp2)
    202               int _x2=x2,_y2=y2;             
     202              int32_t _x2=x2,_y2=y2;         
    203203              setback_intersect(x1, y1, x2, y2, xp1, yp1, xp2, yp2,0);
    204204
Note: See TracChangeset for help on using the changeset viewer.