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.
33 NodeMetas map[uint16]*NodeMeta
36 //mt:const uint8(2) // version
39 // Pos2BlkPos converts a node position to a MapBlk position and index.
40 func Pos2Blkpos(pos [3]int16) (blkpos [3]int16, i uint16) {
42 blkpos[j] = pos[j] >> 4
43 i |= uint16(pos[j]&0xf) << (4 * j)
49 // BlkPos2Pos converts a MapBlk position and index to a node position.
50 func Blkpos2Pos(blkpos [3]int16, i uint16) (pos [3]int16) {
52 pos[j] = blkpos[j]<<4 | int16(i>>(4*j)&0xf)