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

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/morph.cpp

    r2 r17  
    355355    for (i=0;i<total;i++)
    356356    {
    357       ((morph_point16 *)p+i)->x1=fp->read_short();
    358       ((morph_point16 *)p+i)->y1=fp->read_short();
    359       ((morph_point16 *)p+i)->x2=fp->read_short();
    360       ((morph_point16 *)p+i)->y2=fp->read_short();
     357      ((morph_point16 *)p+i)->x1=fp->read_uint16();
     358      ((morph_point16 *)p+i)->y1=fp->read_uint16();
     359      ((morph_point16 *)p+i)->x2=fp->read_uint16();
     360      ((morph_point16 *)p+i)->y2=fp->read_uint16();
    361361      fp->read( &((morph_point16 *)p+i)->start_color,1);
    362362      fp->read( &((morph_point16 *)p+i)->end_color,1);
     
    365365    small=0;
    366366  }
    367   w[0]=fp->read_short();
    368   h[0]=fp->read_short(); 
    369   w[1]=fp->read_short();
    370   h[1]=fp->read_short();
     367  w[0]=fp->read_uint16();
     368  h[0]=fp->read_uint16(); 
     369  w[1]=fp->read_uint16();
     370  h[1]=fp->read_uint16();
    371371}
    372372
     
    678678
    679679 
    680   fp->write_long(total); 
     680  fp->write_uint32(total); 
    681681  if (small)
    682682  {
     
    691691  {
    692692    for (i=0;i<total;i++)
    693     { fp->write_short(((morph_point16 *)p+i)->x1);
    694       fp->write_short(((morph_point16 *)p+i)->y1);
    695       fp->write_short(((morph_point16 *)p+i)->x2);
    696       fp->write_short(((morph_point16 *)p+i)->y2);
     693    { fp->write_uint16(((morph_point16 *)p+i)->x1);
     694      fp->write_uint16(((morph_point16 *)p+i)->y1);
     695      fp->write_uint16(((morph_point16 *)p+i)->x2);
     696      fp->write_uint16(((morph_point16 *)p+i)->y2);
    697697      fp->write( &((morph_point16 *)p+i)->start_color,1);
    698698      fp->write( &((morph_point16 *)p+i)->end_color,1);
    699699    }
    700700  }
    701   fp->write_short(w[0]);
    702   fp->write_short(h[0]);
    703   fp->write_short(w[1]);
    704   fp->write_short(h[1]);
     701  fp->write_uint16(w[0]);
     702  fp->write_uint16(h[0]);
     703  fp->write_uint16(w[1]);
     704  fp->write_uint16(h[1]);
    705705  return 1;
    706706}
     
    877877  int i;
    878878 
    879   patches=fp->read_short();
     879  patches=fp->read_uint16();
    880880  pats=(morph_patch *)jmalloc(sizeof(morph_patch)*patches,"patched_morph::points");
    881881 
    882882  for (i=0;i<patches;i++)
    883883  {
    884     pats[i].patches=fp->read_short();
     884    pats[i].patches=fp->read_uint16();
    885885    if (pats[i].patches)
    886886    {     
Note: See TracChangeset for help on using the changeset viewer.