use hashMapPalette in config.create()
This commit is contained in:
@ -188,8 +188,11 @@ func (s statesCfg) create(bits int) palette[BlocksState] {
|
|||||||
case 1, 2, 3, 4:
|
case 1, 2, 3, 4:
|
||||||
return &linearPalette[BlocksState]{bits: 4, values: make([]BlocksState, 0, 1<<4)}
|
return &linearPalette[BlocksState]{bits: 4, values: make([]BlocksState, 0, 1<<4)}
|
||||||
case 5, 6, 7, 8:
|
case 5, 6, 7, 8:
|
||||||
// TODO: HashMapPalette
|
return &hashPalette[BlocksState]{
|
||||||
return &linearPalette[BlocksState]{bits: bits, values: make([]BlocksState, 0, 1<<bits)}
|
bits: bits,
|
||||||
|
ids: make(map[BlocksState]int),
|
||||||
|
values: make([]BlocksState, 0, 1<<bits),
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return &globalPalette[BlocksState]{}
|
return &globalPalette[BlocksState]{}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user