Ignore:
Timestamp:
May 15, 2011, 6:22:08 AM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: refactor a few image methods so that they use vec2i.

File:
1 edited

Legend:

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

    r651 r655  
    476476        int dx = 20, dy = 5;
    477477        image *jim = cache.img(joy_picts[but * 9+(y + 1)*3 + x + 1]);
    478         joy_win->m_surf->bar(dx, dy, dx + jim->Size().x+6, dy + jim->Size().y+6, wm->black());
     478        joy_win->m_surf->Bar(vec2i(dx, dy), vec2i(dx + jim->Size().x + 6,
     479                                                  dy + jim->Size().y + 6),
     480                             wm->black());
    479481        joy_win->m_surf->PutImage(jim, vec2i(dx + 3, dy + 3));
    480482
     
    514516                      int val, int max)
    515517{
    516     screen->bar(x, y, x + w - 1, y + h, wm->dark_color());
    517     screen->bar(x, y + 1, x + w * val / max, y + h - 1, wm->bright_color());
     518    screen->Bar(vec2i(x, y), vec2i(x + w - 1, y + h), wm->dark_color());
     519    screen->Bar(vec2i(x, y + 1), vec2i(x + w * val / max, y + h - 1),
     520                wm->bright_color());
    518521}
    519522
     
    9991002          else
    10001003          {
    1001         main_screen->line(draw_x, draw_y, draw_x + xinc, draw_y + yinc, wm->bright_color());
    1002         main_screen->line(draw_x + xinc, draw_y, draw_x, draw_y + yinc, wm->bright_color());
     1004        main_screen->Line(vec2i(draw_x, draw_y), vec2i(draw_x + xinc, draw_y + yinc), wm->bright_color());
     1005        main_screen->Line(vec2i(draw_x + xinc, draw_y), vec2i(draw_x, draw_y + yinc), wm->bright_color());
    10031006          }
    10041007        }
     
    10341037        {
    10351038          d += 2;
    1036           main_screen->line(draw_x+*(d - 2), draw_y+*(d - 1), draw_x+*d, draw_y+*(d + 1), b);
     1039          main_screen->Line(vec2i(draw_x + *(d - 2), draw_y + *(d - 1)),
     1040                            vec2i(draw_x + *d, draw_y + *(d + 1)), b);
    10371041        }
    1038         main_screen->line(draw_x+*d, draw_y+*(d - 1), draw_x + p->data[0], draw_y + p->data[1], b);
     1042        main_screen->Line(vec2i(draw_x + *d, draw_y + *(d - 1)),
     1043                          vec2i(draw_x + p->data[0], draw_y + p->data[1]), b);
    10391044          }
    10401045        }
     
    10611066
    10621067    remap_area(main_screen, x1, y1, x2, y2, white_light + 40 * 256);
    1063     main_screen->bar(x1, y1, x2, y1, color);
    1064     main_screen->bar(x1, y2, x2, y2, color);
     1068    main_screen->Bar(vec2i(x1, y1), vec2i(x2, y1), color);
     1069    main_screen->Bar(vec2i(x1, y2), vec2i(x2, y2), color);
    10651070
    10661071    wm->font()->put_string(main_screen, x1 + 5, y1 + 5,
Note: See TracChangeset for help on using the changeset viewer.