mirror of
https://github.com/Relintai/sfw.git
synced 2025-04-07 17:01:48 +02:00
Set up include stripping.
This commit is contained in:
parent
563ecdd4f1
commit
06061dced0
@ -3,7 +3,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/aabb.h"
|
#include "core/aabb.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
real_t AABB::get_volume() const {
|
real_t AABB::get_volume() const {
|
||||||
return size.x * size.y * size.z;
|
return size.x * size.y * size.z;
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/basis.h"
|
#include "core/basis.h"
|
||||||
|
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
#define cofac(row1, col1, row2, col2) \
|
#define cofac(row1, col1, row2, col2) \
|
||||||
(rows[row1][col1] * rows[row2][col2] - rows[row1][col2] * rows[row2][col1])
|
(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);
|
basis.set_columns(v_x, v_y, v_z);
|
||||||
return basis;
|
return basis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef cofac
|
||||||
|
@ -6,9 +6,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/quaternion.h"
|
#include "core/quaternion.h"
|
||||||
#include "core/vector3.h"
|
#include "core/vector3.h"
|
||||||
#include "core/vector3i.h"
|
#include "core/vector3i.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct _NO_DISCARD_CLASS_ Basis {
|
struct _NO_DISCARD_CLASS_ Basis {
|
||||||
Vector3 rows[3] = {
|
Vector3 rows[3] = {
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
#ifndef CHAR_RANGE_INC
|
#ifndef CHAR_RANGE_INC
|
||||||
#define CHAR_RANGE_INC
|
#define CHAR_RANGE_INC
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct CharRange {
|
struct CharRange {
|
||||||
char32_t start;
|
char32_t start;
|
||||||
|
@ -6,9 +6,11 @@
|
|||||||
#ifndef CHAR_UTILS_H
|
#ifndef CHAR_UTILS_H
|
||||||
#define CHAR_UTILS_H
|
#define CHAR_UTILS_H
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
|
||||||
#include "core/char_range.inc"
|
#include "core/char_range.inc"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
static _FORCE_INLINE_ bool is_unicode_identifier_start(char32_t c) {
|
static _FORCE_INLINE_ bool is_unicode_identifier_start(char32_t c) {
|
||||||
for (int i = 0; xid_start[i].start != 0; i++) {
|
for (int i = 0; xid_start[i].start != 0; i++) {
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/color.h"
|
#include "core/color.h"
|
||||||
|
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
uint32_t Color::to_argb32() const {
|
uint32_t Color::to_argb32() const {
|
||||||
uint32_t c = (uint8_t)Math::round(a * 255);
|
uint32_t c = (uint8_t)Math::round(a * 255);
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct _NO_DISCARD_CLASS_ Color {
|
struct _NO_DISCARD_CLASS_ Color {
|
||||||
union {
|
union {
|
||||||
|
@ -6,12 +6,14 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "core/error_list.h"
|
#include "core/error_list.h"
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
#include "core/safe_refcount.h"
|
#include "core/safe_refcount.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class Vector;
|
class Vector;
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
#ifndef ERROR_MACROS_H
|
#ifndef ERROR_MACROS_H
|
||||||
#define ERROR_MACROS_H
|
#define ERROR_MACROS_H
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/logger.h"
|
#include "core/logger.h"
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
// Based on Godot Engine's error_macros.h
|
// Based on Godot Engine's error_macros.h
|
||||||
// MIT License
|
// MIT License
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "face3.h"
|
#include "face3.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
int Face3::split_by_plane(const Plane &p_plane, Face3 p_res[3], bool p_is_point_over[3]) const {
|
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);
|
ERR_FAIL_COND_V(is_degenerate(), 0);
|
||||||
|
@ -6,10 +6,12 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/aabb.h"
|
#include "core/aabb.h"
|
||||||
#include "core/plane.h"
|
#include "core/plane.h"
|
||||||
#include "core/transform.h"
|
#include "core/transform.h"
|
||||||
#include "core/vector3.h"
|
#include "core/vector3.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct _NO_DISCARD_CLASS_ Face3 {
|
struct _NO_DISCARD_CLASS_ Face3 {
|
||||||
enum Side {
|
enum Side {
|
||||||
|
@ -6,12 +6,14 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/hashfuncs.h"
|
#include "core/hashfuncs.h"
|
||||||
#include "paged_allocator.h"
|
#include "paged_allocator.h"
|
||||||
#include "pair.h"
|
#include "pair.h"
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A HashMap implementation that uses open addressing with Robin Hood hashing.
|
* A HashMap implementation that uses open addressing with Robin Hood hashing.
|
||||||
|
@ -6,10 +6,12 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/hash_map.h"
|
#include "core/hash_map.h"
|
||||||
#include "core/hashfuncs.h"
|
#include "core/hashfuncs.h"
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of Set using a bidi indexed hash map.
|
* Implementation of Set using a bidi indexed hash map.
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/aabb.h"
|
#include "core/aabb.h"
|
||||||
#include "core/math_defs.h"
|
#include "core/math_defs.h"
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
@ -20,6 +21,7 @@
|
|||||||
#include "core/string_name.h"
|
#include "core/string_name.h"
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hashing functions
|
* Hashing functions
|
||||||
|
@ -6,9 +6,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/sort_array.h"
|
#include "core/sort_array.h"
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic Templatized Linked List Implementation.
|
* Generic Templatized Linked List Implementation.
|
||||||
|
@ -6,11 +6,13 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/pool_vector.h"
|
#include "core/pool_vector.h"
|
||||||
#include "core/sort_array.h"
|
#include "core/sort_array.h"
|
||||||
#include "core/vector.h"
|
#include "core/vector.h"
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
template <class T, class U = uint32_t, bool force_trivial = false>
|
template <class T, class U = uint32_t, bool force_trivial = false>
|
||||||
class LocalVector {
|
class LocalVector {
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/logger.h"
|
#include "core/logger.h"
|
||||||
|
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
void RLogger::print_trace(const String &str) {
|
void RLogger::print_trace(const String &str) {
|
||||||
print_trace(str.utf8().get_data());
|
print_trace(str.utf8().get_data());
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
|
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
RandomPCG Math::default_rand(RandomPCG::DEFAULT_SEED, RandomPCG::DEFAULT_INC);
|
RandomPCG Math::default_rand(RandomPCG::DEFAULT_SEED, RandomPCG::DEFAULT_INC);
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/math_defs.h"
|
#include "core/math_defs.h"
|
||||||
#include "core/random_pcg.h"
|
#include "core/random_pcg.h"
|
||||||
@ -15,6 +16,7 @@
|
|||||||
|
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class Math {
|
class Math {
|
||||||
static RandomPCG default_rand;
|
static RandomPCG default_rand;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
@ -10,6 +11,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
void *operator new(size_t p_size, const char *p_description) {
|
void *operator new(size_t p_size, const char *p_description) {
|
||||||
return Memory::alloc_static(p_size, false);
|
return Memory::alloc_static(p_size, false);
|
||||||
|
@ -6,10 +6,12 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/safe_refcount.h"
|
#include "core/safe_refcount.h"
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
#ifndef PAD_ALIGN
|
#ifndef PAD_ALIGN
|
||||||
#define PAD_ALIGN 16 //must always be greater than this at much
|
#define PAD_ALIGN 16 //must always be greater than this at much
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/mutex.h"
|
#include "core/mutex.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
static Mutex _global_mutex;
|
static Mutex _global_mutex;
|
||||||
|
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/error_list.h"
|
#include "core/error_list.h"
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
#if !defined(NO_THREADS)
|
#if !defined(NO_THREADS)
|
||||||
|
|
||||||
|
@ -6,12 +6,14 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/hashfuncs.h"
|
#include "core/hashfuncs.h"
|
||||||
#include "core/list.h"
|
#include "core/list.h"
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class OGHashMap
|
* @class OGHashMap
|
||||||
|
@ -6,9 +6,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/list.h"
|
#include "core/list.h"
|
||||||
#include "core/og_hash_map.h"
|
#include "core/og_hash_map.h"
|
||||||
#include "core/pair.h"
|
#include "core/pair.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A hash map which allows to iterate elements in insertion order.
|
* A hash map which allows to iterate elements in insertion order.
|
||||||
|
@ -6,9 +6,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
#include "spin_lock.h"
|
#include "spin_lock.h"
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
template <class T, bool thread_safe = false>
|
template <class T, bool thread_safe = false>
|
||||||
class PagedAllocator {
|
class PagedAllocator {
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/hashfuncs.h"
|
#include "core/hashfuncs.h"
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
template <class F, class S>
|
template <class F, class S>
|
||||||
struct Pair {
|
struct Pair {
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
// *Really* minimal PCG32 code / (c) 2014 M.E. O'Neill / pcg-random.org
|
// *Really* minimal PCG32 code / (c) 2014 M.E. O'Neill / pcg-random.org
|
||||||
// Licensed under Apache License 2.0 (NO WARRANTY, etc. see website)
|
// Licensed under Apache License 2.0 (NO WARRANTY, etc. see website)
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/pcg.h"
|
#include "core/pcg.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
uint32_t pcg32_random_r(pcg32_random_t* rng)
|
uint32_t pcg32_random_r(pcg32_random_t* rng)
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
#ifndef RANDOM_H
|
#ifndef RANDOM_H
|
||||||
#define RANDOM_H
|
#define RANDOM_H
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
#define PCG_DEFAULT_INC_64 1442695040888963407ULL
|
#define PCG_DEFAULT_INC_64 1442695040888963407ULL
|
||||||
|
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/plane.h"
|
#include "core/plane.h"
|
||||||
|
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
void Plane::set_normal(const Vector3 &p_normal) {
|
void Plane::set_normal(const Vector3 &p_normal) {
|
||||||
normal = p_normal;
|
normal = p_normal;
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/vector3.h"
|
#include "core/vector3.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct _NO_DISCARD_CLASS_ Plane {
|
struct _NO_DISCARD_CLASS_ Plane {
|
||||||
Vector3 normal;
|
Vector3 normal;
|
||||||
|
@ -3,12 +3,14 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "pool_allocator.h"
|
#include "pool_allocator.h"
|
||||||
|
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
#define COMPACT_CHUNK(m_entry, m_to_pos) \
|
#define COMPACT_CHUNK(m_entry, m_to_pos) \
|
||||||
do { \
|
do { \
|
||||||
@ -559,3 +561,5 @@ PoolAllocator::~PoolAllocator() {
|
|||||||
memdelete_arr(entry_array);
|
memdelete_arr(entry_array);
|
||||||
memdelete_arr(entry_indices);
|
memdelete_arr(entry_indices);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef COMPACT_CHUNK
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author Juan Linietsky <reduzio@gmail.com>
|
@author Juan Linietsky <reduzio@gmail.com>
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/pool_vector.h"
|
#include "core/pool_vector.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
Mutex pool_vector_lock;
|
Mutex pool_vector_lock;
|
||||||
|
|
||||||
|
@ -6,12 +6,14 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
#include "core/mutex.h"
|
#include "core/mutex.h"
|
||||||
#include "pool_allocator.h"
|
#include "pool_allocator.h"
|
||||||
#include "rw_lock.h"
|
#include "rw_lock.h"
|
||||||
#include "core/safe_refcount.h"
|
#include "core/safe_refcount.h"
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct MemoryPool {
|
struct MemoryPool {
|
||||||
//avoid accessing these directly, must be public for template access
|
//avoid accessing these directly, must be public for template access
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/projection.h"
|
#include "core/projection.h"
|
||||||
|
|
||||||
#include "core/aabb.h"
|
#include "core/aabb.h"
|
||||||
@ -10,6 +11,7 @@
|
|||||||
#include "core/plane.h"
|
#include "core/plane.h"
|
||||||
#include "core/rect2.h"
|
#include "core/rect2.h"
|
||||||
#include "core/transform.h"
|
#include "core/transform.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
float Projection::determinant() const {
|
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] -
|
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] -
|
||||||
|
@ -6,10 +6,12 @@
|
|||||||
#ifndef PROJECTION_H
|
#ifndef PROJECTION_H
|
||||||
#define PROJECTION_H
|
#define PROJECTION_H
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/vector.h"
|
#include "core/vector.h"
|
||||||
#include "core/math_defs.h"
|
#include "core/math_defs.h"
|
||||||
#include "core/vector3.h"
|
#include "core/vector3.h"
|
||||||
#include "core/vector4.h"
|
#include "core/vector4.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct AABB;
|
struct AABB;
|
||||||
struct Plane;
|
struct Plane;
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/quaternion.h"
|
#include "core/quaternion.h"
|
||||||
|
|
||||||
#include "core/basis.h"
|
#include "core/basis.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
real_t Quaternion::angle_to(const Quaternion &p_to) const {
|
real_t Quaternion::angle_to(const Quaternion &p_to) const {
|
||||||
real_t d = dot(p_to);
|
real_t d = dot(p_to);
|
||||||
|
@ -6,10 +6,12 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/math_defs.h"
|
#include "core/math_defs.h"
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
#include "core/vector3.h"
|
#include "core/vector3.h"
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct _NO_DISCARD_CLASS_ Quaternion {
|
struct _NO_DISCARD_CLASS_ Quaternion {
|
||||||
union {
|
union {
|
||||||
|
@ -3,10 +3,12 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/random_pcg.h"
|
#include "core/random_pcg.h"
|
||||||
|
|
||||||
#include "core/stime.h"
|
#include "core/stime.h"
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
RandomPCG::RandomPCG(uint64_t p_seed, uint64_t p_inc) :
|
RandomPCG::RandomPCG(uint64_t p_seed, uint64_t p_inc) :
|
||||||
pcg(),
|
pcg(),
|
||||||
|
@ -6,11 +6,13 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "core/math_defs.h"
|
#include "core/math_defs.h"
|
||||||
|
|
||||||
#include "core/pcg.h"
|
#include "core/pcg.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
#if defined(__GNUC__) || (_llvm_has_builtin(__builtin_clz))
|
#if defined(__GNUC__) || (_llvm_has_builtin(__builtin_clz))
|
||||||
#define CLZ32(x) __builtin_clz(x)
|
#define CLZ32(x) __builtin_clz(x)
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
// based on the very nice implementation of rb-trees by:
|
// 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
|
// https://web.archive.org/web/20120507164830/http://web.mit.edu/~emin/www/source_code/red_black_tree/index.html
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
// based on the very nice implementation of rb-trees by:
|
// 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
|
// https://web.archive.org/web/20120507164830/http://web.mit.edu/~emin/www/source_code/red_black_tree/index.html
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/transform_2d.h" // Includes rect2.h but Rect2 needs Transform2D
|
#include "core/transform_2d.h" // Includes rect2.h but Rect2 needs Transform2D
|
||||||
|
|
||||||
#include "core/rect2i.h"
|
#include "core/rect2i.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
bool Rect2::is_equal_approx(const Rect2 &p_rect) const {
|
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);
|
return position.is_equal_approx(p_rect.position) && size.is_equal_approx(p_rect.size);
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/vector2.h" // also includes math_funcs and ustring
|
#include "core/vector2.h" // also includes math_funcs and ustring
|
||||||
#include "core/vector2i.h"
|
#include "core/vector2i.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct Transform2D;
|
struct Transform2D;
|
||||||
struct Rect2i;
|
struct Rect2i;
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/transform_2d.h" // Includes rect2.h but Rect2 needs Transform2D
|
#include "core/transform_2d.h" // Includes rect2.h but Rect2 needs Transform2D
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
Rect2i::operator String() const {
|
Rect2i::operator String() const {
|
||||||
return "[P: " + position.operator String() + ", S: " + size + "]";
|
return "[P: " + position.operator String() + ", S: " + size + "]";
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/vector2i.h" // also includes math_funcs and ustring
|
#include "core/vector2i.h" // also includes math_funcs and ustring
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct _NO_DISCARD_CLASS_ Rect2i {
|
struct _NO_DISCARD_CLASS_ Rect2i {
|
||||||
Point2i position;
|
Point2i position;
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/vector.h"
|
#include "core/vector.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class RingBuffer {
|
class RingBuffer {
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/error_list.h"
|
#include "core/error_list.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
#if !defined(NO_THREADS)
|
#if !defined(NO_THREADS)
|
||||||
|
|
||||||
|
@ -5,9 +5,11 @@
|
|||||||
|
|
||||||
#if defined(DEBUG_ENABLED) && !defined(NO_THREADS)
|
#if defined(DEBUG_ENABLED) && !defined(NO_THREADS)
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/safe_refcount.h"
|
#include "core/safe_refcount.h"
|
||||||
|
|
||||||
#include "core/error/error_macros.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
|
// On C++14 we don't have std::atomic::is_always_lockfree, so this is the best we can do
|
||||||
void check_lockless_atomics() {
|
void check_lockless_atomics() {
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
#if !defined(NO_THREADS)
|
#if !defined(NO_THREADS)
|
||||||
|
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
#define ERR_BAD_COMPARE(cond) \
|
#define ERR_BAD_COMPARE(cond) \
|
||||||
if (unlikely(cond)) { \
|
if (unlikely(cond)) { \
|
||||||
@ -293,4 +295,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#undef ERR_BAD_COMPARE
|
||||||
|
|
||||||
#endif // SORT_ARRAY_H
|
#endif // SORT_ARRAY_H
|
||||||
|
@ -6,9 +6,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class SpinLock {
|
class SpinLock {
|
||||||
std::atomic_flag locked = ATOMIC_FLAG_INIT;
|
std::atomic_flag locked = ATOMIC_FLAG_INIT;
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// time
|
// time
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/stime.h"
|
#include "core/stime.h"
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
uint64_t STime::time_gpu() {
|
uint64_t STime::time_gpu() {
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
// time framework utils
|
// time framework utils
|
||||||
// - originally by rlyeh, public domain.
|
// - originally by rlyeh, public domain.
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/int_types.h"
|
#include "core/int_types.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class STime {
|
class STime {
|
||||||
public:
|
public:
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/string_name.h"
|
#include "core/string_name.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
StaticCString StaticCString::create(const char *p_ptr) {
|
StaticCString StaticCString::create(const char *p_ptr) {
|
||||||
StaticCString scs;
|
StaticCString scs;
|
||||||
|
@ -6,9 +6,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/mutex.h"
|
#include "core/mutex.h"
|
||||||
#include "core/safe_refcount.h"
|
#include "core/safe_refcount.h"
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct StaticCString {
|
struct StaticCString {
|
||||||
const char *ptr;
|
const char *ptr;
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/mutex.h"
|
#include "core/mutex.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
#define _THREAD_SAFE_CLASS_ mutable Mutex _thread_safe_;
|
#define _THREAD_SAFE_CLASS_ mutable Mutex _thread_safe_;
|
||||||
#define _THREAD_SAFE_METHOD_ MutexLock _thread_safe_method_(_thread_safe_);
|
#define _THREAD_SAFE_METHOD_ MutexLock _thread_safe_method_(_thread_safe_);
|
||||||
|
@ -6,11 +6,13 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/pool_vector.h"
|
#include "core/pool_vector.h"
|
||||||
#include "core/sort_array.h"
|
#include "core/sort_array.h"
|
||||||
#include "core/vector.h"
|
#include "core/vector.h"
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
// It grows strictly as much as needed. (The vanilla LocalVector is what you want in most cases).
|
// 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>
|
template <class T, class U = uint32_t, bool force_trivial = false>
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/transform.h"
|
#include "core/transform.h"
|
||||||
|
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
void Transform::invert() {
|
void Transform::invert() {
|
||||||
basis.transpose();
|
basis.transpose();
|
||||||
|
@ -6,11 +6,13 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/aabb.h"
|
#include "core/aabb.h"
|
||||||
#include "core/basis.h"
|
#include "core/basis.h"
|
||||||
#include "core/plane.h"
|
#include "core/plane.h"
|
||||||
#include "core/vector3i.h"
|
#include "core/vector3i.h"
|
||||||
#include "core/pool_vector.h"
|
#include "core/pool_vector.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct _NO_DISCARD_CLASS_ Transform {
|
struct _NO_DISCARD_CLASS_ Transform {
|
||||||
Basis basis;
|
Basis basis;
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/transform_2d.h"
|
#include "core/transform_2d.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
void Transform2D::invert() {
|
void Transform2D::invert() {
|
||||||
// FIXME: this function assumes the basis is a rotation matrix, with no scaling.
|
// FIXME: this function assumes the basis is a rotation matrix, with no scaling.
|
||||||
|
@ -6,9 +6,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/pool_vector.h"
|
#include "core/pool_vector.h"
|
||||||
#include "core/rect2.h" // also includes vector2, math_funcs, and ustring
|
#include "core/rect2.h" // also includes vector2, math_funcs, and ustring
|
||||||
#include "core/rect2i.h" // also includes vector2i, math_funcs, and ustring
|
#include "core/rect2i.h" // also includes vector2i, math_funcs, and ustring
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct _NO_DISCARD_CLASS_ Transform2D {
|
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":
|
// Warning #1: basis of Transform2D is stored differently from Basis. In terms of columns array, the basis matrix looks like "on paper":
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Basic definitions and simple functions to be used everywhere.
|
* 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
|
#undef CONNECT_DEFERRED // override from Windows SDK, clashes with Object enum
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/int_types.h"
|
#include "core/int_types.h"
|
||||||
|
|
||||||
#include "core/error_list.h"
|
#include "core/error_list.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
/** Generic ABS function, for math uses please use Math::abs */
|
/** Generic ABS function, for math uses please use Math::abs */
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#define _CRT_SECURE_NO_WARNINGS // to disable build-time warning which suggested to use strcpy_s instead strcpy
|
#define _CRT_SECURE_NO_WARNINGS // to disable build-time warning which suggested to use strcpy_s instead strcpy
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
|
|
||||||
#include "core/color.h"
|
#include "core/color.h"
|
||||||
@ -21,6 +22,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
#if defined(MINGW_ENABLED) || defined(_MSC_VER)
|
#if defined(MINGW_ENABLED) || defined(_MSC_VER)
|
||||||
#define snprintf _snprintf_s
|
#define snprintf _snprintf_s
|
||||||
|
@ -6,10 +6,12 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "cowdata.h"
|
#include "cowdata.h"
|
||||||
#include "core/vector.h"
|
#include "core/vector.h"
|
||||||
#include "char_utils.h"
|
#include "char_utils.h"
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* CharProxy */
|
/* CharProxy */
|
||||||
|
@ -12,10 +12,12 @@
|
|||||||
* Vector container. Regular Vector Container. Use with care and for smaller arrays when possible. Use PoolVector for large arrays.
|
* Vector container. Regular Vector Container. Use with care and for smaller arrays when possible. Use PoolVector for large arrays.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "cowdata.h"
|
#include "cowdata.h"
|
||||||
#include "core/sort_array.h"
|
#include "core/sort_array.h"
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class VectorWriteProxy {
|
class VectorWriteProxy {
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/vector2.h"
|
#include "core/vector2.h"
|
||||||
|
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
real_t Vector2::angle() const {
|
real_t Vector2::angle() const {
|
||||||
return Math::atan2(y, x);
|
return Math::atan2(y, x);
|
||||||
|
@ -6,9 +6,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
|
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class String;
|
class String;
|
||||||
|
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/vector2i.h"
|
#include "core/vector2i.h"
|
||||||
|
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
Vector2i Vector2i::clamp(const Vector2i &p_min, const Vector2i &p_max) const {
|
Vector2i Vector2i::clamp(const Vector2i &p_min, const Vector2i &p_max) const {
|
||||||
return Vector2i(
|
return Vector2i(
|
||||||
|
@ -6,10 +6,12 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
|
|
||||||
#include "core/vector2.h"
|
#include "core/vector2.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class String;
|
class String;
|
||||||
|
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/vector3.h"
|
#include "core/vector3.h"
|
||||||
|
|
||||||
#include "core/basis.h"
|
#include "core/basis.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
void Vector3::rotate(const Vector3 &p_axis, real_t p_phi) {
|
void Vector3::rotate(const Vector3 &p_axis, real_t p_phi) {
|
||||||
*this = Basis(p_axis, p_phi).xform(*this);
|
*this = Basis(p_axis, p_phi).xform(*this);
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct Basis;
|
struct Basis;
|
||||||
|
|
||||||
|
@ -3,10 +3,12 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/vector3i.h"
|
#include "core/vector3i.h"
|
||||||
|
|
||||||
#include "core/vector3.h"
|
#include "core/vector3.h"
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
void Vector3i::set_axis(const int p_axis, const int32_t p_value) {
|
void Vector3i::set_axis(const int p_axis, const int32_t p_value) {
|
||||||
ERR_FAIL_INDEX(p_axis, 3);
|
ERR_FAIL_INDEX(p_axis, 3);
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
#ifndef VECTOR3I_H
|
#ifndef VECTOR3I_H
|
||||||
#define VECTOR3I_H
|
#define VECTOR3I_H
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class String;
|
class String;
|
||||||
struct Vector3;
|
struct Vector3;
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/vector4.h"
|
#include "core/vector4.h"
|
||||||
|
|
||||||
#include "core/basis.h"
|
#include "core/basis.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
void Vector4::set_axis(const int p_axis, const real_t p_value) {
|
void Vector4::set_axis(const int p_axis, const real_t p_value) {
|
||||||
ERR_FAIL_INDEX(p_axis, 4);
|
ERR_FAIL_INDEX(p_axis, 4);
|
||||||
|
@ -6,9 +6,11 @@
|
|||||||
#ifndef VECTOR4_H
|
#ifndef VECTOR4_H
|
||||||
#define VECTOR4_H
|
#define VECTOR4_H
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/math_defs.h"
|
#include "core/math_defs.h"
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct _NO_DISCARD_CLASS_ Vector4 {
|
struct _NO_DISCARD_CLASS_ Vector4 {
|
||||||
enum Axis {
|
enum Axis {
|
||||||
|
@ -3,10 +3,12 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/vector4i.h"
|
#include "core/vector4i.h"
|
||||||
|
|
||||||
#include "core/vector4.h"
|
#include "core/vector4.h"
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
void Vector4i::set_axis(const int p_axis, const int32_t p_value) {
|
void Vector4i::set_axis(const int p_axis, const int32_t p_value) {
|
||||||
ERR_FAIL_INDEX(p_axis, 4);
|
ERR_FAIL_INDEX(p_axis, 4);
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
#ifndef VECTOR4I_H
|
#ifndef VECTOR4I_H
|
||||||
#define VECTOR4I_H
|
#define VECTOR4I_H
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class String;
|
class String;
|
||||||
struct Vector4;
|
struct Vector4;
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "cowdata.h"
|
#include "cowdata.h"
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
template <class T, class V>
|
template <class T, class V>
|
||||||
class VMap {
|
class VMap {
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/vector.h"
|
#include "core/vector.h"
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class VSet {
|
class VSet {
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "array.h"
|
#include "array.h"
|
||||||
|
|
||||||
#include "core/hashfuncs.h"
|
#include "core/hashfuncs.h"
|
||||||
@ -10,6 +11,7 @@
|
|||||||
#include "object/object.h"
|
#include "object/object.h"
|
||||||
#include "object/variant.h"
|
#include "object/variant.h"
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class ArrayPrivate {
|
class ArrayPrivate {
|
||||||
public:
|
public:
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class Variant;
|
class Variant;
|
||||||
class ArrayPrivate;
|
class ArrayPrivate;
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core_string_names.h"
|
#include "core_string_names.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
CoreStringNames *CoreStringNames::singleton = nullptr;
|
CoreStringNames *CoreStringNames::singleton = nullptr;
|
||||||
|
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/string_name.h"
|
#include "core/string_name.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class CoreStringNames {
|
class CoreStringNames {
|
||||||
public:
|
public:
|
||||||
|
@ -3,12 +3,14 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "dictionary.h"
|
#include "dictionary.h"
|
||||||
|
|
||||||
#include "core/ordered_hash_map.h"
|
#include "core/ordered_hash_map.h"
|
||||||
#include "core/safe_refcount.h"
|
#include "core/safe_refcount.h"
|
||||||
|
|
||||||
#include "object/variant.h"
|
#include "object/variant.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
struct DictionaryPrivate {
|
struct DictionaryPrivate {
|
||||||
SafeRefCount refcount;
|
SafeRefCount refcount;
|
||||||
|
@ -6,9 +6,11 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/list.h"
|
#include "core/list.h"
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
#include "object/array.h"
|
#include "object/array.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class Variant;
|
class Variant;
|
||||||
|
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
|
//--STRIP
|
||||||
#include "object/object.h"
|
#include "object/object.h"
|
||||||
|
|
||||||
#include "core/error_macros.h"
|
#include "core/error_macros.h"
|
||||||
#include "core/logger.h"
|
#include "core/logger.h"
|
||||||
#include "object/core_string_names.h"
|
#include "object/core_string_names.h"
|
||||||
#include "object/object_rc.h"
|
#include "object/object_rc.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
void Object::set(const StringName &p_name, const Variant &p_value, bool *r_valid) {
|
void Object::set(const StringName &p_name, const Variant &p_value, bool *r_valid) {
|
||||||
if (p_name == CoreStringNames::get_singleton()->_meta) {
|
if (p_name == CoreStringNames::get_singleton()->_meta) {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef OBJECT_H
|
#ifndef OBJECT_H
|
||||||
#define OBJECT_H
|
#define OBJECT_H
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/hash_map.h"
|
#include "core/hash_map.h"
|
||||||
#include "core/rw_lock.h"
|
#include "core/rw_lock.h"
|
||||||
#include "core/string_name.h"
|
#include "core/string_name.h"
|
||||||
@ -10,6 +11,7 @@
|
|||||||
#include "object/variant.h"
|
#include "object/variant.h"
|
||||||
|
|
||||||
#include "object/dictionary.h"
|
#include "object/dictionary.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* object.h */
|
/* object.h */
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/int_types.h"
|
#include "core/int_types.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
typedef uint64_t ObjectID;
|
typedef uint64_t ObjectID;
|
||||||
|
|
||||||
|
@ -6,10 +6,12 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class Object;
|
class Object;
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
|
//--STRIP
|
||||||
#include "psignal.h"
|
#include "psignal.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
void Signal::connect_static(void (*func)(Signal *)) {
|
void Signal::connect_static(void (*func)(Signal *)) {
|
||||||
StaticSignalEntry *se = new StaticSignalEntry();
|
StaticSignalEntry *se = new StaticSignalEntry();
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
#ifndef SIGNAL_H
|
#ifndef SIGNAL_H
|
||||||
#define SIGNAL_H
|
#define SIGNAL_H
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/vector.h"
|
#include "core/vector.h"
|
||||||
#include "core/ustring.h"
|
#include "core/ustring.h"
|
||||||
|
|
||||||
#include "object/variant.h"
|
#include "object/variant.h"
|
||||||
#include "object/reference.h"
|
#include "object/reference.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class Signal {
|
class Signal {
|
||||||
public:
|
public:
|
||||||
|
@ -1,38 +1,14 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* ref_ptr.cpp */
|
/* ref_ptr.cpp */
|
||||||
/*************************************************************************/
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/* 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. */
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "ref_ptr.h"
|
#include "ref_ptr.h"
|
||||||
|
|
||||||
#include "object/reference.h"
|
#include "object/reference.h"
|
||||||
#include "object/resource.h"
|
#include "object/resource.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
void RefPtr::operator=(const RefPtr &p_other) {
|
void RefPtr::operator=(const RefPtr &p_other) {
|
||||||
Ref<Reference> *ref = reinterpret_cast<Ref<Reference> *>(&data[0]);
|
Ref<Reference> *ref = reinterpret_cast<Ref<Reference> *>(&data[0]);
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
* It's basically an opaque container of a Reference reference, so Variant can use it.
|
* It's basically an opaque container of a Reference reference, so Variant can use it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class RefPtr {
|
class RefPtr {
|
||||||
enum {
|
enum {
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
|
//--STRIP
|
||||||
#include "object/reference.h"
|
#include "object/reference.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* reference.cpp */
|
/* reference.cpp */
|
||||||
|
@ -6,10 +6,12 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
#include "core/safe_refcount.h"
|
#include "core/safe_refcount.h"
|
||||||
#include "object/object.h"
|
#include "object/object.h"
|
||||||
#include "object/ref_ptr.h"
|
#include "object/ref_ptr.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class Reference : public Object {
|
class Reference : public Object {
|
||||||
SFW_OBJECT(Reference, Object);
|
SFW_OBJECT(Reference, Object);
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
|
//--STRIP
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
void Resource::emit_changed() {
|
void Resource::emit_changed() {
|
||||||
changed.emit(this);
|
changed.emit(this);
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
#ifndef RESOURCE_H
|
#ifndef RESOURCE_H
|
||||||
#define RESOURCE_H
|
#define RESOURCE_H
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "object/reference.h"
|
#include "object/reference.h"
|
||||||
|
|
||||||
#include "psignal.h"
|
#include "psignal.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
class Resource : public Reference {
|
class Resource : public Reference {
|
||||||
SFW_OBJECT(Resource, Reference);
|
SFW_OBJECT(Resource, Reference);
|
||||||
|
@ -3,17 +3,16 @@
|
|||||||
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
/* From https://github.com/Relintai/pandemonium_engine (MIT) */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
//--STRIP
|
||||||
#include "variant.h"
|
#include "variant.h"
|
||||||
|
|
||||||
//#include "core/core_string_names.h"
|
|
||||||
//#include "core/io/marshalls.h"
|
|
||||||
|
|
||||||
#include "core/math_funcs.h"
|
#include "core/math_funcs.h"
|
||||||
|
|
||||||
#include "object/core_string_names.h"
|
#include "object/core_string_names.h"
|
||||||
#include "object/object.h"
|
#include "object/object.h"
|
||||||
#include "object/object_rc.h"
|
#include "object/object_rc.h"
|
||||||
#include "object/resource.h"
|
#include "object/resource.h"
|
||||||
|
//--STRIP
|
||||||
|
|
||||||
String Variant::get_type_name(Variant::Type p_type) {
|
String Variant::get_type_name(Variant::Type p_type) {
|
||||||
switch (p_type) {
|
switch (p_type) {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user