1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-29 04:05:31 +01:00
Files
luanti/src/database
Erich Schubert 1f3cf59c7f Clean up position encoding
We can simply add 0x800800800 to the encoding, then use bit masking.

This works because adding 0x800 maps -2048:2047 to 0x000:0xFFF.
And 0x800800800 is (0x800 << 24 + 0x800 << 12 + 0x800) for x,y,z.

After bitmasking, -0x800 restores the original value range.
2025-03-16 17:56:58 +01:00
..
2025-03-16 17:56:58 +01:00