Changeset 112


Ignore:
Timestamp:
Mar 16, 2008, 12:52:51 PM (10 years ago)
Author:
Sam Hocevar
Message:
  • Fix spelling errors all over the place.
Location:
abuse/trunk/src
Files:
28 edited

Legend:

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

    r106 r112  
    801801      return make_find_symbol("LINUX");
    802802#endif
    803 
    804803#ifdef __sgi
    805804      return make_find_symbol("IRIX");
    806805#endif
    807 
     806#ifdef __WIN32
     807      return make_find_symbol("WIN32");
     808#endif
    808809    } break;
    809810    case 26 :
  • abuse/trunk/src/cop.cpp

    r106 r112  
    671671      if (!o->controller() || o->controller()->key_down(JK_SPACE))
    672672      {
    673         eval_function((lisp_symbol *)l_restart_player,NULL);  // call teh user function to reset the player
     673        // call the user function to reset the player
     674        eval_function((lisp_symbol *)l_restart_player,NULL);
    674675        o->controller()->reset_player();
    675676        o->set_aistate(0);     
     
    10541055  y+=fnt->height();
    10551056
    1056   screen->wiget_bar(x,y+2,x+strlen(header_str)*fnt->width(),y+fnt->height()-3,
     1057  screen->widget_bar(x,y+2,x+strlen(header_str)*fnt->width(),y+fnt->height()-3,
    10571058                     wm->bright_color(),wm->medium_color(),wm->dark_color());
    10581059  y+=fnt->height();
  • abuse/trunk/src/game.cpp

    r111 r112  
    458458void game::joy_calb(event &ev)
    459459{
    460     if(!joy_win) // make sure the joy stick calibration window is open
     460    if(!joy_win) // make sure the joystick calibration window is open
    461461        return;
    462462
    463     if(ev.type == EV_SPURIOUS) // spurious means we should update your status
     463    if(ev.type == EV_SPURIOUS) // spurious means we should update our status
    464464    {
    465465        int b1, b2, b3 = 0, x, y;
     
    24502450      else
    24512451      {
    2452                 dprintf("Unable to attach to server, quiting\n");
     2452                dprintf("Unable to attach to server, quitting\n");
    24532453                exit(0);
    24542454      }
     
    24592459      if(!strcmp(argv[i], "-fs"))
    24602460      if(!set_file_server(argv[i + 1]))
    2461       dprintf("could not set defualt file server to %s\n", argv[i + 1]);
     2461      dprintf("could not set default file server to %s\n", argv[i + 1]);
    24622462    }
    24632463  }
  • abuse/trunk/src/imlib/decoder.cpp

    r2 r112  
    6868
    6969/* The following static variables are used
    70  * for seperating out codes
     70 * for separating out codes
    7171 */
    7272short navail_bytes = 0;              /* # bytes left in block */
     
    175175
    176176
    177 /* The reason we have these seperated like this instead of using
     177/* The reason we have these separated like this instead of using
    178178 * a structure like the original Wilhite code did, is because this
    179179 * stuff generally produces significantly faster code when compiled...
     
    192192 * in the GIF spec.  Every *linewidth* "characters" (ie. pixels) decoded
    193193 * will generate a call to out_line(), which is a user specific function
    194  * to display a line of pixels.  The function gets it's codes from
     194 * to display a line of pixels.  The function gets its codes from
    195195 * get_next_code() which is responsible for reading blocks of data and
    196  * seperating them into the proper size codes.  Finally, get_byte() is
     196 * separating them into the proper size codes.  Finally, get_byte() is
    197197 * the global routine to read the next byte from the GIF file.
    198198 *
     
    282282          * to color zero.
    283283          */
    284         CONDITION(c<slot,"Error occured while reading gif");
     284        CONDITION(c<slot,"Error occurred while reading gif");
    285285         if (c >= slot)
    286286            c = 0;
  • abuse/trunk/src/imlib/image.cpp

    r56 r112  
    2828{
    2929    "No error",
    30     "Error occured while reading",
     30    "Error occurred while reading",
    3131    "Incorrect file type",
    3232    "File is corrupted",
     
    3434    "Memory allocation trouble",
    3535    "Operation/file type not supported",
    36     "Error occured while writing, (disk full?)"
     36    "Error occurred while writing, (disk full?)"
    3737};
    3838                       
     
    194194  wrd=uint16_to_intel(*up);
    195195  if (wrd!=0x01)
    196   { printf("Compiled under wrong ENDING-nes, edit system.h and try again\n");
     196  { printf("compiled with wrong endianness, edit system.h and try again\n");
    197197    printf("1 (intel) = %d\n",(int)wrd);
    198198    exit(1);
     
    722722void image::set_clip(int16_t x1, int16_t y1, int16_t x2, int16_t y2)
    723723{
    724   // If the image does not already have an Image descriptor, allocate one.
    725 
    726   if (!special)
    727   {
    728     // create a new image descriptor withj no dirty rectangle keeping
    729     special=new image_descriptor(width(),height(),0);
    730   }
    731   special->set_clip(x1,y1,x2,y2);  // set the image descriptor what the clip
    732                        // should be it will adjust to fit wiothin the image.
     724    // If the image does not already have an Image descriptor, allocate one
     725    // with no dirty rectangle keeping.
     726    if(!special)
     727        special = new image_descriptor(width(), height(), 0);
     728
     729    // set the image descriptor what the clip
     730    // should be it will adjust to fit within the image.
     731    special->set_clip(x1, y1, x2, y2);
    733732}
    734733
     
    756755  set_clip(x1,y1,x2,y2);
    757756}
    758 // this function reduces the number of dirty rectanges
    759 // to 1 by find the minmum area that can contain all the rectangles and
    760 // making this the new dirty area
     757
     758//
     759// reduce the number of dirty rectanges to 1 by finding the minmum area that
     760// can contain all the rectangles and making this the new dirty area
     761//
    761762void image_descriptor::reduce_dirties()
    762763{
     
    11441145}
    11451146
    1146 void image::wiget_bar(int16_t x1, int16_t y1, int16_t x2, int16_t y2,
     1147void image::widget_bar(int16_t x1, int16_t y1, int16_t x2, int16_t y2,
    11471148        uint8_t light, uint8_t med, uint8_t dark)
    11481149{
  • abuse/trunk/src/imlib/image.hpp

    r57 r112  
    139139  void     bar                (int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint8_t color);
    140140  void     xor_bar            (int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint8_t color);
    141   void     wiget_bar          (int16_t x1, int16_t y1, int16_t x2, int16_t y2,
     141  void     widget_bar          (int16_t x1, int16_t y1, int16_t x2, int16_t y2,
    142142                                     uint8_t light, uint8_t med, uint8_t dark);
    143143  void     line               (int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint8_t color);
  • abuse/trunk/src/imlib/input.cpp

    r109 r112  
    413413    {
    414414      screen->rectangle(x1,y1,x2,y2,wm->black());
    415 //      screen->wiget_bar(,wm->bright_color(),wm->medium_color(),wm->dark_color());
    416       screen->wiget_bar(x1+1,y1+1,x2-1,y2-1,wm->bright_color(),wm->medium_color(),wm->dark_color());
     415//      screen->widget_bar(,wm->bright_color(),wm->medium_color(),wm->dark_color());
     416      screen->widget_bar(x1+1,y1+1,x2-1,y2-1,wm->bright_color(),wm->medium_color(),wm->dark_color());
    417417      if (text)
    418418      {
  • abuse/trunk/src/imlib/jmalloc.cpp

    r90 r112  
    319319  block_size=Block_size;
    320320  addr=block;
    321   /*
    322      I'm padding each block, because I'm comparing pointers against size
    323      in jfree to determine weither a pointer is too a small object or a large alloc
    324      and it must always be true that the address of the pointer is > JM_SMALL_SIZE
    325      All systems I know start pointer address pretty high, but this is a porting consern.     
    326   */
     321  /* I'm padding each block, because I'm comparing pointers against size
     322   * in jfree to determine whether a pointer is too a small object or a large
     323   * alloc and it must always be true that the address of the pointer is
     324   * > JM_SMALL_SIZE. All systems I know start pointer address pretty high,
     325   * but this can be a portability concern. */
    327326 
    328327  slast=sfirst=(memory_node *)(((char *)block)+JM_SMALL_SIZE);   
  • abuse/trunk/src/imlib/jwindow.cpp

    r111 r112  
    235235void window_manager::move_window(jwindow *j, int x, int y)
    236236{
    237   jwindow *p;
    238   screen->add_dirty(j->x,j->y,j->x+j->l-1,j->y+j->h-1);
    239   for (p=first;p!=j;p=p->next)
    240     p->screen->add_dirty(j->x-p->x,j->y-p->y,j->x+j->l-1-p->x,j->y+j->h-1-p->y);
    241   j->x=x;
    242   j->y=y;
    243   j->screen->add_dirty(0,0,j->l-1,j->h-1);
     237    screen->add_dirty(j->x, j->y, j->x + j->l - 1, j->y + j->h - 1);
     238    for(jwindow *p = first; p != j; p = p->next)
     239        p->screen->add_dirty(j->x - p->x, j->y - p->y, j->x + j->l - 1 - p->x,
     240                             j->y + j->h - 1 - p->y);
     241    j->x = x;
     242    j->y = y;
     243    j->screen->add_dirty(0, 0, j->l - 1, j->h - 1);
    244244}
    245245
     
    483483        if (right_border() >= 1)
    484484        {
    485             screen->wiget_bar (0, 0, l - 1, h - 1, hi, med, low);
     485            screen->widget_bar (0, 0, l - 1, h - 1, hi, med, low);
    486486            if (right_border() >= 3)
    487                 screen->wiget_bar (right_border() - 1, top_border() - 1,
     487                screen->widget_bar (right_border() - 1, top_border() - 1,
    488488                                l - left_border(), h - bottom_border(), low,
    489489                                med, hi);
     
    495495      screen->rectangle (2, 2, top_border() - 2, top_border() - 3,
    496496                           wm->black ());
    497       screen->wiget_bar (3, 3, top_border() - 3, top_border() - 4, hi, med, low);     // draws the 'close' button
     497      screen->widget_bar (3, 3, top_border() - 3, top_border() - 4, hi, med, low);     // draws the 'close' button
    498498    }
    499499 
     
    502502      if (right_border() >= 1)
    503503        {
    504           screen->wiget_bar (0, 0, l - 1, h - 1, hi, med, low);
     504          screen->widget_bar (0, 0, l - 1, h - 1, hi, med, low);
    505505          if (right_border() >= 3)
    506             screen->wiget_bar (right_border() - 1, jw_top + 4,
     506            screen->widget_bar (right_border() - 1, jw_top + 4,
    507507                                l - left_border(), h - bottom_border(), low,
    508508                                med, hi);
     
    513513        }
    514514      screen->rectangle (1, 1, 4, 4, wm->black ());
    515       screen->wiget_bar (2, 2, 3, 3, hi, med, low);   // draws the 'close' button
     515      screen->widget_bar (2, 2, 3, 3, hi, med, low);   // draws the 'close' button
    516516    }
    517517  if (_name && _name[0])
  • abuse/trunk/src/imlib/linked.cpp

    r56 r112  
    1616#include "linked.hpp"
    1717
    18 // unlink take a node out of the linked list, but does not dispose of the memory
     18//
     19// take a node out of the linked list, but do not dispose of the memory
     20//
    1921int linked_list::unlink(linked_node *p)
    2022{
     
    4951
    5052
    51 // this function clears all the nodes in a linked list and dispose of the
    52 // memory for each one by calling is't destructor
     53//
     54// clear all the nodes in a linked list and dispose of the
     55// memory for each one by calling its destructor
     56//
    5357linked_list::~linked_list()
    5458{
     
    6670}
    6771
    68 // this function returns the node number a node is in a linked list
    69 // it start at the node and goes backwards until it reaches the first
    70 // node
     72//
     73// return the index of a given node in a linked list, by starting at the
     74// node and parsing backwards
     75//
    7176int linked_list::node_number(linked_node *p)
    7277{
     
    139144        q->last()->set_next(p);
    140145        q->set_last(p);
    141         q=fn->last();         // set q to the last node so we exit the loop
     146        q=fn->last();         // set q to the last node so we finish the loop
    142147      }
    143148    }
  • abuse/trunk/src/imlib/linked.hpp

    r57 r112  
    6969
    7070// this is the basic class for all linked_list
    71 // it's features should beself explanitory
     71// its features should be self-explanatory.
    7272// openly use the functions listed after the keyword PUBLIC
    7373// type conversions may be nessary if you derive a class of nodes of your own
  • abuse/trunk/src/imlib/morph.cpp

    r66 r112  
    160160            }
    161161
    162             if (*sl && tot==0)  // kill any seperate pixels         
     162            if (*sl && tot==0)  // kill any separate pixels         
    163163              mark_color=0;
    164164            else if (*sl)
  • abuse/trunk/src/imlib/pmenu.cpp

    r111 r112  
    3030  bar=wm->new_window(X, Y, w, 0, NULL);
    3131  bar->freeze();  // can't drag this window
    32   bar->screen->wiget_bar(0,0,w-1,h-1,wm->bright_color(),wm->medium_color(),
     32  bar->screen->widget_bar(0,0,w-1,h-1,wm->bright_color(),wm->medium_color(),
    3333                    wm->dark_color());
    3434
     
    197197                     NULL);
    198198  win->freeze();
    199   win->screen->wiget_bar(0,0,w-1,h-1,wm->bright_color(),wm->medium_color(),wm->dark_color());
     199  win->screen->widget_bar(0,0,w-1,h-1,wm->bright_color(),wm->medium_color(),wm->dark_color());
    200200
    201201  int has_flags=0;
     
    218218  {
    219219    int h=wm->font()->height();
    220     parent->screen->wiget_bar(x,y+h/2-1,x+w-1,y+h/2,wm->dark_color(),wm->medium_color(),wm->bright_color());
     220    parent->screen->widget_bar(x,y+h/2-1,x+w-1,y+h/2,wm->dark_color(),wm->medium_color(),wm->bright_color());
    221221  } else
    222222  {
  • abuse/trunk/src/imlib/scroller.cpp

    r106 r112  
    116116  if (sx>=t) sx=t-1;
    117117  draw(0,screen);
    118   screen->wiget_bar(b1x(),b1y(),b1x()+bw()-1,b1y()+bh()-1,
     118  screen->widget_bar(b1x(),b1y(),b1x()+bw()-1,b1y()+bh()-1,
    119119                    wm->bright_color(),wm->medium_color(),wm->dark_color());
    120   screen->wiget_bar(b2x(),b2y(),b2x()+bw()-1,b2y()+bh()-1,
     120  screen->widget_bar(b2x(),b2y(),b2x()+bw()-1,b2y()+bh()-1,
    121121                    wm->bright_color(),wm->medium_color(),wm->dark_color());
    122122  show_icon(screen,b1x()+2,b1y()+2,bw()-4,bh()-4,b1());
     
    127127  screen->bar(x1,y1,x2,y2,wm->black());
    128128  screen->bar(x1+1,y1+1,x2-1,y2-1,wm->medium_color());   
    129   draw_wiget(screen,0);
     129  draw_widget(screen,0);
    130130  scroll_event(sx,screen);
    131131}
     
    154154
    155155
    156 void scroller::draw_wiget(image *screen, int erase)
     156void scroller::draw_widget(image *screen, int erase)
    157157{
    158158  int x1,y1,x2,y2;
     
    161161    screen->bar(x1,y1,x2,y2,wm->medium_color());
    162162  else
    163     screen->wiget_bar(x1,y1,x2,y2,
     163    screen->widget_bar(x1,y1,x2,y2,
    164164                      wm->bright_color(),wm->medium_color(),wm->dark_color());
    165165}
     
    186186          if (sx>0)
    187187          {
    188             draw_wiget(screen,1);
     188            draw_widget(screen,1);
    189189            sx--;
    190             draw_wiget(screen,0);
     190            draw_widget(screen,0);
    191191            scroll_event(sx,screen);
    192192          }
     
    195195          if (sx<t-1)
    196196          {
    197             draw_wiget(screen,1);
     197            draw_widget(screen,1);
    198198            sx++;
    199             draw_wiget(screen,0);
     199            draw_widget(screen,0);
    200200            scroll_event(sx,screen);
    201201          }         
     
    219219              if (nx!=sx && nx>=0 && nx<t)
    220220              {
    221                 draw_wiget(screen,1);
     221                draw_widget(screen,1);
    222222                sx=nx;
    223                 draw_wiget(screen,0);
     223                draw_widget(screen,0);
    224224                scroll_event(sx,screen);               
    225225              }         
     
    242242        if (nx!=sx)
    243243        {
    244           draw_wiget(screen,1);
     244          draw_widget(screen,1);
    245245          sx=nx;
    246           draw_wiget(screen,0);
     246          draw_widget(screen,0);
    247247          scroll_event(sx,screen);
    248248        }
     
    281281  if (!vert && sx<t-1)
    282282  {
    283     draw_wiget(screen,1);
     283    draw_widget(screen,1);
    284284    sx++;
    285     draw_wiget(screen,0);
     285    draw_widget(screen,0);
    286286    scroll_event(sx,screen);       
    287287  }
     
    292292  if (!vert && sx>1)
    293293  {
    294     draw_wiget(screen,1);
     294    draw_widget(screen,1);
    295295    sx--;
    296     draw_wiget(screen,0);
     296    draw_widget(screen,0);
    297297    scroll_event(sx,screen);       
    298298  }
     
    303303  if (vert && sx>1)
    304304  {
    305     draw_wiget(screen,1);
     305    draw_widget(screen,1);
    306306    sx--;
    307     draw_wiget(screen,0);
     307    draw_widget(screen,0);
    308308    scroll_event(sx,screen);       
    309309  }
     
    314314  if (vert && sx<t-1)
    315315  {
    316     draw_wiget(screen,1);
     316    draw_widget(screen,1);
    317317    sx++;
    318     draw_wiget(screen,0);
     318    draw_widget(screen,0);
    319319    scroll_event(sx,screen);       
    320320  }
     
    327327  if (x!=sx)
    328328  {
    329     draw_wiget(screen,1);
     329    draw_widget(screen,1);
    330330    sx=x;
    331     draw_wiget(screen,0);
     331    draw_widget(screen,0);
    332332    scroll_event(sx,screen);       
    333333  }
     
    460460  if (cur_sel<sx)
    461461  {
    462     draw_wiget(screen,1);
     462    draw_widget(screen,1);
    463463    sx=cur_sel;
    464     draw_wiget(screen,0);
     464    draw_widget(screen,0);
    465465  }
    466466  scroll_event(sx,screen);               
     
    474474  if (cur_sel>sx+th-1)
    475475  {
    476     draw_wiget(screen,1);
     476    draw_widget(screen,1);
    477477    sx=cur_sel-th+1;
    478     draw_wiget(screen,0);
     478    draw_widget(screen,0);
    479479  }
    480480  scroll_event(sx,screen);               
     
    692692    if (cur_sel<sx)
    693693    {
    694       draw_wiget(screen,1);
     694      draw_widget(screen,1);
    695695      last_sel=sx=cur_sel;
    696       draw_wiget(screen,0);
     696      draw_widget(screen,0);
    697697    }
    698698    scroll_event(last_sel,screen);
     
    708708  if (cur_sel>sx+r-1)
    709709  {
    710     draw_wiget(screen,1);
     710    draw_widget(screen,1);
    711711    last_sel=sx=cur_sel-r+1;
    712     draw_wiget(screen,0);
     712    draw_widget(screen,0);
    713713  }
    714714  scroll_event(sx,screen);
  • abuse/trunk/src/imlib/scroller.hpp

    r106 r112  
    3333  int wig_x();
    3434  int darea() { return (l-bw()-2)-bw()-bw(); }
    35   void draw_wiget(image *screen, int erase);
     35  void draw_widget(image *screen, int erase);
    3636  int mouse_to_drag(int mx,int my);
    3737public :
  • abuse/trunk/src/imlib/specs.cpp

    r97 r112  
    843843long spec_directory::data_start_offset()
    844844{
    845   long i;
    846   for (i=0;i<total;i++)
    847     return entries[i]->offset;
    848 
    849   return SPEC_SIG_SIZE+2;     // if no entries, then no data, but return where it would
    850                               // start anyway
     845    /* FIXME: no need for a for loop here! */
     846    long i;
     847    for(i = 0; i < total; i++)
     848        return entries[i]->offset;
     849
     850    // If no entries, then no data, but return where it would start anyway
     851    return SPEC_SIG_SIZE + 2;
    851852}
    852853
    853854long spec_directory::data_end_offset()
    854855{
     856    /* FIXME: no need for a for loop here! */
    855857  spec_entry **e;
    856858  long i;
     
    995997}
    996998
    997 
    998999void note_open_fd(int fd, char const *str)
    9991000{
    1000   total_files_open++;
     1001    total_files_open++;
    10011002}
    10021003
    10031004void note_close_fd(int fd)
    10041005{
    1005   total_files_open--;
    1006 }
    1007 
     1006    total_files_open--;
     1007}
    10081008
    10091009void list_open_fds()
    10101010{
    1011   printf("Total open dos fds=%d\n",total_files_open);
    1012 }
    1013 
     1011    printf("Total open file descriptors: %d\n", total_files_open);
     1012}
     1013
  • abuse/trunk/src/imlib/specs.hpp

    r57 r112  
    104104  virtual ~bFILE();
    105105
    106 
    107   // these read and writes, allways read/write Intel endian-ness
    108   uint16_t read_uint16();
    109   uint32_t read_uint32();
    110   uint8_t read_uint8();
    111   double read_double();
    112   void write_uint16(uint16_t x);
    113   void write_uint32(uint32_t x);
    114   void write_uint8(uint8_t x);
    115   void write_double(double x);
    116   void set_read_buffer_size(long size);
    117 } ;
     106    // read and write using little-endianness
     107    uint16_t read_uint16();
     108    uint32_t read_uint32();
     109    uint8_t read_uint8();
     110    double read_double();
     111    void write_uint16(uint16_t x);
     112    void write_uint32(uint32_t x);
     113    void write_uint8(uint8_t x);
     114    void write_double(double x);
     115    void set_read_buffer_size(long size);
     116};
    118117
    119118class jFILE : public bFILE     // this file type will use virtual opens inside of a spe
     
    187186  void add_by_hand(spec_entry *e);
    188187  void calc_offsets();
    189   long data_start_offset();  // returns the firsyt offset past directory items
     188  long data_start_offset();  // returns the first offset past directory items
    190189  long data_end_offset();    // this should be the end of the file
    191190  long type_total(int type);
  • abuse/trunk/src/imlib/timing.hpp

    r57 r112  
    1313class time_marker
    1414{
    15 public :
    16   long seconds;
    17   long micro_seconds; 
    18   void get_time();
    19   time_marker(); 
    20   double diff_time(time_marker *other);    // returns time diff in seconds                   
    21 } ;
     15public:
     16    long seconds;
     17    long micro_seconds; 
     18    void get_time();
     19    time_marker(); 
     20    double diff_time(time_marker *other); // return time diff in seconds
     21};
    2222
    23 void milli_wait(unsigned wait_time);  // sleeps for a milli second 1000 millies=1 sec
     23void milli_wait(unsigned int wait_time); // sleep for a millisecond
    2424void timer_init();
    2525void timer_uninit();
  • abuse/trunk/src/items.cpp

    r56 r112  
    208208foretile::foretile(bFILE *fp)
    209209{
    210   uint8_t *sl;
    211   image *img=load_image(fp);
    212 
    213 
    214   // create the micro image of the fore tile by aveginging the color values in 2 x 2 space
    215   // and storeing teh closest match
    216 //  uint8_t *buffer=(uint8_t *)&micro_image;
    217   int x,y,w=img->width(),h=img->height(),l;
    218   int r[AUTOTILE_WIDTH*AUTOTILE_HEIGHT],
    219       g[AUTOTILE_WIDTH*AUTOTILE_HEIGHT],
    220       b[AUTOTILE_WIDTH*AUTOTILE_HEIGHT],
    221       t[AUTOTILE_WIDTH*AUTOTILE_HEIGHT];
    222   memset(t,0,AUTOTILE_WIDTH*AUTOTILE_HEIGHT*sizeof(int));
    223   memset(r,0,AUTOTILE_WIDTH*AUTOTILE_HEIGHT*sizeof(int));
    224   memset(g,0,AUTOTILE_WIDTH*AUTOTILE_HEIGHT*sizeof(int));
    225   memset(b,0,AUTOTILE_WIDTH*AUTOTILE_HEIGHT*sizeof(int));
     210    uint8_t *sl;
     211    image *img = load_image(fp);
     212
     213    // create the micro image of the fore tile by averaging the color values
     214    // in 2×2 space and storing the closest match
     215
     216    //uint8_t *buffer=(uint8_t *)&micro_image;
     217    int x, y, w = img->width(), h = img->height(), l;
     218    int r[AUTOTILE_WIDTH * AUTOTILE_HEIGHT],
     219        g[AUTOTILE_WIDTH * AUTOTILE_HEIGHT],
     220        b[AUTOTILE_WIDTH * AUTOTILE_HEIGHT],
     221        t[AUTOTILE_WIDTH * AUTOTILE_HEIGHT];
     222    memset(t, 0, AUTOTILE_WIDTH * AUTOTILE_HEIGHT * sizeof(int));
     223    memset(r, 0, AUTOTILE_WIDTH * AUTOTILE_HEIGHT * sizeof(int));
     224    memset(g, 0, AUTOTILE_WIDTH * AUTOTILE_HEIGHT * sizeof(int));
     225    memset(b, 0, AUTOTILE_WIDTH * AUTOTILE_HEIGHT * sizeof(int));
    226226 
    227227  if (!pal)
  • abuse/trunk/src/menu.cpp

    r111 r112  
    9090}
    9191
    92 void dark_wiget(int x1, int y1, int x2, int y2, int br, int dr, int amount)
     92void dark_widget(int x1, int y1, int x2, int y2, int br, int dr, int amount)
    9393{
    9494  screen->add_dirty(x1,y1,x2,y2);
     
    148148    int tl=strlen(title)*font->width();
    149149    int tx=screen->width()/2-tl/2;
    150     dark_wiget(tx-2,my-font->height()-4,tx+tl+2,my-2,wm->medium_color(),wm->dark_color(),180);
     150    dark_widget(tx-2,my-font->height()-4,tx+tl+2,my-2,wm->medium_color(),wm->dark_color(),180);
    151151    font->put_string(screen,tx+1,my-font->height()-2,title,wm->bright_color());
    152152  }
    153153 
    154   dark_wiget(mx,my,mx+mw-1,my+mh-1,wm->medium_color(),wm->dark_color(),200);
     154  dark_widget(mx,my,mx+mw-1,my+mh-1,wm->medium_color(),wm->dark_color(),200);
    155155
    156156
  • abuse/trunk/src/net/engine.cpp

    r56 r112  
    9595void comm_failed()  // general communication failure with engine
    9696{
    97   fprintf(stderr,"net driver : Error occured while trying to communicate with the engine\n");
     97  fprintf(stderr,"net driver : Error occurred while trying to communicate with the engine\n");
    9898  clean_up();
    9999  exit(0);
  • abuse/trunk/src/net/gclient.cpp

    r61 r112  
    4545              tick,base->current_tick,base->packet.tick_received(),base->last_packet.tick_received());
    4646
    47       if (tick==base->packet.tick_received() && !wait_local_input)    // asking for this tick?  make sure is collected
     47      // asking for this tick?  make sure it is collected
     48      if (tick==base->packet.tick_received() && !wait_local_input)
    4849      {
    4950        fprintf(stderr,"resending client packet %d to server\n",base->packet.tick_received());
  • abuse/trunk/src/net/netdrv.cpp

    r61 r112  
    6868void comm_failed()  // general communication failure with engine
    6969{
    70   fprintf(stderr,"net driver : Error occured while trying to communicate with the engine\n");
     70  fprintf(stderr,"net driver : Error occurred while trying to communicate with the engine\n");
    7171  if (driver) { delete driver; driver=NULL; }
    7272  exit(0);
  • abuse/trunk/src/net/sock.hpp

    r57 r112  
    4747    { DB_OFF,                // no debug printing
    4848      DB_MAJOR_EVENT,        // print major events
    49       DB_IMPORTANT_EVENT,    // anything that would tell where a lockup occures
     49      DB_IMPORTANT_EVENT,    // anything that would tell where a lockup occurs
    5050      DB_MINOR_EVENT } ;     // anything you can think off
    5151
  • abuse/trunk/src/objects.cpp

    r56 r112  
    564564      else
    565565      {
    566         v=c;                                 // sucide
     566        v=c;                                 // suicide
    567567        if (v) v->kills--;
    568568      }
  • abuse/trunk/src/old_server.cpp

    r90 r112  
    387387                       
    388388    if (!client_do_packet(pk))
    389       printf("Error occured while processing packet from server\n");
     389      printf("Error occurred while processing packet from server\n");
    390390  }
    391391
     
    543543int server::join_game(out_socket *os, char *name, char *server_name)
    544544{
    545   char *re="Error occured while reading from server\n";
     545  char *re="Error occurred while reading from server\n";
    546546  packet pk;
    547547
     
    589589  if (current_level->load_failed())
    590590  {
    591     printf("Error occured while downloading level\n");
     591    printf("Error occurred while downloading level\n");
    592592    exit(1);
    593593  }
  • abuse/trunk/src/sdlport/event.cpp

    r88 r112  
    147147        {
    148148                // NOTE : that the mouse status should be known
    149                 // even if another event has occured.
     149                // even if another event has occurred.
    150150                ev.mouse_move.x = mouse->x();
    151151                ev.mouse_move.y = mouse->y();
  • abuse/trunk/src/sdlport/joy.hpp

    r66 r112  
    1111#define __JOYSTICK_HPP_
    1212
    13 int joy_init(int argc, char **argv);              // returns 0 if joy stick not avaible
     13int joy_init(int argc, char **argv); // returns 0 if no joystick is available
    1414void joy_status(int &b1, int &b2, int &b3, int &xv, int &yv);
    1515void joy_calibrate();
Note: See TracChangeset for help on using the changeset viewer.