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/dev.cpp

    r650 r655  
    147147  virtual void scroll_event(int newx, image *screen)
    148148  {
    149     screen->bar(x,y,x+l-1,y+h-1,wm->dark_color());
     149    screen->Bar(vec2i(x, y), vec2i(x + l - 1, y + h - 1), wm->dark_color());
    150150    char st[100];
    151151    sprintf(st,"%d",newx);
     
    484484      main_screen->PutImage(im, vec2i(f->x - vx + v->cx1 - im->Size().x / 2,
    485485                                      f->y - vy + v->cy1 - im->Size().y / 2), 1);
    486       main_screen->rectangle(f->x1 - vx + v->cx1, f->y1 - vy + v->cy1,
    487                              f->x2 - vx + v->cx1, f->y2 - vy + v->cy1,
     486      main_screen->Rectangle(vec2i(f->x1 - vx + v->cx1, f->y1 - vy + v->cy1),
     487                             vec2i(f->x2 - vx + v->cx1, f->y2 - vy + v->cy1),
    488488                             wm->medium_color());
    489489    }
     
    495495      int32_t rx1,ry1;
    496496      the_game->game_to_mouse(link_object->x,link_object->y,v,rx1,ry1);
    497       main_screen->line(rx1,ry1,dlastx,dlasty,yellow);
     497      main_screen->Line(vec2i(rx1, ry1), vec2i(dlastx, dlasty), yellow);
    498498    }
    499499
     
    504504      int32_t rx1,ry1;
    505505      the_game->game_to_mouse(selected_light->x,selected_light->y,v,rx1,ry1);
    506       main_screen->rectangle(rx1-l,ry1-h,rx1+l,ry1+h,wm->bright_color());
     506      main_screen->Rectangle(vec2i(rx1 - l, ry1 - h), vec2i(rx1 + l, ry1 + h),
     507                             wm->bright_color());
    507508    }
    508509
     
    528529      game_object *other=o->get_object(i);
    529530      the_game->game_to_mouse(other->x,other->y,current_view,x2,y2);
    530       main_screen->line(x1,y1,x2,y2,wm->bright_color());
     531      main_screen->Line(vec2i(x1, y1), vec2i(x2, y2), wm->bright_color());
    531532    }
    532533
     
    535536      light_source *l=o->get_light(i);
    536537      the_game->game_to_mouse(l->x,l->y,current_view,x2,y2);
    537       main_screen->line(x1,y1,x2,y2,light_connection_color);
     538      main_screen->Line(vec2i(x1, y1), vec2i(x2, y2), light_connection_color);
    538539    }
    539540
     
    547548      the_game->game_to_mouse(x1,y1,v,rx1,ry1);
    548549      the_game->game_to_mouse(x2,y2,v,rx2,ry2);
    549       main_screen->rectangle(rx1,ry1,rx2,ry2,wm->bright_color());
     550      main_screen->Rectangle(vec2i(rx1, ry1), vec2i(rx2, ry2),
     551                             wm->bright_color());
    550552
    551553      the_game->game_to_mouse(selected_object->x,selected_object->y,current_view,x1,y1);
     
    554556    game_object *other=selected_object->get_object(i);
    555557    the_game->game_to_mouse(other->x,other->y,current_view,x2,y2);
    556     main_screen->line(x1,y1,x2,y2,light_connection_color);
     558    main_screen->Line(vec2i(x1, y1), vec2i(x2, y2), light_connection_color);
    557559      }
    558560    }
     
    30173019      {
    30183020    find=i;
    3019     me->m_surf->rectangle(me->x1()+(i%w)*tw,
    3020                             me->y1()+(i/w)*th,
    3021                             me->x1()+(i%w)*tw+tw-1,
    3022                             me->y1()+(i/w)*th+th-1,wm->bright_color());
     3021    me->m_surf->Rectangle(vec2i(me->x1() + (i % w) * tw,
     3022                                me->y1() + (i / w) * th),
     3023                          vec2i(me->x1() + (i % w) * tw + tw - 1,
     3024                                me->y1() + (i / w) * th + th - 1),
     3025                          wm->bright_color());
    30233026      }
    30243027    }
Note: See TracChangeset for help on using the changeset viewer.