Set up include stripping.

This commit is contained in:
Relintai 2024-01-05 10:58:25 +01:00
parent 563ecdd4f1
commit 06061dced0
164 changed files with 337 additions and 33 deletions

View File

@ -3,7 +3,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/aabb.h"
//--STRIP
real_t AABB::get_volume() const {
return size.x * size.y * size.z;

View File

@ -3,9 +3,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/basis.h"
#include "core/math_funcs.h"
//--STRIP
#define cofac(row1, col1, row2, col2) \
(rows[row1][col1] * rows[row2][col2] - rows[row1][col2] * rows[row2][col1])
@ -1175,3 +1177,5 @@ Basis Basis::looking_at(const Vector3 &p_target, const Vector3 &p_up) {
basis.set_columns(v_x, v_y, v_z);
return basis;
}
#undef cofac

View File

@ -6,9 +6,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/quaternion.h"
#include "core/vector3.h"
#include "core/vector3i.h"
//--STRIP
struct _NO_DISCARD_CLASS_ Basis {
Vector3 rows[3] = {

View File

@ -6,7 +6,9 @@
#ifndef CHAR_RANGE_INC
#define CHAR_RANGE_INC
//--STRIP
#include "core/typedefs.h"
//--STRIP
struct CharRange {
char32_t start;

View File

@ -6,9 +6,11 @@
#ifndef CHAR_UTILS_H
#define CHAR_UTILS_H
//--STRIP
#include "core/typedefs.h"
#include "core/char_range.inc"
//--STRIP
static _FORCE_INLINE_ bool is_unicode_identifier_start(char32_t c) {
for (int i = 0; xid_start[i].start != 0; i++) {

View File

@ -3,9 +3,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/color.h"
#include "core/math_funcs.h"
//--STRIP
uint32_t Color::to_argb32() const {
uint32_t c = (uint8_t)Math::round(a * 255);

View File

@ -6,8 +6,10 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/math_funcs.h"
#include "core/ustring.h"
//--STRIP
struct _NO_DISCARD_CLASS_ Color {
union {

View File

@ -6,12 +6,14 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include <string.h>
#include "core/error_list.h"
#include "core/error_macros.h"
#include "core/memory.h"
#include "core/safe_refcount.h"
//--STRIP
template <class T>
class Vector;

View File

@ -1,8 +1,10 @@
#ifndef ERROR_MACROS_H
#define ERROR_MACROS_H
//--STRIP
#include "core/logger.h"
#include "core/typedefs.h"
//--STRIP
// Based on Godot Engine's error_macros.h
// MIT License

View File

@ -3,7 +3,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "face3.h"
//--STRIP
int Face3::split_by_plane(const Plane &p_plane, Face3 p_res[3], bool p_is_point_over[3]) const {
ERR_FAIL_COND_V(is_degenerate(), 0);

View File

@ -6,10 +6,12 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/aabb.h"
#include "core/plane.h"
#include "core/transform.h"
#include "core/vector3.h"
//--STRIP
struct _NO_DISCARD_CLASS_ Face3 {
enum Side {

View File

@ -6,12 +6,14 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/hashfuncs.h"
#include "paged_allocator.h"
#include "pair.h"
#include "core/math_funcs.h"
#include "core/memory.h"
#include "list.h"
//--STRIP
/**
* A HashMap implementation that uses open addressing with Robin Hood hashing.

View File

@ -6,10 +6,12 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/hash_map.h"
#include "core/hashfuncs.h"
#include "core/math_funcs.h"
#include "core/memory.h"
//--STRIP
/**
* Implementation of Set using a bidi indexed hash map.

View File

@ -6,6 +6,7 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/aabb.h"
#include "core/math_defs.h"
#include "core/math_funcs.h"
@ -20,6 +21,7 @@
#include "core/string_name.h"
#include "core/ustring.h"
#include "core/typedefs.h"
//--STRIP
/**
* Hashing functions

View File

@ -6,9 +6,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/sort_array.h"
#include "core/error_macros.h"
#include "core/memory.h"
//--STRIP
/**
* Generic Templatized Linked List Implementation.

View File

@ -6,11 +6,13 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/pool_vector.h"
#include "core/sort_array.h"
#include "core/vector.h"
#include "core/error_macros.h"
#include "core/memory.h"
//--STRIP
template <class T, class U = uint32_t, bool force_trivial = false>
class LocalVector {

View File

@ -1,10 +1,12 @@
//--STRIP
#include "core/logger.h"
#include "core/ustring.h"
#include <cstdio>
#include <stdio.h>
//--STRIP
void RLogger::print_trace(const String &str) {
print_trace(str.utf8().get_data());

View File

@ -3,9 +3,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/math_funcs.h"
#include "core/error_macros.h"
//--STRIP
RandomPCG Math::default_rand(RandomPCG::DEFAULT_SEED, RandomPCG::DEFAULT_INC);

View File

@ -6,6 +6,7 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/error_macros.h"
#include "core/math_defs.h"
#include "core/random_pcg.h"
@ -15,6 +16,7 @@
#include <float.h>
#include <math.h>
//--STRIP
class Math {
static RandomPCG default_rand;

View File

@ -3,6 +3,7 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/memory.h"
#include "core/error_macros.h"
@ -10,6 +11,7 @@
#include <stdio.h>
#include <stdlib.h>
//--STRIP
void *operator new(size_t p_size, const char *p_description) {
return Memory::alloc_static(p_size, false);

View File

@ -6,10 +6,12 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/error_macros.h"
#include "core/safe_refcount.h"
#include <stddef.h>
//--STRIP
#ifndef PAD_ALIGN
#define PAD_ALIGN 16 //must always be greater than this at much

View File

@ -3,7 +3,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/mutex.h"
//--STRIP
static Mutex _global_mutex;

View File

@ -6,8 +6,10 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/error_list.h"
#include "core/typedefs.h"
//--STRIP
#if !defined(NO_THREADS)

View File

@ -6,12 +6,14 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/hashfuncs.h"
#include "core/list.h"
#include "core/error_macros.h"
#include "core/math_funcs.h"
#include "core/memory.h"
#include "core/ustring.h"
//--STRIP
/**
* @class OGHashMap

View File

@ -6,9 +6,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/list.h"
#include "core/og_hash_map.h"
#include "core/pair.h"
//--STRIP
/**
* A hash map which allows to iterate elements in insertion order.

View File

@ -6,9 +6,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/memory.h"
#include "spin_lock.h"
#include "core/typedefs.h"
//--STRIP
template <class T, bool thread_safe = false>
class PagedAllocator {

View File

@ -6,8 +6,10 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/hashfuncs.h"
#include "core/typedefs.h"
//--STRIP
template <class F, class S>
struct Pair {

View File

@ -1,7 +1,9 @@
// *Really* minimal PCG32 code / (c) 2014 M.E. O'Neill / pcg-random.org
// Licensed under Apache License 2.0 (NO WARRANTY, etc. see website)
//--STRIP
#include "core/pcg.h"
//--STRIP
uint32_t pcg32_random_r(pcg32_random_t* rng)
{

View File

@ -4,7 +4,9 @@
#ifndef RANDOM_H
#define RANDOM_H
//--STRIP
#include "core/typedefs.h"
//--STRIP
#define PCG_DEFAULT_INC_64 1442695040888963407ULL

View File

@ -3,9 +3,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/plane.h"
#include "core/math_funcs.h"
//--STRIP
void Plane::set_normal(const Vector3 &p_normal) {
normal = p_normal;

View File

@ -6,7 +6,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/vector3.h"
//--STRIP
struct _NO_DISCARD_CLASS_ Plane {
Vector3 normal;

View File

@ -3,12 +3,14 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "pool_allocator.h"
#include "core/error_macros.h"
#include "core/memory.h"
#include <cstring>
//--STRIP
#define COMPACT_CHUNK(m_entry, m_to_pos) \
do { \
@ -559,3 +561,5 @@ PoolAllocator::~PoolAllocator() {
memdelete_arr(entry_array);
memdelete_arr(entry_indices);
}
#undef COMPACT_CHUNK

View File

@ -6,7 +6,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/typedefs.h"
//--STRIP
/**
@author Juan Linietsky <reduzio@gmail.com>

View File

@ -3,7 +3,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/pool_vector.h"
//--STRIP
Mutex pool_vector_lock;

View File

@ -6,12 +6,14 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/memory.h"
#include "core/mutex.h"
#include "pool_allocator.h"
#include "rw_lock.h"
#include "core/safe_refcount.h"
#include "core/ustring.h"
//--STRIP
struct MemoryPool {
//avoid accessing these directly, must be public for template access

View File

@ -3,6 +3,7 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/projection.h"
#include "core/aabb.h"
@ -10,6 +11,7 @@
#include "core/plane.h"
#include "core/rect2.h"
#include "core/transform.h"
//--STRIP
float Projection::determinant() const {
return matrix[0][3] * matrix[1][2] * matrix[2][1] * matrix[3][0] - matrix[0][2] * matrix[1][3] * matrix[2][1] * matrix[3][0] -

View File

@ -6,10 +6,12 @@
#ifndef PROJECTION_H
#define PROJECTION_H
//--STRIP
#include "core/vector.h"
#include "core/math_defs.h"
#include "core/vector3.h"
#include "core/vector4.h"
//--STRIP
struct AABB;
struct Plane;

View File

@ -3,9 +3,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/quaternion.h"
#include "core/basis.h"
//--STRIP
real_t Quaternion::angle_to(const Quaternion &p_to) const {
real_t d = dot(p_to);

View File

@ -6,10 +6,12 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/math_defs.h"
#include "core/math_funcs.h"
#include "core/vector3.h"
#include "core/ustring.h"
//--STRIP
struct _NO_DISCARD_CLASS_ Quaternion {
union {

View File

@ -3,10 +3,12 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/random_pcg.h"
#include "core/stime.h"
#include "core/error_macros.h"
//--STRIP
RandomPCG::RandomPCG(uint64_t p_seed, uint64_t p_inc) :
pcg(),

View File

@ -6,11 +6,13 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include <math.h>
#include "core/math_defs.h"
#include "core/pcg.h"
//--STRIP
#if defined(__GNUC__) || (_llvm_has_builtin(__builtin_clz))
#define CLZ32(x) __builtin_clz(x)

View File

@ -6,8 +6,10 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/error_macros.h"
#include "core/memory.h"
//--STRIP
// based on the very nice implementation of rb-trees by:
// https://web.archive.org/web/20120507164830/http://web.mit.edu/~emin/www/source_code/red_black_tree/index.html

View File

@ -6,8 +6,10 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/memory.h"
#include "core/typedefs.h"
//--STRIP
// based on the very nice implementation of rb-trees by:
// https://web.archive.org/web/20120507164830/http://web.mit.edu/~emin/www/source_code/red_black_tree/index.html

View File

@ -3,9 +3,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/transform_2d.h" // Includes rect2.h but Rect2 needs Transform2D
#include "core/rect2i.h"
//--STRIP
bool Rect2::is_equal_approx(const Rect2 &p_rect) const {
return position.is_equal_approx(p_rect.position) && size.is_equal_approx(p_rect.size);

View File

@ -6,8 +6,10 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/vector2.h" // also includes math_funcs and ustring
#include "core/vector2i.h"
//--STRIP
struct Transform2D;
struct Rect2i;

View File

@ -3,7 +3,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/transform_2d.h" // Includes rect2.h but Rect2 needs Transform2D
//--STRIP
Rect2i::operator String() const {
return "[P: " + position.operator String() + ", S: " + size + "]";

View File

@ -6,7 +6,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/vector2i.h" // also includes math_funcs and ustring
//--STRIP
struct _NO_DISCARD_CLASS_ Rect2i {
Point2i position;

View File

@ -6,7 +6,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/vector.h"
//--STRIP
template <typename T>
class RingBuffer {

View File

@ -6,7 +6,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/error_list.h"
//--STRIP
#if !defined(NO_THREADS)

View File

@ -5,9 +5,11 @@
#if defined(DEBUG_ENABLED) && !defined(NO_THREADS)
//--STRIP
#include "core/safe_refcount.h"
#include "core/error/error_macros.h"
//--STRIP
// On C++14 we don't have std::atomic::is_always_lockfree, so this is the best we can do
void check_lockless_atomics() {

View File

@ -6,7 +6,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/typedefs.h"
//--STRIP
#if !defined(NO_THREADS)

View File

@ -6,8 +6,10 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/error_macros.h"
#include "core/typedefs.h"
//--STRIP
#define ERR_BAD_COMPARE(cond) \
if (unlikely(cond)) { \
@ -293,4 +295,6 @@ public:
}
};
#undef ERR_BAD_COMPARE
#endif // SORT_ARRAY_H

View File

@ -6,9 +6,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/typedefs.h"
#include <atomic>
//--STRIP
class SpinLock {
std::atomic_flag locked = ATOMIC_FLAG_INIT;

View File

@ -1,12 +1,14 @@
// ----------------------------------------------------------------------------
// time
//--STRIP
#include "core/stime.h"
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include <ctime>
//--STRIP
#if 0
uint64_t STime::time_gpu() {

View File

@ -5,7 +5,9 @@
// time framework utils
// - originally by rlyeh, public domain.
//--STRIP
#include "core/int_types.h"
//--STRIP
class STime {
public:

View File

@ -3,7 +3,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/string_name.h"
//--STRIP
StaticCString StaticCString::create(const char *p_ptr) {
StaticCString scs;

View File

@ -6,9 +6,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/mutex.h"
#include "core/safe_refcount.h"
#include "core/ustring.h"
//--STRIP
struct StaticCString {
const char *ptr;

View File

@ -6,7 +6,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/mutex.h"
//--STRIP
#define _THREAD_SAFE_CLASS_ mutable Mutex _thread_safe_;
#define _THREAD_SAFE_METHOD_ MutexLock _thread_safe_method_(_thread_safe_);

View File

@ -6,11 +6,13 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/pool_vector.h"
#include "core/sort_array.h"
#include "core/vector.h"
#include "core/error_macros.h"
#include "core/memory.h"
//--STRIP
// It grows strictly as much as needed. (The vanilla LocalVector is what you want in most cases).
template <class T, class U = uint32_t, bool force_trivial = false>

View File

@ -3,9 +3,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/transform.h"
#include "core/math_funcs.h"
//--STRIP
void Transform::invert() {
basis.transpose();

View File

@ -6,11 +6,13 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/aabb.h"
#include "core/basis.h"
#include "core/plane.h"
#include "core/vector3i.h"
#include "core/pool_vector.h"
//--STRIP
struct _NO_DISCARD_CLASS_ Transform {
Basis basis;

View File

@ -3,7 +3,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/transform_2d.h"
//--STRIP
void Transform2D::invert() {
// FIXME: this function assumes the basis is a rotation matrix, with no scaling.

View File

@ -6,9 +6,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/pool_vector.h"
#include "core/rect2.h" // also includes vector2, math_funcs, and ustring
#include "core/rect2i.h" // also includes vector2i, math_funcs, and ustring
//--STRIP
struct _NO_DISCARD_CLASS_ Transform2D {
// Warning #1: basis of Transform2D is stored differently from Basis. In terms of columns array, the basis matrix looks like "on paper":

View File

@ -6,7 +6,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include <stddef.h>
//--STRIP
/**
* Basic definitions and simple functions to be used everywhere.
@ -120,9 +122,11 @@ T *_nullptr() {
#undef CONNECT_DEFERRED // override from Windows SDK, clashes with Object enum
#endif
//--STRIP
#include "core/int_types.h"
#include "core/error_list.h"
//--STRIP
/** Generic ABS function, for math uses please use Math::abs */

View File

@ -7,6 +7,7 @@
#define _CRT_SECURE_NO_WARNINGS // to disable build-time warning which suggested to use strcpy_s instead strcpy
#endif
//--STRIP
#include "core/ustring.h"
#include "core/color.h"
@ -21,6 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
#endif
//--STRIP
#if defined(MINGW_ENABLED) || defined(_MSC_VER)
#define snprintf _snprintf_s

View File

@ -6,10 +6,12 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "cowdata.h"
#include "core/vector.h"
#include "char_utils.h"
#include "core/typedefs.h"
//--STRIP
/*************************************************************************/
/* CharProxy */

View File

@ -12,10 +12,12 @@
* Vector container. Regular Vector Container. Use with care and for smaller arrays when possible. Use PoolVector for large arrays.
*/
//--STRIP
#include "cowdata.h"
#include "core/sort_array.h"
#include "core/error_macros.h"
#include "core/memory.h"
//--STRIP
template <class T>
class VectorWriteProxy {

View File

@ -3,9 +3,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/vector2.h"
#include "core/ustring.h"
//--STRIP
real_t Vector2::angle() const {
return Math::atan2(y, x);

View File

@ -6,9 +6,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/math_funcs.h"
#include "core/error_macros.h"
//--STRIP
class String;

View File

@ -3,9 +3,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/vector2i.h"
#include "core/ustring.h"
//--STRIP
Vector2i Vector2i::clamp(const Vector2i &p_min, const Vector2i &p_max) const {
return Vector2i(

View File

@ -6,10 +6,12 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/error_macros.h"
#include "core/math_funcs.h"
#include "core/vector2.h"
//--STRIP
class String;

View File

@ -3,9 +3,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/vector3.h"
#include "core/basis.h"
//--STRIP
void Vector3::rotate(const Vector3 &p_axis, real_t p_phi) {
*this = Basis(p_axis, p_phi).xform(*this);

View File

@ -6,8 +6,10 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/math_funcs.h"
#include "core/ustring.h"
//--STRIP
struct Basis;

View File

@ -3,10 +3,12 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/vector3i.h"
#include "core/vector3.h"
#include "core/ustring.h"
//--STRIP
void Vector3i::set_axis(const int p_axis, const int32_t p_value) {
ERR_FAIL_INDEX(p_axis, 3);

View File

@ -6,8 +6,10 @@
#ifndef VECTOR3I_H
#define VECTOR3I_H
//--STRIP
#include "core/error_macros.h"
#include "core/math_funcs.h"
//--STRIP
class String;
struct Vector3;

View File

@ -3,9 +3,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/vector4.h"
#include "core/basis.h"
//--STRIP
void Vector4::set_axis(const int p_axis, const real_t p_value) {
ERR_FAIL_INDEX(p_axis, 4);

View File

@ -6,9 +6,11 @@
#ifndef VECTOR4_H
#define VECTOR4_H
//--STRIP
#include "core/math_defs.h"
#include "core/math_funcs.h"
#include "core/ustring.h"
//--STRIP
struct _NO_DISCARD_CLASS_ Vector4 {
enum Axis {

View File

@ -3,10 +3,12 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/vector4i.h"
#include "core/vector4.h"
#include "core/ustring.h"
//--STRIP
void Vector4i::set_axis(const int p_axis, const int32_t p_value) {
ERR_FAIL_INDEX(p_axis, 4);

View File

@ -6,8 +6,10 @@
#ifndef VECTOR4I_H
#define VECTOR4I_H
//--STRIP
#include "core/error_macros.h"
#include "core/math_funcs.h"
//--STRIP
class String;
struct Vector4;

View File

@ -6,8 +6,10 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "cowdata.h"
#include "core/typedefs.h"
//--STRIP
template <class T, class V>
class VMap {

View File

@ -6,8 +6,10 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/vector.h"
#include "core/typedefs.h"
//--STRIP
template <class T>
class VSet {

View File

@ -3,6 +3,7 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "array.h"
#include "core/hashfuncs.h"
@ -10,6 +11,7 @@
#include "object/object.h"
#include "object/variant.h"
#include "core/ustring.h"
//--STRIP
class ArrayPrivate {
public:

View File

@ -6,7 +6,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/typedefs.h"
//--STRIP
class Variant;
class ArrayPrivate;

View File

@ -3,7 +3,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core_string_names.h"
//--STRIP
CoreStringNames *CoreStringNames::singleton = nullptr;

View File

@ -6,7 +6,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/string_name.h"
//--STRIP
class CoreStringNames {
public:

View File

@ -3,12 +3,14 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "dictionary.h"
#include "core/ordered_hash_map.h"
#include "core/safe_refcount.h"
#include "object/variant.h"
//--STRIP
struct DictionaryPrivate {
SafeRefCount refcount;

View File

@ -6,9 +6,11 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/list.h"
#include "core/ustring.h"
#include "object/array.h"
//--STRIP
class Variant;

View File

@ -1,9 +1,11 @@
//--STRIP
#include "object/object.h"
#include "core/error_macros.h"
#include "core/logger.h"
#include "object/core_string_names.h"
#include "object/object_rc.h"
//--STRIP
void Object::set(const StringName &p_name, const Variant &p_value, bool *r_valid) {
if (p_name == CoreStringNames::get_singleton()->_meta) {

View File

@ -1,6 +1,7 @@
#ifndef OBJECT_H
#define OBJECT_H
//--STRIP
#include "core/hash_map.h"
#include "core/rw_lock.h"
#include "core/string_name.h"
@ -10,6 +11,7 @@
#include "object/variant.h"
#include "object/dictionary.h"
//--STRIP
/*************************************************************************/
/* object.h */

View File

@ -6,7 +6,9 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/int_types.h"
//--STRIP
typedef uint64_t ObjectID;

View File

@ -6,10 +6,12 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/memory.h"
#include "core/typedefs.h"
#include <atomic>
//--STRIP
class Object;

View File

@ -1,4 +1,6 @@
//--STRIP
#include "psignal.h"
//--STRIP
void Signal::connect_static(void (*func)(Signal *)) {
StaticSignalEntry *se = new StaticSignalEntry();

View File

@ -1,11 +1,13 @@
#ifndef SIGNAL_H
#define SIGNAL_H
//--STRIP
#include "core/vector.h"
#include "core/ustring.h"
#include "object/variant.h"
#include "object/reference.h"
//--STRIP
class Signal {
public:

View File

@ -1,38 +1,14 @@
/*************************************************************************/
/* ref_ptr.cpp */
/*************************************************************************/
/* This file is part of: */
/* PANDEMONIUM ENGINE */
/* https://github.com/Relintai/pandemonium_engine */
/*************************************************************************/
/* Copyright (c) 2022-present Péter Magyar. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "ref_ptr.h"
#include "object/reference.h"
#include "object/resource.h"
//--STRIP
void RefPtr::operator=(const RefPtr &p_other) {
Ref<Reference> *ref = reinterpret_cast<Ref<Reference> *>(&data[0]);

View File

@ -12,7 +12,9 @@
* It's basically an opaque container of a Reference reference, so Variant can use it.
*/
//--STRIP
#include "core/typedefs.h"
//--STRIP
class RefPtr {
enum {

View File

@ -1,4 +1,6 @@
//--STRIP
#include "object/reference.h"
//--STRIP
/*************************************************************************/
/* reference.cpp */

View File

@ -6,10 +6,12 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "core/memory.h"
#include "core/safe_refcount.h"
#include "object/object.h"
#include "object/ref_ptr.h"
//--STRIP
class Reference : public Object {
SFW_OBJECT(Reference, Object);

View File

@ -1,4 +1,6 @@
//--STRIP
#include "resource.h"
//--STRIP
void Resource::emit_changed() {
changed.emit(this);

View File

@ -1,9 +1,11 @@
#ifndef RESOURCE_H
#define RESOURCE_H
//--STRIP
#include "object/reference.h"
#include "psignal.h"
//--STRIP
class Resource : public Reference {
SFW_OBJECT(Resource, Reference);

View File

@ -3,17 +3,16 @@
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
/*************************************************************************/
//--STRIP
#include "variant.h"
//#include "core/core_string_names.h"
//#include "core/io/marshalls.h"
#include "core/math_funcs.h"
#include "object/core_string_names.h"
#include "object/object.h"
#include "object/object_rc.h"
#include "object/resource.h"
//--STRIP
String Variant::get_type_name(Variant::Type p_type) {
switch (p_type) {

Some files were not shown because too many files have changed in this diff Show More