Noah Petherbridge
1a9706c09f
* Rework the Story Mode UI to display level thumbnails. * Responsive UI: defaults to wide screen mode and shows 3 levels horizontally but on narrow/mobile display, shows 2 levels per page in portrait. * Add "Tiny" screenshot size (224x126) to fit the Story Mode UI. * Make the pager buttons bigger and more touchable. * Maximize the game window on startup unless the -w option with a specific window resolution is provided.
25 lines
698 B
Go
25 lines
698 B
Go
package level
|
|
|
|
/*
|
|
Inflate the level from its compressed JSON form.
|
|
|
|
This is called as part of the LoadJSON function when the level is read
|
|
from disk. In the JSON format, pixels in the level refer to the palette
|
|
by its index number.
|
|
|
|
This function calls the following:
|
|
|
|
- Chunker.Inflate(Palette) to update references to the level's pixels to point
|
|
to the Swatch entry.
|
|
- Actors.Inflate()
|
|
- Palette.Inflate() to load private instance values for the palette subsystem.
|
|
*/
|
|
func (l *Level) Inflate() {
|
|
// Inflate the chunk metadata to map the pixels to their palette indexes.
|
|
l.Chunker.Inflate(l.Palette)
|
|
l.Actors.Inflate()
|
|
|
|
// Inflate the private instance values.
|
|
l.Palette.Inflate()
|
|
}
|