Ignore:
Timestamp:
Nov 10, 2005, 9:41:13 PM (17 years ago)
Author:
Sam Hocevar
Message:
  • absolute shitloads of 64 bit fixes.
File:
1 edited

Legend:

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

    r2 r17  
    1818    }
    1919
    20     inside=(unsigned char *)jmalloc(tot,"Boundary point list"); 
     20    inside=(uint8_t *)jmalloc(tot,"Boundary point list"); 
    2121  }
    2222
    23   unsigned char *point_on;
     23  uint8_t *point_on;
    2424 
    2525  for (i=0,point_on=data;i<tot-1;i++)
     
    3434
    3535    int j,xp1,yp1,xp2,yp2,maxx,maxy,minx,miny;   
    36     unsigned char *point2,segs_left=0,segs_right=0,segs_down=0;   
     36    uint8_t *point2,segs_left=0,segs_right=0,segs_down=0;   
    3737    int skip_next=0;   
    3838    int check_left=0,check_right=0,check_down=0;
     
    101101{
    102102  int x1,y1,x2,y2,checkx,checky,i; 
    103   unsigned char *point_on; 
     103  uint8_t *point_on; 
    104104  if (tot)
    105105  {
    106     inside=(unsigned char *)jmalloc(tot,"Boundary point list"); 
     106    inside=(uint8_t *)jmalloc(tot,"Boundary point list"); 
    107107  } else inside=NULL;
    108108  for (i=0,point_on=data;i<tot-1;i++)
     
    117117
    118118    int j,xp1,yp1,xp2,yp2,maxx,maxy,minx,miny;   
    119     unsigned char *point2,segs_left=0,segs_right=0,segs_down=0;   
     119    uint8_t *point2,segs_left=0,segs_right=0,segs_down=0;   
    120120    int skip_next=0;   
    121121    int check_left=0,check_right=0,check_down=0;
     
    186186{
    187187  im=load_image(fp);
    188   next=fp->read_short();
     188  next=fp->read_uint16();
    189189}
    190190
     
    192192{
    193193  im=load_image(e,fp);
    194   next=fp->read_short();
     194  next=fp->read_uint16();
    195195}
    196196
    197197foretile::foretile(bFILE *fp)
    198198{
    199   unsigned char *sl;
     199  uint8_t *sl;
    200200  image *img=load_image(fp);
    201201
     
    203203  // create the micro image of the fore tile by aveginging the color values in 2 x 2 space
    204204  // and storeing teh closest match
    205 //  unsigned char *buffer=(unsigned char *)&micro_image;
     205//  uint8_t *buffer=(uint8_t *)&micro_image;
    206206  int x,y,w=img->width(),h=img->height(),l;
    207207  int r[AUTOTILE_WIDTH*AUTOTILE_HEIGHT],
     
    250250  delete img;
    251251
    252   next=fp->read_short();
     252  next=fp->read_uint16();
    253253  fp->read(&damage,1);
    254254
     
    285285    point_list p(fp);
    286286    advance=0;
    287   } else advance=fp->read_byte();
     287  } else advance=fp->read_uint8();
    288288 
    289289  f_damage=new boundary(fp,"fig bound");
     
    296296{
    297297  palette *p=new palette(fp);
    298   uchar *t=data,*p_addr=(uchar *)p->addr();
     298  uint8_t *t=data,*p_addr=(uint8_t *)p->addr();
    299299  for (int i=0;i<256;i++,t++,p_addr+=3) 
    300300    *t=pal->find_closest(*p_addr,p_addr[1],p_addr[2]);
Note: See TracChangeset for help on using the changeset viewer.