Do some more polish
This commit is contained in:
parent
c0fddf7631
commit
f0e7ca8e33
5 changed files with 12 additions and 10 deletions
11
map.h
11
map.h
|
@ -9,7 +9,7 @@
|
|||
|
||||
Map coordinates/size:
|
||||
- map size is 64x64x64 blocks
|
||||
- [0,0,0] is is bottom-left-front-most
|
||||
- [0,0,0] is bottom-left-front-most
|
||||
- x goes right, y goes up, z goes forward
|
||||
- coordinate number is a single number obtained as x + 64 * y + 64 * 64 * z
|
||||
|
||||
|
@ -276,9 +276,9 @@ void LCR_rampGetDimensions(uint8_t rampType, uint8_t *height4ths,
|
|||
}
|
||||
|
||||
/**
|
||||
Adds given block to current map, including possibly deleting a block by
|
||||
adding LCR_BLOCK_NONE. The function handles sorting the block to the right
|
||||
position. Returns 1 if successful, else 0.
|
||||
Adds given block to current map, including possibly deleting a block by adding
|
||||
LCR_BLOCK_NONE. The function handles sorting the block to the right position.
|
||||
Returns 1 if successful, else 0.
|
||||
*/
|
||||
uint8_t _LCR_mapAddBlock(const uint8_t block[LCR_BLOCK_SIZE])
|
||||
{
|
||||
|
@ -394,8 +394,7 @@ void _LCR_mapComputeHash(void)
|
|||
Same as LCR_mapGetBlockAt, but allows to specify start and end block of the
|
||||
of the search to make it faster.
|
||||
*/
|
||||
int LCR_mapGetBlockAtFast(uint8_t x, uint8_t y, uint8_t z,
|
||||
int start, int end)
|
||||
int LCR_mapGetBlockAtFast(uint8_t x, uint8_t y, uint8_t z, int start, int end)
|
||||
{
|
||||
// binary search (the blocks are sorted)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue