Changeset 17 for abuse/trunk/src/particle.cpp
- Timestamp:
- Nov 10, 2005, 9:41:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/particle.cpp
r2 r17 105 105 part_frame::part_frame(bFILE *fp) 106 106 { 107 t=fp->read_ long();107 t=fp->read_uint32(); 108 108 data=(part *)jmalloc(sizeof(part)*t,"particle frame"); 109 109 x1=y1=100000; x2=y2=-100000; 110 110 for (int i=0;i<t;i++) 111 111 { 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(); 114 114 if (x<x1) x1=x; 115 115 if (y<y1) y1=y; … … 118 118 data[i].x=x; 119 119 data[i].y=y; 120 data[i].color=fp->read_ byte();120 data[i].color=fp->read_uint8(); 121 121 } 122 122 } … … 156 156 void part_frame::draw(image *screen, int x, int y, int dir) 157 157 { 158 short cx1,cy1,cx2,cy2;158 int16_t cx1,cy1,cx2,cy2; 159 159 screen->get_clip(cx1,cy1,cx2,cy2); 160 160 if (x+x1>cx2 || x+x2<cx1 || y+y1>cy2 || y+y2<cy1) return ; … … 196 196 void scatter_line(int x1, int y1, int x2, int y2, int c, int s) 197 197 { 198 short cx1, cy1, cx2, cy2;198 int16_t cx1, cy1, cx2, cy2; 199 199 screen->get_clip( cx1, cy1, cx2, cy2 ); 200 200 … … 223 223 void ascatter_line(int x1, int y1, int x2, int y2, int c1, int c2, int s) 224 224 { 225 short cx1, cy1, cx2, cy2;225 int16_t cx1, cy1, cx2, cy2; 226 226 screen->get_clip( cx1, cy1, cx2, cy2 ); 227 227 … … 234 234 235 235 int w = screen->width(); 236 u char*addr;236 uint8_t *addr; 237 237 238 238 while( t-- )
Note: See TracChangeset
for help on using the changeset viewer.