annotate Engine/mm7_data.h @ 2535:3a36de426f5f

For draw uPlayerCreationUI_ArrowAnim
author Ritor1
date Sun, 15 Feb 2015 23:39:07 +0600
parents 68cdef6879a0
children 407263babde8
rev   line source
2499
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
1 #pragma once
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
2 #include <string>
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
3 #include "VectorTypes.h"
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
4 #include "OSAPI.h"
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
5 #include <array>
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
6 #include <assert.h>
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
7 #include "NZIArray.h"
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
8
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
9 //typedef char _UNKNOWN;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
10 typedef unsigned int uint;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
11
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
12
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
13 inline void __fastcall memset32(void *ptr, unsigned __int32 value, int count)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
14 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
15 unsigned __int32* p = (unsigned __int32 *)ptr;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
16 for (int i = 0; i < count; i++)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
17 *p++ = value;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
18 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
19
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
20
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
21
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
22
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
23
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
24
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
25
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
26
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
27
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
28
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
29
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
30 #if defined(__GNUC__)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
31 typedef long long ll;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
32 typedef unsigned long long ull;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
33 #define __int64 long long
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
34 #define __int32 int
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
35 #define __int16 short
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
36 #define __int8 char
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
37 #define MAKELL(num) num ## LL
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
38 #define FMT_64 "ll"
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
39 #elif defined(_MSC_VER)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
40 typedef __int64 ll;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
41 typedef unsigned __int64 ull;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
42 #define MAKELL(num) num ## i64
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
43 #define FMT_64 "I64"
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
44 #elif defined (__BORLANDC__)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
45 typedef __int64 ll;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
46 typedef unsigned __int64 ull;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
47 #define MAKELL(num) num ## i64
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
48 #define FMT_64 "L"
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
49 #else
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
50 #error "unknown compiler"
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
51 #endif
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
52 typedef unsigned int uint;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
53 typedef unsigned char uchar;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
54 typedef unsigned short ushort;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
55 typedef unsigned long ulong;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
56
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
57 typedef char int8;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
58 typedef signed char sint8;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
59 typedef unsigned char uint8;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
60 typedef short int16;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
61 typedef signed short sint16;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
62 typedef unsigned short uint16;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
63 typedef int int32;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
64 typedef signed int sint32;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
65 typedef unsigned int uint32;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
66 typedef ll int64;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
67 typedef ll sint64;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
68 typedef ull uint64;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
69
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
70 // Partially defined types:
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
71 #define _BYTE uint8
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
72 #define _WORD uint16
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
73 #define _DWORD uint32
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
74 #define _QWORD uint64
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
75 #if !defined(_MSC_VER)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
76 #define _LONGLONG __int128
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
77 #endif
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
78
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
79 #ifndef _WINDOWS_
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
80 typedef int8 BYTE;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
81 typedef int16 WORD;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
82 typedef int32 DWORD;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
83 typedef int32 LONG;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
84 #endif
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
85 typedef int64 QWORD;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
86 #ifndef __cplusplus
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
87 typedef int bool; // we want to use bool in our C programs
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
88 #endif
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
89
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
90 // Some convenience macros to make partial accesses nicer
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
91 // first unsigned macros:
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
92 #ifdef HIBYTE
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
93 #undef HIBYTE
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
94 #endif // HIBYTE
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
95 #ifdef HIWORD
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
96 #undef HIWORD
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
97 #endif // HIWORD
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
98 #ifdef LOBYTE
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
99 #undef LOBYTE
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
100 #endif // LOBYTE
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
101 #ifdef LOWORD
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
102 #undef LOWORD
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
103 #endif // LOWORD
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
104
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
105 #define LOBYTE(x) (*((_BYTE*)&(x))) // low byte
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
106 #define LOWORD(x) (*((_WORD*)&(x))) // low word
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
107 #define LODWORD(x) (*((_DWORD*)&(x))) // low dword
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
108 #define HIBYTE(x) (*((_BYTE*)&(x)+1))
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
109 #define HIWORD(x) (*((_WORD*)&(x)+1))
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
110 #define HIDWORD(x) (*((_DWORD*)&(x)+1))
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
111 #define BYTEn(x, n) (*((_BYTE*)&(x)+n))
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
112 #define WORDn(x, n) (*((_WORD*)&(x)+n))
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
113 #define BYTE1(x) BYTEn(x, 1) // byte 1 (counting from 0)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
114 #define BYTE2(x) BYTEn(x, 2)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
115 #define BYTE3(x) BYTEn(x, 3)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
116 #define BYTE4(x) BYTEn(x, 4)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
117 #define BYTE5(x) BYTEn(x, 5)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
118 #define BYTE6(x) BYTEn(x, 6)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
119 #define BYTE7(x) BYTEn(x, 7)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
120 #define BYTE8(x) BYTEn(x, 8)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
121 #define BYTE9(x) BYTEn(x, 9)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
122 #define BYTE10(x) BYTEn(x, 10)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
123 #define BYTE11(x) BYTEn(x, 11)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
124 #define BYTE12(x) BYTEn(x, 12)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
125 #define BYTE13(x) BYTEn(x, 13)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
126 #define BYTE14(x) BYTEn(x, 14)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
127 #define BYTE15(x) BYTEn(x, 15)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
128 #define WORD1(x) WORDn(x, 1)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
129 #define WORD2(x) WORDn(x, 2) // third word of the object, unsigned
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
130 #define WORD3(x) WORDn(x, 3)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
131 #define WORD4(x) WORDn(x, 4)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
132 #define WORD5(x) WORDn(x, 5)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
133 #define WORD6(x) WORDn(x, 6)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
134 #define WORD7(x) WORDn(x, 7)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
135
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
136 // now signed macros (the same but with sign extension)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
137 #define SLOBYTE(x) (*((int8*)&(x)))
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
138 #define SLOWORD(x) (*((int16*)&(x)))
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
139 #define SLODWORD(x) (*((int32*)&(x)))
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
140 #define SHIBYTE(x) (*((int8*)&(x)+1))
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
141 #define SHIWORD(x) (*((int16*)&(x)+1))
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
142 #define SHIDWORD(x) (*((int32*)&(x)+1))
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
143 #define SBYTEn(x, n) (*((int8*)&(x)+n))
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
144 #define SWORDn(x, n) (*((int16*)&(x)+n))
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
145 #define SBYTE1(x) SBYTEn(x, 1)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
146 #define SBYTE2(x) SBYTEn(x, 2)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
147 #define SBYTE3(x) SBYTEn(x, 3)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
148 #define SBYTE4(x) SBYTEn(x, 4)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
149 #define SBYTE5(x) SBYTEn(x, 5)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
150 #define SBYTE6(x) SBYTEn(x, 6)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
151 #define SBYTE7(x) SBYTEn(x, 7)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
152 #define SBYTE8(x) SBYTEn(x, 8)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
153 #define SBYTE9(x) SBYTEn(x, 9)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
154 #define SBYTE10(x) SBYTEn(x, 10)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
155 #define SBYTE11(x) SBYTEn(x, 11)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
156 #define SBYTE12(x) SBYTEn(x, 12)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
157 #define SBYTE13(x) SBYTEn(x, 13)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
158 #define SBYTE14(x) SBYTEn(x, 14)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
159 #define SBYTE15(x) SBYTEn(x, 15)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
160 #define SWORD1(x) SWORDn(x, 1)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
161 #define SWORD2(x) SWORDn(x, 2)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
162 #define SWORD3(x) SWORDn(x, 3)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
163 #define SWORD4(x) SWORDn(x, 4)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
164 #define SWORD5(x) SWORDn(x, 5)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
165 #define SWORD6(x) SWORDn(x, 6)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
166 #define SWORD7(x) SWORDn(x, 7)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
167
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
168
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
169
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
170 // Generate a reference to pair of operands
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
171 template<class T> int16 __PAIR__( int8 high, T low) { return ((( int16)high) << sizeof(high)*8) | uint8(low); }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
172 template<class T> int32 __PAIR__( int16 high, T low) { return ((( int32)high) << sizeof(high)*8) | uint16(low); }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
173 template<class T> int64 __PAIR__( int32 high, T low) { return ((( int64)high) << sizeof(high)*8) | uint32(low); }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
174 template<class T> uint16 __PAIR__(uint8 high, T low) { return (((uint16)high) << sizeof(high)*8) | uint8(low); }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
175 template<class T> uint32 __PAIR__(uint16 high, T low) { return (((uint32)high) << sizeof(high)*8) | uint16(low); }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
176 template<class T> uint64 __PAIR__(uint32 high, T low) { return (((uint64)high) << sizeof(high)*8) | uint32(low); }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
177
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
178 // rotate left
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
179 template<class T> T __ROL__(T value, uint count)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
180 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
181 const uint nbits = sizeof(T) * 8;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
182 count %= nbits;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
183
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
184 T high = value >> (nbits - count);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
185 value <<= count;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
186 value |= high;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
187 return value;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
188 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
189
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
190 // rotate right
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
191 template<class T> T __ROR__(T value, uint count)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
192 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
193 const uint nbits = sizeof(T) * 8;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
194 count %= nbits;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
195
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
196 T low = value << (nbits - count);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
197 value >>= count;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
198 value |= low;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
199 return value;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
200 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
201
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
202 // carry flag of left shift
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
203 template<class T> int8 __MKCSHL__(T value, uint count)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
204 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
205 const uint nbits = sizeof(T) * 8;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
206 count %= nbits;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
207
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
208 return (value >> (nbits-count)) & 1;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
209 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
210
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
211 // carry flag of right shift
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
212 template<class T> int8 __MKCSHR__(T value, uint count)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
213 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
214 return (value >> (count-1)) & 1;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
215 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
216
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
217 // sign flag
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
218 template<class T> int8 __SETS__(T x)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
219 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
220 if ( sizeof(T) == 1 )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
221 return int8(x) < 0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
222 if ( sizeof(T) == 2 )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
223 return int16(x) < 0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
224 if ( sizeof(T) == 4 )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
225 return int32(x) < 0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
226 return int64(x) < 0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
227 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
228
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
229 // overflow flag of subtraction (x-y)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
230 template<class T, class U> int8 __OFSUB__(T x, U y)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
231 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
232 if ( sizeof(T) < sizeof(U) )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
233 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
234 U x2 = x;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
235 int8 sx = __SETS__(x2);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
236 return (sx ^ __SETS__(y)) & (sx ^ __SETS__(x2-y));
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
237 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
238 else
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
239 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
240 T y2 = y;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
241 int8 sx = __SETS__(x);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
242 return (sx ^ __SETS__(y2)) & (sx ^ __SETS__(x-y2));
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
243 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
244 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
245
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
246 // overflow flag of addition (x+y)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
247 template<class T, class U> int8 __OFADD__(T x, U y)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
248 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
249 if ( sizeof(T) < sizeof(U) )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
250 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
251 U x2 = x;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
252 int8 sx = __SETS__(x2);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
253 return ((1 ^ sx) ^ __SETS__(y)) & (sx ^ __SETS__(x2+y));
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
254 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
255 else
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
256 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
257 T y2 = y;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
258 int8 sx = __SETS__(x);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
259 return ((1 ^ sx) ^ __SETS__(y2)) & (sx ^ __SETS__(x+y2));
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
260 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
261 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
262
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
263 // carry flag of subtraction (x-y)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
264 template<class T, class U> int8 __CFSUB__(T x, U y)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
265 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
266 int size = sizeof(T) > sizeof(U) ? sizeof(T) : sizeof(U);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
267 if ( size == 1 )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
268 return uint8(x) < uint8(y);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
269 if ( size == 2 )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
270 return uint16(x) < uint16(y);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
271 if ( size == 4 )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
272 return uint32(x) < uint32(y);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
273 return uint64(x) < uint64(y);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
274 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
275
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
276 // carry flag of addition (x+y)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
277 template<class T, class U> int8 __CFADD__(T x, U y)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
278 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
279 int size = sizeof(T) > sizeof(U) ? sizeof(T) : sizeof(U);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
280 if ( size == 1 )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
281 return uint8(x) > uint8(x+y);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
282 if ( size == 2 )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
283 return uint16(x) > uint16(x+y);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
284 if ( size == 4 )
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
285 return uint32(x) > uint32(x+y);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
286 return uint64(x) > uint64(x+y);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
287 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
288
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
289
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
290 //-------------------------------------------------------------------------
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
291 // Data declarations
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
292
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
293 extern int game_starting_year;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
294 extern unsigned int game_viewport_width;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
295 extern unsigned int game_viewport_height;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
296 extern int game_viewport_x;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
297 extern int game_viewport_y;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
298 extern int game_viewport_z;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
299 extern int game_viewport_w;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
300
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
301 extern int pWindowList_at_506F50_minus1_indexing[1];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
302 extern int dword_4C9890[10]; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
303 extern int dword_4C9920[16]; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
304 extern char byte_4D864C; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
305 extern float flt_4D86CC; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
306 extern int dword_4D86D8; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
307
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
308
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
309 extern float flt_4D84E8;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
310
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
311 extern int pCurrentScreen; // 004E28F8
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
312 extern unsigned int uGammaPos;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
313 extern std::array<int, 8> BtnTurnCoord;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
314 extern std::array<__int16, 4> RightClickPortraitXmin;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
315 extern std::array<__int16, 4> RightClickPortraitXmax;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
316 //extern int pArmorSkills[5];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
317 //extern int pWeaponSkills[9];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
318 //extern int pMiscSkills[12];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
319 //extern int pMagicSkills[9];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
320 extern std::array<unsigned int, 4> pHealthBarPos;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
321 extern std::array<unsigned int, 4> pManaBarPos;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
322 //extern std::array<char, 80> _4E2B21_buff_spell_tooltip_colors;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
323 extern std::array<char, 88> monster_popup_y_offsets; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
324 extern unsigned char hourglass_icon_idx; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
325
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
326
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
327 extern const char *format_4E2D80;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
328 extern char format_4E2D90[8];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
329 extern const char *format_4E2DE8; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
330 extern const char *Stat_string_format_2_column_text;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
331 extern const char *Stat_string_format_2_column_less_100; // format text of resistance in Stats screen
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
332 extern const char *Stat_string_format_2_column_over_100;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
333 extern int dword_4E455C; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
334 extern std::array<int, 6> dword_4E4560;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
335 extern std::array<int, 6> dword_4E4578;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
336 extern std::array<int, 6> dword_4E4590;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
337 extern std::array<int, 6> dword_4E45A8;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
338 extern std::array<float, 10> flt_4E4A80;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
339
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
340 extern std::array< std::array<int, 2>, 14> pPartySpellbuffsUI_XYs;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
341 extern std::array<unsigned char, 14> byte_4E5DD8; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
342 extern std::array<unsigned __int8, 14> pPartySpellbuffsUI_smthns;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
343 extern std::array< std::array<int, 6>, 6> pNPCPortraits_x; // 004E5E50
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
344 extern std::array< std::array<int, 6>, 6> pNPCPortraits_y; // 004E5EE0
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
345 extern std::array<const char *, 11> pHouse_ExitPictures;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
346 extern std::array<const char *, 11> _4E6BDC_loc_names;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
347 extern std::array<__int16, 11> word_4E8152;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
348 extern std::array< std::array<char, 14>, 7> byte_4E8168;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
349 extern char _4E94D0_light_type; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
350 extern char _4E94D2_light_type; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
351 extern char _4E94D3_light_type; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
352 extern std::array<unsigned int, 2> saveload_dlg_xs;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
353 extern std::array<unsigned int, 2> saveload_dlg_ys;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
354 extern std::array<unsigned int, 2> saveload_dlg_zs;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
355 extern std::array<unsigned int, 2> saveload_dlg_ws;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
356 extern int dword_4E98BC_bApplicationActive; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
357 extern std::array<char*, 465> pTransitionStrings; // 4EB080
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
358 extern std::array<int, 9> dword_4EC268; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
359 extern std::array<int, 7> dword_4EC28C; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
360 extern std::array<const char*, 25> pPlayerPortraitsNames;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
361
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
362 extern std::array< std::array<unsigned char, 25>, 48> byte_4ECF08;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
363 extern std::array<std::array<unsigned char, 8>, 110> SoundSetAction; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
364 extern std::array<__int16, 4> pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
365 extern std::array< std::array<char, 37>, 36> byte_4ED970_skill_learn_ability_by_class_table;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
366 extern std::array<unsigned int, 2> pHiredNPCsIconsOffsetsX;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
367 extern std::array<unsigned int, 2> pHiredNPCsIconsOffsetsY;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
368 extern std::array<int, 2> Party_Spec_Motion_status_ids; //dword_4EE07C
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
369 extern std::array<__int16, 101> word_4EE088_sound_ids; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
370 extern std::array<short, 28> word_4EE150;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
371 extern int ScreenshotFileNumber; // dword_4EFA80
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
372 extern std::array<const char *, 19> off_4F03B8; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
373 extern __int16 word_4F0576[]; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
374
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
375 extern std::array<int, 32> guild_mambership_flags;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
376 extern std::array<__int16, 49> word_4F0754;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
377 extern std::array<__int16, 54> _4F0882_evt_VAR_PlayerItemInHands_vals;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
378 extern std::array<unsigned short, 6> pMaxLevelPerTrainingHallType;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
379 extern std::array<int, 11> price_for_membership; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
380 extern std::array<__int16, 32> word_4F0F30; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
381 extern std::array<int, 500> ai_array_4F5E68;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
382 extern std::array<int, 500> ai_array_4F6638_actor_ids;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
383 extern std::array<int, 500> ai_near_actors_targets_pid;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
384 extern int ai_arrays_size; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
385 extern std::array<int, 500> ai_near_actors_distances;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
386 extern std::array<unsigned int, 500> ai_near_actors_ids;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
387 extern std::array<int, 182> dword_4F8580; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
388 extern int dword_4FA9B0[]; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
389 extern int dword_4FA9B4[]; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
390
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
391 extern char byte_4FAA24; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
392 //extern HWND dword_4FAA28; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
393
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
394 extern std::array<unsigned int, 480> pSRZBufferLineOffsets;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
395 extern int areWeLoadingTexture; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
396 extern std::array<char, 777> books_num_items_per_page; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
397 extern int lloyds_beacon_spell_id; // dword_506338
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
398 extern int lloyds_beacon_sound_id; // dword_50633C
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
399 extern signed int sRecoveryTime; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
400 extern unsigned int uRequiredMana; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
401 extern int _506348_current_lloyd_playerid; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
402 extern __int64 lloyds_beacon_spell_level; // qword_506350
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
403 extern char byte_506360; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
404 extern int dword_506364; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
405 //extern Texture *dword_50640C[]; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
406 extern unsigned int uExitCancelTextureId;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
407 extern int books_page_number; // number for page in books(íîìåð ñòðàíèöû â êíèãàõ)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
408 extern int books_primary_item_per_page; // number primary item in book page(íîìåð íà÷àëüíîé çàïèñè íà ñòðàíèöå)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
409 extern int Autonotes_Instructors_page_flag; // dword_50652C
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
410 extern int Autonotes_Misc_page_flag; //dword_506530
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
411 extern int Book_PageBtn6_flag; //dword_506534
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
412 extern int Book_PageBtn5_flag; //dword_506538
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
413 extern int Book_PageBtn4_flag; //dword_50653C
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
414 extern int Book_PageBtn3_flag; //dword_506540
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
415 extern int BtnDown_flag; //BtnDown_flag
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
416 extern int BtnUp_flag; //BtnUp_flag
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
417 extern int quick_spell_at_page; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
418 extern char byte_506550; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
419 extern std::array<const char *, 5> aMoonPhaseNames;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
420 extern int _506568_autonote_type; // 506568
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
421 extern char bRecallingBeacon; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
422 extern int uLastPointedObjectID; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
423 //extern unsigned __int8 bMonsterInfoUI_bDollInitialized;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
424 extern std::array<const char *, 44> aSpellNames;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
425 extern int pMainScreenNum; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
426 extern int dword_506980_uW; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
427 extern int dword_506984_uZ; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
428 extern int dword_506988_uY; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
429 extern int dword_50698C_uX; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
430 extern int uGameMenuUI_CurentlySelectedKeyIdx; // 506E68
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
431 extern std::array<bool, 28> GameMenuUI_InvaligKeyBindingsFlags; // 506E6C
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
432 extern std::array<unsigned int, 28> pPrevVirtualCidesMapping;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
433 extern int KeyboardPageNum; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
434 extern int uRestUI_FoodRequiredToRest;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
435 extern int dword_506F14; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
436 extern int _506F18_num_minutes_to_sleep; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
437 extern int dword_506F1C; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
438 extern std::array<int, 20> pVisibleWindowsIdxs; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
439 extern int uNumVisibleWindows;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
440 extern char bFlashHistoryBook; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
441 extern char bFlashAutonotesBook; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
442 extern char bFlashQuestBook; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
443 extern int uTextureID_PlayerBuff_PainReflection; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
444 extern int uTextureID_PlayerBuff_Hammerhands; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
445 extern int uTextureID_PlayerBuff_Preservation; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
446 extern int uTextureID_PlayerBuff_Bless; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
447 extern int uTextureID_Btn_QuickReference; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
448 extern int uTextureID_Compas; // dword_5079B4
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
449 extern int dword_5079C8; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
450 extern int dword_5079CC; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
451 extern int dword_5079D0; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
452 extern int uTextureID_Minimap_Loop; // dword_5079D8
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
453 extern struct GUIButton *pBtn_ZoomOut; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
454 extern struct GUIButton *pBtn_ZoomIn; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
455 extern unsigned int uGameUIFontShadow;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
456 extern unsigned int uGameUIFontMain;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
457 extern int dword_507B00_spell_info_to_draw_in_popup; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
458 extern std::array<const char *, 12> aMonthNames;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
459 extern std::array<const char *, 7> aDayNames;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
460 extern std::array<const char *, 9> aSpellSchoolNames;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
461 extern std::array<const char *, 7> aAttributeNames;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
462 extern unsigned int uActiveCharacter;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
463 extern int dword_507BF0_is_there_popup_onscreen; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
464 extern int awards_scroll_bar_created; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
465 extern int dword_507CC0_activ_ch; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
466 extern __int64 GameUI_RightPanel_BookFlashTimer; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
467 extern int _507CD4_RestUI_hourglass_anim_controller; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
468 extern bool OpenedTelekinesis; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
469 extern std::array<int, 50> dword_50B570; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
470 extern std::array<int, 50> dword_50B638; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
471 extern struct stru367 PortalFace;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
472 extern std::array<int, 100> dword_50BC10; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
473 extern std::array<int, 100> dword_50BDA0; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
474 extern std::array<int, 100> _50BF30_actors_in_viewport_ids; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
475 extern char town_portal_caster_id; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
476 extern int some_active_character; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
477 extern std::array<unsigned int, 5> pIconIDs_Turn;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
478 extern unsigned int uIconID_TurnStop;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
479 extern unsigned int uIconID_TurnHour;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
480 extern int uIconID_CharacterFrame; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
481 extern unsigned int uIconID_TurnStart;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
482 extern int dword_50C994; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
483 extern int dword_50C998_turnbased_icon_1A; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
484 extern int uSpriteID_Spell11; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
485 extern bool _50C9A0_IsEnchantingInProgress; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
486 extern int _50C9A8_item_enchantment_timer; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
487 extern int _50C9D0_AfterEnchClickEventId; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
488 extern int _50C9D4_AfterEnchClickEventSecondParam; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
489 extern int _50C9D8_AfterEnchClickEventTimeout; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
490 extern int dword_50C9DC; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
491 extern struct NPCData *ptr_50C9E0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
492 //extern int dword_50C9E8; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
493 //extern int dword_50C9EC[]; // 50C9EC
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
494 extern int dword_50CDC8;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
495 extern Vec3_int_ layingitem_vel_50FDFC;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
496 extern char pStartingMapName[32]; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
497 extern std::array<unsigned __int8, 5> IsPlayerWearingWatersuit;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
498 extern std::array<char, 54> party_has_equipment;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
499 extern std::array<char, 17> byte_5111F6_OwnedArtifacts;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
500 extern std::array<unsigned int, 16> papredoll_dbrds;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
501
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
502 extern int bRingsShownInCharScreen; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
503
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
504 extern unsigned int uNumBlueFacesInBLVMinimap;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
505 extern std::array<unsigned __int16, 50> pBlueFacesInBLVMinimapIDs;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
506 extern std::array<int, 14> pTextureIDs_PartyBuffIcons;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
507 extern unsigned int uIconIdx_FlySpell;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
508 extern unsigned int uIconIdx_WaterWalk;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
509 extern int dword_576E28; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
510 extern int _576E2C_current_minimap_zoom; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
511 extern __int64 _5773B8_event_timer; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
512
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
513 extern int dword_591084; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
514 extern struct Actor *pDialogue_SpeakingActor;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
515 extern unsigned int uDialogueType;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
516 extern signed int sDialogue_SpeakingActorNPC_ID;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
517 extern struct LevelDecoration *_591094_decoration;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
518 extern std::array<char, 200> sHouseName; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
519 extern int uCurrentHouse_Animation; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
520 extern char *dword_591164_teleport_map_name; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
521 extern int dword_591168_teleport_speedz; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
522 extern int dword_59116C_teleport_directionx; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
523 extern int dword_591170_teleport_directiony; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
524 extern int dword_591174_teleportz; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
525 extern int dword_591178_teleporty; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
526 extern int dword_59117C_teleportx; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
527 extern std::array<std::array<char, 100>, 6> byte_591180; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
528 extern std::array<struct NPCData *, 7> HouseNPCData; //0this array size temporarily increased to 60 from 6 to work aroud house overflow
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
529 extern GUIButton* HouseNPCPortraitsButtonsList[6];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
530 extern struct Texture *pTexture_591428;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
531 extern struct Texture *pTexture_outside; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
532 extern struct Texture *pTexture_Dialogue_Background;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
533 extern std::array<char, 2000> byte_5B0938;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
534 extern int EvtTargetObj; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
535 extern int _unused_5B5924_is_travel_ui_drawn; // 005B5924
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
536 extern int _5B65A8_npcdata_uflags_or_other; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
537 extern int _5B65AC_npcdata_fame_or_other; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
538 extern int _5B65B0_npcdata_rep_or_other; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
539 extern int _5B65B4_npcdata_loword_house_or_other; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
540 extern int _5B65B8_npcdata_hiword_house_or_other; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
541 extern int dword_5B65BC; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
542 extern int dword_5B65C0; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
543 extern int dword_5B65C4_cancelEventProcessing; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
544 extern int MapsLongTimers_count; // dword_5B65C8
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
545 extern int npcIdToDismissAfterDialogue; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
546 extern int dword_5B65D0_dialogue_actor_npc_id; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
547 extern int dword_5C3418; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
548 extern int dword_5C341C; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
549 //extern std::array<char, 777> byte_5C3427; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
550 extern std::array<char, 200> GameUI_Footer_TimedString;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
551 extern std::array<char, 200> pFooterString;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
552 extern unsigned int GameUI_Footer_TimeLeft;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
553 extern int bForceDrawFooter; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
554 extern int _5C35C0_force_party_death; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
555 extern int bDialogueUI_InitializeActor_NPC_ID; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
556 extern char *p2DEventsTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
557
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
558 extern int dword_5C35D4; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
559 extern std::array<const char *, 2> aAMPMNames;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
560 extern char byte_5C45AF[]; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
561 extern std::array<char, 10000> pTmpBuf3;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
562 extern std::array<char, 4096> pFinalMessage; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
563 extern std::array<char, 2000> pTmpBuf;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
564 extern std::array<char, 2000> pTmpBuf2;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
565 extern std::array<char, 100> Journal_limitation_factor; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
566 extern int ui_current_text_color; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
567 extern __int64 qword_5C6DF0; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
568 extern int dword_5C6DF8; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
569 extern std::array<char, 104> item__getname_buffer; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
570 extern std::array<char *, 36> pClassDescriptions;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
571 extern std::array<char *, 7> pAttributeDescriptions;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
572 extern std::array<char *, 38> pGrandSkillDesc;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
573 extern std::array<char *, 38> pMasterSkillDesc;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
574 extern std::array<char *, 38> pExpertSkillDesc;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
575 extern std::array<char *, 38> pNormalSkillDesc;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
576 extern std::array<char *, 38> pSkillDesc;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
577 extern char *pHealthPointsAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
578 extern char *pSpellPointsAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
579 extern char *pArmourClassAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
580 extern char *pPlayerConditionAttributeDescription; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
581 extern char *pFastSpellAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
582 extern char *pPlayerAgeAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
583 extern char *pPlayerLevelAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
584 extern char *pPlayerExperienceAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
585 extern char *pAttackBonusAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
586 extern char *pAttackDamageAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
587 extern char *pMissleBonusAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
588 extern char *pMissleDamageAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
589 extern char *pFireResistanceAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
590 extern char *pAirResistanceAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
591 extern char *pWaterResistanceAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
592 extern char *pEarthResistanceAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
593 extern char *pMindResistanceAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
594 extern char *pBodyResistanceAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
595 extern char *pSkillPointsAttributeDescription;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
596 extern char *pClassTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
597 extern char *pStatsTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
598 extern char *pSkillDescTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
599 extern struct FactionTable *pFactionTable;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
600 //extern std::array<char, 777> byte_5C8D1A; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
601
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
602 extern std::array<char, 777> byte_5E4C15; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
603 extern std::array<const char *, 14> pSomeItemsNames;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
604
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
605 extern char *pMonstersTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
606 extern char *pMonsterPlacementTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
607 extern char *pSpellsTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
608 extern char *pMapStatsTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
609 extern char *pHostileTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
610 extern char *pPotionsTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
611 extern char *pPotionNotesTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
612
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
613 extern std::array<int, 777> _6807B8_level_decorations_ids; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
614 extern int _6807E0_num_decorations_with_sounds_6807B8; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
615 extern std::array<int, 3000> event_triggers; // 6807E8
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
616 extern size_t num_event_triggers; // 6836C8
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
617 extern std::array<int, 64> dword_69B010;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
618 extern float flt_69B138_dist; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
619 extern char byte_69BD41_unused; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
620 extern unsigned int uTextureID_x_u;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
621 extern unsigned int uTextureID_LS_saveU;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
622 extern unsigned int uTextureID_LS_loadU;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
623 extern unsigned int uTextureID_AR_DN_DN;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
624 extern unsigned int uTextureID_AR_UP_DN;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
625 extern unsigned int uTextureID_LS_;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
626 extern unsigned int uTextureID_x_d;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
627 extern unsigned int uTextureID_save_up;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
628 extern unsigned int uTextureID_load_up;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
629 extern unsigned int uTextureID_loadsave;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
630 extern int pSaveListPosition; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
631 extern unsigned int uLoadGameUI_SelectedSlot;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
632 extern HWND hInsertCDWindow; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
633 extern int uCPUSpeed; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
634 extern char cMM7GameCDDriveLetter; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
635 extern enum MENU_STATE sCurrentMenuID;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
636 extern unsigned int uGameState;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
637 extern int uDefaultTravelTime_ByFoot; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
638 extern int day_attrib; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
639 extern int day_fogrange_1; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
640 extern int day_fogrange_2; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
641 extern struct TileTable *pTileTable; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
642 extern int outdoor_grid_band_1; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
643 extern int outdoor_grid_band_2; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
644 extern int outdoor_grid_band_3; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
645 extern std::array<char, 777> pDefaultSkyTexture; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
646 extern std::array<char, 16> byte_6BE124_cfg_textures_DefaultGroundTexture; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
647 extern int _6BE134_odm_main_tile_group; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
648 extern int dword_6BE138; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
649 extern int dword_6BE13C_uCurrentlyLoadedLocationID; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
650 extern float fWalkSpeedMultiplier; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
651 extern float fBackwardWalkSpeedMultiplier; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
652 extern float fTurnSpeedMultiplier; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
653 extern float flt_6BE150_look_up_down_dangle; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
654 //extern char pMM7WindowClassName[]; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
655 //extern HINSTANCE hInstance; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
656 //extern char *pCmdLine;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
657 //extern HWND hWnd; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
658 extern char pCurrentMapName[32]; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
659 extern unsigned int uLevelMapStatsID;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
660
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
661 extern bool FORCE_16_BITS; // related to GAME_SETTINGS_INVALID_RESOLUTION
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
662 #define GAME_SETTINGS_0001 0x0001
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
663 #define GAME_SETTINGS_INVALID_RESOLUTION 0x0002
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
664 #define GAME_SETTINGS_NO_INTRO 0x0004
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
665 #define GAME_SETTINGS_NO_LOGO 0x0008
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
666 #define GAME_SETTINGS_NO_SOUND 0x0010
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
667 #define GAME_SETTINGS_NO_WALK_SOUND 0x0020
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
668 #define GAME_SETTINGS_NO_HOUSE_ANIM 0x0040
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
669 #define GAME_SETTINGS_0080_SKIP_USER_INPUT_THIS_FRAME 0x0080
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
670 #define GAME_SETTINGS_APP_INACTIVE 0x0100
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
671 #define GAME_SETTINGS_0200_EVENT_TIMER 0x0200
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
672 #define GAME_SETTINGS_0400_MISC_TIMER 0x0400
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
673 #define GAME_SETTINGS_0800 0x0800
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
674 #define GAME_SETTINGS_1000 0x1000
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
675 #define GAME_SETTINGS_2000 0x2000
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
676 #define GAME_SETTINGS_4000 0x4000
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
677 extern int dword_6BE364_game_settings_1; // GAME_SETTINGS_*
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
678
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
679 #define DEBUG_SETTINGS_RUN_IN_WIDOW 0x0001
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
680 #define DEBUG_SETTINGS_0002_SHOW_FR 0x0002
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
681 #define DEBUG_SETTINGS_NO_ACTORS 0x0004
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
682 #define DEBUG_SETTINGS_NO_DECORATIONS 0x0008
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
683 #define DEBUG_SETTINGS_NO_DAMAGE 0x0010
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
684 extern int dword_6BE368_debug_settings_2; // DEBUG_SETTINGS_*
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
685
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
686 extern unsigned __int8 bCanLoadFromCD;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
687 extern int bShowDamage; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
688 extern unsigned int bAlwaysRun;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
689 extern unsigned int bFlipOnExit;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
690 extern unsigned int uTurnSpeed;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
691 extern float flt_6BE3A0; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
692 extern float flt_6BE3A4_debug_recmod1;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
693 extern float flt_6BE3A8_debug_recmod2;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
694 extern float flt_6BE3AC_debug_recmod1_x_1_6;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
695 extern std::array<char, 20> byte_6BE3B0; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
696 extern char bUnderwater; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
697 extern char bNoNPCHiring; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
698 extern unsigned int bNoVideo;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
699 extern bool bNoIntro;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
700 extern bool bNoLogo;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
701 extern bool bNoCD;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
702 extern bool bNoSound;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
703 extern std::array<int, 100> dword_720020_zvalues;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
704 extern std::array<int, 299> dword_7201B0_zvalues;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
705 extern int uTextureID_720980; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
706 extern std::array<__int16, 104> word_7209A0_intercepts_ys_plus_ys;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
707 extern std::array<__int16, 104> word_720A70_intercepts_xs_plus_xs;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
708 extern std::array<__int16, 104> word_720B40_intercepts_zs;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
709 extern std::array<__int16, 102> word_720C10_intercepts_xs;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
710 extern std::array<__int16, 777> word_720CE0_ys; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
711 extern std::array<__int16, 777> word_720DB0_xs; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
712 extern std::array<int, 20> dword_720E80;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
713 extern std::array<int, 20> dword_720ED0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
714 extern std::array<int, 20> ceiling_height_level;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
715 extern std::array<__int16, 104> odm_floor_face_vert_coord_Y; // word_720F70
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
716 extern std::array<__int16, 104> odm_floor_face_vert_coord_X; // word_721040
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
717 extern std::array<int, 20> current_Face_id; // dword_721110
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
718 extern std::array<int, 20> current_BModel_id; // dword_721160
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
719 extern std::array<int, 20> odm_floor_level; // idb dword_7211B0
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
720 extern int blv_prev_party_x; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
721 extern int blv_prev_party_z; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
722 extern int blv_prev_party_y; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
723 extern char *dword_722F10; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
724 extern std::array<const char *, 513> pQuestTable;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
725 extern char *dword_723718_autonote_related; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
726 extern std::array<const char *, 82> pScrolls;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
727 extern int dword_7241C8; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
728
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
729 extern std::array<const char *, 59> aNPCProfessionNames;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
730 extern char *pAwardsTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
731 extern char *pScrollsTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
732 extern char *pMerchantsTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
733 extern std::array<const char *, 7> pMerchantsBuyPhrases;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
734 extern std::array<const char *, 7> pMerchantsSellPhrases;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
735 extern std::array<const char *, 7> pMerchantsRepairPhrases;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
736 extern std::array<const char *, 7> pMerchantsIdentifyPhrases;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
737 extern char *pTransitionsTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
738 extern char *pAutonoteTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
739 extern char *pQuestsTXT_Raw;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
740 extern unsigned int uNumTerrainNormals;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
741 extern struct Vec3_float_ *pTerrainNormals;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
742 extern std::array<unsigned short, 128 * 128 * 2> pTerrainNormalIndices;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
743 extern std::array<unsigned int, 128 * 128 * 2> pTerrainSomeOtherData;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
744 extern int dword_A74C88; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
745 extern unsigned int uPlayerCreationUI_SkySliderPos;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
746 extern int uPlayerCreationUI_ArrowAnim;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
747 extern unsigned int uPlayerCreationUI_SelectedCharacter;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
748 extern int dword_A74CDC; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
749 extern struct Texture *pTexture_PlayerFaceMask;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
750 extern struct Texture *pTexture_PlayerFaceEradicated;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
751 extern struct Texture *pTexture_PlayerFaceDead;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
752 extern std::array< std::array<struct Texture *, 56>, 4> pTextures_PlayerFaces;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
753 extern __int64 _A750D8_player_speech_timer; // qword_A750D8
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
754 extern enum PlayerSpeech PlayerSpeechID;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
755 extern int uSpeakingCharacter; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
756 extern std::array<const char *, 36> pClassNames;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
757 extern std::array<const char *, 19> aCharacterConditionNames;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
758 extern std::array<const char *, 38> pSkillNames;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
759 extern char byte_AE5B91; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
760 extern std::array<int, 32> dword_F1B430; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
761 extern std::array<int, 4> player_levels;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
762 extern std::array<__int16, 6> weapons_Ypos; // word_F8B158
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
763 extern struct Texture *ShopTexture; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
764 extern std::array<struct Texture *, 12> ItemsInShopTexture;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
765 extern __int16 bountyHunting_monster_id_for_hunting; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
766 extern const char *bountyHunting_text; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
767 extern int contract_approved; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
768 extern int dword_F8B1AC_award_bit_number; // idb
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
769 extern int dword_F8B1B0_MasteryBeingTaught; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
770 extern int gold_transaction_amount; // F8B1B4
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
771 extern std::array<char *, 4> pShopOptions;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
772 extern int dword_F8B1D8; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
773 extern int dword_F8B1E0; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
774 extern int dword_F8B1E4; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
775 extern const char *current_npc_text; // 0xF8B1E8
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
776 extern char dialogue_show_profession_details; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
777 extern std::array<char, 777> byte_F8B1EF; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
778 extern std::array<char, 4> byte_F8B1F0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
779
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
780 extern int bGameoverLoop; // weak
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
781 extern std::array<__int16, 104> intersect_face_vertex_coords_list_a; // word_F8BC48
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
782 extern std::array<__int16, 104> intersect_face_vertex_coords_list_b; // word_F8BD18
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
783 extern bool wizard_eye;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
784 extern bool change_seasons;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
785 extern bool all_magic;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
786 extern bool debug_information;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
787 extern bool show_picked_face;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
788 extern bool draw_portals_loops;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
789 extern bool new_speed;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
790 extern bool bSnow;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
791 extern bool draw_terrain_dist_mist;