mirror of
https://github.com/Relintai/terraman_2d.git
synced 2024-11-12 10:15:18 +01:00
Replace TERRAIN_ to TERRAIN_2D_. (Include guards, and enums.)
This commit is contained in:
parent
6c60ca107a
commit
6272c56664
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_WORLD_AREA_H
|
#ifndef TERRAIN_2D_WORLD_AREA_H
|
||||||
#define TERRAIN_WORLD_AREA_H
|
#define TERRAIN_2D_WORLD_AREA_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_LIGHT_H
|
#ifndef TERRAIN_2D_LIGHT_H
|
||||||
#define TERRAIN_LIGHT_H
|
#define TERRAIN_2D_LIGHT_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#ifndef TERRAIN_DEFINES_H
|
#ifndef TERRAIN_2D_DEFINES_H
|
||||||
#define TERRAIN_DEFINES_H
|
#define TERRAIN_2D_DEFINES_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -56,13 +56,13 @@
|
|||||||
</member>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="TERRAIN_SIDE_TOP" value="0" enum="Terrain2DSurfaceSides">
|
<constant name="TERRAIN_2D_SIDE_TOP" value="0" enum="Terrain2DSurfaceSides">
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="TERRAIN_SIDE_BOTTOM" value="1" enum="Terrain2DSurfaceSides">
|
<constant name="TERRAIN_2D_SIDE_BOTTOM" value="1" enum="Terrain2DSurfaceSides">
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="TERRAIN_SIDE_SIDE" value="2" enum="Terrain2DSurfaceSides">
|
<constant name="TERRAIN_2D_SIDE_SIDE" value="2" enum="Terrain2DSurfaceSides">
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="TERRAIN_SIDES_COUNT" value="3">
|
<constant name="TERRAIN_2D_SIDES_COUNT" value="3">
|
||||||
</constant>
|
</constant>
|
||||||
</constants>
|
</constants>
|
||||||
</class>
|
</class>
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_LEVEL_GENERATOR_H
|
#ifndef TERRAIN_2D_LEVEL_GENERATOR_H
|
||||||
#define TERRAIN_LEVEL_GENERATOR_H
|
#define TERRAIN_2D_LEVEL_GENERATOR_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_LEVEL_GENERATOR_FLAT_H
|
#ifndef TERRAIN_2D_LEVEL_GENERATOR_FLAT_H
|
||||||
#define TERRAIN_LEVEL_GENERATOR_FLAT_H
|
#define TERRAIN_2D_LEVEL_GENERATOR_FLAT_H
|
||||||
|
|
||||||
#include "terrain_2d_level_generator.h"
|
#include "terrain_2d_level_generator.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_LIBRARY_H
|
#ifndef TERRAIN_2D_LIBRARY_H
|
||||||
#define TERRAIN_LIBRARY_H
|
#define TERRAIN_2D_LIBRARY_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
@ -205,4 +205,4 @@ protected:
|
|||||||
Vector<Ref<Material>> _prop_materials;
|
Vector<Ref<Material>> _prop_materials;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TERRAIN_LIBRARY_H
|
#endif // TERRAIN_2D_LIBRARY_H
|
||||||
|
@ -233,7 +233,7 @@ void Terrain2DLibraryMerger::refresh_rects() {
|
|||||||
Ref<Terrain2DSurfaceMerger> surface = Ref<Terrain2DSurfaceMerger>(_terra_surfaces[i]);
|
Ref<Terrain2DSurfaceMerger> surface = Ref<Terrain2DSurfaceMerger>(_terra_surfaces[i]);
|
||||||
|
|
||||||
if (surface.is_valid()) {
|
if (surface.is_valid()) {
|
||||||
for (int j = 0; j < Terrain2DSurface::TERRAIN_SIDES_COUNT; ++j) {
|
for (int j = 0; j < Terrain2DSurface::TERRAIN_2D_SIDES_COUNT; ++j) {
|
||||||
Ref<Texture> tex = surface->get_texture(static_cast<Terrain2DSurface::Terrain2DSurfaceSides>(j));
|
Ref<Texture> tex = surface->get_texture(static_cast<Terrain2DSurface::Terrain2DSurfaceSides>(j));
|
||||||
|
|
||||||
if (!tex.is_valid())
|
if (!tex.is_valid())
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_LIBRARY_MERGER_H
|
#ifndef TERRAIN_2D_LIBRARY_MERGER_H
|
||||||
#define TERRAIN_LIBRARY_MERGER_H
|
#define TERRAIN_2D_LIBRARY_MERGER_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -621,7 +621,7 @@ void Terrain2DLibraryMergerPCM::refresh_rects() {
|
|||||||
Ref<Terrain2DSurfaceMerger> surface = Ref<Terrain2DSurfaceMerger>(_terra_surfaces[i]);
|
Ref<Terrain2DSurfaceMerger> surface = Ref<Terrain2DSurfaceMerger>(_terra_surfaces[i]);
|
||||||
|
|
||||||
if (surface.is_valid()) {
|
if (surface.is_valid()) {
|
||||||
for (int j = 0; j < Terrain2DSurface::TERRAIN_SIDES_COUNT; ++j) {
|
for (int j = 0; j < Terrain2DSurface::TERRAIN_2D_SIDES_COUNT; ++j) {
|
||||||
Ref<Texture> tex = surface->get_texture(static_cast<Terrain2DSurface::Terrain2DSurfaceSides>(j));
|
Ref<Texture> tex = surface->get_texture(static_cast<Terrain2DSurface::Terrain2DSurfaceSides>(j));
|
||||||
|
|
||||||
if (!tex.is_valid())
|
if (!tex.is_valid())
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_LIBRARY_MERGER_PCM_H
|
#ifndef TERRAIN_2D_LIBRARY_MERGER_PCM_H
|
||||||
#define TERRAIN_LIBRARY_MERGER_PCM_H
|
#define TERRAIN_2D_LIBRARY_MERGER_PCM_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_LIBRARY_SIMPLE_H
|
#ifndef TERRAIN_2D_LIBRARY_SIMPLE_H
|
||||||
#define TERRAIN_LIBRARY_SIMPLE_H
|
#define TERRAIN_2D_LIBRARY_SIMPLE_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
@ -77,4 +77,4 @@ private:
|
|||||||
int _atlas_rows;
|
int _atlas_rows;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TERRAIN_LIBRARY_H
|
#endif // TERRAIN_2D_LIBRARY_H
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_MATERIAL_CACHE_H
|
#ifndef TERRAIN_2D_MATERIAL_CACHE_H
|
||||||
#define TERRAIN_MATERIAL_CACHE_H
|
#define TERRAIN_2D_MATERIAL_CACHE_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ void Terrain2DMaterialCachePCM::refresh_rects() {
|
|||||||
Ref<Terrain2DSurfaceMerger> surface = Ref<Terrain2DSurfaceMerger>(_surfaces[i]);
|
Ref<Terrain2DSurfaceMerger> surface = Ref<Terrain2DSurfaceMerger>(_surfaces[i]);
|
||||||
|
|
||||||
if (surface.is_valid()) {
|
if (surface.is_valid()) {
|
||||||
for (int j = 0; j < Terrain2DSurface::TERRAIN_SIDES_COUNT; ++j) {
|
for (int j = 0; j < Terrain2DSurface::TERRAIN_2D_SIDES_COUNT; ++j) {
|
||||||
Ref<Texture> tex = surface->get_texture(static_cast<Terrain2DSurface::Terrain2DSurfaceSides>(j));
|
Ref<Texture> tex = surface->get_texture(static_cast<Terrain2DSurface::Terrain2DSurfaceSides>(j));
|
||||||
|
|
||||||
if (!tex.is_valid())
|
if (!tex.is_valid())
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_MATERIAL_CACHE_PCM_H
|
#ifndef TERRAIN_2D_MATERIAL_CACHE_PCM_H
|
||||||
#define TERRAIN_MATERIAL_CACHE_PCM_H
|
#define TERRAIN_2D_MATERIAL_CACHE_PCM_H
|
||||||
|
|
||||||
#include "terrain_2d_material_cache.h"
|
#include "terrain_2d_material_cache.h"
|
||||||
|
|
||||||
|
@ -104,9 +104,9 @@ void Terrain2DSurface::_bind_methods() {
|
|||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("refresh_rects"), &Terrain2DSurface::refresh_rects);
|
ClassDB::bind_method(D_METHOD("refresh_rects"), &Terrain2DSurface::refresh_rects);
|
||||||
|
|
||||||
BIND_ENUM_CONSTANT(TERRAIN_SIDE_TOP);
|
BIND_ENUM_CONSTANT(TERRAIN_2D_SIDE_TOP);
|
||||||
BIND_ENUM_CONSTANT(TERRAIN_SIDE_BOTTOM);
|
BIND_ENUM_CONSTANT(TERRAIN_2D_SIDE_BOTTOM);
|
||||||
BIND_ENUM_CONSTANT(TERRAIN_SIDE_SIDE);
|
BIND_ENUM_CONSTANT(TERRAIN_2D_SIDE_SIDE);
|
||||||
|
|
||||||
BIND_CONSTANT(TERRAIN_SIDES_COUNT);
|
BIND_CONSTANT(TERRAIN_2D_SIDES_COUNT);
|
||||||
}
|
}
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_SURFACE_H
|
#ifndef TERRAIN_2D_SURFACE_H
|
||||||
#define TERRAIN_SURFACE_H
|
#define TERRAIN_2D_SURFACE_H
|
||||||
|
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
@ -63,14 +63,14 @@ public:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
enum Terrain2DSurfaceSides {
|
enum Terrain2DSurfaceSides {
|
||||||
TERRAIN_SIDE_TOP = 0,
|
TERRAIN_2D_SIDE_TOP = 0,
|
||||||
TERRAIN_SIDE_BOTTOM = 1,
|
TERRAIN_2D_SIDE_BOTTOM = 1,
|
||||||
TERRAIN_SIDE_SIDE = 2,
|
TERRAIN_2D_SIDE_SIDE = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
TERRAIN_SIDES_COUNT = 3,
|
TERRAIN_2D_SIDES_COUNT = 3,
|
||||||
TERRAIN_SIDES_ARRAY_SIZE = TERRAIN_SIDES_COUNT * 2,
|
TERRAIN_2D_SIDES_ARRAY_SIZE = TERRAIN_2D_SIDES_COUNT * 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
int get_id() const;
|
int get_id() const;
|
||||||
@ -99,7 +99,7 @@ protected:
|
|||||||
int _mesher_index;
|
int _mesher_index;
|
||||||
bool _transparent;
|
bool _transparent;
|
||||||
bool _liquid;
|
bool _liquid;
|
||||||
Rect2 _rects[TERRAIN_SIDES_COUNT];
|
Rect2 _rects[TERRAIN_2D_SIDES_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
VARIANT_ENUM_CAST(Terrain2DSurface::Terrain2DSurfaceSides);
|
VARIANT_ENUM_CAST(Terrain2DSurface::Terrain2DSurfaceSides);
|
||||||
|
@ -45,7 +45,7 @@ void Terrain2DSurfaceMerger::set_texture(const Terrain2DSurfaceSides side, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Terrain2DSurfaceMerger::refresh_rects() {
|
void Terrain2DSurfaceMerger::refresh_rects() {
|
||||||
for (int i = 0; i < TERRAIN_SIDES_COUNT; ++i) {
|
for (int i = 0; i < TERRAIN_2D_SIDES_COUNT; ++i) {
|
||||||
if (!_regions[i].is_valid()) {
|
if (!_regions[i].is_valid()) {
|
||||||
_rects[i] = Rect2();
|
_rects[i] = Rect2();
|
||||||
continue;
|
continue;
|
||||||
@ -75,7 +75,7 @@ void Terrain2DSurfaceMerger::refresh_rects() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Terrain2DSurfaceMerger::Terrain2DSurfaceMerger() {
|
Terrain2DSurfaceMerger::Terrain2DSurfaceMerger() {
|
||||||
for (int i = 0; i < TERRAIN_SIDES_COUNT; ++i) {
|
for (int i = 0; i < TERRAIN_2D_SIDES_COUNT; ++i) {
|
||||||
_regions[i].unref();
|
_regions[i].unref();
|
||||||
_textures[i].unref();
|
_textures[i].unref();
|
||||||
}
|
}
|
||||||
@ -87,13 +87,13 @@ Terrain2DSurfaceMerger::~Terrain2DSurfaceMerger() {
|
|||||||
void Terrain2DSurfaceMerger::_bind_methods() {
|
void Terrain2DSurfaceMerger::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("get_region", "side"), &Terrain2DSurfaceMerger::get_region);
|
ClassDB::bind_method(D_METHOD("get_region", "side"), &Terrain2DSurfaceMerger::get_region);
|
||||||
ClassDB::bind_method(D_METHOD("set_region", "side", "texture"), &Terrain2DSurfaceMerger::set_region);
|
ClassDB::bind_method(D_METHOD("set_region", "side", "texture"), &Terrain2DSurfaceMerger::set_region);
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "region_top", PROPERTY_HINT_RESOURCE_TYPE, "AtlasTexture", 0), "set_region", "get_region", TERRAIN_SIDE_TOP);
|
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "region_top", PROPERTY_HINT_RESOURCE_TYPE, "AtlasTexture", 0), "set_region", "get_region", TERRAIN_2D_SIDE_TOP);
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "region_bottom", PROPERTY_HINT_RESOURCE_TYPE, "AtlasTexture", 0), "set_region", "get_region", TERRAIN_SIDE_BOTTOM);
|
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "region_bottom", PROPERTY_HINT_RESOURCE_TYPE, "AtlasTexture", 0), "set_region", "get_region", TERRAIN_2D_SIDE_BOTTOM);
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "region_side", PROPERTY_HINT_RESOURCE_TYPE, "AtlasTexture", 0), "set_region", "get_region", TERRAIN_SIDE_SIDE);
|
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "region_side", PROPERTY_HINT_RESOURCE_TYPE, "AtlasTexture", 0), "set_region", "get_region", TERRAIN_2D_SIDE_SIDE);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_texture", "side"), &Terrain2DSurfaceMerger::get_texture);
|
ClassDB::bind_method(D_METHOD("get_texture", "side"), &Terrain2DSurfaceMerger::get_texture);
|
||||||
ClassDB::bind_method(D_METHOD("set_texture", "side", "texture"), &Terrain2DSurfaceMerger::set_texture);
|
ClassDB::bind_method(D_METHOD("set_texture", "side", "texture"), &Terrain2DSurfaceMerger::set_texture);
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_top", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", TERRAIN_SIDE_TOP);
|
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_top", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", TERRAIN_2D_SIDE_TOP);
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_bottom", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", TERRAIN_SIDE_BOTTOM);
|
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_bottom", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", TERRAIN_2D_SIDE_BOTTOM);
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_side", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", TERRAIN_SIDE_SIDE);
|
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_side", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", TERRAIN_2D_SIDE_SIDE);
|
||||||
}
|
}
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_SURFACE_MERGER_H
|
#ifndef TERRAIN_2D_SURFACE_MERGER_H
|
||||||
#define TERRAIN_SURFACE_MERGER_H
|
#define TERRAIN_2D_SURFACE_MERGER_H
|
||||||
|
|
||||||
#include "terrain_2d_surface.h"
|
#include "terrain_2d_surface.h"
|
||||||
|
|
||||||
@ -54,8 +54,8 @@ protected:
|
|||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ref<AtlasTexture> _regions[TERRAIN_SIDES_COUNT];
|
Ref<AtlasTexture> _regions[TERRAIN_2D_SIDES_COUNT];
|
||||||
Ref<Texture> _textures[TERRAIN_SIDES_COUNT];
|
Ref<Texture> _textures[TERRAIN_2D_SIDES_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -51,7 +51,7 @@ void Terrain2DSurfaceSimple::refresh_rects() {
|
|||||||
|
|
||||||
ERR_FAIL_COND(lib == NULL);
|
ERR_FAIL_COND(lib == NULL);
|
||||||
|
|
||||||
for (int i = 0; i < TERRAIN_SIDES_COUNT; ++i) {
|
for (int i = 0; i < TERRAIN_2D_SIDES_COUNT; ++i) {
|
||||||
float culomn = 1.0 / static_cast<float>(lib->get_atlas_columns());
|
float culomn = 1.0 / static_cast<float>(lib->get_atlas_columns());
|
||||||
float row = 1.0 / static_cast<float>(lib->get_atlas_rows());
|
float row = 1.0 / static_cast<float>(lib->get_atlas_rows());
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ void Terrain2DSurfaceSimple::refresh_rects() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Terrain2DSurfaceSimple::Terrain2DSurfaceSimple() {
|
Terrain2DSurfaceSimple::Terrain2DSurfaceSimple() {
|
||||||
for (int i = 0; i < TERRAIN_SIDES_ARRAY_SIZE; ++i) {
|
for (int i = 0; i < TERRAIN_2D_SIDES_ARRAY_SIZE; ++i) {
|
||||||
_atlas_positions[i] = 0;
|
_atlas_positions[i] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,12 +83,12 @@ void Terrain2DSurfaceSimple::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("get_atlas_y", "side"), &Terrain2DSurfaceSimple::get_atlas_y);
|
ClassDB::bind_method(D_METHOD("get_atlas_y", "side"), &Terrain2DSurfaceSimple::get_atlas_y);
|
||||||
ClassDB::bind_method(D_METHOD("set_atlas_y", "side", "value"), &Terrain2DSurfaceSimple::set_atlas_y);
|
ClassDB::bind_method(D_METHOD("set_atlas_y", "side", "value"), &Terrain2DSurfaceSimple::set_atlas_y);
|
||||||
|
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::INT, "top_atlas_x"), "set_atlas_x", "get_atlas_x", TERRAIN_SIDE_TOP);
|
ADD_PROPERTYI(PropertyInfo(Variant::INT, "top_atlas_x"), "set_atlas_x", "get_atlas_x", TERRAIN_2D_SIDE_TOP);
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::INT, "top_atlas_y"), "set_atlas_y", "get_atlas_y", TERRAIN_SIDE_TOP);
|
ADD_PROPERTYI(PropertyInfo(Variant::INT, "top_atlas_y"), "set_atlas_y", "get_atlas_y", TERRAIN_2D_SIDE_TOP);
|
||||||
|
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::INT, "bottom_atlas_x"), "set_atlas_x", "get_atlas_x", TERRAIN_SIDE_BOTTOM);
|
ADD_PROPERTYI(PropertyInfo(Variant::INT, "bottom_atlas_x"), "set_atlas_x", "get_atlas_x", TERRAIN_2D_SIDE_BOTTOM);
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::INT, "bottom_atlas_y"), "set_atlas_y", "get_atlas_y", TERRAIN_SIDE_BOTTOM);
|
ADD_PROPERTYI(PropertyInfo(Variant::INT, "bottom_atlas_y"), "set_atlas_y", "get_atlas_y", TERRAIN_2D_SIDE_BOTTOM);
|
||||||
|
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::INT, "side_atlas_x"), "set_atlas_x", "get_atlas_x", TERRAIN_SIDE_SIDE);
|
ADD_PROPERTYI(PropertyInfo(Variant::INT, "side_atlas_x"), "set_atlas_x", "get_atlas_x", TERRAIN_2D_SIDE_SIDE);
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::INT, "side_atlas_y"), "set_atlas_y", "get_atlas_y", TERRAIN_SIDE_SIDE);
|
ADD_PROPERTYI(PropertyInfo(Variant::INT, "side_atlas_y"), "set_atlas_y", "get_atlas_y", TERRAIN_2D_SIDE_SIDE);
|
||||||
}
|
}
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_SURFACE_SIMPLE_H
|
#ifndef TERRAIN_2D_SURFACE_SIMPLE_H
|
||||||
#define TERRAIN_SURFACE_SIMPLE_H
|
#define TERRAIN_2D_SURFACE_SIMPLE_H
|
||||||
|
|
||||||
#include "terrain_2d_surface.h"
|
#include "terrain_2d_surface.h"
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ protected:
|
|||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int _atlas_positions[TERRAIN_SIDES_ARRAY_SIZE];
|
int _atlas_positions[TERRAIN_2D_SIDES_ARRAY_SIZE];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -173,10 +173,10 @@ void Terrain2DMesherBlocky::add_chunk_normal(Ref<Terrain2DChunkDefault> chunk) {
|
|||||||
add_indices(vc + 0);
|
add_indices(vc + 0);
|
||||||
|
|
||||||
Vector2 uvs[] = {
|
Vector2 uvs[] = {
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(1, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(1, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(0, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(0, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(0, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(0, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(1, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale())
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(1, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale())
|
||||||
};
|
};
|
||||||
|
|
||||||
Vector3 verts[] = {
|
Vector3 verts[] = {
|
||||||
@ -340,10 +340,10 @@ void Terrain2DMesherBlocky::add_chunk_lod(Ref<Terrain2DChunkDefault> chunk) {
|
|||||||
add_indices(vc + 0);
|
add_indices(vc + 0);
|
||||||
|
|
||||||
Vector2 uvs[] = {
|
Vector2 uvs[] = {
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(1, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(1, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(0, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(0, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(0, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(0, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(1, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale())
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(1, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale())
|
||||||
};
|
};
|
||||||
|
|
||||||
Vector3 verts[] = {
|
Vector3 verts[] = {
|
||||||
@ -512,10 +512,10 @@ void Terrain2DMesherBlocky::create_margin_zmin(Ref<Terrain2DChunkDefault> chunk)
|
|||||||
add_indices(vc + 0);
|
add_indices(vc + 0);
|
||||||
|
|
||||||
Vector2 uvs[] = {
|
Vector2 uvs[] = {
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(1, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(1, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(0, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(0, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(0, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(0, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(1, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale())
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(1, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale())
|
||||||
};
|
};
|
||||||
|
|
||||||
float vi0 = Math::lerp(isolevels[2], isolevels[3], x_interp);
|
float vi0 = Math::lerp(isolevels[2], isolevels[3], x_interp);
|
||||||
@ -684,10 +684,10 @@ void Terrain2DMesherBlocky::create_margin_zmax(Ref<Terrain2DChunkDefault> chunk)
|
|||||||
add_indices(vc + 0);
|
add_indices(vc + 0);
|
||||||
|
|
||||||
Vector2 uvs[] = {
|
Vector2 uvs[] = {
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(1, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(1, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(0, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(0, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(0, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(0, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(1, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale())
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(1, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale())
|
||||||
};
|
};
|
||||||
|
|
||||||
float vi0 = Math::lerp(isolevels[1], isolevels[0], x_interp);
|
float vi0 = Math::lerp(isolevels[1], isolevels[0], x_interp);
|
||||||
@ -856,10 +856,10 @@ void Terrain2DMesherBlocky::create_margin_xmin(Ref<Terrain2DChunkDefault> chunk)
|
|||||||
add_indices(vc + 0);
|
add_indices(vc + 0);
|
||||||
|
|
||||||
Vector2 uvs[] = {
|
Vector2 uvs[] = {
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(1, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(1, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(0, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(0, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(0, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(0, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(1, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale())
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(1, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale())
|
||||||
};
|
};
|
||||||
|
|
||||||
float vi0 = Math::lerp(isolevels[0], isolevels[3], z_interp);
|
float vi0 = Math::lerp(isolevels[0], isolevels[3], z_interp);
|
||||||
@ -1026,10 +1026,10 @@ void Terrain2DMesherBlocky::create_margin_xmax(Ref<Terrain2DChunkDefault> chunk)
|
|||||||
add_indices(vc + 0);
|
add_indices(vc + 0);
|
||||||
|
|
||||||
Vector2 uvs[] = {
|
Vector2 uvs[] = {
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(1, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(1, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(0, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(0, 0), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(0, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(0, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(1, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale())
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(1, 1), x % get_texture_scale(), z % get_texture_scale(), get_texture_scale())
|
||||||
};
|
};
|
||||||
|
|
||||||
float vi0 = Math::lerp(isolevels[1], isolevels[2], z_interp);
|
float vi0 = Math::lerp(isolevels[1], isolevels[2], z_interp);
|
||||||
@ -1186,10 +1186,10 @@ void Terrain2DMesherBlocky::create_face(Ref<Terrain2DChunkDefault> chunk, int da
|
|||||||
add_indices(vc + 0);
|
add_indices(vc + 0);
|
||||||
|
|
||||||
Vector2 uvs[] = {
|
Vector2 uvs[] = {
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(1, 0), dataxmin % get_texture_scale(), datazmin % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(1, 0), dataxmin % get_texture_scale(), datazmin % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(0, 0), dataxmin % get_texture_scale(), datazmin % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(0, 0), dataxmin % get_texture_scale(), datazmin % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(0, 1), dataxmin % get_texture_scale(), datazmin % get_texture_scale(), get_texture_scale()),
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(0, 1), dataxmin % get_texture_scale(), datazmin % get_texture_scale(), get_texture_scale()),
|
||||||
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_SIDE_TOP, Vector2(1, 1), dataxmin % get_texture_scale(), datazmin % get_texture_scale(), get_texture_scale())
|
surface->transform_uv_scaled(Terrain2DSurface::TERRAIN_2D_SIDE_TOP, Vector2(1, 1), dataxmin % get_texture_scale(), datazmin % get_texture_scale(), get_texture_scale())
|
||||||
};
|
};
|
||||||
|
|
||||||
Vector3 verts[] = {
|
Vector3 verts[] = {
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_MESHER_BLOCKY_H
|
#ifndef TERRAIN_2D_MESHER_BLOCKY_H
|
||||||
#define TERRAIN_MESHER_BLOCKY_H
|
#define TERRAIN_2D_MESHER_BLOCKY_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_MESHER_DEFAULT_H
|
#ifndef TERRAIN_2D_MESHER_DEFAULT_H
|
||||||
#define TERRAIN_MESHER_DEFAULT_H
|
#define TERRAIN_2D_MESHER_DEFAULT_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_TOOLS_H
|
#ifndef TERRAIN_2D_TOOLS_H
|
||||||
#define TERRAIN_TOOLS_H
|
#define TERRAIN_2D_TOOLS_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_LIGHT_NODE_H
|
#ifndef TERRAIN_2D_LIGHT_NODE_H
|
||||||
#define TERRAIN_LIGHT_NODE_H
|
#define TERRAIN_2D_LIGHT_NODE_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_REGISTER_TYPES_H
|
#ifndef TERRAIN_2D_REGISTER_TYPES_H
|
||||||
#define TERRAIN_REGISTER_TYPES_H
|
#define TERRAIN_2D_REGISTER_TYPES_H
|
||||||
|
|
||||||
void register_terraman_2d_types();
|
void register_terraman_2d_types();
|
||||||
void unregister_terraman_2d_types();
|
void unregister_terraman_2d_types();
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BLOCK_TERRAIN_STRUCTURE_H
|
#ifndef BLOCK_TERRAIN_2D_STRUCTURE_H
|
||||||
#define BLOCK_TERRAIN_STRUCTURE_H
|
#define BLOCK_TERRAIN_2D_STRUCTURE_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_CHUNK_BLOCKY_H
|
#ifndef TERRAIN_2D_CHUNK_BLOCKY_H
|
||||||
#define TERRAIN_CHUNK_BLOCKY_H
|
#define TERRAIN_2D_CHUNK_BLOCKY_H
|
||||||
|
|
||||||
#include "../default/terrain_2d_chunk_default.h"
|
#include "../default/terrain_2d_chunk_default.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_WORLD_BLOCKY_H
|
#ifndef TERRAIN_2D_WORLD_BLOCKY_H
|
||||||
#define TERRAIN_WORLD_BLOCKY_H
|
#define TERRAIN_2D_WORLD_BLOCKY_H
|
||||||
|
|
||||||
#include "../default/terrain_2d_world_default.h"
|
#include "../default/terrain_2d_world_default.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_CHUNK_DEFAULT_H
|
#ifndef TERRAIN_2D_CHUNK_DEFAULT_H
|
||||||
#define TERRAIN_CHUNK_DEFAULT_H
|
#define TERRAIN_2D_CHUNK_DEFAULT_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_WORLD_DEFAULT_H
|
#ifndef TERRAIN_2D_WORLD_DEFAULT_H
|
||||||
#define TERRAIN_WORLD_DEFAULT_H
|
#define TERRAIN_2D_WORLD_DEFAULT_H
|
||||||
|
|
||||||
#include "../terrain_2d_world.h"
|
#include "../terrain_2d_world.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_JOB_H
|
#ifndef TERRAIN_2D_JOB_H
|
||||||
#define TERRAIN_JOB_H
|
#define TERRAIN_2D_JOB_H
|
||||||
|
|
||||||
#include "scene/resources/texture.h"
|
#include "scene/resources/texture.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_LIGHT_JOB_H
|
#ifndef TERRAIN_2D_LIGHT_JOB_H
|
||||||
#define TERRAIN_LIGHT_JOB_H
|
#define TERRAIN_2D_LIGHT_JOB_H
|
||||||
|
|
||||||
#include "terrain_2d_job.h"
|
#include "terrain_2d_job.h"
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ SOFTWARE.
|
|||||||
|
|
||||||
#include "terrain_2d_mesher_job_step.h"
|
#include "terrain_2d_mesher_job_step.h"
|
||||||
|
|
||||||
const String Terrain2DMesherJobStep::BINDING_STRING_TERRAIN_TERRAIN_JOB_STEP_TYPE = "Normal,Normal LOD,Drop UV2,Merge Verts,Bake Texture,Simplify Mesh";
|
const String Terrain2DMesherJobStep::BINDING_STRING_TERRAIN_2D_TERRAIN_2D_JOB_STEP_TYPE = "Normal,Normal LOD,Drop UV2,Merge Verts,Bake Texture,Simplify Mesh";
|
||||||
|
|
||||||
Terrain2DMesherJobStep::Terrain2DMesherJobStepType Terrain2DMesherJobStep::get_job_type() const {
|
Terrain2DMesherJobStep::Terrain2DMesherJobStepType Terrain2DMesherJobStep::get_job_type() const {
|
||||||
return _job_type;
|
return _job_type;
|
||||||
@ -89,7 +89,7 @@ Terrain2DMesherJobStep::~Terrain2DMesherJobStep() {
|
|||||||
void Terrain2DMesherJobStep::_bind_methods() {
|
void Terrain2DMesherJobStep::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("get_job_type"), &Terrain2DMesherJobStep::get_job_type);
|
ClassDB::bind_method(D_METHOD("get_job_type"), &Terrain2DMesherJobStep::get_job_type);
|
||||||
ClassDB::bind_method(D_METHOD("set_job_type", "value"), &Terrain2DMesherJobStep::set_job_type);
|
ClassDB::bind_method(D_METHOD("set_job_type", "value"), &Terrain2DMesherJobStep::set_job_type);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "job_type", PROPERTY_HINT_ENUM, Terrain2DMesherJobStep::BINDING_STRING_TERRAIN_TERRAIN_JOB_STEP_TYPE), "set_job_type", "get_job_type");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "job_type", PROPERTY_HINT_ENUM, Terrain2DMesherJobStep::BINDING_STRING_TERRAIN_2D_TERRAIN_2D_JOB_STEP_TYPE), "set_job_type", "get_job_type");
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_lod_index"), &Terrain2DMesherJobStep::get_lod_index);
|
ClassDB::bind_method(D_METHOD("get_lod_index"), &Terrain2DMesherJobStep::get_lod_index);
|
||||||
ClassDB::bind_method(D_METHOD("set_lod_index", "value"), &Terrain2DMesherJobStep::set_lod_index);
|
ClassDB::bind_method(D_METHOD("set_lod_index", "value"), &Terrain2DMesherJobStep::set_lod_index);
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_TERRAIN_JOB_STEP_H
|
#ifndef TERRAIN_2D_TERRAIN_2D_JOB_STEP_H
|
||||||
#define TERRAIN_TERRAIN_JOB_STEP_H
|
#define TERRAIN_2D_TERRAIN_2D_JOB_STEP_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ public:
|
|||||||
TYPE_OTHER,
|
TYPE_OTHER,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const String BINDING_STRING_TERRAIN_TERRAIN_JOB_STEP_TYPE;
|
static const String BINDING_STRING_TERRAIN_2D_TERRAIN_2D_JOB_STEP_TYPE;
|
||||||
|
|
||||||
Terrain2DMesherJobStepType get_job_type() const;
|
Terrain2DMesherJobStepType get_job_type() const;
|
||||||
void set_job_type(const Terrain2DMesherJobStepType value);
|
void set_job_type(const Terrain2DMesherJobStepType value);
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_PROP_JOB_H
|
#ifndef TERRAIN_2D_PROP_JOB_H
|
||||||
#define TERRAIN_PROP_JOB_H
|
#define TERRAIN_2D_PROP_JOB_H
|
||||||
|
|
||||||
#include "terrain_2d_job.h"
|
#include "terrain_2d_job.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_TERRAIN_JOB_H
|
#ifndef TERRAIN_2D_TERRAIN_2D_JOB_H
|
||||||
#define TERRAIN_TERRAIN_JOB_H
|
#define TERRAIN_2D_TERRAIN_2D_JOB_H
|
||||||
|
|
||||||
#include "terrain_2d_job.h"
|
#include "terrain_2d_job.h"
|
||||||
|
|
||||||
|
@ -1074,7 +1074,7 @@ Terrain2DChunk::Terrain2DChunk() {
|
|||||||
|
|
||||||
_is_generating = false;
|
_is_generating = false;
|
||||||
_dirty = false;
|
_dirty = false;
|
||||||
_state = TERRAIN_CHUNK_STATE_OK;
|
_state = TERRAIN_2D_CHUNK_STATE_OK;
|
||||||
|
|
||||||
_voxel_scale = 1;
|
_voxel_scale = 1;
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_CHUNK_H
|
#ifndef TERRAIN_2D_CHUNK_H
|
||||||
#define TERRAIN_CHUNK_H
|
#define TERRAIN_2D_CHUNK_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ class Terrain2DChunk : public Resource {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
enum {
|
enum {
|
||||||
TERRAIN_CHUNK_STATE_OK = 0,
|
TERRAIN_2D_CHUNK_STATE_OK = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_ENVIRONMENT_DATA_H
|
#ifndef TERRAIN_2D_ENVIRONMENT_DATA_H
|
||||||
#define TERRAIN_ENVIRONMENT_DATA_H
|
#define TERRAIN_2D_ENVIRONMENT_DATA_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_STRUCTURE_H
|
#ifndef TERRAIN_2D_STRUCTURE_H
|
||||||
#define TERRAIN_STRUCTURE_H
|
#define TERRAIN_2D_STRUCTURE_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_WORLD_H
|
#ifndef TERRAIN_2D_WORLD_H
|
||||||
#define TERRAIN_WORLD_H
|
#define TERRAIN_2D_WORLD_H
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TERRAIN_WORLD_EDITOR_PLUGIN_H
|
#ifndef TERRAIN_2D_WORLD_EDITOR_PLUGIN_H
|
||||||
#define TERRAIN_WORLD_EDITOR_PLUGIN_H
|
#define TERRAIN_2D_WORLD_EDITOR_PLUGIN_H
|
||||||
|
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_plugin.h"
|
#include "editor/editor_plugin.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user