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/particle.cpp

    r2 r17  
    105105part_frame::part_frame(bFILE *fp)
    106106{
    107   t=fp->read_long();
     107  t=fp->read_uint32();
    108108  data=(part *)jmalloc(sizeof(part)*t,"particle frame");
    109109  x1=y1=100000; x2=y2=-100000;
    110110  for (int i=0;i<t;i++)
    111111  {
    112     short x=fp->read_short();
    113     short y=fp->read_short();
     112    int16_t x=fp->read_uint16();
     113    int16_t y=fp->read_uint16();
    114114    if (x<x1) x1=x;
    115115    if (y<y1) y1=y;
     
    118118    data[i].x=x;
    119119    data[i].y=y;   
    120     data[i].color=fp->read_byte();
     120    data[i].color=fp->read_uint8();
    121121  }
    122122}
     
    156156void part_frame::draw(image *screen, int x, int y, int dir)
    157157{
    158   short cx1,cy1,cx2,cy2;
     158  int16_t cx1,cy1,cx2,cy2;
    159159  screen->get_clip(cx1,cy1,cx2,cy2);
    160160  if (x+x1>cx2 || x+x2<cx1 || y+y1>cy2 || y+y2<cy1) return ;
     
    196196void scatter_line(int x1, int y1, int x2, int y2, int c, int s)
    197197{
    198         short cx1, cy1, cx2, cy2;
     198        int16_t cx1, cy1, cx2, cy2;
    199199        screen->get_clip( cx1, cy1, cx2, cy2 );
    200200
     
    223223void ascatter_line(int x1, int y1, int x2, int y2, int c1, int c2, int s)
    224224{
    225         short cx1, cy1, cx2, cy2;
     225        int16_t cx1, cy1, cx2, cy2;
    226226        screen->get_clip( cx1, cy1, cx2, cy2 );
    227227
     
    234234
    235235        int w = screen->width();
    236         uchar *addr;
     236        uint8_t *addr;
    237237
    238238        while( t-- )
Note: See TracChangeset for help on using the changeset viewer.