feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
43
engine/thirdparty/misc/patches/FastNoiseLite-0001-namespace-warnings.patch
vendored
Normal file
43
engine/thirdparty/misc/patches/FastNoiseLite-0001-namespace-warnings.patch
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
diff --git a/thirdparty/misc/FastNoiseLite.h b/thirdparty/misc/FastNoiseLite.h
|
||||
index ed97b0fcac..fb6dbcb92a 100644
|
||||
--- a/thirdparty/misc/FastNoiseLite.h
|
||||
+++ b/thirdparty/misc/FastNoiseLite.h
|
||||
@@ -52,6 +52,8 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
+namespace fastnoiselite {
|
||||
+
|
||||
class FastNoiseLite
|
||||
{
|
||||
public:
|
||||
@@ -1609,6 +1611,12 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
+// GCC raises warnings when integer overflows occur, which are needed for hashing here.
|
||||
+#if defined(__GNUC__) && !defined(__clang__)
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Waggressive-loop-optimizations"
|
||||
+#endif
|
||||
+
|
||||
template <typename FNfloat>
|
||||
float SingleCellular(int seed, FNfloat x, FNfloat y, FNfloat z) const
|
||||
{
|
||||
@@ -1763,6 +1771,9 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
+#if defined(__GNUC__) && !defined(__clang__)
|
||||
+#pragma GCC diagnostic pop
|
||||
+#endif
|
||||
|
||||
// Perlin Noise
|
||||
|
||||
@@ -2583,4 +2594,6 @@ const T FastNoiseLite::Lookup<T>::RandVecs3D[] =
|
||||
-0.7870349638f, 0.03447489231f, 0.6159443543f, 0, -0.2015596421f, 0.6859872284f, 0.6991389226f, 0, -0.08581082512f, -0.10920836f, -0.9903080513f, 0, 0.5532693395f, 0.7325250401f, -0.396610771f, 0, -0.1842489331f, -0.9777375055f, -0.1004076743f, 0, 0.0775473789f, -0.9111505856f, 0.4047110257f, 0, 0.1399838409f, 0.7601631212f, -0.6344734459f, 0, 0.4484419361f, -0.845289248f, 0.2904925424f, 0
|
||||
};
|
||||
|
||||
+} // namespace fastnoiselite
|
||||
+
|
||||
#endif
|
||||
32
engine/thirdparty/misc/patches/ifaddrs-android-0001-complete-struct.patch
vendored
Normal file
32
engine/thirdparty/misc/patches/ifaddrs-android-0001-complete-struct.patch
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
diff --git a/thirdparty/misc/ifaddrs-android.h b/thirdparty/misc/ifaddrs-android.h
|
||||
index e7d81e813f..04ff2ca58b 100644
|
||||
--- a/thirdparty/misc/ifaddrs-android.h
|
||||
+++ b/thirdparty/misc/ifaddrs-android.h
|
||||
@@ -34,6 +34,9 @@
|
||||
// Fills out a list of ifaddr structs (see below) which contain information
|
||||
// about every network interface available on the host.
|
||||
// See 'man getifaddrs' on Linux or OS X (nb: it is not a POSIX function).
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
struct ifaddrs {
|
||||
struct ifaddrs* ifa_next;
|
||||
char* ifa_name;
|
||||
@@ -42,7 +45,17 @@ struct ifaddrs {
|
||||
struct sockaddr* ifa_netmask;
|
||||
// Real ifaddrs has broadcast, point to point and data members.
|
||||
// We don't need them (yet?).
|
||||
+ // We never initialize the following members. We only define them to match the ifaddrs struct.
|
||||
+ union
|
||||
+ {
|
||||
+ struct sockaddr *ifu_broadaddr;
|
||||
+ struct sockaddr *ifu_dstaddr;
|
||||
+ } ifa_ifu;
|
||||
+ void *ifa_data;
|
||||
};
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
|
||||
int getifaddrs(struct ifaddrs** result);
|
||||
void freeifaddrs(struct ifaddrs* addrs);
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/thirdparty/misc/polypartition.cpp b/thirdparty/misc/polypartition.cpp
|
||||
index 3a8a6efa83..8c5409bf24 100644
|
||||
index 3a8a6efa83..a725125ed0 100644
|
||||
--- a/thirdparty/misc/polypartition.cpp
|
||||
+++ b/thirdparty/misc/polypartition.cpp
|
||||
@@ -26,7 +26,6 @@
|
||||
|
|
@ -528,15 +528,15 @@ index 3a8a6efa83..8c5409bf24 100644
|
|||
// a tree, complexity requirements for operations are the same as
|
||||
// for the balanced binary search tree.
|
||||
- std::set<ScanLineEdge> edgeTree;
|
||||
+ Set<ScanLineEdge> edgeTree;
|
||||
+ RBSet<ScanLineEdge> edgeTree;
|
||||
// Store iterators to the edge tree elements.
|
||||
// This makes deleting existing edges much faster.
|
||||
- std::set<ScanLineEdge>::iterator *edgeTreeIterators, edgeIter;
|
||||
- edgeTreeIterators = new std::set<ScanLineEdge>::iterator[maxnumvertices];
|
||||
- std::pair<std::set<ScanLineEdge>::iterator, bool> edgeTreeRet;
|
||||
+ Set<ScanLineEdge>::Element **edgeTreeIterators, *edgeIter;
|
||||
+ edgeTreeIterators = new Set<ScanLineEdge>::Element *[maxnumvertices];
|
||||
+ //Pair<Set<ScanLineEdge>::iterator, bool> edgeTreeRet;
|
||||
+ RBSet<ScanLineEdge>::Element **edgeTreeIterators, *edgeIter;
|
||||
+ edgeTreeIterators = new RBSet<ScanLineEdge>::Element *[maxnumvertices];
|
||||
+ //Pair<RBSet<ScanLineEdge>::iterator, bool> edgeTreeRet;
|
||||
for (i = 0; i < numvertices; i++) {
|
||||
- edgeTreeIterators[i] = edgeTree.end();
|
||||
+ edgeTreeIterators[i] = nullptr;
|
||||
|
|
@ -671,8 +671,8 @@ index 3a8a6efa83..8c5409bf24 100644
|
|||
void TPPLPartition::AddDiagonal(MonotoneVertex *vertices, long *numvertices, long index1, long index2,
|
||||
- TPPLVertexType *vertextypes, std::set<ScanLineEdge>::iterator *edgeTreeIterators,
|
||||
- std::set<ScanLineEdge> *edgeTree, long *helpers) {
|
||||
+ TPPLVertexType *vertextypes, Set<ScanLineEdge>::Element **edgeTreeIterators,
|
||||
+ Set<ScanLineEdge> *edgeTree, long *helpers) {
|
||||
+ TPPLVertexType *vertextypes, RBSet<ScanLineEdge>::Element **edgeTreeIterators,
|
||||
+ RBSet<ScanLineEdge> *edgeTree, long *helpers) {
|
||||
long newindex1, newindex2;
|
||||
|
||||
newindex1 = *numvertices;
|
||||
|
|
@ -713,7 +713,7 @@ index 3a8a6efa83..8c5409bf24 100644
|
|||
}
|
||||
}
|
||||
diff --git a/thirdparty/misc/polypartition.h b/thirdparty/misc/polypartition.h
|
||||
index f163f5d217..b2d905a3ef 100644
|
||||
index e1df6cef9e..c084bdf74c 100644
|
||||
--- a/thirdparty/misc/polypartition.h
|
||||
+++ b/thirdparty/misc/polypartition.h
|
||||
@@ -24,8 +24,9 @@
|
||||
|
|
@ -724,7 +724,7 @@ index f163f5d217..b2d905a3ef 100644
|
|||
-#include <set>
|
||||
+#include "core/math/vector2.h"
|
||||
+#include "core/templates/list.h"
|
||||
+#include "core/templates/set.h"
|
||||
+#include "core/templates/rb_set.h"
|
||||
|
||||
typedef double tppl_float;
|
||||
|
||||
|
|
@ -809,8 +809,8 @@ index f163f5d217..b2d905a3ef 100644
|
|||
void AddDiagonal(MonotoneVertex *vertices, long *numvertices, long index1, long index2,
|
||||
- TPPLVertexType *vertextypes, std::set<ScanLineEdge>::iterator *edgeTreeIterators,
|
||||
- std::set<ScanLineEdge> *edgeTree, long *helpers);
|
||||
+ TPPLVertexType *vertextypes, Set<ScanLineEdge>::Element **edgeTreeIterators,
|
||||
+ Set<ScanLineEdge> *edgeTree, long *helpers);
|
||||
+ TPPLVertexType *vertextypes, RBSet<ScanLineEdge>::Element **edgeTreeIterators,
|
||||
+ RBSet<ScanLineEdge> *edgeTree, long *helpers);
|
||||
|
||||
// Triangulates a monotone polygon, used in Triangulate_MONO.
|
||||
int TriangulateMonotone(TPPLPoly *inPoly, TPPLPolyList *triangles);
|
||||
57
engine/thirdparty/misc/patches/qoa-min-fix.patch
vendored
57
engine/thirdparty/misc/patches/qoa-min-fix.patch
vendored
|
|
@ -1,57 +0,0 @@
|
|||
diff --git a/qoa.h b/qoa.h
|
||||
index 592082933a..c890b88bd6 100644
|
||||
--- a/qoa.h
|
||||
+++ b/qoa.h
|
||||
@@ -140,14 +140,14 @@ typedef struct {
|
||||
#endif
|
||||
} qoa_desc;
|
||||
|
||||
-unsigned int qoa_encode_header(qoa_desc *qoa, unsigned char *bytes);
|
||||
-unsigned int qoa_encode_frame(const short *sample_data, qoa_desc *qoa, unsigned int frame_len, unsigned char *bytes);
|
||||
-void *qoa_encode(const short *sample_data, qoa_desc *qoa, unsigned int *out_len);
|
||||
+inline unsigned int qoa_encode_header(qoa_desc *qoa, unsigned char *bytes);
|
||||
+inline unsigned int qoa_encode_frame(const short *sample_data, qoa_desc *qoa, unsigned int frame_len, unsigned char *bytes);
|
||||
+inline void *qoa_encode(const short *sample_data, qoa_desc *qoa, unsigned int *out_len);
|
||||
|
||||
-unsigned int qoa_max_frame_size(qoa_desc *qoa);
|
||||
-unsigned int qoa_decode_header(const unsigned char *bytes, int size, qoa_desc *qoa);
|
||||
-unsigned int qoa_decode_frame(const unsigned char *bytes, unsigned int size, qoa_desc *qoa, short *sample_data, unsigned int *frame_len);
|
||||
-short *qoa_decode(const unsigned char *bytes, int size, qoa_desc *file);
|
||||
+inline unsigned int qoa_max_frame_size(qoa_desc *qoa);
|
||||
+inline unsigned int qoa_decode_header(const unsigned char *bytes, int size, qoa_desc *qoa);
|
||||
+inline unsigned int qoa_decode_frame(const unsigned char *bytes, unsigned int size, qoa_desc *qoa, short *sample_data, unsigned int *frame_len);
|
||||
+inline short *qoa_decode(const unsigned char *bytes, int size, qoa_desc *file);
|
||||
|
||||
#ifndef QOA_NO_STDIO
|
||||
|
||||
@@ -394,9 +394,9 @@ unsigned int qoa_encode_frame(const short *sample_data, qoa_desc *qoa, unsigned
|
||||
#ifdef QOA_RECORD_TOTAL_ERROR
|
||||
qoa_uint64_t best_error = -1;
|
||||
#endif
|
||||
- qoa_uint64_t best_slice;
|
||||
- qoa_lms_t best_lms;
|
||||
- int best_scalefactor;
|
||||
+ qoa_uint64_t best_slice = -1;
|
||||
+ qoa_lms_t best_lms = {{-1, -1, -1, -1}, {-1, -1, -1, -1}};
|
||||
+ int best_scalefactor = -1;
|
||||
|
||||
for (int sfi = 0; sfi < 16; sfi++) {
|
||||
/* There is a strong correlation between the scalefactors of
|
||||
@@ -500,7 +500,7 @@ void *qoa_encode(const short *sample_data, qoa_desc *qoa, unsigned int *out_len)
|
||||
num_frames * QOA_LMS_LEN * 4 * qoa->channels + /* 4 * 4 bytes lms state per channel */
|
||||
num_slices * 8 * qoa->channels; /* 8 byte slices */
|
||||
|
||||
- unsigned char *bytes = QOA_MALLOC(encoded_size);
|
||||
+ unsigned char *bytes = (unsigned char *)QOA_MALLOC(encoded_size);
|
||||
|
||||
for (unsigned int c = 0; c < qoa->channels; c++) {
|
||||
/* Set the initial LMS weights to {0, 0, -1, 2}. This helps with the
|
||||
@@ -655,7 +655,7 @@ short *qoa_decode(const unsigned char *bytes, int size, qoa_desc *qoa) {
|
||||
|
||||
/* Calculate the required size of the sample buffer and allocate */
|
||||
int total_samples = qoa->samples * qoa->channels;
|
||||
- short *sample_data = QOA_MALLOC(total_samples * sizeof(short));
|
||||
+ short *sample_data = (short *)QOA_MALLOC(total_samples * sizeof(short));
|
||||
|
||||
unsigned int sample_index = 0;
|
||||
unsigned int frame_len;
|
||||
54
engine/thirdparty/misc/patches/smaz-0001-write-string-warning.patch
vendored
Normal file
54
engine/thirdparty/misc/patches/smaz-0001-write-string-warning.patch
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
diff --git a/thirdparty/misc/smaz.c b/thirdparty/misc/smaz.c
|
||||
index aa674c3858..6f9ea20e67 100644
|
||||
--- a/thirdparty/misc/smaz.c
|
||||
+++ b/thirdparty/misc/smaz.c
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <string.h>
|
||||
|
||||
/* Our compression codebook, used for compression */
|
||||
-static char *Smaz_cb[241] = {
|
||||
+static const char *Smaz_cb[241] = {
|
||||
"\002s,\266", "\003had\232\002leW", "\003on \216", "", "\001yS",
|
||||
"\002ma\255\002li\227", "\003or \260", "", "\002ll\230\003s t\277",
|
||||
"\004fromg\002mel", "", "\003its\332", "\001z\333", "\003ingF", "\001>\336",
|
||||
@@ -76,7 +76,7 @@ static char *Smaz_rcb[254] = {
|
||||
"e, ", " it", "whi", " ma", "ge", "x", "e c", "men", ".com"
|
||||
};
|
||||
|
||||
-int smaz_compress(char *in, int inlen, char *out, int outlen) {
|
||||
+int smaz_compress(const char *in, int inlen, char *out, int outlen) {
|
||||
unsigned int h1,h2,h3=0;
|
||||
int verblen = 0, _outlen = outlen;
|
||||
char verb[256], *_out = out;
|
||||
@@ -154,7 +154,7 @@ out:
|
||||
return out-_out;
|
||||
}
|
||||
|
||||
-int smaz_decompress(char *in, int inlen, char *out, int outlen) {
|
||||
+int smaz_decompress(const char *in, int inlen, char *out, int outlen) {
|
||||
unsigned char *c = (unsigned char*) in;
|
||||
char *_out = out;
|
||||
int _outlen = outlen;
|
||||
@@ -179,7 +179,7 @@ int smaz_decompress(char *in, int inlen, char *out, int outlen) {
|
||||
inlen -= 2+len;
|
||||
} else {
|
||||
/* Codebook entry */
|
||||
- char *s = Smaz_rcb[*c];
|
||||
+ const char *s = Smaz_rcb[*c];
|
||||
int len = strlen(s);
|
||||
|
||||
if (outlen < len) return _outlen+1;
|
||||
diff --git a/thirdparty/misc/smaz.h b/thirdparty/misc/smaz.h
|
||||
index ce9c35d6b2..d8e1f8a6a5 100644
|
||||
--- a/thirdparty/misc/smaz.h
|
||||
+++ b/thirdparty/misc/smaz.h
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _SMAZ_H
|
||||
#define _SMAZ_H
|
||||
|
||||
-int smaz_compress(char *in, int inlen, char *out, int outlen);
|
||||
-int smaz_decompress(char *in, int inlen, char *out, int outlen);
|
||||
+int smaz_compress(const char *in, int inlen, char *out, int outlen);
|
||||
+int smaz_decompress(const char *in, int inlen, char *out, int outlen);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue