solarus-games / solarus

This repository was moved to GitLab: https://gitlab.com/solarus-games/solarus
http://www.solarus-games.org
Other
712 stars 133 forks source link

Compatible tilesets #662

Open Maxs1789 opened 9 years ago

Maxs1789 commented 9 years ago

For now, Solarus provide a method to change the tileset of a map, but tilesets must be compatible and only the image is loaded, the other properties should be idendique.

A method set_tileset_image() instead of set_tileset() would be clearer.

And it would be great to have a tileset with multiple images rather than having several compatible tilesets in the resources and of the side of the editor.

Diarandor commented 7 years ago

And it would be great to have a tileset with multiple images rather than having several compatible tilesets in the resources and of the side of the editor.

This would be great indeed. I want to point out that if we allow using multiple images, then the functions "get/set_tileset_image()" would need an additional parameter to indicate which of the images we are refering to. The parameters used to indicate each image could be just integers, or maybe strings. If there is only one image, that image could be set as default and then we could use the "nil" variable in this parameter (i.e., the parameter could be omitted) to refer to this "default" image.