forked from Mudlet/Mudlet
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Infrastructure: make TRoom coordinates private (Mudlet#7539)
#### Summary of PR Changes/Additions Makes the coordinate members of the `TRoom` class private so that access to them can be tracked via methods to set and get them. #### Motivation for Adding to Mudlet This is so that the setters can then subsequently include any extra code that needs to be aware when the room is moved. I intend to improve the detection of rooms being placed in the same position but realised this would be a good preliminary step. #### Additional Information (related issues, discussions, etc.) Removes some dead code setting but not using `(int) quads` and `(int) verts` in `(void) GLWidget::paintGL()` Also using the mouse to drag and thus move selected rooms when those rooms were on different levels would squash them all down to be on the same z-coordinate as the "highlighted centre of the selection" room. This is not as helpful it might seem and instead increased the likelihood of causing room collisions - so now each room will retain it's z coordinate if it is not on the same level as the centre of the multiple room selection. Also move code that likely needs to be run whenever rooms are added/removed/moved within an area to a common block of code (`(void) TArea::clean()`) to help keep things DRY. I intend to put code to update a per area record of rooms that are in the same place within that block in the future - so that the record can be reused without having to be repeatedly recalculated, especially in the paint event for the 2D mapper. --------- Signed-off-by: Stephen Lyons <[email protected]>
- Loading branch information
Showing
12 changed files
with
274 additions
and
237 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.