Ignore:
Timestamp:
Mar 2, 2008, 4:41:48 PM (12 years ago)
Author:
Sam Hocevar
Message:
  • Make a few symbols static (Ref #7).
File:
1 edited

Legend:

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

    r58 r60  
    5252  for (y=y1;y<=y2;y++)
    5353  {
    54     unsigned char *sl=screen->scan_line(y)+x1;
     54    uint8_t *sl=screen->scan_line(y)+x1;
    5555    for (x=x1;x<=x2;x++,sl++)
    5656    {
    57       unsigned char *paddr=(unsigned char *)pal->addr()+(*sl)*3;
    58       unsigned char r=((*(paddr++))-r_to)*percent/256+r_to;
    59       unsigned char g=((*(paddr++))-g_to)*percent/256+g_to;
    60       unsigned char b=((*(paddr++))-b_to)*percent/256+b_to;
     57      uint8_t *paddr=(uint8_t *)pal->addr()+(*sl)*3;
     58      uint8_t r=((*(paddr++))-r_to)*percent/256+r_to;
     59      uint8_t g=((*(paddr++))-g_to)*percent/256+g_to;
     60      uint8_t b=((*(paddr++))-b_to)*percent/256+b_to;
    6161      *sl=color_table->lookup_color((r)>>3,(g)>>3,(b)>>3);
    6262    }
     
    7878  for (y=y1;y<=y2;y++)
    7979  {
    80     unsigned char *sl=screen->scan_line(y)+x1;
     80    uint8_t *sl=screen->scan_line(y)+x1;
    8181    for (x=x1;x<=x2;x++,sl++)
    8282    {
    83       unsigned char *paddr=(unsigned char *)pal->addr()+(*sl)*3;
    84       unsigned char r=(*(paddr++))*amount/256;
    85       unsigned char g=(*(paddr++))*amount/256;
    86       unsigned char b=(*(paddr++))*amount/256;
     83      uint8_t *paddr=(uint8_t *)pal->addr()+(*sl)*3;
     84      uint8_t r=(*(paddr++))*amount/256;
     85      uint8_t g=(*(paddr++))*amount/256;
     86      uint8_t b=(*(paddr++))*amount/256;
    8787      *sl=color_table->lookup_color((r)>>3,(g)>>3,(b)>>3);
    8888    }
Note: See TracChangeset for help on using the changeset viewer.