Mercurial > mm7
comparison mm7_3.cpp @ 1461:845907a747d3
Merge
author | Gloval |
---|---|
date | Wed, 21 Aug 2013 20:59:16 +0400 |
parents | 2ca62c9e7b3c |
children | c987b5ed09af |
comparison
equal
deleted
inserted
replaced
1460:ff2118028c71 | 1461:845907a747d3 |
---|---|
50 #include "Lights.h" | 50 #include "Lights.h" |
51 | 51 |
52 #include "MM7.h" | 52 #include "MM7.h" |
53 | 53 |
54 //----- (0046E44E) -------------------------------------------------------- | 54 //----- (0046E44E) -------------------------------------------------------- |
55 int __thiscall _46E44E_collide_against_faces_and_portals(unsigned int b1) | 55 int _46E44E_collide_against_faces_and_portals(unsigned int b1) |
56 { | 56 { |
57 BLVSector *pSector; // edi@1 | 57 BLVSector *pSector; // edi@1 |
58 signed int v2; // ebx@1 | 58 signed int v2; // ebx@1 |
59 BLVFace *pFace; // esi@2 | 59 BLVFace *pFace; // esi@2 |
60 __int16 pNextSector; // si@10 | 60 __int16 pNextSector; // si@10 |
598 while ( (signed int)v15 < (signed int)uNumSpriteObjects ); | 598 while ( (signed int)v15 < (signed int)uNumSpriteObjects ); |
599 } | 599 } |
600 } | 600 } |
601 | 601 |
602 //----- (0046EF01) -------------------------------------------------------- | 602 //----- (0046EF01) -------------------------------------------------------- |
603 int __thiscall _46EF01_collision_chech_player(int a1) | 603 int _46EF01_collision_chech_player(int a1) |
604 { | 604 { |
605 int v1; // edx@1 | 605 int v1; // edx@1 |
606 int result; // eax@1 | 606 int result; // eax@1 |
607 int v3; // ebx@7 | 607 int v3; // ebx@7 |
608 int v4; // esi@7 | 608 int v4; // esi@7 |
671 } | 671 } |
672 return result; | 672 return result; |
673 } | 673 } |
674 | 674 |
675 //----- (0046F04E) -------------------------------------------------------- | 675 //----- (0046F04E) -------------------------------------------------------- |
676 signed int __cdecl _46F04E_collide_against_portals() | 676 int _46F04E_collide_against_portals() |
677 { | 677 { |
678 BLVSector *v0; // ecx@1 | 678 BLVSector *v0; // ecx@1 |
679 unsigned int v1; // eax@1 | 679 unsigned int v1; // eax@1 |
680 int v2; // eax@2 | 680 int v2; // eax@2 |
681 BLVFace *v3; // eax@3 | 681 BLVFace *v3; // eax@3 |
862 } | 862 } |
863 return result; | 863 return result; |
864 } | 864 } |
865 | 865 |
866 //----- (004706C6) -------------------------------------------------------- | 866 //----- (004706C6) -------------------------------------------------------- |
867 void __cdecl UpdateActors_ODM() | 867 void UpdateActors_ODM() |
868 { | 868 { |
869 Actor *v0; // esi@2 | 869 Actor *v0; // esi@2 |
870 AIState uAIState; // ax@2 | 870 AIState uAIState; // ax@2 |
871 //unsigned int v2; // ecx@6 | 871 //unsigned int v2; // ecx@6 |
872 int v3; // ebx@6 | 872 int v3; // ebx@6 |
3346 *v19 = 0; | 3346 *v19 = 0; |
3347 return 1; | 3347 return 1; |
3348 } | 3348 } |
3349 | 3349 |
3350 //----- (00475665) -------------------------------------------------------- | 3350 //----- (00475665) -------------------------------------------------------- |
3351 signed int __thiscall sub_475665(BLVFace *_this, int a2, __int16 a3) | 3351 int sub_475665(BLVFace *_this, int a2, __int16 a3) |
3352 { | 3352 { |
3353 unsigned int v3; // eax@1 | 3353 unsigned int v3; // eax@1 |
3354 Vec3_short_ *v4; // edx@3 | 3354 Vec3_short_ *v4; // edx@3 |
3355 signed int v5; // eax@4 | 3355 signed int v5; // eax@4 |
3356 int v6; // esi@4 | 3356 int v6; // esi@4 |
4330 && (double)(signed int)pViewport->uViewportBR_Y > a1->field_B4[i*4+21] ) | 4330 && (double)(signed int)pViewport->uViewportBR_Y > a1->field_B4[i*4+21] ) |
4331 v16 = 1; | 4331 v16 = 1; |
4332 } | 4332 } |
4333 } | 4333 } |
4334 return v16; | 4334 return v16; |
4335 } | |
4336 | |
4337 //----- (004783FA) -------------------------------------------------------- | |
4338 void __cdecl sub_4783FA_construct_global_73D150() | |
4339 { | |
4340 char *v0; // eax@1 | |
4341 signed int v1; // ecx@1 | |
4342 | |
4343 v0 = (char *)&array_73D150[0].flt_2C; | |
4344 v1 = 20; | |
4345 do | |
4346 { | |
4347 *(float *)v0 = 0.0; | |
4348 v0 += 48; | |
4349 --v1; | |
4350 } | |
4351 while ( v1 ); | |
4352 } | 4335 } |
4353 | 4336 |
4354 //----- (0047840D) -------------------------------------------------------- | 4337 //----- (0047840D) -------------------------------------------------------- |
4355 char Render::DrawBuildingsD3D() | 4338 char Render::DrawBuildingsD3D() |
4356 { | 4339 { |
5814 v7 = 248; | 5797 v7 = 248; |
5815 return (-1 - v7) << 24; | 5798 return (-1 - v7) << 24; |
5816 } | 5799 } |
5817 | 5800 |
5818 //----- (0047C4FC) -------------------------------------------------------- | 5801 //----- (0047C4FC) -------------------------------------------------------- |
5819 signed int __fastcall GetActorTintColor(int max_dimm, int min_dimm, float distance, int a4, RenderBillboard *a5) | 5802 int __fastcall GetActorTintColor(int max_dimm, int min_dimm, float distance, int a4, RenderBillboard *a5) |
5820 { | 5803 { |
5821 //int v5; // esi@1 | 5804 //int v5; // esi@1 |
5822 signed int v6; // edx@1 | 5805 signed int v6; // edx@1 |
5823 //signed int result; // eax@2 | 5806 //signed int result; // eax@2 |
5824 int v8; // eax@3 | 5807 int v8; // eax@3 |
5968 return 64 - (sWorldPosZ >> 9); // sar is in original exe, resulting -880 / 512 = -1 | 5951 return 64 - (sWorldPosZ >> 9); // sar is in original exe, resulting -880 / 512 = -1 |
5969 // and -880 sar 9 = -2 | 5952 // and -880 sar 9 = -2 |
5970 } | 5953 } |
5971 | 5954 |
5972 //----- (0047F469) -------------------------------------------------------- | 5955 //----- (0047F469) -------------------------------------------------------- |
5973 int __stdcall GridCellToWorldPosX(int a1) | 5956 int GridCellToWorldPosX(int a1) |
5974 { | 5957 { |
5975 return (a1 - 64) << 9; | 5958 return (a1 - 64) << 9; |
5976 } | 5959 } |
5977 | 5960 |
5978 //----- (0047F476) -------------------------------------------------------- | 5961 //----- (0047F476) -------------------------------------------------------- |
5979 int __stdcall GridCellToWorldPosZ(int a1) | 5962 int GridCellToWorldPosZ(int a1) |
5980 { | 5963 { |
5981 return (64 - a1) << 9; | 5964 return (64 - a1) << 9; |
5982 } | 5965 } |
5983 | 5966 |
5984 | 5967 |
6008 array_77EC08[i].field_32 = 0; | 5991 array_77EC08[i].field_32 = 0; |
6009 } | 5992 } |
6010 } | 5993 } |
6011 | 5994 |
6012 //----- (00481ED9) -------------------------------------------------------- | 5995 //----- (00481ED9) -------------------------------------------------------- |
6013 void __cdecl sub_481ED9_MessWithOutdoorCamera() | 5996 void sub_481ED9_MessWithOutdoorCamera() |
6014 { | 5997 { |
6015 stru_8019C8._48616B(65536, 0, 0, 0, 65536, 0); | 5998 stru_8019C8._48616B(65536, 0, 0, 0, 65536, 0); |
6016 pOutdoorCamera->uNumPolygons = 0; | 5999 pOutdoorCamera->uNumPolygons = 0; |
6017 pOutdoorCamera->uNumEdges = 0; | 6000 pOutdoorCamera->uNumEdges = 0; |
6018 pOutdoorCamera->uNumSpans = 0; | 6001 pOutdoorCamera->uNumSpans = 0; |
6187 } | 6170 } |
6188 else | 6171 else |
6189 return y_x1z1; | 6172 return y_x1z1; |
6190 } | 6173 } |
6191 | 6174 |
6192 //----- (00482A90) -------------------------------------------------------- | |
6193 signed int __cdecl const_1_0() | |
6194 { | |
6195 return 1; | |
6196 } | |
6197 | |
6198 | 6175 |
6199 | 6176 |
6200 | 6177 |
6201 | 6178 |
6202 //----- (00485F53) -------------------------------------------------------- | 6179 //----- (00485F53) -------------------------------------------------------- |
6203 void __thiscall sr_485F53(Vec2_int_ *v) | 6180 void sr_485F53(Vec2_int_ *v) |
6204 { | 6181 { |
6205 ++v->y; | 6182 ++v->y; |
6206 if ( v->y > 1000 ) | 6183 if ( v->y > 1000 ) |
6207 v->y = 0; | 6184 v->y = 0; |
6208 } | 6185 } |
6724 } | 6701 } |
6725 } | 6702 } |
6726 } | 6703 } |
6727 | 6704 |
6728 //----- (00443F95) -------------------------------------------------------- | 6705 //----- (00443F95) -------------------------------------------------------- |
6729 void __cdecl OnMapLeave() | 6706 void OnMapLeave() |
6730 { | 6707 { |
6731 _evt_raw *test_event; | 6708 _evt_raw *test_event; |
6732 if ( uLevelEVT_NumEvents > 0 ) | 6709 if ( uLevelEVT_NumEvents > 0 ) |
6733 { | 6710 { |
6734 for (uint i = 0; i < uLevelEVT_NumEvents; ++i) | 6711 for (uint i = 0; i < uLevelEVT_NumEvents; ++i) |
6915 if (uLevelStrFileSize) | 6892 if (uLevelStrFileSize) |
6916 LoadLevel_InitializeLevelStr(); | 6893 LoadLevel_InitializeLevelStr(); |
6917 } | 6894 } |
6918 | 6895 |
6919 //----- (00444564) -------------------------------------------------------- | 6896 //----- (00444564) -------------------------------------------------------- |
6920 const char *__cdecl sub_444564() | 6897 const char * sub_444564() |
6921 { | 6898 { |
6922 double v0; // st7@3 | 6899 double v0; // st7@3 |
6923 int v1; // ebx@3 | 6900 int v1; // ebx@3 |
6924 int v2; // edi@3 | 6901 int v2; // edi@3 |
6925 int v3; // eax@3 | 6902 int v3; // eax@3 |
7045 pGUIWindow2->CreateButton(407, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); | 7022 pGUIWindow2->CreateButton(407, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); |
7046 } | 7023 } |
7047 } | 7024 } |
7048 | 7025 |
7049 //----- (004452BB) -------------------------------------------------------- | 7026 //----- (004452BB) -------------------------------------------------------- |
7050 void __cdecl sub_4452BB() | 7027 void sub_4452BB() |
7051 { | 7028 { |
7052 pGUIWindow2->Release(); | 7029 pGUIWindow2->Release(); |
7053 pGUIWindow2 = 0; | 7030 pGUIWindow2 = 0; |
7054 activeLevelDecoration = _591094_decoration; | 7031 activeLevelDecoration = _591094_decoration; |
7055 EventProcessor(dword_5C3418, 0, 1, dword_5C341C); | 7032 EventProcessor(dword_5C3418, 0, 1, dword_5C341C); |
7434 } | 7411 } |
7435 } | 7412 } |
7436 } | 7413 } |
7437 | 7414 |
7438 //----- (00448B45) -------------------------------------------------------- | 7415 //----- (00448B45) -------------------------------------------------------- |
7439 void __thiscall GameUI_StatusBar_UpdateTimedString(unsigned int bForceHide) | 7416 void GameUI_StatusBar_UpdateTimedString(unsigned int bForceHide) |
7440 { | 7417 { |
7441 if ( bForceHide || GameUI_Footer_TimeLeft && GetTickCount() >= GameUI_Footer_TimeLeft ) | 7418 if ( bForceHide || GameUI_Footer_TimeLeft && GetTickCount() >= GameUI_Footer_TimeLeft ) |
7442 GameUI_Footer_TimeLeft = 0; | 7419 GameUI_Footer_TimeLeft = 0; |
7443 } | 7420 } |
7444 | 7421 |
7795 if ( !GameUI_Footer_TimeLeft ) | 7772 if ( !GameUI_Footer_TimeLeft ) |
7796 ShowStatusBarString(pGlobalTXT_LocalizationStrings[521], 2u);// Nothing here | 7773 ShowStatusBarString(pGlobalTXT_LocalizationStrings[521], 2u);// Nothing here |
7797 } | 7774 } |
7798 | 7775 |
7799 //----- (0044C28B) -------------------------------------------------------- | 7776 //----- (0044C28B) -------------------------------------------------------- |
7800 signed int __cdecl const_2() | 7777 int const_2() |
7801 { | 7778 { |
7802 return 2; | 7779 return 2; |
7803 } | 7780 } |
7804 | 7781 |
7805 //----- (0044C28F) -------------------------------------------------------- | 7782 //----- (0044C28F) -------------------------------------------------------- |
7806 bool __cdecl sub_44C28F_open_nwc_dungeon() | 7783 bool TeleportToNWCDungeon() |
7807 { | 7784 { |
7808 bool result; // eax@1 | 7785 if (!_stricmp("nwc.blv", pCurrentMapName.data())) |
7809 | 7786 return false; |
7810 result = _stricmp("nwc.blv", pCurrentMapName.data()); | 7787 |
7811 if ( result ) | 7788 _5B65A8_npcdata_uflags_or_other = 0; |
7812 { | 7789 _5B65AC_npcdata_fame_or_other = 0; |
7813 _5B65A8_npcdata_uflags_or_other = 0; | 7790 _5B65B0_npcdata_rep_or_other = 0; |
7814 _5B65AC_npcdata_fame_or_other = 0; | 7791 _5B65B4_npcdata_loword_house_or_other = 0; |
7815 _5B65B0_npcdata_rep_or_other = 0; | 7792 _5B65B8_npcdata_hiword_house_or_other = 0; |
7816 _5B65B4_npcdata_loword_house_or_other = 0; | 7793 dword_5B65BC = 0; |
7817 _5B65B8_npcdata_hiword_house_or_other = 0; | 7794 dword_5B65C0 = 0; |
7818 dword_5B65BC = 0; | 7795 |
7819 dword_5B65C0 = 0; | 7796 pGameLoadingUI_ProgressBar->uType = GUIProgressBar::TYPE_Fullscreen; |
7820 pGameLoadingUI_ProgressBar->uType = GUIProgressBar::TYPE_Fullscreen; | 7797 sub_44987B("nwc.blv", MapStartPoint_Party); |
7821 sub_44987B("nwc.blv", MapStartPoint_Party); | 7798 pCurrentScreen = SCREEN_GAME; |
7822 pCurrentScreen = SCREEN_GAME; | 7799 return true; |
7823 result = 1; | |
7824 } | |
7825 return result; | |
7826 } | 7800 } |
7827 | 7801 |
7828 //----- (0044C2F4) -------------------------------------------------------- | 7802 //----- (0044C2F4) -------------------------------------------------------- |
7829 bool LevelDecoration::IsInteractive() | 7803 bool LevelDecoration::IsInteractive() |
7830 { | 7804 { |
7888 v14 = v13 + 6.7553994e15; | 7862 v14 = v13 + 6.7553994e15; |
7889 this->z = LODWORD(v14); | 7863 this->z = LODWORD(v14); |
7890 } | 7864 } |
7891 | 7865 |
7892 //----- (00401000) -------------------------------------------------------- | 7866 //----- (00401000) -------------------------------------------------------- |
7893 void __stdcall mm7__vector_constructor(void *a1, int objSize, int numObjs, int (__thiscall *constructor)(int)) | 7867 void mm7__vector_constructor(void *a1, int objSize, int numObjs, int ( *constructor)(int)) |
7894 { | 7868 { |
7895 void *v4; // esi@2 | 7869 void *v4; // esi@2 |
7896 int v5; // edi@2 | 7870 int v5; // edi@2 |
7897 | 7871 |
7898 if ( numObjs - 1 >= 0 ) | 7872 if ( numObjs - 1 >= 0 ) |
7906 --v5; | 7880 --v5; |
7907 } | 7881 } |
7908 while ( v5 ); | 7882 while ( v5 ); |
7909 } | 7883 } |
7910 } | 7884 } |
7911 | |
7912 // 4F75D8: using guessed type int ai_arrays_size; | |
7913 | |
7914 // 4F75D8: using guessed type int ai_arrays_size; | |
7915 | 7885 |
7916 //----- (0040261D) -------------------------------------------------------- | 7886 //----- (0040261D) -------------------------------------------------------- |
7917 int stru298::Add(__int16 uID, __int16 a3, __int16 x, __int16 y, __int16 z, char a7, char a8) | 7887 int stru298::Add(__int16 uID, __int16 a3, __int16 x, __int16 y, __int16 z, char a7, char a8) |
7918 { | 7888 { |
7919 int result; // eax@1 | 7889 int result; // eax@1 |