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

    r656 r657  
    120120      if (get_packet(buf,size))              // get starting inputs
    121121      {
    122         process_packet_commands(buf,size);
    123     int32_t mx,my;
    124     the_game->game_to_mouse(player_list->pointer_x,player_list->pointer_y,player_list,mx,my);
    125     wm->SetMousePos((small_render ? 2 : 1) * vec2i(mx, my));
     122        process_packet_commands(buf, size);
     123        vec2i mouse = the_game->GameToMouse(vec2i(player_list->pointer_x,
     124                                                  player_list->pointer_y),
     125                                            player_list);
     126        wm->SetMousePos((small_render ? 2 : 1) * mouse);
    126127      }
    127128      else
Note: See TracChangeset for help on using the changeset viewer.