* Adds map indicators to the smallmap. */
| 874 | * Adds map indicators to the smallmap. |
| 875 | */ |
| 876 | void DrawMapIndicators() const |
| 877 | { |
| 878 | /* Find main viewport. */ |
| 879 | const Viewport &vp = *GetMainWindow()->viewport; |
| 880 | |
| 881 | Point upper_left_smallmap_coord = InverseRemapCoords2(vp.virtual_left, vp.virtual_top); |
| 882 | Point lower_right_smallmap_coord = InverseRemapCoords2(vp.virtual_left + vp.virtual_width - 1, vp.virtual_top + vp.virtual_height - 1); |
| 883 | |
| 884 | Point upper_left = this->RemapTile(upper_left_smallmap_coord.x / (int)TILE_SIZE, upper_left_smallmap_coord.y / (int)TILE_SIZE); |
| 885 | upper_left.x -= this->subscroll; |
| 886 | |
| 887 | Point lower_right = this->RemapTile(lower_right_smallmap_coord.x / (int)TILE_SIZE, lower_right_smallmap_coord.y / (int)TILE_SIZE); |
| 888 | lower_right.x -= this->subscroll; |
| 889 | |
| 890 | SmallMapWindow::DrawVertMapIndicator(upper_left.x, upper_left.y, lower_right.y); |
| 891 | SmallMapWindow::DrawVertMapIndicator(lower_right.x, upper_left.y, lower_right.y); |
| 892 | |
| 893 | SmallMapWindow::DrawHorizMapIndicator(upper_left.x, lower_right.x, upper_left.y); |
| 894 | SmallMapWindow::DrawHorizMapIndicator(upper_left.x, lower_right.x, lower_right.y); |
| 895 | } |
| 896 | |
| 897 | /** |
| 898 | * Draws one column of tiles of the small map in a certain mode onto the screen buffer, skipping the shifted rows in between. |
no test coverage detected