Include typedefs.h in defs.h.

This commit is contained in:
Relintai 2023-10-23 17:54:30 +02:00
parent 6ea7b53e5a
commit 3e2e07a056
5 changed files with 13 additions and 42 deletions

View File

@ -34,8 +34,6 @@
#include <algorithm>
bool AABB::intersects(const AABB &p_aabb) const {
if (position.x >= (p_aabb.position.x + p_aabb.size.x))
return false;
@ -600,5 +598,3 @@ void AABB::get_edge(int p_edge, Vector3 &r_from, Vector3 &r_to) const {
AABB::operator String() const {
return String() + position + " - " + size;
}

View File

@ -35,8 +35,6 @@
#include <algorithm>
const Basis Basis::IDENTITY = Basis();
const Basis Basis::FLIP_X = Basis(-1, 0, 0, 0, 1, 0, 0, 0, 1);
const Basis Basis::FLIP_Y = Basis(1, 0, 0, 0, -1, 0, 0, 0, 1);
@ -634,12 +632,8 @@ Basis::Basis(const Vector3 &p_euler) {
set_euler(p_euler);
}
#include "quaternion.h"
Basis::Basis(const Quaternion &p_quaternion) {
real_t d = p_quaternion.length_squared();
real_t s = 2.0 / d;
@ -706,5 +700,3 @@ Basis::operator Quaternion() const {
return Quaternion(temp[0], temp[1], temp[2], temp[3]);
}

View File

@ -35,11 +35,6 @@
#include <gdn/color.h>
#include <cmath>
#define MIN(a, b) (a < b ? a : b)
#define MAX(a, b) (a > b ? a : b)
static String _to_hex(float p_val);
static float _parse_col(const String &p_str, int p_ofs) {
@ -651,5 +646,3 @@ Color Color::operator-() const {
1.0 - b,
1.0 - a);
}

View File

@ -1,3 +1,6 @@
#ifndef DEFS_H
#define DEFS_H
/*************************************************************************/
/* defs.h */
/*************************************************************************/
@ -28,11 +31,6 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef DEFS_H
#define DEFS_H
enum class Error {
OK,
FAILED, ///< Generic fail error
@ -85,8 +83,6 @@ enum class Error {
ERR_PRINTER_ON_FIRE, /// the parallel port printer is engulfed in flames
};
#include <pandemonium_global.h>
// alloca() is non-standard. When using MSVC, it's in malloc.h.
@ -119,6 +115,8 @@ typedef float real_t;
#define unlikely(x) x
#endif
#include "typedefs.h"
// Don't use this directly; instead, use any of the CRASH_* macros
#ifdef _MSC_VER
#define GENERATE_TRAP \

View File

@ -343,14 +343,6 @@ struct _GlobalLock {
#define __STRX(m_index) #m_index
#define __STR(m_index) __STRX(m_index)
#ifdef __GNUC__
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#else
#define likely(x) x
#define unlikely(x) x
#endif
#if defined(__GNUC__)
#define _PRINTF_FORMAT_ATTRIBUTE_2_0 __attribute__((format(printf, 2, 0)))
#define _PRINTF_FORMAT_ATTRIBUTE_2_3 __attribute__((format(printf, 2, 3)))