Mercurial > mm7
annotate Game.h @ 2482:d58599b6306b
remove DirectX11.cpp/.h for MVS 2012
author | Ritor1 |
---|---|
date | Sun, 24 Aug 2014 22:27:51 +0600 |
parents | 104fdbea0386 |
children |
rev | line source |
---|---|
0 | 1 #pragma once |
1016 | 2 #include "VectorTypes.h" |
0 | 3 |
2463 | 4 #include "OSAPI.h" |
5 | |
2464 | 6 #include "MapInfo.h" |
7 | |
0 | 8 |
2155 | 9 #define GAME_FLAGS_1_01_lightmap_related 0x01 |
676
ecfb1b3c9a39
BLV: when standing right on the portal (orange wall) everything looks fine
Nomad
parents:
638
diff
changeset
|
10 #define GAME_FLAGS_1_DRAW_BLV_DEBUGS 0x08 |
592 | 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 | |
573 | 15 |
0 | 16 |
17 | |
18 /* 320 */ | |
19 enum GAME_STATE | |
20 { | |
982 | 21 GAME_STATE_PLAYING = 0, |
981 | 22 GAME_FINISHED = 1, |
2124 | 23 GAME_STATE_CHANGE_LOCATION = 2, |
1214
0d6c7ff3cddd
simplified stru193_math constructor and class definition
Grumpy7
parents:
1016
diff
changeset
|
24 GAME_STATE_LOADING_GAME = 3, |
981 | 25 GAME_STATE_NEWGAME_OUT_GAMEMENU = 4, |
26 GAME_STATE_5 = 5, | |
982 | 27 GAME_STATE_STARTING_NEW_GAME = 6, |
734 | 28 GAME_STATE_GAME_QUITTING_TO_MAIN_MENU = 7, |
981 | 29 GAME_STATE_PARTY_DIED = 8, |
30 GAME_STATE_FINAL_WINDOW = 9, | |
31 GAME_STATE_A = 10 | |
0 | 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 | |
1016 | 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 | |
0 | 86 /* 104 */ |
87 #pragma pack(push, 1) | |
88 struct Game | |
89 { | |
90 static Game *Create(); | |
91 static void Destroy(); | |
92 | |
93 protected: Game(); | |
522 | 94 protected: virtual ~Game(); |
0 | 95 |
1016 | 96 |
0 | 97 public: |
98 void _44E904(); | |
99 bool InitializeGammaController(); | |
194 | 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); | |
0 | 102 void OutlineSelection(); |
1392 | 103 signed int _44EC23(struct Polygon *a2, int *a3, signed int a4); |
0 | 104 signed int _44ED0A(struct BLVFace *a2, int *a3, signed int a4); |
2006 | 105 bool AlterGamma_BLV(struct BLVFace *pFace, signed int *pColor); |
106 bool AlterGamma_ODM(struct ODMFace *pFace, signed int *pColor); | |
0 | 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 | |
1458 | 126 //void ( ***vdestructor_ptr)(Game *, bool); |
0 | 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; | |
1397 | 160 void/*ThreadWard*/ *pThreadWardInstance; |
0 | 161 ParticleEngine *pParticleEngine; |
162 Mouse *pMouseInstance; | |
163 LightmapBuilder *pLightmapBuilder; | |
164 Vis *pVisInstance; | |
165 stru6 *pStru6Instance; | |
166 IndoorCameraD3D *pIndoorCameraD3D; | |
167 stru9 *pStru9Instance; | |
168 stru10 *pStru10Instance; | |
1392 | 169 void/*stru11*/ *pStru11Instance; |
170 void/*stru12*/ *pStru12Instance; | |
1397 | 171 void/*CShow*/ *pCShow; |
0 | 172 Keyboard *pKeyboardInstance; |
173 GammaController *pGammaController; | |
174 int field_E74; | |
175 }; | |
176 #pragma pack(pop) | |
177 | |
178 | |
179 | |
180 | |
181 | |
182 | |
2343 | 183 extern Game *pGame; |
184 | |
185 void sub_42FBDD(); | |
186 void CloseWindowBackground(); | |
187 void GameUI_MsgProc(); | |
188 void back_to_game(); | |
2463 | 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 | |
2464 | 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(); |