Mercurial > mm7
diff mm7_4.cpp @ 1459:2ca62c9e7b3c
Function names
author | Nomad |
---|---|
date | Wed, 21 Aug 2013 16:06:50 +0200 |
parents | 934074e7fcc1 |
children | 845907a747d3 |
line wrap: on
line diff
--- a/mm7_4.cpp Wed Aug 21 14:26:36 2013 +0200 +++ b/mm7_4.cpp Wed Aug 21 16:06:50 2013 +0200 @@ -47,7 +47,7 @@ #include "Lights.h" //----- (0046CC4B) -------------------------------------------------------- -void check_event_triggers() +void check_event_triggers() { int v0; // eax@1 LevelDecoration *v1; // esi@2 @@ -90,9 +90,9 @@ signed int v38; // [sp+20h] [bp-4h]@24 v0 = 0; - for ( i = 0; i < _6836C8_num_decorations_6807E8; ++i ) + for ( i = 0; i < num_event_triggers; ++i ) { - v1 = &pLevelDecorations[_6807E8_level_decorations_ids[v0]]; + v1 = &pLevelDecorations[event_triggers[v0]]; v2 = v1->field_18; v3 = v1->vPosition.y; v33 = v1->vPosition.x; @@ -597,7 +597,7 @@ } //----- (00491E3A) -------------------------------------------------------- -void sub_491E3A() +void sub_491E3A() { Player *v0; // ebx@1 signed int v1; // esi@3 @@ -842,7 +842,7 @@ a1.spell_caster_pid = v12; a1.uFacing = 0; a1.uSoundID = 0; - v13 = sub_46A89E((int)v41, 100, 307); + v13 = _46A89E_immolation_effect((int)v41, 100, 307); if ( v13 > 0 ) { do @@ -1070,7 +1070,7 @@ } //----- (00493F79) -------------------------------------------------------- -void sub_493F79(stru351_summoned_item *_this, __int64 a2) +void init_summoned_item(stru351_summoned_item *_this, __int64 duration) { signed __int64 v2; // ST2C_8@1 signed __int64 v3; // qax@1 @@ -1078,7 +1078,7 @@ unsigned __int64 v5; // qax@1 unsigned int v6; // ebx@1 - v2 = (signed __int64)((double)a2 * 0.234375); + v2 = (signed __int64)((double)duration * 0.234375); v3 = v2 / 60 / 60; //v4 = v3; v5 = (unsigned int)v3 / 0x18; @@ -1885,8 +1885,7 @@ dword_AE3370 = v3; return pNPCStats->pNPCNames[0][v11 + 2 * v3]; } -// AE336C: using guessed type int dword_AE336C; -// AE3370: using guessed type int dword_AE3370; + //----- (00495430) -------------------------------------------------------- char * GetReputationString( signed int a1 ) @@ -2241,7 +2240,7 @@ i += 2; break; } - sub_493F79(&v56, *a6); + init_summoned_item(&v56, *a6); sprintfex(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v56.field_14_exprie_month], v56.field_C_expire_day + 1, v56.field_18_expire_year); strcat(pTmpBuf2.data(), a1); dst = strlen(pTmpBuf2.data()); @@ -2272,7 +2271,7 @@ i += 2; break; } - sub_493F79(&v56, pParty->field_3C._s_times[v17-51]); + init_summoned_item(&v56, pParty->field_3C._s_times[v17-51]); sprintfex(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v56.field_14_exprie_month], v56.field_C_expire_day + 1, v56.field_18_expire_year); strcat(pTmpBuf2.data(), a1); dst = strlen(pTmpBuf2.data()); @@ -3009,7 +3008,7 @@ } //----- (004B1ECE) -------------------------------------------------------- -void sub_4B1ECE() +void OracleDialogue() { __int16 *v0; // edi@1 int v1; // ebx@3 @@ -3103,10 +3102,6 @@ v9->uHolderPlayer = v5; } } -// 4F08EC: using guessed type int dword_4F08EC[]; -// 722B3C: using guessed type int dword_722B3C; -// 722B44: using guessed type int dword_722B44; -// F8B1A8: using guessed type int dword_F8B1A8; //----- (004B254D) -------------------------------------------------------- char * _4B254D_SkillMasteryTeacher(int _this) @@ -3506,7 +3501,6 @@ pDialogueWindow->_41D08F_set_keyboard_control_group(v1 + 1, 1, 0, 1); } -// F8B19C: using guessed type int dword_F8B19C; //----- (004B3FE5) -------------------------------------------------------- void __fastcall sub_4B3FE5(int a4) @@ -3544,13 +3538,13 @@ } //----- (004B46F8) -------------------------------------------------------- -int __fastcall sub_4B46F8(int a1) +__int64 GetExperienceRequiredForLevel(int level) { - int v1; // eax@1 + __int64 v1; // eax@1 int i; // edx@1 v1 = 0; - for ( i = 0; i < a1; ++i ) + for ( i = 0; i < level; ++i ) v1 += i + 1; return 1000 * v1; } @@ -3756,12 +3750,13 @@ switch ( npc_event_id ) { case 139: - sub_4B1ECE(); + OracleDialogue(); break; case 311: sub_4BBA85_bounties(); break; case 399: + __debugbreak(); // what kind of dialogue is that? sub_4BBCDD(); break; default: