Finish the Set/ implementation

This commit is contained in:
2018-03-18 17:27:32 +00:00
parent 961a213752
commit 738abfc4a8
5 changed files with 78 additions and 55 deletions

View File

@@ -122,12 +122,9 @@ func loadSets() {
}
for key, mapSet := range mapSets {
fmt.Printf(" * `%s`: Defs=%#v len(palette)=%d\n", key, mapSet.Defs, len(mapSet.Palette))
if key == "map01.set" {
for i, objName := range mapSet.Palette {
fmt.Printf(" %d. %s\n", i, objName)
}
}
fmt.Printf(" * `%s`: surface expected=%d actual=%d\n", key, mapSet.SurfaceCount, len(mapSet.SurfacePalette))
fmt.Printf(" * `%s`: left expected=%d actual=%d\n", key, mapSet.LeftCount, len(mapSet.LeftPalette))
fmt.Printf(" * `%s`: right expected=%d actual=%d\n", key, mapSet.RightCount, len(mapSet.RightPalette))
fmt.Printf(" * `%s`: center expected=%d actual=%d\n", key, mapSet.CenterCount, len(mapSet.CenterPalette))
}
}

View File

@@ -293,7 +293,7 @@ func runStep(win *pixelgl.Window, state *runState) *runState {
log.Printf(
"x=%d y=%d z=%d SurfaceTile=%d (%s) SurfaceFrame=%d SquadRelated=%d",
x, y, state.zIdx,
cell.Surface.Index(), state.env.set.Palette[int(cell.Surface.Index())], cell.Surface.Frame(),
cell.Surface.Index(), state.env.set.SurfacePalette[int(cell.Surface.Index())], cell.Surface.Frame(),
cell.SquadRelated,
)
log.Printf("CellIdx%d=%d. Full cell data: %#v", state.cellIdx, cell.At(state.cellIdx), cell)