Skip to content

Commit

Permalink
Engine: IAGSEngine::ViewportToRoom() allows other viewports
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-mogilko committed Jun 8, 2019
1 parent 172fc65 commit 9048362
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Engine/plugin/agsplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ void IAGSEngine::ViewportToRoom (int32 *x, int32 *y) {
// NOTE: This is an old function that did not account for custom/multiple viewports
// and does not expect to fail, therefore we always use primary viewport here.
// (Not sure if it's good though)
VpPoint vpt = play.ScreenToRoom(x ? game_to_data_coord(*x) : 0, y ? game_to_data_coord(*y) : 0, 0, false);
VpPoint vpt = play.ScreenToRoom(x ? game_to_data_coord(*x) : 0, y ? game_to_data_coord(*y) : 0);
if (x)
*x = vpt.first.X;
if (y)
Expand Down

0 comments on commit 9048362

Please sign in to comment.