tile animation: synthesize ANIMBIT when saving (for compatibility)
Also, add some safety checks in case Tiles.get() is called with an out-of-range tile number. git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@739 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
568377ccc8
commit
9bf2e91783
3 changed files with 15 additions and 4 deletions
|
@ -50,6 +50,11 @@ public class Tiles
|
|||
|
||||
public static TileSpec get(int tileNumber)
|
||||
{
|
||||
return tiles[tileNumber];
|
||||
if (tileNumber >= 0 && tileNumber < tiles.length) {
|
||||
return tiles[tileNumber];
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue