forked from CTR-tools/CTR-ModSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacros.h
52 lines (41 loc) · 1 KB
/
macros.h
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
// Version = MDD of release, all 1999
// For example, May 7 would be 507
#define AugReview 805
#define SepReview 903
#define UsaRetail 926
#define JpnTrial 1006
#define EurRetail 1020
#define JpnRetail 1111
#if BUILD == EurRetail
#define SCREEN_HEIGHT 236
#define FPS 25
#define ELAPSED_MS 40
#else
#define SCREEN_HEIGHT 216
#define FPS 30
#define ELAPSED_MS 32
#endif
#define SCREEN_WIDTH 512
#define SECOND (FPS * ELAPSED_MS)
#define MINUTE (SECOND * 60)
#define true 1
#define false 0
#ifndef REBUILD_PC
#define force_inline static inline __attribute__((always_inline))
#else
#define force_inline static
#endif
#define OFFSETOF(TYPE, ELEMENT) \
((unsigned int)&(((TYPE *)0)->ELEMENT))
#define RGBtoBGR(color) \
((color & 0xFF0000) >> 16) | (color & 0xFF00) | ((color & 0xFF) << 16)
#define GetRed(color) \
(color & 0xFF)
#define GetGreen(color) \
(color & 0xFF00)>>8
#define GetBlue(color) \
(color & 0xFF0000)>>16
#define aspectratioupsample(int) \
(int*7)/4
#define aspectratiodownsample(int) \
(int*4)/7