Update BBParam classes for Godot 4

This commit is contained in:
Serhii Snitsaruk 2022-12-17 14:22:55 +01:00
parent 36bae84125
commit 2215999689
10 changed files with 130 additions and 21 deletions

View File

@ -1,16 +1,16 @@
/* bb_real_array.h */
#ifndef BB_REAL_ARRAY_H
#define BB_REAL_ARRAY_H
#ifndef BB_FLOAT_ARRAY_H
#define BB_FLOAT_ARRAY_H
#include "bb_param.h"
#include "core/object/object.h"
class BBRealArray : public BBParam {
GDCLASS(BBRealArray, BBParam);
class BBFloatArray : public BBParam {
GDCLASS(BBFloatArray, BBParam);
protected:
virtual Variant::Type get_type() const override { return Variant::PACKED_FLOAT64_ARRAY; }
};
#endif // BB_REAL_ARRAY_H
#endif // BB_FLOAT_ARRAY_H

View File

@ -1,16 +1,16 @@
/* bb_quat.h */
#ifndef BB_QUAT_H
#define BB_QUAT_H
#ifndef BB_QUATERNION_H
#define BB_QUATERNION_H
#include "bb_param.h"
#include "core/object/object.h"
class BBQuat : public BBParam {
GDCLASS(BBQuat, BBParam);
class BBQuaternion : public BBParam {
GDCLASS(BBQuaternion, BBParam);
protected:
virtual Variant::Type get_type() const override { return Variant::QUATERNION; }
};
#endif // BB_QUAT_H
#endif // BB_QUATERNION_H

16
bb_param/bb_rect2i.h Normal file
View File

@ -0,0 +1,16 @@
/* bb_rect2.h */
#ifndef BB_RECT2I_H
#define BB_RECT2I_H
#include "bb_param.h"
#include "core/object/object.h"
class BBRect2i : public BBParam {
GDCLASS(BBRect2i, BBParam);
protected:
virtual Variant::Type get_type() const override { return Variant::RECT2I; }
};
#endif // BB_RECT2I_H

16
bb_param/bb_string_name.h Normal file
View File

@ -0,0 +1,16 @@
/* bb_string.h */
#ifndef BB_STRING_NAME_H
#define BB_STRING_NAME_H
#include "bb_param.h"
#include "core/object/object.h"
class BBStringName : public BBParam {
GDCLASS(BBStringName, BBParam);
protected:
virtual Variant::Type get_type() const override { return Variant::STRING_NAME; }
};
#endif // BB_STRING_H

View File

@ -1,16 +1,16 @@
/* bb_transform.h */
#ifndef BB_TRANSFORM_H
#define BB_TRANSFORM_H
#ifndef BB_TRANSFORM3D_H
#define BB_TRANSFORM3D_H
#include "bb_param.h"
#include "core/object/object.h"
class BBTransform : public BBParam {
GDCLASS(BBTransform, BBParam);
class BBTransform3D : public BBParam {
GDCLASS(BBTransform3D, BBParam);
protected:
virtual Variant::Type get_type() const override { return Variant::TRANSFORM3D; }
};
#endif // BB_TRANSFORM_H
#endif // BB_TRANSFORM3D_H

16
bb_param/bb_vector2i.h Normal file
View File

@ -0,0 +1,16 @@
/* bb_vector2.h */
#ifndef BB_VECTOR2I_H
#define BB_VECTOR2I_H
#include "bb_param.h"
#include "core/object/object.h"
class BBVector2i : public BBParam {
GDCLASS(BBVector2i, BBParam);
protected:
virtual Variant::Type get_type() const override { return Variant::VECTOR2I; }
};
#endif // BB_VECTOR2I_H

16
bb_param/bb_vector3i.h Normal file
View File

@ -0,0 +1,16 @@
/* bb_vector3.h */
#ifndef BB_VECTOR3I_H
#define BB_VECTOR3I_H
#include "bb_param.h"
#include "core/object/object.h"
class BBVector3i : public BBParam {
GDCLASS(BBVector3i, BBParam);
protected:
virtual Variant::Type get_type() const override { return Variant::VECTOR3I; }
};
#endif // BB_VECTOR3I_H

16
bb_param/bb_vector4.h Normal file
View File

@ -0,0 +1,16 @@
/* bb_vector3.h */
#ifndef BB_VECTOR4_H
#define BB_VECTOR4_H
#include "bb_param.h"
#include "core/object/object.h"
class BBVector4 : public BBParam {
GDCLASS(BBVector4, BBParam);
protected:
virtual Variant::Type get_type() const override { return Variant::VECTOR4; }
};
#endif // BB_VECTOR4_H

16
bb_param/bb_vector4i.h Normal file
View File

@ -0,0 +1,16 @@
/* bb_vector3.h */
#ifndef BB_VECTOR4I_H
#define BB_VECTOR4I_H
#include "bb_param.h"
#include "core/object/object.h"
class BBVector4i : public BBParam {
GDCLASS(BBVector4i, BBParam);
protected:
virtual Variant::Type get_type() const override { return Variant::VECTOR4I; }
};
#endif // BB_VECTOR4I_H

View File

@ -13,23 +13,29 @@
#include "bb_param/bb_color_array.h"
#include "bb_param/bb_dictionary.h"
#include "bb_param/bb_float.h"
#include "bb_param/bb_float_array.h"
#include "bb_param/bb_int.h"
#include "bb_param/bb_int_array.h"
#include "bb_param/bb_node.h"
#include "bb_param/bb_param.h"
#include "bb_param/bb_plane.h"
#include "bb_param/bb_quat.h"
#include "bb_param/bb_real_array.h"
#include "bb_param/bb_quaternion.h"
#include "bb_param/bb_rect2.h"
#include "bb_param/bb_rect2i.h"
#include "bb_param/bb_string.h"
#include "bb_param/bb_string_array.h"
#include "bb_param/bb_transform.h"
#include "bb_param/bb_string_name.h"
#include "bb_param/bb_transform2d.h"
#include "bb_param/bb_transform3d.h"
#include "bb_param/bb_variant.h"
#include "bb_param/bb_vector2.h"
#include "bb_param/bb_vector2_array.h"
#include "bb_param/bb_vector2i.h"
#include "bb_param/bb_vector3.h"
#include "bb_param/bb_vector3_array.h"
#include "bb_param/bb_vector3i.h"
#include "bb_param/bb_vector4.h"
#include "bb_param/bb_vector4i.h"
#include "blackboard.h"
#include "bt/actions/bt_action.h"
#include "bt/actions/bt_console_print.h"
@ -130,21 +136,28 @@ void initialize_limboai_module(ModuleInitializationLevel p_level) {
GDREGISTER_CLASS(BBFloat);
GDREGISTER_CLASS(BBString);
GDREGISTER_CLASS(BBVector2);
GDREGISTER_CLASS(BBVector2i);
GDREGISTER_CLASS(BBRect2);
GDREGISTER_CLASS(BBRect2i);
GDREGISTER_CLASS(BBVector3);
GDREGISTER_CLASS(BBVector3i);
GDREGISTER_CLASS(BBTransform2D);
GDREGISTER_CLASS(BBVector4);
GDREGISTER_CLASS(BBVector4i);
GDREGISTER_CLASS(BBPlane);
GDREGISTER_CLASS(BBQuat);
GDREGISTER_CLASS(BBQuaternion);
GDREGISTER_CLASS(BBAabb);
GDREGISTER_CLASS(BBBasis);
GDREGISTER_CLASS(BBTransform);
GDREGISTER_CLASS(BBTransform3D);
GDREGISTER_CLASS(BBColor);
GDREGISTER_CLASS(BBStringName);
GDREGISTER_CLASS(BBColor);
GDREGISTER_CLASS(BBNode);
GDREGISTER_CLASS(BBDictionary);
GDREGISTER_CLASS(BBArray);
GDREGISTER_CLASS(BBByteArray);
GDREGISTER_CLASS(BBIntArray);
GDREGISTER_CLASS(BBRealArray);
GDREGISTER_CLASS(BBFloatArray);
GDREGISTER_CLASS(BBColorArray);
GDREGISTER_CLASS(BBStringArray);
GDREGISTER_CLASS(BBVector2Array);