mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 04:51:49 +00:00
format: reformat project
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
parent
736cd175d5
commit
bbf33e8e4d
202 changed files with 7389 additions and 5609 deletions
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef VOXELS_VOXELSVOLUME_HPP_
|
||||
#define VOXELS_VOXELSVOLUME_HPP_
|
||||
|
||||
#include "../typedefs.hpp"
|
||||
#include "../constants.hpp"
|
||||
#include "../typedefs.hpp"
|
||||
#include "voxel.hpp"
|
||||
|
||||
class VoxelsVolume {
|
||||
|
|
@ -50,18 +50,20 @@ public:
|
|||
}
|
||||
|
||||
inline blockid_t pickBlockId(int bx, int by, int bz) const {
|
||||
if (bx < x || by < y || bz < z || bx >= x + w || by >= y + h || bz >= z + d) {
|
||||
if (bx < x || by < y || bz < z || bx >= x + w || by >= y + h ||
|
||||
bz >= z + d) {
|
||||
return BLOCK_VOID;
|
||||
}
|
||||
return voxels[vox_index(bx - x, by - y, bz - z, w, d)].id;
|
||||
}
|
||||
|
||||
inline light_t pickLight(int bx, int by, int bz) const {
|
||||
if (bx < x || by < y || bz < z || bx >= x + w || by >= y + h || bz >= z + d) {
|
||||
if (bx < x || by < y || bz < z || bx >= x + w || by >= y + h ||
|
||||
bz >= z + d) {
|
||||
return 0;
|
||||
}
|
||||
return lights[vox_index(bx - x, by - y, bz - z, w, d)];
|
||||
}
|
||||
};
|
||||
|
||||
#endif // VOXELS_VOXELSVOLUME_HPP_
|
||||
#endif // VOXELS_VOXELSVOLUME_HPP_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue