pokitto / PokittoLib

Library for making programs on Pokitto hardware
22 stars 16 forks source link

Tilemap changes #95

Closed filmote closed 4 years ago

filmote commented 4 years ago

Allow tilemap sizes greater than 16 and less than 256 to save memory if you are not using all 256 tiles. Allow images to be assigned directly - height / width are derived from image. This allows you to do this:

tilemap.set(16, 16, worldMap);
tilemap.setTile(0, Images::Green);
tilemap.setTile(1, Images::Tree);
tilemap.setTile(2, Images::Grass);
tilemap.setTile(3, Images::Water);