2013-04-05 06:13:26 +00:00
|
|
|
#ifndef TYPES_H
|
|
|
|
#define TYPES_H
|
|
|
|
|
|
|
|
typedef unsigned char u8; /* unsigned 8-bit */
|
|
|
|
typedef unsigned short u16; /* unsigned 16-bit */
|
2013-10-24 09:20:05 +00:00
|
|
|
typedef unsigned int u32; /* unsigned 32-bit */
|
2013-04-05 06:13:26 +00:00
|
|
|
typedef unsigned long long u64; /* unsigned 64-bit */
|
|
|
|
|
|
|
|
typedef signed char s8; /* signed 8-bit */
|
|
|
|
typedef short s16; /* signed 16-bit */
|
2013-10-24 09:20:05 +00:00
|
|
|
typedef int s32; /* signed 32-bit */
|
2013-04-05 06:13:26 +00:00
|
|
|
typedef long long s64; /* signed 64-bit */
|
|
|
|
|
|
|
|
typedef volatile unsigned char vu8; /* unsigned 8-bit */
|
|
|
|
typedef volatile unsigned short vu16; /* unsigned 16-bit */
|
2013-10-24 09:20:05 +00:00
|
|
|
typedef volatile unsigned int vu32; /* unsigned 32-bit */
|
2013-04-05 06:13:26 +00:00
|
|
|
typedef volatile unsigned long long vu64; /* unsigned 64-bit */
|
|
|
|
|
|
|
|
typedef volatile signed char vs8; /* signed 8-bit */
|
|
|
|
typedef volatile short vs16; /* signed 16-bit */
|
2013-10-24 09:20:05 +00:00
|
|
|
typedef volatile int vs32; /* signed 32-bit */
|
2013-04-05 06:13:26 +00:00
|
|
|
typedef volatile long long vs64; /* signed 64-bit */
|
|
|
|
|
|
|
|
typedef float f32; /* single prec floating point */
|
|
|
|
typedef double f64; /* double prec floating point */
|
|
|
|
|
|
|
|
#ifndef TRUE
|
|
|
|
#define TRUE 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef FALSE
|
|
|
|
#define FALSE 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NULL
|
|
|
|
#define NULL 0
|
|
|
|
#endif
|
|
|
|
|
2015-02-28 13:09:24 +00:00
|
|
|
#ifndef PLUGIN_PATH_SIZE
|
|
|
|
#define PLUGIN_PATH_SIZE 260
|
|
|
|
#endif
|
|
|
|
|
2018-12-01 11:24:55 +00:00
|
|
|
template <typename T>
|
|
|
|
class ValueKeeper
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ValueKeeper(T& _obj, T _newVal)
|
|
|
|
: m_obj(_obj)
|
|
|
|
, m_val(_obj)
|
|
|
|
{
|
|
|
|
m_obj = _newVal;
|
|
|
|
}
|
|
|
|
|
|
|
|
~ValueKeeper()
|
|
|
|
{
|
|
|
|
m_obj = m_val;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
T & m_obj;
|
|
|
|
T m_val;
|
|
|
|
};
|
|
|
|
|
2022-01-16 17:27:17 +00:00
|
|
|
#include "porting.h"
|
|
|
|
|
|
|
|
struct Gwords {
|
|
|
|
Gwords();
|
|
|
|
Gwords(word _w0, word _w1);
|
|
|
|
|
|
|
|
word w0;
|
|
|
|
word w1;
|
|
|
|
#ifdef EXTENDED_GFX
|
|
|
|
word w2;
|
|
|
|
word w3;
|
|
|
|
|
|
|
|
Gwords(word _w0, word _w1, word _w2, word _w3);
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef EXTENDED_GFX
|
|
|
|
static_assert(sizeof(Gwords) == sizeof(word) * 4, "Gwords is incorrect size");
|
|
|
|
#else
|
|
|
|
static_assert(sizeof(Gwords) == sizeof(word) * 2, "Gwords is incorrect size");
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct RGBA8
|
|
|
|
{
|
|
|
|
#ifdef NATIVE
|
|
|
|
u8 a;
|
|
|
|
u8 b;
|
|
|
|
u8 g;
|
|
|
|
u8 r;
|
|
|
|
#else
|
|
|
|
u8 r;
|
|
|
|
u8 g;
|
|
|
|
u8 b;
|
|
|
|
u8 a;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
2013-04-05 06:13:26 +00:00
|
|
|
#endif // TYPES_H
|