summaryrefslogtreecommitdiff
path: root/src/include/defines.h
blob: 884ab469a9a12b0e5a9dafba256dfb0b1115a6d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
typedef int8_t int8;
typedef int16_t int16;
typedef int32_t int32;

typedef int64_t int64;
typedef int32 bool32;

typedef uint8_t uint8;
typedef uint16_t uint16;
typedef uint32_t uint32;
typedef uint64_t uint64;

typedef float real32;
typedef double real64;

typedef uint64 ptrsize;   // is there a compiler variable for 32 vs 64 bit like this?

#define NORMALIZED_COL_MIN V4(0.0f, 0.0f, 0.0f, 0.0f)
#define NORMALIZED_COL_MAX V4(1.0f, 1.0f, 1.0f, 1.0f)
#define NORMALIZED_REAL_MIN { 0.0f }
#define NORMALIZED_REAL_MAX { 1.0f }

#define TESS_TOL 1.5f     // Level of tesselation for bezier calculations; ImGui's default value

// All of these MIN/MAX values are arbitrarily chosen; they can probably be
// increased if the user requires it.

#define PROPERTY_REAL_MAX 1000000
#define PROPERTY_REAL_MIN -1000000

#define MAX_LAYERS 2048
#define MAX_EFFECTS 32
#define MAX_SOURCES 1024
#define MAX_HISTORY_ENTRIES 2048
#define MAX_HISTORY_ACTIONS 8192
#define MAX_COMPS 1024
#define MAX_PRECOMP_RECURSIONS 4
#define MAX_MASKS 8
#define MAX_PROPERTIES_PER_EFFECT 80     // Kinda high since we want to support 8 xy points of Curves data across 5 channels.
#define MAX_KEYFRAME_BLOCKS 64
// #define MAX_KEYFRAMES_PER_BLOCK 32       // max keyframes on a single channel is 2048
#define MAX_KEYFRAMES_PER_BLOCK 2

#define MAX_SELECTED_PROPERTIES 16

#define AmountOf(Array) sizeof((Array)) / sizeof((Array)[1])

#if ARM
#define GetCPUTime() 0
#else
#define GetCPUTime() __rdtsc()
#endif

static real32 Tau = 0.9; // tension