Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint8_t &world::block(uint16_t x,uint16_t y,uint16_t z)
- {
- if (x >= x_size ||
- y >= y_size ||
- z >= z_size)
- {
- throw std::runtime_error("world::block(): Index out of bounds");
- }
- return map[(((y * z_size) + z) * x_size) + x];
- }
Add Comment
Please, Sign In to add comment