comparison mm7_3.cpp @ 1035:306ec23b37df

004C1EE5 & other stuff
author Nomad
date Wed, 22 May 2013 14:12:51 +0200
parents 3a5c8df8381d
children ff2d888f8033
comparison
equal deleted inserted replaced
1034:aa848c90181f 1035:306ec23b37df
13754 _5B65B0_npcdata_rep_or_other = 0; 13754 _5B65B0_npcdata_rep_or_other = 0;
13755 _5B65AC_npcdata_fame_or_other = 0; 13755 _5B65AC_npcdata_fame_or_other = 0;
13756 _5B65A8_npcdata_uflags_or_other = 0; 13756 _5B65A8_npcdata_uflags_or_other = 0;
13757 } 13757 }
13758 } 13758 }
13759 // 5B65A8: using guessed type int _5B65A8_npcdata_uflags_or_other; 13759
13760 // 5B65AC: using guessed type int _5B65AC_npcdata_fame_or_other; 13760
13761 // 5B65B0: using guessed type int _5B65B0_npcdata_rep_or_other;
13762 // 5B65B4: using guessed type int _5B65B4_npcdata_loword_house_or_other;
13763 // 5B65B8: using guessed type int _5B65B8_npcdata_hiword_house_or_other;
13764 // 5B65BC: using guessed type int dword_5B65BC;
13765 // 5B65C0: using guessed type int dword_5B65C0;
13766 13761
13767 //----- (00449A49) -------------------------------------------------------- 13762 //----- (00449A49) --------------------------------------------------------
13768 __int16 __fastcall sub_449A49_door_switch_animation(unsigned int uDoorID, int a2) 13763 __int16 __fastcall sub_449A49_door_switch_animation(unsigned int uDoorID, int a2)
13769 { 13764 {
13770 int v2; // eax@1 13765 int v2; // eax@1
13857 return v2; 13852 return v2;
13858 } 13853 }
13859 13854
13860 //----- (00449B57) -------------------------------------------------------- 13855 //----- (00449B57) --------------------------------------------------------
13861 bool _449B57_test_bit( unsigned __int8 *a1, __int16 a2 ) 13856 bool _449B57_test_bit( unsigned __int8 *a1, __int16 a2 )
13862 { 13857 {
13863 return a1[(a2 - 1) >> 3] & (0x80u >> (a2 - 1) % 8); 13858 return a1[(a2 - 1) >> 3] & (0x80u >> (a2 - 1) % 8);
13864 } 13859 }
13865 13860
13866 //----- (00449B7E) -------------------------------------------------------- 13861 //----- (00449B7E) --------------------------------------------------------
13867 void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle) 13862 void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle)
13873 set_bit = 0x80 >> v3 % 8; 13868 set_bit = 0x80 >> v3 % 8;
13874 if ( bToggle ) 13869 if ( bToggle )
13875 pArray[v3 / 8] |= set_bit; 13870 pArray[v3 / 8] |= set_bit;
13876 else 13871 else
13877 pArray[v3 / 8] &= ~set_bit; 13872 pArray[v3 / 8] &= ~set_bit;
13878 }
13879
13880 //----- (0044A56A) --------------------------------------------------------
13881 void __cdecl Party__CountHirelings()
13882 {
13883 pParty->field_70A = 0;
13884
13885 for (int i = 0; i < pNPCStats->uNumNewNPCs; ++i)
13886 {
13887 auto npc = pNPCStats->pNewNPCData + i;
13888 if (npc->Hired() &&
13889 (!pParty->pHirelings[0].pName || strcmp(npc->pName, pParty->pHirelings[0].pName)))
13890 {
13891 if (!pParty->pHirelings[1].pName || strcmp(npc->pName, pParty->pHirelings[1].pName))
13892 ++pParty->field_70A;
13893 }
13894 }
13895 } 13873 }
13896 13874
13897 //----- (0044C175) -------------------------------------------------------- 13875 //----- (0044C175) --------------------------------------------------------
13898 void __fastcall ShowStatusBarString(const char *pString, unsigned int uNumSeconds) 13876 void __fastcall ShowStatusBarString(const char *pString, unsigned int uNumSeconds)
13899 { 13877 {
13908 i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString) ) 13886 i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString) )
13909 byte_5C3427[strlen(GameUI_Footer_TimedString)] = 0; 13887 byte_5C3427[strlen(GameUI_Footer_TimedString)] = 0;
13910 } 13888 }
13911 13889
13912 //----- (0044C1D0) -------------------------------------------------------- 13890 //----- (0044C1D0) --------------------------------------------------------
13913 void __cdecl ShowNothingHereStatus() 13891 void ShowNothingHereStatus()
13914 { 13892 {
13915 if ( !GameUI_Footer_TimeLeft ) 13893 if ( !GameUI_Footer_TimeLeft )
13916 ShowStatusBarString(pGlobalTXT_LocalizationStrings[521], 2u);// Nothing here 13894 ShowStatusBarString(pGlobalTXT_LocalizationStrings[521], 2u);// Nothing here
13917 } 13895 }
13918 13896
13946 } 13924 }
13947 13925
13948 //----- (0044C2F4) -------------------------------------------------------- 13926 //----- (0044C2F4) --------------------------------------------------------
13949 int LevelDecoration::IsInteractive() 13927 int LevelDecoration::IsInteractive()
13950 { 13928 {
13951 signed int v1; // eax@1 13929 switch (uDecorationDescID)
13952 13930 {
13953 v1 = this->uDecorationDescID; 13931 case 4: // trash pile
13954 if ( v1 > 34 ) 13932 case 5: // campfire
13955 { 13933 case 6: // cauldron
13956 if ( v1 == 184 || v1 == 187 || v1 == 190 || v1 > 205 && v1 <= 221 ) 13934 case 11: // fruit plate
13957 return 1; 13935 case 13: // trash pile
13958 } 13936 case 14: // dirt
13959 else 13937 case 24: // keg
13960 { 13938 case 184: // fire
13961 if ( v1 == 34 || v1 >= 4 && (v1 <= 6 || v1 == 11 || v1 > 12 && (v1 <= 14 || v1 == 24)) ) 13939 case 187: // fire
13962 return 1; 13940 case 190: // fire
13963 } 13941 return true;
13964 return 0; 13942 }
13943
13944 if (uDecorationDescID >= 206 && uDecorationDescID <= 209) // lighthouse fire
13945 return true;
13946 if (uDecorationDescID >= 210 && uDecorationDescID <= 221) // magic pedistal
13947 return true;
13948
13949 return false;
13965 } 13950 }
13966 13951
13967 //----- (0044C362) -------------------------------------------------------- 13952 //----- (0044C362) --------------------------------------------------------
13968 void Vec3_int_::Normalize_float() 13953 void Vec3_int_::Normalize_float()
13969 { 13954 {
13980 float v11; // ST18_4@1 13965 float v11; // ST18_4@1
13981 double v12; // ST0C_8@1 13966 double v12; // ST0C_8@1
13982 float v13; // ST14_4@1 13967 float v13; // ST14_4@1
13983 double v14; // ST0C_8@1 13968 double v14; // ST0C_8@1
13984 13969
13970 assert(false);
13985 //v1 = this; 13971 //v1 = this;
13986 v2 = (double)this->x * 0.000015258789; 13972 v2 = (double)this->x * 0.000015258789;
13987 v3 = v2; 13973 v3 = v2;
13988 v4 = (double)this->y * 0.000015258789; 13974 v4 = (double)this->y * 0.000015258789;
13989 v5 = v4; 13975 v5 = v4;