aboutsummaryrefslogtreecommitdiff
path: root/builtin/client
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2021-04-29 09:30:19 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2021-05-03 19:49:19 +0200
commitccdd886e273ec2fa5f8cfe1d1f474914eccb2abf (patch)
tree076dd76bafc39c824aaa4e372502514c14d6640a /builtin/client
parenta47a00228b7be97a740081ec9ed86f108021ad6d (diff)
downloadminetest-ccdd886e273ec2fa5f8cfe1d1f474914eccb2abf.tar.gz
minetest-ccdd886e273ec2fa5f8cfe1d1f474914eccb2abf.tar.bz2
minetest-ccdd886e273ec2fa5f8cfe1d1f474914eccb2abf.zip
refacto: Hud: make driver, client, player, inventory, tsrc private & drop unused guienv
also fix c_content.h, on client it includes the src/client/hud.h instead of src/hud.h, which leads to wrong file dependency on the lua stack
span> the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "mapgen_singlenode.h" #include "voxel.h" #include "mapblock.h" #include "mapnode.h" #include "map.h" #include "nodedef.h" #include "voxelalgorithms.h" #include "emerge.h" MapgenSinglenode::MapgenSinglenode(MapgenParams *params, EmergeParams *emerge) : Mapgen(MAPGEN_SINGLENODE, params, emerge) { const NodeDefManager *ndef = emerge->ndef; c_node = ndef->getId("mapgen_singlenode"); if (c_node == CONTENT_IGNORE) c_node = CONTENT_AIR; MapNode n_node(c_node); set_light = (ndef->get(n_node).sunlight_propagates) ? LIGHT_SUN : 0x00; } //////////////////////// Map generator void MapgenSinglenode::makeChunk(BlockMakeData *data) { // Pre-conditions assert(data->vmanip); assert(data->nodedef); assert(data->blockpos_requested.X >= data->blockpos_min.X && data->blockpos_requested.Y >= data->blockpos_min.Y && data->blockpos_requested.Z >= data->blockpos_min.Z); assert(data->blockpos_requested.X <= data->blockpos_max.X && data->blockpos_requested.Y <= data->blockpos_max.Y && data->blockpos_requested.Z <= data->blockpos_max.Z); this->generating = true; this->vm = data->vmanip; this->ndef = data->nodedef; v3s16 blockpos_min = data->blockpos_min; v3s16 blockpos_max = data->blockpos_max; // Area of central chunk v3s16 node_min = blockpos_min * MAP_BLOCKSIZE;