World of Might and Magic
0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
|
См. документацию.
4 typedef unsigned int uint;
6 #define PID(type, id) (uint32_t)((((8 * (id))) | (type)) & 0xFFFF) // packed id
7 #define PID_TYPE(pid) (ObjectType)((pid)&7) // extract type
8 #define PID_ID(pid) (uint32_t)(((pid)&0xFFFF) >> 3) // extract value
9 #define PID_INVALID (-1)
12 typedef unsigned int uint;
16 for (
int i = 0; i <
count; i++) {
23 typedef unsigned long long ull;
24 #define __int64 long long
28 #define MAKELL(num) num##LL
30 #elif defined(_MSC_VER)
32 typedef unsigned __int64
ull;
33 #define MAKELL(num) num##i64
35 #elif defined(__BORLANDC__)
37 typedef unsigned __int64
ull;
38 #define MAKELL(num) num##i64
41 #error "unknown compiler"
43 typedef unsigned int uint;
66 #if !defined(_MSC_VER)
67 #define _LONGLONG __int128
70 #define HEXRAYS_LOBYTE(x) (*((_BYTE *)&(x))) // low byte
71 #define HEXRAYS_LOWORD(x) (*((_WORD *)&(x))) // low word
72 #define HEXRAYS_LODWORD(x) (*((_DWORD *)&(x))) // low dword
73 #define HEXRAYS_HIBYTE(x) (*((_BYTE *)&(x) + 1))
74 #define HEXRAYS_HIWORD(x) (*((_WORD *)&(x) + 1))
75 #define HEXRAYS_HIDWORD(x) (*((_DWORD *)&(x) + 1))
76 #define BYTEn(x, n) (*((_BYTE *)&(x) + n))
77 #define WORDn(x, n) (*((_WORD *)&(x) + n))
78 #define BYTE1(x) BYTEn(x, 1) // byte 1 (counting from 0)
79 #define BYTE2(x) BYTEn(x, 2)
80 #define BYTE3(x) BYTEn(x, 3)
81 #define BYTE4(x) BYTEn(x, 4)
82 #define BYTE5(x) BYTEn(x, 5)
83 #define BYTE6(x) BYTEn(x, 6)
84 #define BYTE7(x) BYTEn(x, 7)
85 #define BYTE8(x) BYTEn(x, 8)
86 #define BYTE9(x) BYTEn(x, 9)
87 #define BYTE10(x) BYTEn(x, 10)
88 #define BYTE11(x) BYTEn(x, 11)
89 #define BYTE12(x) BYTEn(x, 12)
90 #define BYTE13(x) BYTEn(x, 13)
91 #define BYTE14(x) BYTEn(x, 14)
92 #define BYTE15(x) BYTEn(x, 15)
93 #define WORD1(x) WORDn(x, 1)
94 #define WORD2(x) WORDn(x, 2) // third word of the object, unsigned
95 #define WORD3(x) WORDn(x, 3)
96 #define WORD4(x) WORDn(x, 4)
97 #define WORD5(x) WORDn(x, 5)
98 #define WORD6(x) WORDn(x, 6)
99 #define WORD7(x) WORDn(x, 7)
102 #define HEXRAYS_SLOBYTE(x) (*((int8 *)&(x)))
103 #define HEXRAYS_SLOWORD(x) (*((int16 *)&(x)))
104 #define HEXRAYS_SLODWORD(x) (*((int32 *)&(x)))
105 #define HEXRAYS_SHIBYTE(x) (*((int8 *)&(x) + 1))
106 #define HEXRAYS_SHIWORD(x) (*((int16 *)&(x) + 1))
107 #define HEXRAYS_SHIDWORD(x) (*((int32 *)&(x) + 1))
108 #define SBYTEn(x, n) (*((int8 *)&(x) + n))
109 #define SWORDn(x, n) (*((int16 *)&(x) + n))
110 #define SBYTE1(x) SBYTEn(x, 1)
111 #define SBYTE2(x) SBYTEn(x, 2)
112 #define SBYTE3(x) SBYTEn(x, 3)
113 #define SBYTE4(x) SBYTEn(x, 4)
114 #define SBYTE5(x) SBYTEn(x, 5)
115 #define SBYTE6(x) SBYTEn(x, 6)
116 #define SBYTE7(x) SBYTEn(x, 7)
117 #define SBYTE8(x) SBYTEn(x, 8)
118 #define SBYTE9(x) SBYTEn(x, 9)
119 #define SBYTE10(x) SBYTEn(x, 10)
120 #define SBYTE11(x) SBYTEn(x, 11)
121 #define SBYTE12(x) SBYTEn(x, 12)
122 #define SBYTE13(x) SBYTEn(x, 13)
123 #define SBYTE14(x) SBYTEn(x, 14)
124 #define SBYTE15(x) SBYTEn(x, 15)
125 #define SWORD1(x) SWORDn(x, 1)
126 #define SWORD2(x) SWORDn(x, 2)
127 #define SWORD3(x) SWORDn(x, 3)
128 #define SWORD4(x) SWORDn(x, 4)
129 #define SWORD5(x) SWORDn(x, 5)
130 #define SWORD6(x) SWORDn(x, 6)
131 #define SWORD7(x) SWORDn(x, 7)
136 return (((
int16)high) <<
sizeof(high) * 8) |
uint8(low);
140 return (((
int32)high) <<
sizeof(high) * 8) |
uint16(low);
144 return (((
int64)high) <<
sizeof(high) * 8) |
uint32(low);
148 return (((
uint16)high) <<
sizeof(high) * 8) |
uint8(low);
152 return (((
uint32)high) <<
sizeof(high) * 8) |
uint16(low);
156 return (((
uint64)high) <<
sizeof(high) * 8) |
uint32(low);
162 const uint nbits =
sizeof(T) * 8;
174 const uint nbits =
sizeof(T) * 8;
186 const uint nbits =
sizeof(T) * 8;
201 if (
sizeof(T) == 1)
return int8(
x) < 0;
202 if (
sizeof(T) == 2)
return int16(
x) < 0;
203 if (
sizeof(T) == 4)
return int32(
x) < 0;
208 template <
class T,
class U>
210 if (
sizeof(T) <
sizeof(U)) {
222 template <
class T,
class U>
224 if (
sizeof(T) <
sizeof(U)) {
236 template <
class T,
class U>
238 int size =
sizeof(T) >
sizeof(U) ?
sizeof(T) :
sizeof(U);
246 template <
class T,
class U>
248 int size =
sizeof(T) >
sizeof(U) ?
sizeof(T) :
sizeof(U);
263 #pragma pack(push, 1)
278 #pragma pack(push, 1)
289 #pragma pack(push, 1)
int8 __MKCSHR__(T value, uint count)
T __ROL__(T value, uint count)
GLuint GLuint GLsizei count
int8 __MKCSHL__(T value, uint count)
EGLSurface EGLint EGLint y
EGLSyncKHR EGLint EGLint * value
@ SOUND_StartTurnBasedMode
void memset32(void *ptr, uint32_t value, int count)
int16 __PAIR__(int8 high, T low)
GLfixed GLfixed GLfixed y2
unsigned __int32 uint32_t
T __ROR__(T value, uint count)
std::array< stat_coord, 26 > stat_string_coord