renpy / pygame_sdl2

Reimplementation of portions of the pygame API using SDL2.
GNU Lesser General Public License v2.1
326 stars 64 forks source link

Add an optional rectangle parameter to TextureNode #97

Open MyreMylar opened 6 years ago

MyreMylar commented 6 years ago

So that users can specify their own area of the shared Texture to use. This allows more flexibility rather than having this functionality restricted to the TextureAtlas class which is specific to one particular approach to texture sharing.

This is a step toward having better support for tile maps such as those produced by the Tiled map editor (http://www.mapeditor.org/)

NOTE: I rejigged my original pull requests to hopefully make them easier to understand and less messy.

If this pull request is not substantial enough on it's own for inclusion then I can probably come back in a couple of weeks with a larger version that adds more functionality. I'm trying to help the best way I can, and am just not sure what the general process is for improving the library as an outsider.