Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structure where top left cell is out of viewport window coordinates does not get drawn #24

Closed
stefanhendriks opened this issue Feb 13, 2015 · 2 comments
Assignees
Labels

Comments

@stefanhendriks
Copy link
Contributor

Ie. Place a Const Yard and scroll so that the topleft of the structure is not visible.

I would expect the lower / right half to be drawn. This does not happen.

@stefanhendriks
Copy link
Contributor Author

This has impact on how we draw stuff. Currently the MapRenderer selects all cells which to draw. Then it basically calls the Renderer to draw them.

However, since structures are only now drawn from the 'top left cell' and the top left cell might not be visible... it may not draw the structure.

So this needs a different approach.

One way would be to select all structures to draw as we go through all cells. This would basically imply a StructureRenderer which uses the same logic but checks if structures are present. If so it will render those, but it also has to figure out the top left. Now it s directly attached to the Cell class which makes Cell equivalent of a MapCell for drawing Structures.

It is handy to have a reference to a structure from a Cell but figuring out what the coordinates are for a structure might be worthy to store somewhere else?

@stefanhendriks
Copy link
Contributor Author

Fixed!
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant