| 2914 | } |
| 2915 | |
| 2916 | bool Gui::getCursorCoords(int32_t &x, int32_t &y, int32_t &z) |
| 2917 | { |
| 2918 | using df::global::cursor; |
| 2919 | bool is_adv = World::isAdventureMode(); |
| 2920 | if (is_adv || !cursor) |
| 2921 | { |
| 2922 | df::coord p; |
| 2923 | if (is_adv && game) |
| 2924 | { |
| 2925 | auto &look = game->main_interface.adventure.look; |
| 2926 | if (look.open) |
| 2927 | p = look.cursor; |
| 2928 | } |
| 2929 | x = p.x; y = p.y; z = p.z; |
| 2930 | return p.isValid(); |
| 2931 | } |
| 2932 | |
| 2933 | x = cursor->x; y = cursor->y; z = cursor->z; |
| 2934 | return has_cursor(); |
| 2935 | } |
| 2936 | |
| 2937 | bool Gui::getCursorCoords(df::coord &pos) |
| 2938 | { |
no test coverage detected