6 BlkIsUnderground MapBlkFlags = 1 << iota
12 type LitFromBlks uint16
14 const AlwaysLitFrom LitFromBlks = 0xf000
16 func LitFrom(d Dir, b LightBank) LitFromBlks {
17 return 1 << (uint8(d) + uint8(6*b))
24 //mt:const uint8(2) // Size of param0 in bytes.
25 //mt:const uint8(1 + 1) // Size of param1 and param2 combined, in bytes.
31 NodeMetas map[uint16]*NodeMeta
34 // mt:const uint8(2) // version
37 // Pos2BlkPos converts a node position to a MapBlk position and index.
38 func Pos2Blkpos(pos [3]int16) (blkpos [3]int16, i uint16) {
40 blkpos[j] = pos[j] >> 4
41 i |= uint16(pos[j]&0xf) << (4 * j)
47 // BlkPos2Pos converts a MapBlk position and index to a node position.
48 func Blkpos2Pos(blkpos [3]int16, i uint16) (pos [3]int16) {
50 pos[j] = blkpos[j]<<4 | int16(i>>(4*j)&0xf)