#include "nodedef.h"
#include "itemdef.h"
#include "client/mesh.h"
#include "client/shader.h"
#include "client/client.h"
#include "client/renderingengine.h"
#include "client/tile.h"
#include <IMeshManipulator.h>
#include "log.h"
#include "settings.h"
#include "nameidmapping.h"
#include "util/numeric.h"
#include "util/serialize.h"
#include "exceptions.h"
#include "debug.h"
#include "gamedef.h"
#include "mapnode.h"
#include <fstream>
#include <algorithm>
#include <cmath>
Macros | |
#define | WRITEBOX(box) |
#define | READBOXES(box) |
#define | TILE_FLAG_BACKFACE_CULLING (1 << 0) |
#define | TILE_FLAG_TILEABLE_HORIZONTAL (1 << 1) |
#define | TILE_FLAG_TILEABLE_VERTICAL (1 << 2) |
#define | TILE_FLAG_HAS_COLOR (1 << 3) |
#define | TILE_FLAG_HAS_SCALE (1 << 4) |
#define | TILE_FLAG_HAS_ALIGN_STYLE (1 << 5) |
Functions | |
static void | fillTileAttribs (ITextureSource *tsrc, TileLayer *layer, const TileSpec &tile, const TileDef &tiledef, video::SColor color, u8 material_type, u32 shader_id, bool backface_culling, const TextureSettings &tsettings) |
bool | isWorldAligned (AlignStyle style, WorldAlignMode mode, NodeDrawType drawtype) |
void | boxVectorUnion (const std::vector< aabb3f > &boxes, aabb3f *box_union) |
void | getNodeBoxUnion (const NodeBox &nodebox, const ContentFeatures &features, aabb3f *box_union) |
NodeDefManager * | createNodeDefManager () |
static void | removeDupes (std::vector< content_t > &list) |
#define READBOXES | ( | box | ) |
#define TILE_FLAG_BACKFACE_CULLING (1 << 0) |
#define TILE_FLAG_HAS_ALIGN_STYLE (1 << 5) |
#define TILE_FLAG_HAS_COLOR (1 << 3) |
#define TILE_FLAG_HAS_SCALE (1 << 4) |
#define TILE_FLAG_TILEABLE_HORIZONTAL (1 << 1) |
#define TILE_FLAG_TILEABLE_VERTICAL (1 << 2) |
#define WRITEBOX | ( | box | ) |
Returns the smallest box that contains all boxes in the vector. Box_union is expanded.
[in] | boxes | the vector containing the boxes |
[in,out] | box_union | the union of the arguments |
Referenced by getNodeBoxUnion().
NodeDefManager* createNodeDefManager | ( | ) |
Referenced by TestGameDef::TestGameDef(), and Game::init().
|
static |
References TileDef::animation, TileLayer::animation_frame_count, TileLayer::animation_frame_length_ms, AUTOSCALE_ENABLE, AUTOSCALE_FORCE, TextureSettings::autoscale_mode, TileLayer::color, TileDef::color, TileAnimationParams::determineParams(), FrameSpec::flags_texture, TileLayer::flags_texture, TileLayer::frames, ITextureSource::getNormalTexture(), ITextureSource::getShaderFlagsTexture(), ITextureSource::getTextureForMesh(), TileAnimationParams::getTextureModifer(), TileLayer::has_color, TileDef::has_color, MATERIAL_FLAG_ANIMATION, MATERIAL_FLAG_BACKFACE_CULLING, MATERIAL_FLAG_TILEABLE_HORIZONTAL, MATERIAL_FLAG_TILEABLE_VERTICAL, TileLayer::material_flags, TileLayer::material_type, TileDef::name, TextureSettings::node_texture_size, FrameSpec::normal_texture, TileLayer::normal_texture, TileLayer::scale, TileDef::scale, TileLayer::shader_id, TAT_NONE, FrameSpec::texture, TileLayer::texture, FrameSpec::texture_id, TileLayer::texture_id, TileDef::tileable_horizontal, TileDef::tileable_vertical, TileAnimationParams::type, and TileSpec::world_aligned.
Referenced by ContentFeatures::updateTextures().
void getNodeBoxUnion | ( | const NodeBox & | nodebox, |
const ContentFeatures & | features, | ||
aabb3f * | box_union | ||
) |
Returns a box that contains the nodebox in every case. The argument node_union is expanded.
[in] | nodebox | the nodebox to be measured |
[in] | features | used to decide whether the nodebox can be rotated |
[in,out] | box_union | the union of the arguments |
References boxVectorUnion(), BS, NodeBox::connect_back, NodeBox::connect_bottom, NodeBox::connect_front, NodeBox::connect_left, NodeBox::connect_right, NodeBox::connect_top, CPT2_COLORED_FACEDIR, CPT2_FACEDIR, NodeBox::disconnected, NodeBox::disconnected_back, NodeBox::disconnected_bottom, NodeBox::disconnected_front, NodeBox::disconnected_left, NodeBox::disconnected_right, NodeBox::disconnected_sides, NodeBox::disconnected_top, NodeBox::fixed, NODEBOX_CONNECTED, NODEBOX_FIXED, NODEBOX_LEVELED, NODEBOX_WALLMOUNTED, ContentFeatures::param_type_2, NodeBox::type, NodeBox::wall_bottom, NodeBox::wall_side, and NodeBox::wall_top.
Referenced by NodeDefManager::deSerialize(), and NodeDefManager::set().
bool isWorldAligned | ( | AlignStyle | style, |
WorldAlignMode | mode, | ||
NodeDrawType | drawtype | ||
) |
References ALIGN_STYLE_USER_DEFINED, ALIGN_STYLE_WORLD, NDT_NODEBOX, NDT_NORMAL, WORLDALIGN_DISABLE, WORLDALIGN_FORCE, and WORLDALIGN_FORCE_NODEBOX.
Referenced by ContentFeatures::updateTextures().
|
static |