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

game: convert a few View members to vec2i.

File:
1 edited

Legend:

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

    r658 r674  
    229229  if (small_render)
    230230  {
    231     mx=(v->pointer_x-v->cx1)*2+v->cx1;
    232     my=(v->pointer_y-v->cy1)*2+v->cy1;
     231    mx = v->pointer_x * 2 - v->m_aa.x;
     232    my = v->pointer_y * 2 - v->m_aa.y;
    233233  } else
    234234  {
    235     mx=v->pointer_x;
    236     my=v->pointer_y;
     235    mx = v->pointer_x;
     236    my = v->pointer_y;
    237237  }
    238238
     
    288288  area(sx1,sy1,sx2,sy2);
    289289
    290   int view_y2=small_render ? (v->cy2-v->cy1+1)*2+v->cy1 : v->cy2;
     290  int view_y2=small_render ? (v->m_bb.y-v->m_aa.y+1)*2+v->m_aa.y : v->m_bb.y;
    291291  if (sy1<view_y2)     // tell view to shrink if it is overlapping the status bar
    292292  {
    293293    v->suggest.send_view=1;
    294     v->suggest.cx1=v->cx1;
    295     v->suggest.cy1=v->cy1;
    296     v->suggest.cx2=v->cx2;
    297     v->suggest.cy2=small_render ? (sy1-v->cy1-2)/2+v->cy1 : sy1-2;
     294    v->suggest.cx1 = v->m_aa.x;
     295    v->suggest.cy1 = v->m_aa.y;
     296    v->suggest.cx2 = v->m_bb.x;
     297    v->suggest.cy2 = small_render ? (sy1 - v->m_aa.y - 2) / 2 + v->m_aa.y : sy1 - 2;
    298298  }
    299299
    300300  if (sbar<=0 || !total_weapons) return ;
    301301
    302 
    303   int mx=small_render ? (last_demo_mpos.x-v->cx1)*2+v->cx1 : last_demo_mpos.x;
    304   int my=small_render ? (last_demo_mpos.y-v->cy1)*2+v->cy1 : last_demo_mpos.y;
    305 
     302  int mx = small_render ? last_demo_mpos.x * 2 - v->m_aa.x : last_demo_mpos.x;
     303  int my = small_render ? last_demo_mpos.y * 2 - v->m_aa.y : last_demo_mpos.y;
    306304
    307305  if (mx>sx1 && my>sy1 && mx<sx2 && my<sy2)
Note: See TracChangeset for help on using the changeset viewer.