Ignore:
Timestamp:
May 16, 2011, 2:37:51 AM (11 years ago)
Author:
Sam Hocevar
Message:

game: prefix a few class members with m_ to avoid confusion.

File:
1 edited

Legend:

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

    r674 r676  
    209209        f->suggest.cy1 = (yres - 31) / 2 + 5 - h / 2;
    210210        f->suggest.cy2 = (yres - 51) / 2 + 5 + h / 2;
    211         f->suggest.shift_down = f->shift_down;
    212         f->suggest.shift_right = f->shift_right;
     211        f->suggest.shift = f->m_shift;
    213212        f->suggest.pan_x = f->pan_x;
    214213        f->suggest.pan_y = f->pan_y;
     
    230229        f->suggest.cx2=(f->m_bb.x + amount);
    231230        f->suggest.cy2 = f->m_bb.y + amount / 2;
    232         f->suggest.shift_down = f->shift_down;
    233         f->suggest.shift_right = f->shift_right;
     231        f->suggest.shift = f->m_shift;
    234232        f->suggest.pan_x = f->pan_x;
    235233        f->suggest.pan_y = f->pan_y;
     
    315313    if (dev & EDIT_MODE)
    316314        tmp = vec2i(map_xoff, map_yoff);
    317     else if(v->focus)
    318         tmp = vec2i(v->focus->x / ftile_width()
     315    else if(v->m_focus)
     316        tmp = vec2i(v->m_focus->x / ftile_width()
    319317                       - (v->m_bb.x - v->m_aa.x) / AUTOTILE_WIDTH / 2,
    320                     v->focus->y / ftile_height()
     318                    v->m_focus->y / ftile_height()
    321319                       - (v->m_bb.y - v->m_aa.y) / AUTOTILE_HEIGHT / 2);
    322320    else
     
    331329                 - tmp.y * AUTOTILE_HEIGHT + v->m_aa.y);
    332330    if (tmp.x > 0)
    333         ret.x -= (v->focus->x * AUTOTILE_WIDTH / ftile_width())
     331        ret.x -= (v->m_focus->x * AUTOTILE_WIDTH / ftile_width())
    334332                     % AUTOTILE_WIDTH;
    335333    if(tmp.y > 0)
    336         ret.y -= (v->focus->y * AUTOTILE_HEIGHT / ftile_height())
     334        ret.y -= (v->m_focus->y * AUTOTILE_HEIGHT / ftile_height())
    337335                     % AUTOTILE_HEIGHT;
    338336
     
    385383        if(player_list)
    386384        {
    387             first_view = new view(player_list->focus, NULL, -1);
     385            first_view = new view(player_list->m_focus, NULL, -1);
    388386            first_view->pan_x = player_list->xoff();
    389387            first_view->pan_y = player_list->yoff();
     
    777775      } else
    778776      {
    779     if(v->focus)
    780     {
    781       x1 = v->focus->x / ftile_width() - (v->m_bb.x - v->m_aa.x) / fw / 2;
    782       y1 = v->focus->y / ftile_height() - (v->m_bb.y - v->m_aa.y) / fh / 2;
     777    if(v->m_focus)
     778    {
     779      x1 = v->m_focus->x / ftile_width() - (v->m_bb.x - v->m_aa.x) / fw / 2;
     780      y1 = v->m_focus->y / ftile_height() - (v->m_bb.y - v->m_aa.y) / fh / 2;
    783781    } else x1 = y1 = 0;
    784782      }
    785783      if(x1 > 0)
    786         xo = v->m_aa.x - ((v->focus->x * fw / ftile_width()) % fw);
     784        xo = v->m_aa.x - ((v->m_focus->x * fw / ftile_width()) % fw);
    787785      else xo = v->m_aa.x;
    788786      if(y1 > 0)
    789         yo = v->m_aa.y - ((v->focus->y * fh / ftile_height()) % fh);
     787        yo = v->m_aa.y - ((v->m_focus->y * fh / ftile_height()) % fh);
    790788      else yo = v->m_aa.y;
    791789    } else
     
    14501448      for(; f; f = f->next)
    14511449      {
    1452     if(f->focus)
     1450    if(f->m_focus)
    14531451    {
    14541452      int w, h;
     
    17621760                                        v->suggest.pan_x = v->pan_x;
    17631761                                        v->suggest.pan_y = v->pan_y;
    1764                                         v->suggest.shift_down = v->shift_down;
    1765                                         v->suggest.shift_right = v->shift_right;
     1762                                        v->suggest.shift = v->m_shift;
    17661763                                    }
    17671764                                }
     
    18271824
    18281825
    1829       if(!player_list->focus)
     1826      if(!player_list->m_focus)
    18301827      {
    18311828    dprintf("Players have not been created\ncall create_players");
     
    18861883    for(view *f = first_view; f; f = f->next)
    18871884    {
    1888       if(f->focus)
     1885      if(f->m_focus)
    18891886      {
    18901887    f->update_scroll();
     
    19491946  {
    19501947    view *p = player_list;
    1951     game_object *o = p->focus;
     1948    game_object *o = p->m_focus;
    19521949    player_list = player_list->next;
    19531950    delete p;
Note: See TracChangeset for help on using the changeset viewer.