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

game: refactor the GetFg? methods to use vec2i.

File:
1 edited

Legend:

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

    r665 r666  
    10571057    for (y=0,i=cur_bg; y<h; y++)
    10581058          for (x=0; x<l; x++)
    1059             the_game->put_bg(tile.x+x,tile.y+y,i++);
     1059            the_game->PutBg(tile + vec2i(x, y), i++);
    10601060    dprintf("%dx%d\n",l,h);
    10611061      } else dprintf(symbol_str("unchop1"));
     
    12171217        tile.y < current_level->foreground_height())
    12181218    {
    1219       cur_fg=current_level->get_fg(tile.x, tile.y);
     1219      cur_fg=current_level->GetFg(tile);
    12201220      if (forew)
    12211221    ((tile_picker *)forew->read(DEV_FG_PICKER))->recenter(forew->m_surf);
     
    18621862          if (tile.x>=0 && tile.y>=0 && tile.x<current_level->foreground_width() &&
    18631863          tile.y<current_level->foreground_height())
    1864           current_level->put_fg(tile.x,tile.y,raise_all ? make_above_tile(cur_fg) : cur_fg);
     1864          current_level->PutFg(tile, raise_all ? make_above_tile(cur_fg) : cur_fg);
    18651865          the_game->need_refresh();
    18661866        } else if (ev.mouse_button==1 && !selected_object && !selected_light)
     
    18691869          if (tile.x>=0 && tile.y>=0 && tile.x<current_level->background_width() &&
    18701870          tile.y<current_level->background_height())
    1871           current_level->put_bg(tile.x,tile.y,cur_fg);
     1871          current_level->PutBg(tile, cur_fg);
    18721872          the_game->need_refresh();
    18731873        }
     
    19541954        if (tile.x>=0 && tile.y>=0 && tile.x<current_level->foreground_width() &&
    19551955            tile.y<current_level->foreground_height())
    1956         the_game->put_fg(tile.x,tile.y,raise_all ? make_above_tile(cur_fg) : cur_fg);
     1956        the_game->PutFg(tile, raise_all ? make_above_tile(cur_fg) : cur_fg);
    19571957          }
    19581958          if ((dev & DRAW_BG_LAYER) && ev.mouse_button==2)
     
    19611961        if (tile.x>=0 && tile.y>=0 && tile.x<current_level->background_width() &&
    19621962            tile.y<current_level->background_height())
    1963         the_game->put_bg(tile.x,tile.y,cur_bg);
     1963        the_game->PutBg(tile, cur_bg);
    19641964          }
    19651965        }
     
    31093109        if (xx>=0 && yy>=0 && xx<current_level->foreground_width() &&
    31103110            yy<current_level->foreground_height())
    3111           the_game->put_fg(xx,yy,raise_all ? make_above_tile(pat[xx-tile.x+(yy-tile.y)*w]) : pat[xx-tile.x+(yy-tile.y)*w] );
     3111          the_game->PutFg(vec2i(xx, yy), raise_all ? make_above_tile(pat[xx-tile.x+(yy-tile.y)*w]) : pat[xx-tile.x+(yy-tile.y)*w] );
    31123112          }
    31133113        }
Note: See TracChangeset for help on using the changeset viewer.