Ignore:
Timestamp:
Apr 17, 2011, 11:56:44 PM (11 years ago)
Author:
Sam Hocevar
Message:

style: remove trailing spaces, fix copyright statements.

File:
1 edited

Legend:

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

    r481 r494  
    22 *  Abuse - dark 2D side-scrolling platform game
    33 *  Copyright (c) 1995 Crack dot Com
     4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
    45 *
    56 *  This software was released into the Public Domain. As with most public
     
    3435  return new text_field(5,ystart+H*0,ELEVATOR_SPEED,"speed",              "#####",speed,
    3536         new text_field(5,ystart+H*1,ELEVATOR_DIR,"heading dir",          "#####",dir,
    36          new text_field(5,ystart+H*2,ELEVATOR_DIRECTION,"facing dir",     "#####",direction,   
     37         new text_field(5,ystart+H*2,ELEVATOR_DIRECTION,"facing dir",     "#####",direction,
    3738            NULL)));
    3839}
     
    105106    trans_image *p=picture();
    106107
    107     for (i=sy1;i<=sy2;i++)
     108    for (i=sy1; i<=sy2; i++)
    108109      p->put_scan_line(screen,sx,i,0);
    109110  }
     
    147148  int i;
    148149  game_object **o=current_level->obj;
    149   for (i=current_level->first_object();i>=0;i=o[i]->next_active)
     150  for (i=current_level->first_object(); i>=0; i=o[i]->next_active)
    150151  {
    151152    if (o[i]->type()==O_elcontrol)
     
    168169    switch (state)
    169170    {
    170       case stopped :   
     171      case stopped :
    171172      {
    172173        long x1,y1,x2,y2;
     
    204205      set_state(still_jump);              // we can start moving now
    205206      dir=dir+dir;
    206     }   
     207    }
    207208    break;
    208209      case still_jump :                       // just stopped, open the doors
     
    263264  int i;
    264265  activate=-1;  // if we can't fnd the name then go focus
    265   for (i=0;i<TOTAL_OBJECTS;i++)
     266  for (i=0; i<TOTAL_OBJECTS; i++)
    266267    if (!strcmp(name,object_names[i]))
    267268      activate=i;
     
    312313  else
    313314  {
    314     for (i=current_level->first_object();i>=0;i=o[i]->next_active)
     315    for (i=current_level->first_object(); i>=0; i=o[i]->next_active)
    315316    {
    316317      long x1,y1,x2,y2;
    317318      if (o[i]->type()==activate)
    318       {   
     319      {
    319320    o[i]->picture_space(x1,y1,x2,y2);
    320321    if (x+xrange>=x1 && x-xrange<=x2 && y+yrange>=y1 && y-yrange<=y2)
    321     {   
     322    {
    322323          current_level->send_signal(signal);
    323324      return 1;          // only send one signal!
    324     }   
     325    }
    325326      }
    326327    }
     
    360361  signal=atoi(inm->get(SENSOR_SIGNAL)->read());
    361362  get_activate(inm->get(SENSOR_ACTIVATE)->read());
    362 }           
    363 
     363}
     364
Note: See TracChangeset for help on using the changeset viewer.