2541
|
1 #pragma once
|
|
2 #include "Engine/ErrorHandling.h"
|
|
3 #include "Engine/Log.h"
|
|
4 #include "Engine/MM7.h"
|
|
5 #include "Engine/mm7_data.h"
|
|
6
|
|
7 void SetCurrentMenuID(enum MENU_STATE);
|
|
8 enum MENU_STATE GetCurrentMenuID();
|
|
9
|
|
10 void Engine_DeinitializeAndTerminate(int exitCode);
|
|
11
|
|
12
|
|
13 #pragma once
|
|
14 #include "Engine/VectorTypes.h"
|
|
15
|
|
16 #include "OSAPI.h"
|
|
17
|
|
18 #include "Engine/MapInfo.h"
|
|
19
|
|
20
|
|
21 #define GAME_FLAGS_1_01_lightmap_related 0x01
|
|
22 #define GAME_FLAGS_1_DRAW_BLV_DEBUGS 0x08
|
|
23 #define GAME_FLAGS_2_SATURATE_LIGHTMAPS 0x02
|
|
24 #define GAME_FLAGS_2_ALTER_GRAVITY 0x08
|
|
25 #define GAME_FLAGS_2_TARGETING_MODE 0x10
|
|
26 #define GAME_FLAGS_2_DRAW_BLOODSPLATS 0x20
|
|
27
|
|
28
|
|
29
|
|
30 /* 320 */
|
|
31 enum GAME_STATE
|
|
32 {
|
|
33 GAME_STATE_PLAYING = 0,
|
|
34 GAME_FINISHED = 1,
|
|
35 GAME_STATE_CHANGE_LOCATION = 2,
|
|
36 GAME_STATE_LOADING_GAME = 3,
|
|
37 GAME_STATE_NEWGAME_OUT_GAMEMENU = 4,
|
|
38 GAME_STATE_5 = 5,
|
|
39 GAME_STATE_STARTING_NEW_GAME = 6,
|
|
40 GAME_STATE_GAME_QUITTING_TO_MAIN_MENU = 7,
|
|
41 GAME_STATE_PARTY_DIED = 8,
|
|
42 GAME_STATE_FINAL_WINDOW = 9,
|
|
43 GAME_STATE_A = 10
|
|
44 };
|
|
45
|
|
46
|
|
47
|
|
48 /* 105 */
|
|
49 #pragma pack(push, 1)
|
|
50 struct Game__StationaryLight
|
|
51 {
|
|
52 Vec3_float_ vPosition;
|
|
53 Vec3_float_ vRGBColor;
|
|
54 float flt_18;
|
|
55 };
|
|
56 #pragma pack(pop)
|
|
57
|
|
58
|
|
59 /* 108 */
|
|
60 #pragma pack(push, 1)
|
|
61 struct Game_stru0
|
|
62 {
|
|
63 int field_0;
|
|
64 unsigned __int8 *ptr_4;
|
|
65 int field_8;
|
|
66 int field_C;
|
|
67 };
|
|
68 #pragma pack(pop)
|
|
69
|
|
70
|
|
71 /* 279 */
|
|
72 #pragma pack(push, 1)
|
|
73 //Game_stru1
|
|
74 struct Game_Bloodsplat
|
|
75 {
|
|
76 float x;
|
|
77 float y;
|
|
78 float z;
|
|
79 float r;
|
|
80 float g;
|
|
81 float b;
|
|
82 float radius;
|
|
83 };
|
|
84 #pragma pack(pop)
|
|
85
|
|
86
|
|
87 class Vis;
|
|
88 class LightmapBuilder;
|
|
89 class ParticleEngine;
|
|
90 class Mouse;
|
|
91 class Keyboard;
|
|
92 class ThreadWard;
|
|
93 class CShow;
|
|
94 class GammaController;
|
|
95 struct stru9;
|
|
96 struct stru10;
|
|
97
|
|
98 /* 104 */
|
|
99 #pragma pack(push, 1)
|
|
100 struct Engine
|
|
101 {
|
|
102 static Engine *Create();
|
|
103 static void Destroy();
|
|
104
|
|
105 protected: Engine();
|
|
106 protected: virtual ~Engine();
|
|
107
|
|
108
|
|
109 public:
|
|
110 //void _44E904_gamma_saturation_adjust();
|
|
111 //bool InitializeGammaController();
|
|
112 bool PickMouse(float fPickDepth, unsigned int uMouseX, unsigned int uMouseY, bool bOutline, struct Vis_SelectionFilter *sprite_filter, struct Vis_SelectionFilter *face_filter);
|
|
113 bool PickKeyboard(bool bOutline, struct Vis_SelectionFilter *sprite_filter, struct Vis_SelectionFilter *face_filter);
|
|
114 void OutlineSelection();
|
|
115 signed int _44EC23(struct Polygon *a2, int *a3, signed int a4);
|
|
116 signed int _44ED0A(struct BLVFace *a2, int *a3, signed int a4);
|
|
117 bool AlterGamma_BLV(struct BLVFace *pFace, signed int *pColor);
|
|
118 bool AlterGamma_ODM(struct ODMFace *pFace, signed int *pColor);
|
|
119 bool draw_debug_outlines();
|
|
120 bool _44EEA7();
|
|
121 bool _44F07B();
|
|
122 void ToggleFlags(unsigned int uMask);
|
|
123 void ToggleFlags2(unsigned int uFlag);
|
|
124 void _44F0FD();
|
|
125 void PushStationaryLights(int a2);
|
|
126 void PrepareBloodsplats();
|
|
127 void Deinitialize();
|
|
128 void DrawParticles();
|
|
129 void Draw();
|
|
130
|
|
131 //----- (0042EB6A) --------------------------------------------------------
|
|
132 struct stru6 *GetStru6() { return this->pStru6Instance; }
|
|
133 //----- (0042EB71) --------------------------------------------------------
|
2543
|
134 //struct IndoorCameraD3D *GetIndoorCamera() { return this->pIndoorCameraD3D; }
|
2541
|
135
|
|
136
|
|
137 //void ( ***vdestructor_ptr)(Game *, bool);
|
|
138 Game__StationaryLight pStationaryLights[25];
|
|
139 char field_2C0[1092];
|
|
140 unsigned int uNumStationaryLights;
|
|
141 Game_Bloodsplat pBloodsplats[20];
|
|
142 int field_938;
|
|
143 int field_93C;
|
|
144 int field_940;
|
|
145 int field_944;
|
|
146 int field_948;
|
|
147 int field_94C;
|
|
148 int field_950;
|
|
149 int field_954;
|
|
150 int field_958;
|
|
151 int field_95C;
|
|
152 int field_960;
|
|
153 int field_964;
|
|
154 int field_968;
|
|
155 int field_96C;
|
|
156 int field_970;
|
|
157 Mouse *pMouse;
|
|
158 int field_978;
|
|
159 Game_stru0 stru_97C;
|
|
160 char field_98C[1148];
|
|
161 int uNumBloodsplats;
|
|
162 int field_E0C;
|
|
163 __int64 field_E10;
|
|
164 int uNumStationaryLights_in_pStationaryLightsStack;
|
|
165 unsigned int __depricated1;//unsigned int bGammaControlInitialized;
|
|
166 unsigned int uFlags;
|
|
167 unsigned int uFlags2;
|
|
168 float fSaturation;
|
|
169 unsigned __int64 __depricated2;//unsigned __int64 uSomeGammaStartTime;
|
|
170 unsigned __int64 __depricated3;//__int64 uSomeGammaDeltaTime;
|
|
171 void/*ThreadWard*/ *pThreadWardInstance;
|
|
172 ParticleEngine *pParticleEngine;
|
|
173 Mouse *pMouseInstance;
|
|
174 LightmapBuilder *pLightmapBuilder;
|
|
175 Vis *pVisInstance;
|
|
176 stru6 *pStru6Instance;
|
2543
|
177 void *__depricated5;//IndoorCameraD3D *pIndoorCameraD3D;
|
2541
|
178 stru9 *pStru9Instance;
|
|
179 stru10 *pStru10Instance;
|
|
180 void/*stru11*/ *pStru11Instance;
|
|
181 void/*stru12*/ *pStru12Instance;
|
|
182 void/*CShow*/ *pCShow;
|
|
183 Keyboard *pKeyboardInstance;
|
|
184 void *__depricated_4;//GammaController *pGammaController;
|
|
185 int field_E74;
|
|
186 };
|
|
187 #pragma pack(pop)
|
|
188
|
|
189
|
|
190
|
|
191
|
|
192
|
|
193
|
|
194 extern Engine *pEngine;
|
|
195
|
|
196 void sub_42FBDD();
|
|
197 void CloseWindowBackground();
|
|
198 void back_to_game();
|
|
199
|
|
200 void UpdateUserInput_and_MapSpecificStuff();
|
|
201 void PrepareWorld(unsigned int _0_box_loading_1_fullscreen);
|
|
202 void DoPrepareWorld(unsigned int bLoading, int _1_fullscreen_loading_2_box);
|
|
203
|
|
204 //int __stdcall aWinProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam);
|
|
205 int __stdcall InsertMM7CDDialogFunc(HWND hDlg, int a2, __int16 a3, int a4);
|
|
206 bool __fastcall FindMM7CD(HWND hWnd, char *pCDDrive);
|
|
207 //bool __fastcall Initialize(HINSTANCE hInst, char *pCmdLine);
|
|
208
|
|
209 void FinalInitialization();
|
|
210 bool __fastcall CheckMM7CD(char c);
|
|
211 void SecondaryInitialization();
|
|
212
|
|
213
|
|
214 void MM6_Initialize(const wchar_t *pIniFilename);
|
|
215 void MM7Initialization();
|
|
216
|
|
217 void __fastcall PrepareToLoadODM(unsigned int bLoading, struct ODMRenderParams *a2);
|
|
218 void ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows();
|
|
219 void _461103_load_level_sub();
|
|
220 void InitializeTurnBasedAnimations(void *);
|
|
221 unsigned int GetGravityStrength();
|
|
222 void GameUI_StatusBar_UpdateTimedString(unsigned int bForceHide); // idb
|
|
223
|
|
224 void __fastcall sub_44861E_set_texture(unsigned int uFaceCog, const char *pFilename);
|
|
225 void __fastcall sub_44892E_set_faces_bit(int sCogNumber, int bit, int on);
|
|
226 void __fastcall SetDecorationSprite(uint16_t uCog, bool bHide, const char *pFileName); // idb
|
|
227 void _494035_timed_effects__water_walking_damage__etc();
|
|
228 void _493938_regenerate();
|
|
229 void sub_491E3A();
|
|
230 const char *GetReputationString(signed int a1);
|
|
231 unsigned int __fastcall _494820_training_time(unsigned int a1);
|
|
232 void LoadLevel_InitializeLevelStr();
|
|
233 void OnMapLeave();
|
|
234 void OnMapLoad();
|
|
235 void Level_LoadEvtAndStr(const char *pLevelName);
|
|
236 void sub_4452BB();
|
|
237 bool _44100D_should_alter_right_panel();
|
|
238 void Transition_StopSound_Autosave(const char *pMapName, MapStartPoint point); // sub_44987B idb
|
|
239
|
|
240 void __fastcall sub_4451A8_press_any_key(int a1, int a2, int a4);
|
|
241
|
|
242 void OnTimer(int);
|
|
243 bool TeleportToNWCDungeon(); |