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