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