|
Fission FSN
|
Public Member Functions | |
| __init__ (self, mapImageFile, tileSet, tileWidth, tileHeight) | |
| readMap (self) | |
| printProgress (self, percentage) | |
| write (self, fileName) | |
Public Attributes | |
| TileWidth = tileWidth | |
| TileHeight = tileHeight | |
| TileSet = tileSet | |
| list | List = [] |
| Width | |
| Height = MapImageWidth / self.TileWidth, MapImageHeight / self.TileHeight | |
This class represents a tile map.
| MapWriter.TileMap.__init__ | ( | self, | |
| mapImageFile, | |||
| tileSet, | |||
| tileWidth, | |||
| tileHeight ) |
| MapWriter.TileMap.printProgress | ( | self, | |
| percentage ) |
This function prints the percentage on the current row after erasing what is already there.
| MapWriter.TileMap.readMap | ( | self | ) |
This function takes the map image, and obtains a list self.List, where
an entry equals i if self.TileSet.List[i-1] is the corresponding picture on the map
image. If a matching tile is not found, i is set to 0.
| MapWriter.TileMap.write | ( | self, | |
| fileName ) |
| MapWriter.TileMap.Height = MapImageWidth / self.TileWidth, MapImageHeight / self.TileHeight |
| list MapWriter.TileMap.List = [] |
| MapWriter.TileMap.TileHeight = tileHeight |
| MapWriter.TileMap.TileSet = tileSet |
| MapWriter.TileMap.TileWidth = tileWidth |
| MapWriter.TileMap.Width |