Mercurial > mm7
annotate mm7_unsorted_subs.h @ 2336:d6887ee81068
header file include cleanup
author | Grumpy7 |
---|---|
date | Wed, 02 Apr 2014 23:21:34 +0200 |
parents | 9551756f46c4 |
children | 1e865e8690ba |
rev | line source |
---|---|
2152 | 1 #pragma once |
2336 | 2 #include <stdint.h> |
3 #include <math.h> | |
2152 | 4 |
5 | |
6 //------------------------------------------------------------------------- | |
7 // Function declarations | |
8 void init_event_triggers(); | |
9 void check_event_triggers(); | |
10 | |
11 | |
12 | |
13 | |
2290 | 14 //void ShowMM7IntroVideo_and_LoadingScreen(); |
2152 | 15 unsigned int GameOverMenu(void *ecx0); |
16 int __fastcall SpawnRandomTreasure(struct MapInfo *a1, struct SpawnPointMM7 *a2); | |
17 void DamageMonsterFromParty(signed int a1, unsigned int uActorID_Monster, struct Vec3_int_ *pVelocity); | |
18 | |
19 void MakeActorAIList_ODM(); | |
20 int MakeActorAIList_BLV(); | |
21 void UpdateActorAI(); | |
22 bool __fastcall sub_4070EF_prolly_detect_player(unsigned int uObjID, unsigned int uObj2ID); | |
23 bool __fastcall sub_4075DB(int a1, int a2, int a3, struct BLVFace *face); | |
24 bool __fastcall sub_4077F1(int a1, int a2, int a3, struct ODMFace *face, struct BSPVertexBuffer *a5); | |
25 bool __fastcall sub_407A1C(int x, int z, int y, struct Vec3_int_ v); // idb | |
26 void InitializeActors(); | |
27 void InitializeSpriteObjects(); | |
28 int __fastcall sub_4088E9(int a1, int a2, int a3, int a4, int a5, int a6); | |
29 unsigned int SearchAliveActors(unsigned int *pTotalActors); | |
30 unsigned int SearchActorByMonsterID(unsigned int *pTotalActors, int uMonsterID); | |
31 unsigned int SearchActorByGroup(unsigned int *pTotalActors, unsigned int uGroup); | |
32 unsigned int SearchActorByID(unsigned int *pTotalActors, unsigned int a2); | |
33 void PrepareArcomage(); | |
34 void DoBlt_Copy(unsigned __int16 *pPixels); // idb | |
35 void __fastcall ZBuffer_Fill(int *pZBuffer, int uTextureId, int iZValue); | |
36 void __fastcall ZBuffer_DoFill(int *pZBuffer, struct Texture *pTex, int uZValue); | |
37 void __fastcall ZBuffer_DoFill2(int *pZBuffer, struct Texture *a2, int a3); // idb | |
38 void SetMoonPhaseNames(); | |
39 void __fastcall LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer); | |
40 void SetAttributeNames(); | |
41 void uGameUIFontMain_initialize(); | |
42 void uGameUIFontShadow_initialize(); | |
43 void Inventory_ItemPopupAndAlchemy(); | |
44 void UI_OnMouseLeftClick(int *pXY); // idb | |
45 unsigned int UI_GetHealthManaAndOtherQualitiesStringColor(signed int current_pos, signed int base_pos); | |
46 unsigned int __fastcall GetSizeInInventorySlots(unsigned int uNumPixels); | |
47 struct GUIButton *__fastcall GUI_HandleHotkey(unsigned __int8 uHotkey); // idb | |
48 int __fastcall GUI_ReplaceHotkey(unsigned __int8 uOldHotkey, unsigned __int8 uNewHotkey, char bFirstCall); | |
49 void DrawBuff_remaining_time_string(int uY, struct GUIWindow *window, __int64 remaining_time, struct GUIFont *Font); | |
50 bool UI_OnKeyDown(unsigned int vkKey); | |
51 void GameUI_DrawItemInfo(struct ItemGen* inspect_item); // idb | |
52 void MonsterPopup_Draw(unsigned int uActorID, struct GUIWindow *window); | |
53 void LoadActualSkyFrame(); | |
54 void Sleep6Hours(); | |
55 void ChestUI_WritePointedObjectStatusString(); | |
56 void OnChestLeftClick(); | |
57 void GameUI_WritePointedObjectStatusString(); | |
58 void __fastcall GameUI_OnPlayerPortraitLeftClick(unsigned int uPlayerID); // idb | |
59 void OnGameViewportClick(); | |
60 bool PauseGameDrawing(); | |
61 void SetUserInterface(enum PartyAlignment alignment, bool bReplace); | |
62 void reset_some_strus_flt_2Cs(); | |
63 int __fastcall GetPortalScreenCoord(unsigned int uFaceID); | |
64 bool PortalFrustrum(int pNumVertices, struct BspRenderer_PortalViewportData *a2, struct BspRenderer_PortalViewportData *near_portal, int uFaceID); | |
65 int ODM_NearClip(unsigned int uVertexID); // idb | |
66 int ODM_FarClip(unsigned int uNumVertices); | |
67 bool sub_427769_isSpellQuickCastableOnShiftClick(unsigned int uSpellID); | |
68 void _42777D_CastSpell_UseWand_ShootArrow(int a1, unsigned int uPlayerID, unsigned int a4, __int16 a5, int a6); | |
69 void InitializeTurnBasedAnimations(void *); | |
70 void CompactLayingItemsList(); | |
71 void sub_42FBDD(); | |
72 void CloseWindowBackground(); | |
73 void GameUI_MsgProc(); | |
74 void back_to_game(); | |
75 void GUI_MainMenuMessageProc(); | |
76 double get_shading_dist_mist(); | |
77 void area_of_effect__damage_evaluate(); | |
78 void __fastcall DamagePlayerFromMonster(unsigned int uObjID, int a2, struct Vec3_int_ *pPos, signed int a4); | |
79 void __fastcall sub_43A97E(unsigned int uLayingItemID, signed int a2); // idb | |
80 double __fastcall sub_43AE12(signed int a1); | |
81 void ItemDamageFromActor(unsigned int uObjID, unsigned int uActorID, struct Vec3_int_ *pVelocity); | |
82 void CharacterUI_LoadPaperdollTextures(); | |
2288 | 83 int GetItemTextureFilename(char *pOut, signed int item_id, int index, int shoulder); |
2152 | 84 bool IsDwarfPresentInParty(bool b); |
85 bool ShouldLoadTexturesForRaceAndGender(unsigned int _this); | |
86 void WetsuitOn(unsigned int uPlayerID); // idb | |
87 void WetsuitOff(unsigned int uPlayerID); | |
88 void __fastcall PrepareDrawLists_BLV(); | |
89 void FindBillboardsLightLevels_BLV(); | |
90 int __fastcall _43F55F_get_billboard_light_level(struct RenderBillboard *a1, int uBaseLightLevel); | |
91 int __fastcall _43F5C8_get_point_light_level_with_respect_to_lights(unsigned int uBaseLightLevel, int uSectorID, float x, float y, float z); | |
92 void PrepareBspRenderList_BLV(); | |
93 void PrepareDecorationsRenderList_BLV(unsigned int uDecorationID, unsigned int uSectorID); | |
94 void PrepareActorRenderList_BLV(); | |
95 void PrepareItemsRenderList_BLV(); | |
96 void AddBspNodeToRenderList(unsigned int node_id); | |
97 void __fastcall sub_4406BC(unsigned int node_id, unsigned int uFirstNode); // idb | |
2205 | 98 bool _44100D_should_alter_right_panel(); |
2152 | 99 __int16 __fastcall sub_441A4E(int a1); |
100 void DrawBook_Map_sub(unsigned int tl_x, unsigned int tl_y, unsigned int br_x, int br_y, int _48074); // idb | |
101 void Initialize2DA(); | |
102 void LoadLevel_InitializeLevelStr(); | |
103 void OnMapLeave(); | |
104 void OnMapLoad(); | |
105 void Level_LoadEvtAndStr(const char *pLevelName); | |
106 const char *GetMapBookHintText();//sub_444564 | |
107 char *GetEventHintString(unsigned int uEventID); // idb | |
108 int GetTravelTime(); | |
109 void __fastcall sub_4451A8_press_any_key(int a1, int a2, int a4); | |
110 unsigned int SkillToMastery(unsigned int skill_value); | |
111 unsigned int __fastcall GetSpellColor(signed int a1); | |
112 void __fastcall LoadGame(unsigned int uSlot); // idb | |
113 void SaveGame(bool IsAutoSAve, bool NotSaveWorld); | |
114 void __fastcall DoSavegame(unsigned int uSlot); // idb | |
115 bool Initialize_GamesLOD_NewLOD(); | |
116 void SaveNewGame(); | |
117 void PrepareToLoadBLV(unsigned int bLoading); | |
118 void __fastcall PrepareToLoadODM(unsigned int bLoading, struct ODMRenderParams *a2); | |
119 void _461103_load_level_sub(); | |
120 void MainMenu_Loop(); | |
121 char sub_4637E0_is_there_popup_onscreen(); | |
122 void ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows(); | |
123 void PrepareWorld(unsigned int _0_box_loading_1_fullscreen); | |
124 void Game_DeinitializeAndTerminate(int exitCode); // idb | |
125 void FinalInitialization(); | |
126 char Is_out15odm_underwater(); | |
127 void SetUnderwaterFog(); | |
128 void DoPrepareWorld(unsigned int bLoading, int _1_fullscreen_loading_2_box); | |
129 int __fastcall ReadWindowsRegistryInt(const char *pKey, int uDefValue); // idb | |
130 void __fastcall WriteWindowsRegistryString(const char *pKey, const char *pString); | |
131 void __fastcall ReadWindowsRegistryString(const char *pKeyName, char *pOutString, int uBufLen, const char *pDefaultValue); | |
132 void __fastcall WriteWindowsRegistryInt(const char *pKey, int val); | |
133 bool __fastcall CheckMM7CD(char c); | |
134 void SecondaryInitialization(); | |
135 void CreateAsyncMouse(); | |
136 void CreateAsyncKeyboard(); | |
137 void MM6_Initialize(const wchar_t *pIniFilename); | |
138 void MM7Initialization(); | |
139 void SetCurrentMenuID(enum MENU_STATE); // idb | |
140 enum MENU_STATE GetCurrentMenuID(); | |
141 void CreateMsgScrollWindow(signed int mscroll_id); | |
142 void free_book_subwindow(); | |
143 void CreateScrollWindow(); | |
144 void OnPaperdollLeftClick(); | |
145 void OnPressSpace(); | |
146 char __fastcall DoInteractionWithTopmostZObject(int a1, int a2); | |
147 void OracleDialogue(); | |
148 void __fastcall ClickNPCTopic(signed int uMessageParam); | |
2239
699bd6ee5ad0
dword_F8B1B0 to dword_F8B1B0_MasteryBeingTaught, some final touches to _4B254D_SkillMasteryTeacher
Grumpy7
parents:
2237
diff
changeset
|
149 const char * _4B254D_SkillMasteryTeacher(int trainerInfo); |
2152 | 150 const char *ContractSelectText(int pEventCode); |
151 void SimpleHouseDialog(); | |
152 void CreateButtonInColumn(int a1, unsigned int a2); | |
153 void FillAviableSkillsToTeach(int _this); | |
154 void sub_4B3E1E(); | |
155 void DrawJoinGuildWindow(int pEventCode); | |
2240
1fc4223bddf6
dword_F8B1B0_MasteryBeingTaught removing redundant case bodies
Grumpy7
parents:
2239
diff
changeset
|
156 void _4B3FE5_training_dialogue(int a4); |
2152 | 157 void NPCHireableDialogPrepare(); |
158 void _4B4224_UpdateNPCTopics(int _this); | |
159 void __fastcall DrawTextAtStatusBar(const char *Str, int a5); | |
160 __int64 GetExperienceRequiredForLevel(int a1); | |
161 void CheckBountyRespawnAndAward(); | |
162 void Arena_SelectionFightLevel(); | |
163 void ArenaFight(); | |
164 void SpellBookGenerator(); | |
165 void UI_CreateEndConversationButton(); | |
166 void __fastcall OnSelectShopDialogueOption(signed int uMessageParam); | |
167 int HouseDialogPressCloseBtn(); | |
168 void UIShop_Buy_Identify_Repair(); | |
169 bool __fastcall IsBModelVisible(unsigned int uModelID, int *unused); | |
170 void ODM_LoadAndInitialize(const char *pLevelFilename, struct ODMRenderParams *thisa); | |
171 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
|
172 int __fastcall sub_47C3D7_get_fog_specular(int a1, int a2, float a3); |
2152 | 173 int __fastcall GetActorTintColor(int max_dim, int min_dim, float distance, int a4, struct RenderBillboard *a5); |
174 unsigned int WorldPosToGridCellX(int); // weak | |
175 unsigned int WorldPosToGridCellZ(int); // weak | |
176 int GridCellToWorldPosX(int); // weak | |
177 int GridCellToWorldPosZ(int); // weak | |
178 void sub_481ED9_MessWithODMRenderParams(); | |
179 bool IsTerrainSlopeTooHigh(int pos_x, int pos_y); | |
180 int __fastcall GetTerrainHeightsAroundParty2(int a1, int a2, int *a3, int a4); | |
181 void sub_487DA9(); | |
182 double GetFogDensityByTime(struct OutdoorLocation *_this); | |
183 bool __fastcall HSV2RGB(float *a1, float *a2, float *a3, float a4, float a5, float a6); | |
184 void __fastcall RGB2HSV(float *a1, float *a2, float a3, float a4, float a5, float *a6); | |
185 signed int ReplaceHSV(unsigned int uColor, float a2, float gamma, float a4); | |
186 bool PlayerCreation_Choose4Skills(); | |
187 int PlayerCreation_GetUnspentAttributePointCount(); | |
188 void LoadPlayerPortraintsAndVoices(); | |
189 void ReloadPlayerPortraits(int player_id, int face_id); | |
190 void sub_491E3A(); | |
191 int CycleCharacter(bool backwards); | |
192 void __fastcall Rest(unsigned int uHoursToSleep); | |
193 void _493938_regenerate(); | |
194 void init_summoned_item(struct stru351_summoned_item *_this, __int64 duration); | |
195 void _494035_timed_effects__water_walking_damage__etc(); | |
196 unsigned int __fastcall _494820_training_time(unsigned int a1); | |
197 const char *GetReputationString(signed int a1); | |
198 char *BuildDialogueString(const char *lpsz, unsigned __int8 uPlayerID, struct ItemGen *a3, char *a4, int a5, __int64 *a6); | |
199 void PlayerCreationUI_Draw(); | |
200 void PlayerCreationUI_Initialize(); | |
201 void DeleteCCharFont(); | |
202 bool PlayerCreationUI_Loop(); | |
203 unsigned int __fastcall GetMaxMipLevels(unsigned int uDim); | |
204 struct SoundHeader *FindSound_BinSearch(unsigned int uStart, unsigned int uEnd, const char *pName); | |
205 struct SoundData *LoadSound(const char *pSoundName, struct SoundData *pOutBuff, unsigned int uID); | |
206 int __fastcall sub_4AAEA6_transform(struct RenderVertexSoft *a1); | |
207 int __fastcall sub_4AB66C(int, int); // weak | |
208 int GetSoundStrengthByDistanceFromParty(int x, int y, int z); | |
209 void PlayLevelMusic(); | |
210 unsigned int __fastcall sub_4B0E07(unsigned int uFaceID); // idb | |
2246 | 211 void sub_4B1447_party_fine(int shopId, int stealingResult, int fineToAdd); |
2232 | 212 void sub_4B1523_showSpellbookInfo(int spellItemId); |
2152 | 213 void ShowPopupShopItem(); |
214 void RestAndHeal(__int64 uNumMinutes); // idb | |
215 void GetHouseGoodbyeSpeech(); | |
216 unsigned int GetGravityStrength(); | |
217 void UpdateUserInput_and_MapSpecificStuff(); | |
218 void BLV_UpdateUserInputAndOther(); | |
219 void ODM_UpdateUserInputAndOther(); | |
220 bool __fastcall _46BFFA_check_object_intercept(unsigned int uLayingItemID, signed int a2); | |
221 int BLV_GetFloorLevel(int x, int y, int z, unsigned int uSectorID, unsigned int *pFaceID); | |
222 int ODM_GetFloorLevel(int X, signed int Y, int Z, int, int *pOnWater, int *bmodel_pid, int bWaterWalk); | |
223 int GetCeilingHeight(int Party_X, signed int Party_Y, int Party_ZHeight, int pFaceID); | |
224 void ODM_GetTerrainNormalAt(int pos_x, int pos_z, Vec3_int_ *out); | |
225 unsigned int __fastcall sub_46DEF2(signed int a2, unsigned int uLayingItemID); | |
226 void _46E0B2_collide_against_decorations(); | |
227 void __fastcall _46E26D_collide_against_sprites(signed int a1, signed int a2); | |
228 int _46E44E_collide_against_faces_and_portals(unsigned int b1); // idb | |
229 int __fastcall _46E889_collide_against_bmodels(unsigned int ecx0); | |
230 int collide_against_floor(int x, int y, int z, unsigned int *pSectorID, unsigned int *pFaceID); // idb | |
231 void __fastcall _46ED8A_collide_against_sprite_objects(unsigned int _this); | |
232 int _46EF01_collision_chech_player(int a1); // idb | |
233 int _46F04E_collide_against_portals(); | |
234 void BLV_UpdateDoors(); | |
235 void UpdateActors_BLV(); | |
236 void UpdateActors_ODM(); | |
237 void UpdateObjects(); | |
238 int collide_against_floor_approximate(int x, int y, int z, unsigned int *pSectorID, unsigned int *pFaceID); // idb | |
239 void BLV_ProcessPartyActions(); | |
240 void ODM_ProcessPartyActions(); | |
241 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); | |
242 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); | |
243 int sub_475665(struct BLVFace *face, int a2, __int16 a3); | |
244 bool __fastcall sub_4759C9(struct BLVFace *face, int a2, int a3, __int16 a4); | |
245 bool __fastcall sub_475D85(Vec3_int_ *a1, Vec3_int_ *a2, int *a3, struct BLVFace *a4); | |
246 bool __fastcall sub_475F30(int *a1, struct BLVFace *a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9); | |
247 void sub_4452BB(); | |
248 const char *GetProfessionActionText(int a1); | |
249 struct NPCData *__fastcall GetNPCData(signed int npcid); | |
250 struct NPCData * GetNewNPCData(signed int npcid, int* npc_indx); | |
251 int __fastcall GetGreetType(signed int SpeakingNPC_ID); | |
252 void DialogueEnding(); | |
253 void PrepareHouse(enum HOUSE_ID house); // idb | |
254 bool EnterHouse(enum HOUSE_ID uHouseID); | |
255 bool sub_4465DF_check_season(int a1); | |
256 int __fastcall IsActorAlive(unsigned int uType, unsigned int uParam, unsigned int uNumAlive); // idb | |
257 int NPC_EventProcessor(int npc_event_id, int entry_line = 0); | |
258 void __fastcall sub_448518_npc_set_item(int npc, unsigned int item, int a3); | |
259 void __fastcall sub_44861E_set_texture(unsigned int uFaceCog, const char *pFilename); | |
260 void __fastcall SetDecorationSprite(uint16_t uCog, bool bHide, const char *pFileName); // idb | |
261 void __fastcall sub_44892E_set_faces_bit(int sCogNumber, int bit, int on); | |
262 void __fastcall ToggleActorGroupFlag(unsigned int uGroupID, unsigned int uFlag, unsigned int bToggle); | |
263 void GameUI_StatusBar_UpdateTimedString(unsigned int bForceHide); // idb | |
264 void OnTimer(int); | |
265 void __fastcall sub_448CF4_spawn_monsters(__int16 typeindex, __int16 level, int count, int x, int y, int z, int group, unsigned int uUniqueName); | |
266 void __fastcall EventCastSpell(int uSpellID, int uSkillLevel, int uSkill, int fromx, int fromy, int fromz, int tox, int toy, int toz);//sub_448DF8 | |
267 void Door_switch_animation(unsigned int uDoorID, int a2); // idb: sub_449A49 | |
268 bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2); | |
269 void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle); // idb | |
270 void ShowStatusBarString(const char *pString, unsigned int uNumSeconds); | |
271 void ShowNothingHereStatus(); | |
272 int const_2(); | |
273 bool TeleportToNWCDungeon(); | |
274 void SpawnEncounter(struct MapInfo *pMapInfo, struct SpawnPointMM7 *spawn, int a3, int a4, int a5); | |
275 int __fastcall sub_44FA4C_spawn_light_elemental(int a1, int a2, int a3); | |
276 int __fastcall sub_450521_ProllyDropItemAt(int ecx0, signed int a2, int a3, int a4, int a5, unsigned __int16 a6); | |
277 int __fastcall _45063B_spawn_some_monster(struct MapInfo *a1, int a2); | |
278 void RespawnGlobalDecorations(); | |
279 bool __fastcall SpawnActor(unsigned int uMonsterID); | |
280 int GetAlertStatus(); | |
281 int integer_sqrt(int val); | |
282 int __fastcall GetDiceResult(unsigned int uNumDice, unsigned int uDiceSides); // idb | |
283 inline int round_to_int(float x) { return (int)floor(x + 0.5f); } | |
284 inline void __fastcall memset32(void *ptr, unsigned __int32 value, int count) | |
285 { | |
286 unsigned __int32* p = (unsigned __int32 *)ptr; | |
287 for ( int i=0; i < count; i++ ) | |
288 *p++ = value; | |
289 } | |
290 | |
291 | |
292 namespace zlib | |
293 { | |
294 int MemZip(void *dest, unsigned int *destLen, void *source, unsigned int sourceLen); | |
295 int MemUnzip(void *dest, unsigned int *destLen, const void *source, unsigned int sourceLen); | |
296 }; |