annotate mm7_unsorted_subs.h @ 2422:bb1273b1b9b6

//Uninitialized memory access
author Ritor1
date Wed, 23 Jul 2014 01:18:24 +0600
parents 802460e60eee
children 0f17a30149ec
rev   line source
2152
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
1 #pragma once
2336
d6887ee81068 header file include cleanup
Grumpy7
parents: 2331
diff changeset
2 #include <stdint.h>
d6887ee81068 header file include cleanup
Grumpy7
parents: 2331
diff changeset
3 #include <math.h>
2152
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
4
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
5
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
6 //-------------------------------------------------------------------------
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
7 // Function declarations
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
8 void init_event_triggers();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
9 void check_event_triggers();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
10
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
11
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
12
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
13
2290
d65414f65bd4 add MMT.cpp and MMT.h
Ritor1
parents: 2288
diff changeset
14 //void ShowMM7IntroVideo_and_LoadingScreen();
2152
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
15 unsigned int GameOverMenu(void *ecx0);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
16
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
17 bool __fastcall sub_4075DB(int a1, int a2, int a3, struct BLVFace *face);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
18 bool __fastcall sub_4077F1(int a1, int a2, int a3, struct ODMFace *face, struct BSPVertexBuffer *a5);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
19 bool __fastcall sub_407A1C(int x, int z, int y, struct Vec3_int_ v); // idb
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
20 void reset_some_strus_flt_2Cs();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
21 void InitializeTurnBasedAnimations(void *);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
22 double get_shading_dist_mist();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
23 void area_of_effect__damage_evaluate();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
24 void __fastcall sub_43A97E(unsigned int uLayingItemID, signed int a2); // idb
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
25 double __fastcall sub_43AE12(signed int a1);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
26 void ItemDamageFromActor(unsigned int uObjID, unsigned int uActorID, struct Vec3_int_ *pVelocity);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
27 void FindBillboardsLightLevels_BLV();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
28 int __fastcall _43F55F_get_billboard_light_level(struct RenderBillboard *a1, int uBaseLightLevel);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
29 int __fastcall _43F5C8_get_point_light_level_with_respect_to_lights(unsigned int uBaseLightLevel, int uSectorID, float x, float y, float z);
2205
db94443ea4e7 _44100D_should_alter_right_panel()
Ritor1
parents: 2193
diff changeset
30 bool _44100D_should_alter_right_panel();
2152
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
31 __int16 __fastcall sub_441A4E(int a1);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
32 void LoadLevel_InitializeLevelStr();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
33 void OnMapLeave();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
34 void OnMapLoad();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
35 void Level_LoadEvtAndStr(const char *pLevelName);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
36 void __fastcall sub_4451A8_press_any_key(int a1, int a2, int a4);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
37 void __fastcall PrepareToLoadODM(unsigned int bLoading, struct ODMRenderParams *a2);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
38 void _461103_load_level_sub();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
39 void MainMenu_Loop();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
40 void ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
41 void PrepareWorld(unsigned int _0_box_loading_1_fullscreen);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
42 void Game_DeinitializeAndTerminate(int exitCode); // idb
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
43 void FinalInitialization();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
44 void DoPrepareWorld(unsigned int bLoading, int _1_fullscreen_loading_2_box);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
45 bool __fastcall CheckMM7CD(char c);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
46 void SecondaryInitialization();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
47 void CreateAsyncMouse();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
48 void CreateAsyncKeyboard();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
49 void MM6_Initialize(const wchar_t *pIniFilename);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
50 void MM7Initialization();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
51 void SetCurrentMenuID(enum MENU_STATE); // idb
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
52 enum MENU_STATE GetCurrentMenuID();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
53 void OracleDialogue();
2239
699bd6ee5ad0 dword_F8B1B0 to dword_F8B1B0_MasteryBeingTaught, some final touches to _4B254D_SkillMasteryTeacher
Grumpy7
parents: 2237
diff changeset
54 const char * _4B254D_SkillMasteryTeacher(int trainerInfo);
2152
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
55 void sub_4B3E1E();
2240
1fc4223bddf6 dword_F8B1B0_MasteryBeingTaught removing redundant case bodies
Grumpy7
parents: 2239
diff changeset
56 void _4B3FE5_training_dialogue(int a4);
2152
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
57 void __fastcall DrawTextAtStatusBar(const char *Str, int a5);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
58 __int64 GetExperienceRequiredForLevel(int a1);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
59 void CheckBountyRespawnAndAward();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
60 int HouseDialogPressCloseBtn();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
61 bool __fastcall IsBModelVisible(unsigned int uModelID, int *unused);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
62 void ODM_LoadAndInitialize(const char *pLevelFilename, struct ODMRenderParams *thisa);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
63 unsigned int GetLevelFogColor();
2193
4842f58715ea sub_47C3D7_get_fog_related_stuff to sub_47C3D7_get_fog_specular cleanup, IsTerrainSlopeTooHigh restoring commented out min,min/max,max implementation, some small changes in OnMapLoad, sub_4465DF_check_season attempted to pick the best readabilty/maintainability tradeoff
Grumpy7
parents: 2155
diff changeset
64 int __fastcall sub_47C3D7_get_fog_specular(int a1, int a2, float a3);
2152
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
65 int __fastcall GetActorTintColor(int max_dim, int min_dim, float distance, int a4, struct RenderBillboard *a5);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
66 unsigned int WorldPosToGridCellX(int); // weak
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
67 unsigned int WorldPosToGridCellZ(int); // weak
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
68 int GridCellToWorldPosX(int); // weak
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
69 int GridCellToWorldPosZ(int); // weak
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
70 void sub_481ED9_MessWithODMRenderParams();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
71 bool IsTerrainSlopeTooHigh(int pos_x, int pos_y);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
72 int __fastcall GetTerrainHeightsAroundParty2(int a1, int a2, int *a3, int a4);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
73 void sub_487DA9();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
74 double GetFogDensityByTime(struct OutdoorLocation *_this);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
75 void sub_491E3A();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
76 void _493938_regenerate();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
77 void init_summoned_item(struct stru351_summoned_item *_this, __int64 duration);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
78 void _494035_timed_effects__water_walking_damage__etc();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
79 unsigned int __fastcall _494820_training_time(unsigned int a1);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
80 const char *GetReputationString(signed int a1);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
81 char *BuildDialogueString(const char *lpsz, unsigned __int8 uPlayerID, struct ItemGen *a3, char *a4, int a5, __int64 *a6);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
82 unsigned int __fastcall GetMaxMipLevels(unsigned int uDim);
2246
0be4f17b7986 shop stealing cleaned up a bit
Grumpy7
parents: 2240
diff changeset
83 void sub_4B1447_party_fine(int shopId, int stealingResult, int fineToAdd);
2152
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
84 unsigned int GetGravityStrength();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
85 void UpdateUserInput_and_MapSpecificStuff();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
86 bool __fastcall _46BFFA_check_object_intercept(unsigned int uLayingItemID, signed int a2);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
87 unsigned int __fastcall sub_46DEF2(signed int a2, unsigned int uLayingItemID);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
88 void _46E0B2_collide_against_decorations();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
89 int _46E44E_collide_against_faces_and_portals(unsigned int b1); // idb
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
90 int __fastcall _46E889_collide_against_bmodels(unsigned int ecx0);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
91 int collide_against_floor(int x, int y, int z, unsigned int *pSectorID, unsigned int *pFaceID); // idb
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
92 void __fastcall _46ED8A_collide_against_sprite_objects(unsigned int _this);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
93 int _46EF01_collision_chech_player(int a1); // idb
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
94 int _46F04E_collide_against_portals();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
95 void UpdateObjects();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
96 int collide_against_floor_approximate(int x, int y, int z, unsigned int *pSectorID, unsigned int *pFaceID); // idb
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
97 bool sub_47531C(int a1, int *a2, int pos_x, int pos_y, int pos_z, int dir_x, int dir_y, int dir_z, struct BLVFace *face, int a10);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
98 bool sub_4754BF(int a1, int *a2, int X, int Y, int Z, int dir_x, int dir_y, int dir_z, struct BLVFace *face, int a10, int a11);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
99 int sub_475665(struct BLVFace *face, int a2, __int16 a3);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
100 bool __fastcall sub_4759C9(struct BLVFace *face, int a2, int a3, __int16 a4);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
101 bool __fastcall sub_475D85(Vec3_int_ *a1, Vec3_int_ *a2, int *a3, struct BLVFace *a4);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
102 bool __fastcall sub_475F30(int *a1, struct BLVFace *a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
103 void sub_4452BB();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
104 bool sub_4465DF_check_season(int a1);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
105 void __fastcall sub_44861E_set_texture(unsigned int uFaceCog, const char *pFilename);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
106 void __fastcall SetDecorationSprite(uint16_t uCog, bool bHide, const char *pFileName); // idb
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
107 void __fastcall sub_44892E_set_faces_bit(int sCogNumber, int bit, int on);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
108 void GameUI_StatusBar_UpdateTimedString(unsigned int bForceHide); // idb
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
109 void OnTimer(int);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
110 void __fastcall sub_448CF4_spawn_monsters(__int16 typeindex, __int16 level, int count, int x, int y, int z, int group, unsigned int uUniqueName);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
111 bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
112 void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle); // idb
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
113 void ShowStatusBarString(const char *pString, unsigned int uNumSeconds);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
114 void ShowNothingHereStatus();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
115 int const_2();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
116 bool TeleportToNWCDungeon();
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
117 inline void __fastcall memset32(void *ptr, unsigned __int32 value, int count)
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
118 {
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
119 unsigned __int32* p = (unsigned __int32 *)ptr;
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
120 for ( int i=0; i < count; i++ )
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
121 *p++ = value;
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
122 }
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents:
diff changeset
123