mirror of
https://github.com/Relintai/props.git
synced 2024-11-12 10:15:25 +01:00
Fix compile for 4.0.
This commit is contained in:
parent
bfb60df215
commit
f4bc70c94e
@ -4,7 +4,7 @@ This is a c++ engine module for the Godot Engine.
|
|||||||
|
|
||||||
It gives you props, and editor utilities to convert scenes to props.
|
It gives you props, and editor utilities to convert scenes to props.
|
||||||
|
|
||||||
It supports both godot 3.2 and 4.0 (master). Note that since 4.0 is still in very early stages I only
|
It supports both godot 3.2 and 4.0 (master [last tested commit](https://github.com/godotengine/godot/commit/b7e10141197fdd9b0dbc4cfa7890329510d36540)). Note that since 4.0 is still in very early stages I only
|
||||||
check whether it works from time to time.
|
check whether it works from time to time.
|
||||||
|
|
||||||
# Pre-built binaries
|
# Pre-built binaries
|
||||||
|
@ -23,7 +23,13 @@ SOFTWARE.
|
|||||||
#ifndef GROUND_CLUTTER_H
|
#ifndef GROUND_CLUTTER_H
|
||||||
#define GROUND_CLUTTER_H
|
#define GROUND_CLUTTER_H
|
||||||
|
|
||||||
|
#include "core/version.h"
|
||||||
|
|
||||||
|
#if VERSION_MAJOR > 3
|
||||||
|
#include "core/io/resource.h"
|
||||||
|
#else
|
||||||
#include "core/resource.h"
|
#include "core/resource.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef TEXTURE_PACKER_PRESENT
|
#ifdef TEXTURE_PACKER_PRESENT
|
||||||
#include "../../texture_packer/texture_packer.h"
|
#include "../../texture_packer/texture_packer.h"
|
||||||
|
@ -23,9 +23,15 @@ SOFTWARE.
|
|||||||
#ifndef GROUND_CLUTTER_FOLIAGE_H
|
#ifndef GROUND_CLUTTER_FOLIAGE_H
|
||||||
#define GROUND_CLUTTER_FOLIAGE_H
|
#define GROUND_CLUTTER_FOLIAGE_H
|
||||||
|
|
||||||
#include "ground_clutter.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
#if VERSION_MAJOR > 3
|
||||||
|
#include "core/templates/vector.h"
|
||||||
|
#else
|
||||||
#include "core/vector.h"
|
#include "core/vector.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "ground_clutter.h"
|
||||||
|
|
||||||
#include "scene/resources/texture.h"
|
#include "scene/resources/texture.h"
|
||||||
|
|
||||||
|
@ -90,8 +90,11 @@ void PropEditorPlugin::_convert_selected_scene_to_prop_data(Variant param) {
|
|||||||
PropEditorPlugin::PropEditorPlugin(EditorNode *p_node) {
|
PropEditorPlugin::PropEditorPlugin(EditorNode *p_node) {
|
||||||
editor = p_node;
|
editor = p_node;
|
||||||
|
|
||||||
|
#if VERSION_MAJOR < 4
|
||||||
editor->add_tool_menu_item("Convert active scene to PropData", this, "convert_active_scene_to_prop_data");
|
editor->add_tool_menu_item("Convert active scene to PropData", this, "convert_active_scene_to_prop_data");
|
||||||
editor->add_tool_menu_item("Convert selected scene(s) to PropData", this, "convert_selected_scene_to_prop_data");
|
editor->add_tool_menu_item("Convert selected scene(s) to PropData", this, "convert_selected_scene_to_prop_data");
|
||||||
|
#else
|
||||||
|
#endif
|
||||||
|
|
||||||
HBoxContainer *container = memnew(HBoxContainer);
|
HBoxContainer *container = memnew(HBoxContainer);
|
||||||
|
|
||||||
|
@ -4,7 +4,13 @@
|
|||||||
|
|
||||||
//#include "../thread_pool/thread_pool.h"
|
//#include "../thread_pool/thread_pool.h"
|
||||||
|
|
||||||
|
#include "core/version.h"
|
||||||
|
|
||||||
|
#if VERSION_MAJOR > 3
|
||||||
|
#include "core/config/engine.h"
|
||||||
|
#else
|
||||||
#include "core/engine.h"
|
#include "core/engine.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
Ref<PropData> PropInstance::get_prop_data() {
|
Ref<PropData> PropInstance::get_prop_data() {
|
||||||
return _prop_data;
|
return _prop_data;
|
||||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
|||||||
#ifndef PROP_INSTANCE_JOB_H
|
#ifndef PROP_INSTANCE_JOB_H
|
||||||
#define PROP_INSTANCE_JOB_H
|
#define PROP_INSTANCE_JOB_H
|
||||||
|
|
||||||
#include "core/math/vector3.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
#if VERSION_MAJOR > 3
|
||||||
|
#include "core/templates/vector.h"
|
||||||
|
#else
|
||||||
#include "core/vector.h"
|
#include "core/vector.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "core/math/vector3.h"
|
||||||
|
|
||||||
#include "../thread_pool/thread_pool_job.h"
|
#include "../thread_pool/thread_pool_job.h"
|
||||||
|
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
#include "prop_scene_instance.h"
|
#include "prop_scene_instance.h"
|
||||||
|
|
||||||
|
#include "core/version.h"
|
||||||
|
|
||||||
|
#if VERSION_MAJOR > 3
|
||||||
|
#include "core/config/engine.h"
|
||||||
|
#else
|
||||||
#include "core/engine.h"
|
#include "core/engine.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
Ref<PackedScene> PropSceneInstance::get_scene() {
|
Ref<PackedScene> PropSceneInstance::get_scene() {
|
||||||
return _scene;
|
return _scene;
|
||||||
|
@ -23,12 +23,20 @@ SOFTWARE.
|
|||||||
#ifndef PROP_DATA_H
|
#ifndef PROP_DATA_H
|
||||||
#define PROP_DATA_H
|
#define PROP_DATA_H
|
||||||
|
|
||||||
|
#include "core/version.h"
|
||||||
|
|
||||||
|
#if VERSION_MAJOR > 3
|
||||||
|
#include "core/object/reference.h"
|
||||||
|
#include "core/templates/vector.h"
|
||||||
|
#else
|
||||||
|
#include "core/reference.h"
|
||||||
|
#include "core/vector.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "core/math/rect2.h"
|
#include "core/math/rect2.h"
|
||||||
#include "core/math/transform.h"
|
#include "core/math/transform.h"
|
||||||
#include "core/math/vector2.h"
|
#include "core/math/vector2.h"
|
||||||
#include "core/math/vector3.h"
|
#include "core/math/vector3.h"
|
||||||
#include "core/reference.h"
|
|
||||||
#include "core/vector.h"
|
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
@ -23,8 +23,15 @@ SOFTWARE.
|
|||||||
#ifndef PROP_DATA_DATA_H
|
#ifndef PROP_DATA_DATA_H
|
||||||
#define PROP_DATA_DATA_H
|
#define PROP_DATA_DATA_H
|
||||||
|
|
||||||
#include "core/math/transform.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
#if VERSION_MAJOR > 3
|
||||||
|
#include "core/io/resource.h"
|
||||||
|
#else
|
||||||
#include "core/resource.h"
|
#include "core/resource.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "core/math/transform.h"
|
||||||
|
|
||||||
#if TEXTURE_PACKER_PRESENT
|
#if TEXTURE_PACKER_PRESENT
|
||||||
#include "../../texture_packer/texture_packer.h"
|
#include "../../texture_packer/texture_packer.h"
|
||||||
|
@ -23,9 +23,15 @@ SOFTWARE.
|
|||||||
#ifndef PROP_DATA_LIGHT_H
|
#ifndef PROP_DATA_LIGHT_H
|
||||||
#define PROP_DATA_LIGHT_H
|
#define PROP_DATA_LIGHT_H
|
||||||
|
|
||||||
#include "prop_data_entry.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
#if VERSION_MAJOR > 3
|
||||||
|
#include "core/math/color.h"
|
||||||
|
#else
|
||||||
#include "core/color.h"
|
#include "core/color.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "prop_data_entry.h"
|
||||||
|
|
||||||
class PropDataLight : public PropDataEntry {
|
class PropDataLight : public PropDataEntry {
|
||||||
GDCLASS(PropDataLight, PropDataEntry);
|
GDCLASS(PropDataLight, PropDataEntry);
|
||||||
|
@ -22,6 +22,14 @@ SOFTWARE.
|
|||||||
|
|
||||||
#include "register_types.h"
|
#include "register_types.h"
|
||||||
|
|
||||||
|
#include "core/version.h"
|
||||||
|
|
||||||
|
#if VERSION_MAJOR > 3
|
||||||
|
#include "core/config/engine.h"
|
||||||
|
#else
|
||||||
|
#include "core/engine.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "props/prop_data.h"
|
#include "props/prop_data.h"
|
||||||
#include "props/prop_data_entry.h"
|
#include "props/prop_data_entry.h"
|
||||||
#include "props/prop_data_light.h"
|
#include "props/prop_data_light.h"
|
||||||
@ -38,7 +46,6 @@ SOFTWARE.
|
|||||||
|
|
||||||
#include "prop_scene_instance.h"
|
#include "prop_scene_instance.h"
|
||||||
|
|
||||||
#include "core/engine.h"
|
|
||||||
#include "singleton/prop_utils.h"
|
#include "singleton/prop_utils.h"
|
||||||
|
|
||||||
#include "./editor/prop_editor_plugin.h"
|
#include "./editor/prop_editor_plugin.h"
|
||||||
|
@ -24,10 +24,15 @@ SOFTWARE.
|
|||||||
|
|
||||||
#include "../props/prop_data.h"
|
#include "../props/prop_data.h"
|
||||||
#include "../props/prop_data_entry.h"
|
#include "../props/prop_data_entry.h"
|
||||||
#include "core/engine.h"
|
|
||||||
|
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
|
|
||||||
|
#if VERSION_MAJOR > 3
|
||||||
|
#include "core/config/engine.h"
|
||||||
|
#else
|
||||||
|
#include "core/engine.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
PropUtils *PropUtils::_instance;
|
PropUtils *PropUtils::_instance;
|
||||||
Vector<Ref<PropDataEntry>> PropUtils::_processors;
|
Vector<Ref<PropDataEntry>> PropUtils::_processors;
|
||||||
|
|
||||||
|
@ -23,11 +23,17 @@ SOFTWARE.
|
|||||||
#ifndef PROP_UTILS_H
|
#ifndef PROP_UTILS_H
|
||||||
#define PROP_UTILS_H
|
#define PROP_UTILS_H
|
||||||
|
|
||||||
|
#include "core/version.h"
|
||||||
|
|
||||||
|
#if VERSION_MAJOR > 3
|
||||||
|
#include "core/object/object.h"
|
||||||
|
#include "core/object/reference.h"
|
||||||
|
#include "core/templates/vector.h"
|
||||||
|
#else
|
||||||
#include "core/object.h"
|
#include "core/object.h"
|
||||||
|
|
||||||
#include "core/vector.h"
|
|
||||||
|
|
||||||
#include "core/reference.h"
|
#include "core/reference.h"
|
||||||
|
#include "core/vector.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
class PropData;
|
class PropData;
|
||||||
class PropDataEntry;
|
class PropDataEntry;
|
||||||
@ -60,7 +66,7 @@ private:
|
|||||||
void _remove_processor_bind(const int index);
|
void _remove_processor_bind(const int index);
|
||||||
int _get_processor_count_bind();
|
int _get_processor_count_bind();
|
||||||
|
|
||||||
static Vector<Ref<PropDataEntry> > _processors;
|
static Vector<Ref<PropDataEntry>> _processors;
|
||||||
static PropUtils *_instance;
|
static PropUtils *_instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user