NW4F G3d
Loading...
Searching...
No Matches
g3d_defs.h
Go to the documentation of this file.
1#ifndef NW_G3D_DEFS_H_
2#define NW_G3D_DEFS_H_
3
4#define NW_G3D_VERSION_MAJOR ( 3 )
5#define NW_G3D_VERSION_MINOR ( 0 )
6#define NW_G3D_VERSION_MICRO ( 0 )
7
8#define NW_G3D_VERSION_BINARYBUGFIX ( 1 )
9
10#define NW_G3D_WIN_WIN ( 0x1 )
11#define NW_G3D_CAFE_CAFE ( 0x4 )
12#define NW_G3D_CAFE_WIN ( 0x5 )
13
14#define NW_G3D_PLATFORM ( NW_G3D_CAFE_CAFE )
15
16#define NW_G3D_IS_TARGET_WIN ( 0 )
17#define NW_G3D_IS_TARGET_CAFE ( 1 )
18
19#define NW_G3D_IS_HOST_WIN ( 0 )
20#define NW_G3D_IS_HOST_CAFE ( 1 )
21
22#define NW_G3D_LITTLE_ENDIAN ( 0 )
23#define NW_G3D_BIG_ENDIAN ( 1 )
24
25#define NW_G3D_TARGET_ENDIAN ( NW_G3D_BIG_ENDIAN )
26
27#define NW_G3D_HOST_ENDIAN ( NW_G3D_TARGET_ENDIAN )
28
29#define NW_G3D_32BIT ( 2 )
30#define NW_G3D_64BIT ( 3 )
31
32#define NW_G3D_TARGET_ARCH ( NW_G3D_32BIT )
33
34#define NW_G3D_TARGET_PTRSIZE ( 1 << NW_G3D_TARGET_ARCH )
35#define NW_G3D_TARGET_DEFAULT_ALIGNMENT ( NW_G3D_TARGET_PTRSIZE )
36
37
38#define NW_G3D_HOST_ARCH ( NW_G3D_32BIT )
39
40#define NW_G3D_HOST_PTRSIZE ( 1 << NW_G3D_HOST_ARCH )
41#define NW_G3D_HOST_DEFAULT_ALIGNMENT ( NW_G3D_HOST_PTRSIZE )
42
43#define NW_G3D_DEBUG ( 1 )
44#define NW_G3D_DEVELOP ( 2 )
45#define NW_G3D_RELEASE ( 3 )
46
47#if !defined( NW_G3D_BUILD )
48 #if defined( NW_DEBUG )
49 #define NW_G3D_BUILD ( NW_G3D_DEBUG )
50 #elif defined( NW_DEVELOP )
51 #define NW_G3D_BUILD ( NW_G3D_DEVELOP )
52 #elif defined( NW_RELEASE )
53 #define NW_G3D_BUILD ( NW_G3D_RELEASE )
54 #else
55 #error "Unknown build"
56 #endif
57#endif
58
59#define NW_G3D_IS_DEBUG ( NW_G3D_BUILD == NW_G3D_DEBUG )
60#define NW_G3D_IS_DEVELOP ( NW_G3D_BUILD == NW_G3D_DEVELOP )
61#define NW_G3D_IS_RELEASE ( NW_G3D_BUILD == NW_G3D_RELEASE )
62
63#define NW_G3D_IS_GX2 ( NW_G3D_IS_HOST_CAFE )
64#define NW_G3D_IS_GL ( !NW_G3D_IS_HOST_CAFE )
65
66#define NW_G3D_FORCE_INLINE inline
67
68#define NW_G3D_INLINE inline
69#define NW_G3D_MATH_INLINE inline
70
71#define NW_G3D_ALIGN(alignment) ALIGNVAR(alignment)
72
73#define NW_G3D_UNUSED( var ) (void)var
74
75#define NW_G3D_STATIC_CONDITION(exp) (exp)
76
77#define NW_G3D_TABLE_FIELD static const
78
79#define NW_G3D_CODE_POSITION_NAME __BASE__
80
81#define NW_G3D_DISALLOW_COPY_AND_ASSIGN(TypeName)
82 TypeName(const TypeName&);
83 void operator=(const TypeName&)
84
85#define NW_G3D_DEPRECATED_FUNCTION_MSG(MFunc, msg) MFunc __attribute__ ((deprecated))
86
87#define NW_G3D_DEPRECATED_FUNCTION(MFunc) NW_G3D_DEPRECATED_FUNCTION_MSG(MFunc,
88 "## g3d deprecated function ##")
89
90#define NW_G3D_MAKE_U8X4_AS_U32(a,b,c,d)
91 static_cast<u32>(
92 (static_cast<u8>(a) << 24)
93 | (static_cast<u8>(b) << 16)
94 | (static_cast<u8>(c) << 8)
95 | (static_cast<u8>(d) << 0)
96 )
97
98#define NW_G3D_GET_SIGNATURE0(sig) ((static_cast<u32>(sig) >> 24) & 0xFF)
99#define NW_G3D_GET_SIGNATURE1(sig) ((static_cast<u32>(sig) >> 16) & 0xFF)
100#define NW_G3D_GET_SIGNATURE2(sig) ((static_cast<u32>(sig) >> 8) & 0xFF)
101#define NW_G3D_GET_SIGNATURE3(sig) ((static_cast<u32>(sig) >> 0) & 0xFF)
102
110
111namespace nw { namespace g3d {
112
113namespace ut {}
114using namespace nw::g3d::ut;
115
116namespace math {}
117using namespace nw::g3d::math;
118
119namespace fnd {}
120using namespace nw::g3d::fnd;
121
122namespace res {}
123using namespace nw::g3d::res;
124
125} } // namespace nw::g3d
126
127#include <cafe/os/OSCore.h>
128
129typedef u8 bit8;
130typedef u16 bit16;
131typedef u32 bit32;
132typedef u64 bit64;
133
134typedef unsigned int uint;
135
136#include <stdint.h>
137#ifndef DISABLE_PS
138#include <ppc_ghs.h>
139#include <ppc_ps.h>
140#endif // DISABLE_PS
141#else
142
143#endif // NW_G3D_DEFS_H_
#define NW_G3D_IS_HOST_CAFE
Definition g3d_defs.h:20
#define NW_G3D_DEBUG
Definition g3d_defs.h:43
u64 bit64
Definition g3d_defs.h:132
#define NW_G3D_CAFE_CAFE
Definition g3d_defs.h:11
#define NW_G3D_VERSION_MICRO
Definition g3d_defs.h:6
#define NW_G3D_VERSION_BINARYBUGFIX
Definition g3d_defs.h:8
#define NW_G3D_VERSION_MAJOR
Definition g3d_defs.h:4
#define NW_G3D_TARGET_ARCH
Definition g3d_defs.h:32
#define NW_G3D_BIG_ENDIAN
Definition g3d_defs.h:23
#define NW_G3D_RELEASE
Definition g3d_defs.h:45
#define NW_G3D_32BIT
Definition g3d_defs.h:29
#define NW_G3D_VERSION_MINOR
Definition g3d_defs.h:5
#define NW_G3D_TARGET_ENDIAN
Definition g3d_defs.h:25
u8 bit8
Definition g3d_defs.h:129
u16 bit16
Definition g3d_defs.h:130
#define NW_G3D_HOST_PTRSIZE
Definition g3d_defs.h:40
u32 bit32
Definition g3d_defs.h:131
#define NW_G3D_MAKE_U8X4_AS_U32(a, b, c, d)
Definition g3d_defs.h:90
#define NW_G3D_DEPRECATED_FUNCTION_MSG(MFunc, msg)
Definition g3d_defs.h:85
#define NW_G3D_HOST_ARCH
Definition g3d_defs.h:38
#define NW_G3D_TARGET_PTRSIZE
Definition g3d_defs.h:34
#define NW_G3D_DEVELOP
Definition g3d_defs.h:44
Definition g3d_GfxManage.cpp:10
Definition g3d_MathCommon.h:6
Definition g3d_defs.h:122
Definition g3d_Inlines.h:8
Definition g3d_GfxManage.cpp:10