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

game: make the scattered line functions use vec2i.

File:
1 edited

Legend:

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

    r671 r672  
    103103
    104104
    105 void console::draw_char(int x, int y, char ch)
     105void console::DrawChar(vec2i pos, char ch)
    106106{
    107107    if (!con_win)
     
    109109
    110110    vec2i fs = fnt->Size();
    111     vec2i pos = vec2i(wx(), wy()) + vec2i(x, y) * fs;
     111    pos = vec2i(wx(), wy()) + pos * fs;
    112112    con_win->m_surf->Bar(pos, pos + fs - vec2i(1), wm->black());
    113113    fnt->PutChar(con_win->m_surf, pos, ch);
     
    116116void console::do_cr()
    117117{
    118   if (cx<w && cy<h)  draw_char(cx,cy,screen[cy*w+cx]);
     118  if (cx<w && cy<h) DrawChar(vec2i(cx, cy), screen[cy*w+cx]);
    119119  cx=0;
    120120  cy++;
     
    143143      {
    144144    if (con_win)
    145       draw_char(cx,cy,screen[cy*w+cx]);
     145      DrawChar(vec2i(cx, cy), screen[cy*w+cx]);
    146146    cx--;
    147147    if (con_win)
     
    158158      screen[cy*w+cx]=ch;
    159159      if (con_win)
    160         draw_char(cx,cy,ch);
     160        DrawChar(vec2i(cx, cy), ch);
    161161      cx++;
    162162      if (cx>=w) do_cr(); else
Note: See TracChangeset for help on using the changeset viewer.