Changeset 17 for abuse/trunk/src/old_earth_menu.cpp
- Timestamp:
- Nov 10, 2005, 9:41:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/old_earth_menu.cpp
r2 r17 35 35 for (y=y1;y<=y2;y++) 36 36 { 37 u nsigned char*sl=screen->scan_line(y)+x1;37 uint8_t *sl=screen->scan_line(y)+x1; 38 38 for (x=x1;x<=x2;x++,sl++) 39 39 { 40 u nsigned char *paddr=(unsigned char*)pal->addr()+(*sl)*3;41 u nsigned charr=((*(paddr++))-r_to)*percent/256+r_to;42 u nsigned charg=((*(paddr++))-g_to)*percent/256+g_to;43 u nsigned charb=((*(paddr++))-b_to)*percent/256+b_to;40 uint8_t *paddr=(uint8_t *)pal->addr()+(*sl)*3; 41 uint8_t r=((*(paddr++))-r_to)*percent/256+r_to; 42 uint8_t g=((*(paddr++))-g_to)*percent/256+g_to; 43 uint8_t b=((*(paddr++))-b_to)*percent/256+b_to; 44 44 *sl=color_table->lookup_color((r)>>3,(g)>>3,(b)>>3); 45 45 } … … 61 61 for (y=y1;y<=y2;y++) 62 62 { 63 u nsigned char*sl=screen->scan_line(y)+x1;63 uint8_t *sl=screen->scan_line(y)+x1; 64 64 for (x=x1;x<=x2;x++,sl++) 65 65 { 66 u nsigned char *paddr=(unsigned char*)pal->addr()+(*sl)*3;67 u nsigned charr=(*(paddr++))*amount/256;68 u nsigned charg=(*(paddr++))*amount/256;69 u nsigned charb=(*(paddr++))*amount/256;66 uint8_t *paddr=(uint8_t *)pal->addr()+(*sl)*3; 67 uint8_t r=(*(paddr++))*amount/256; 68 uint8_t g=(*(paddr++))*amount/256; 69 uint8_t b=(*(paddr++))*amount/256; 70 70 *sl=color_table->lookup_color((r)>>3,(g)>>3,(b)>>3); 71 71 } … … 251 251 { 252 252 int x,size; 253 u short *remap;253 uint16_t *remap; 254 254 } ; 255 255 … … 261 261 int x1=10000,x2=0; 262 262 int iw=im->width(); 263 u short r,co,off,cc;263 uint16_t r,co,off,cc; 264 264 int y=0; 265 265 for (;y<mask_height;y++) 266 266 { 267 267 mask_line *n=p+y; 268 u char*sl=screen->scan_line(y+sy)+sx+n->x;269 u char*sl2=im->scan_line(y);270 // u char*sl3=clouds->scan_line(y);271 u short *rem=n->remap;268 uint8_t *sl=screen->scan_line(y+sy)+sx+n->x; 269 uint8_t *sl2=im->scan_line(y); 270 // uint8_t *sl3=clouds->scan_line(y); 271 uint16_t *rem=n->remap; 272 272 if (sx+n->x<x1) x1=sx+n->x; 273 273 int x=0; … … 301 301 { 302 302 // find the start of the run.. 303 u char*sl=mask->scan_line(y);303 uint8_t *sl=mask->scan_line(y); 304 304 int x=0; 305 305 while (*sl==0) { sl++; x++; } … … 313 313 314 314 // now calculate remap for line 315 p[y].remap=(u short *)jmalloc(size*2,"mask remap");316 u short *rem=p[y].remap;315 p[y].remap=(uint16_t *)jmalloc(size*2,"mask remap"); 316 uint16_t *rem=p[y].remap; 317 317 for (x=0;x<size;x++,rem++) 318 318 { … … 508 508 ico_button *buts[MENU_TICONS]; 509 509 510 longmaxx=0,maxy=0;510 int32_t maxx=0,maxy=0; 511 511 int i=0; 512 512 for (;i<MENU_TICONS;i++) … … 519 519 menu_icons[i*3+2]=cash.reg("art/icons.spe",name,SPEC_IMAGE,1); 520 520 521 longx=WINDOW_FRAME_LEFT+(i%9)*cash.img(menu_icons[0])->width();522 longy=WINDOW_FRAME_TOP+(i/9)*cash.img(menu_icons[0])->height();521 int32_t x=WINDOW_FRAME_LEFT+(i%9)*cash.img(menu_icons[0])->width(); 522 int32_t y=WINDOW_FRAME_TOP+(i/9)*cash.img(menu_icons[0])->height(); 523 523 if (x>maxx) maxx=x; 524 524 if (y>maxy) maxy=y; … … 587 587 event ev; 588 588 // main_pm->draw(screen,eh,1); 589 longx=84,y=60;589 int32_t x=84,y=60; 590 590 Cell *v=find_symbol("earth_x"); 591 591 if (v && DEFINEDP(v)) x=lnumber_value(symbol_value(v));
Note: See TracChangeset
for help on using the changeset viewer.