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

game: refactor the mouse/game coordinate conversion logic.

File:
1 edited

Legend:

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

    r643 r657  
    2222void morph_char::draw(game_object *who, view *v)
    2323{
    24   if (fleft)
    25   {
    26     int32_t rx,ry;
    27     the_game->game_to_mouse(who->x-(cx>>16),who->y-(cy>>16),v,rx,ry);
    28     mor->show(main_screen,rx,ry,color_table,pal,1000);
    29     cx+=dcx;
    30     cy+=dcy;
    31     fleft--;
    32   }
     24    if (fleft)
     25    {
     26        vec2i pos = the_game->GameToMouse(vec2i(who->x - (cx >> 16),
     27                                                who->y - (cy >> 16)), v);
     28        mor->show(main_screen, pos.x, pos.x, color_table, pal, 1000);
     29        cx += dcx;
     30        cy += dcy;
     31        fleft--;
     32    }
    3333}
    3434
Note: See TracChangeset for help on using the changeset viewer.