Ignore:
Timestamp:
Sep 12, 2011, 10:17:23 PM (9 years ago)
Author:
Sam Hocevar
Message:

core: rename vec2i to ivec2 and update matrix.h from Lol Engine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/pmenu.cpp

    r671 r682  
    2929  active=NULL;
    3030
    31   vec2i caa, cbb;
     31  ivec2 caa, cbb;
    3232  screen->GetClip(caa, cbb);
    3333  if (caa.x<X) caa.x=X;
     
    3535  int h = Jwindow::top_border() + Jwindow::bottom_border();
    3636
    37   bar = wm->CreateWindow(vec2i(X, Y), vec2i(w, 0), NULL);
     37  bar = wm->CreateWindow(ivec2(X, Y), ivec2(w, 0), NULL);
    3838  bar->freeze();  // can't drag this window
    39   bar->m_surf->WidgetBar(vec2i(0, 0), vec2i(w - 1, h - 1),
     39  bar->m_surf->WidgetBar(ivec2(0, 0), ivec2(w - 1, h - 1),
    4040                         wm->bright_color(), wm->medium_color(),
    4141                         wm->dark_color());
     
    146146  int w,h;
    147147  calc_size(w,h);
    148   vec2i caa, cbb;
     148  ivec2 caa, cbb;
    149149  main_screen->GetClip(caa, cbb);
    150150  // FIXME: is this correct? it looks like it used to be incorrect
     
    168168void psub_menu::calc_size(int &w, int &h)
    169169{
    170     vec2i ts = wm->font()->Size();
     170    ivec2 ts = wm->font()->Size();
    171171  w=h=0;
    172172  for (pmenu_item *p=first; p; p=p->next)
     
    189189  int w,h,i=0;
    190190  calc_size(w,h);
    191   vec2i caa, cbb;
     191  ivec2 caa, cbb;
    192192  main_screen->GetClip(caa, cbb);
    193193  if (parent->m_pos.x + w + x >= cbb.x)
     
    201201
    202202
    203   win=wm->CreateWindow(parent->m_pos + vec2i(x, y),
    204              vec2i(w - Jwindow::left_border() - Jwindow::right_border(),
     203  win=wm->CreateWindow(parent->m_pos + ivec2(x, y),
     204             ivec2(w - Jwindow::left_border() - Jwindow::right_border(),
    205205                   h - Jwindow::top_border() - Jwindow::bottom_border()),
    206206             NULL);
    207207  win->freeze();
    208   win->m_surf->WidgetBar(vec2i(0, 0), vec2i(w - 1, h - 1),
     208  win->m_surf->WidgetBar(ivec2(0, 0), ivec2(w - 1, h - 1),
    209209                         wm->bright_color(), wm->medium_color(),
    210210                         wm->dark_color());
     
    229229  {
    230230    int h=wm->font()->Size().y;
    231     parent->m_surf->WidgetBar(vec2i(x, y + h / 2 - 1),
    232                               vec2i(x + w - 1, y + h / 2), wm->dark_color(),
     231    parent->m_surf->WidgetBar(ivec2(x, y + h / 2 - 1),
     232                              ivec2(x + w - 1, y + h / 2), wm->dark_color(),
    233233                              wm->medium_color(), wm->bright_color());
    234234  } else
     
    240240      else
    241241      {
    242     parent->m_surf->Bar(vec2i(bx, y),
    243                         vec2i(x + w - 1, y + wm->font()->Size().y + 1),
     242    parent->m_surf->Bar(ivec2(bx, y),
     243                        ivec2(x + w - 1, y + wm->font()->Size().y + 1),
    244244                        wm->dark_color());
    245     wm->font()->PutString(parent->m_surf, vec2i(x+1, y+1), n, wm->medium_color());
    246     if (on_off && *on_off) wm->font()->PutString(parent->m_surf, vec2i(bx+1, y+1), "*", wm->medium_color());
     245    wm->font()->PutString(parent->m_surf, ivec2(x+1, y+1), n, wm->medium_color());
     246    if (on_off && *on_off) wm->font()->PutString(parent->m_surf, ivec2(bx+1, y+1), "*", wm->medium_color());
    247247      }
    248248    } else
     
    252252      else
    253253      {
    254     parent->m_surf->Bar(vec2i(bx, y),
    255                         vec2i(x + w - 1, y + wm->font()->Size().y + 1),
     254    parent->m_surf->Bar(ivec2(bx, y),
     255                        ivec2(x + w - 1, y + wm->font()->Size().y + 1),
    256256                        wm->medium_color());
    257     wm->font()->PutString(parent->m_surf, vec2i(x + 1, y + 1), n, wm->bright_color());
    258     if (on_off && *on_off) wm->font()->PutString(parent->m_surf, vec2i(bx + 1, y + 1), "*", wm->bright_color());
     257    wm->font()->PutString(parent->m_surf, ivec2(x + 1, y + 1), n, wm->bright_color());
     258    if (on_off && *on_off) wm->font()->PutString(parent->m_surf, ivec2(bx + 1, y + 1), "*", wm->bright_color());
    259259      }
    260260    }
Note: See TracChangeset for help on using the changeset viewer.