Mercurial > mm7
changeset 546:0193f10fecbf
Слияние
author | Ritor1 |
---|---|
date | Sun, 03 Mar 2013 18:39:35 +0600 |
parents | dde1083df4b7 (diff) a4fe569c0d63 (current diff) |
children | 4475d81889e6 f146781c5c2d 653724e9c234 |
files | mm7_2.cpp |
diffstat | 3 files changed, 40 insertions(+), 83 deletions(-) [+] |
line wrap: on
line diff
--- a/Events.cpp Sun Mar 03 12:22:14 2013 +0000 +++ b/Events.cpp Sun Mar 03 18:39:35 2013 +0600 @@ -849,99 +849,62 @@ pValue = EVT_DWORD(_evt->v7); if ( EVT_WORD(_evt->v5) == VAR_PlayerItemInHands ) { - v64 = 0; - if ( pParty->pPickedItem.uItemID == pValue ) + if ( pParty->pPickedItem.uItemID == pValue )//In hand { pMouse->RemoveHoldingItem(); ++curr_seq_num; v4 = v124; - - //v6 = v123; - //v7 = ""; break; } - v65 = 0; - v66 = pPlayers[uActiveCharacter]; - v67 = (int)v66->pInventoryIndices; - do + v67 = (int)pPlayers[uActiveCharacter]->pInventoryIndices; + for ( v65 = 0; v65 < 126; ++v65 ) { - if ( (int)&v66->pInventoryItems[v67] == pValue ) + if ( (int)&pPlayers[uActiveCharacter]->pInventoryItems[v67] == pValue ) { - v66->RemoveItemAtInventoryIndex(v65); + pPlayers[uActiveCharacter]->RemoveItemAtInventoryIndex(v65); ++curr_seq_num; v4 = v124; - - //v6 = v123; - //v7 = ""; break; } - ++v65; v67 += 4; } while ( (signed int)v65 < 126 ); - v68 = 0; - v69 = (int)&v66->pEquipment; - do + v69 = (int)&pPlayers[uActiveCharacter]->pEquipment; + for ( v68 = 0; v68 < 16; ++v68 ) + { + if ( *(int *)v69 && (int)&pPlayers[uActiveCharacter]->pInventoryItems[v69] == pValue ) { - if ( *(int *)v69 && (int)&v66->pInventoryItems[v69] == pValue ) + *(&pPlayers[uActiveCharacter]->pEquipment.uOffHand + v68) = 0; + ++curr_seq_num; + v4 = v124; + break; + } + v69 += 4; + } + for (int i = 1; i < 5; i++) + { + v72 = (int)pPlayers[i]->pInventoryIndices; + for ( int v71 = 0; v71 < 126; ++v71 ) + { + if ( (int)&pPlayers[i]->pInventoryItems[v72] == pValue ) { - *(&v66->pEquipment.uOffHand + v68) = 0; - ++curr_seq_num; - v4 = v124; - - //v6 = v123; - //v7 = ""; + pPlayers[i]->RemoveItemAtInventoryIndex(v71); break; } - ++v68; - v69 += 4; + v72 += 4; } - while ( v68 < 16 ); - pPlayer = pPlayers[1]; - while ( 1 ) - { - v70 = pPlayer; - if ( !v64 ) - { - v71 = 0; - v72 = (int)v70->pInventoryIndices; - do - { - if ( (int)&v70->pInventoryItems[v72] == pValue ) - { - v70->RemoveItemAtInventoryIndex(v71); - goto LABEL_169; - } - ++v71; - v72 += 4; - } - while ( (signed int)v71 < 126 ); - v73 = 0; - v74 = (int)&v70->pEquipment; - while ( !*(int *)v74 || (int)&v70->pInventoryItems[v74] != pValue ) - { - ++v73; - v74 += 4; - if ( v73 >= 16 ) - goto LABEL_170; - } - *(&v70->pEquipment.uOffHand + v73) = 0; -LABEL_169: - v64 = 1; - } -LABEL_170: - pPlayer += 4; - if ( pPlayer > pPlayers[4] ) - { - //++curr_seq_num; - v4 = v124; - - //v6 = v123; - //v7 = ""; - break; - } - } + v73 = 0; + v74 = (int)&pPlayers[i]->pEquipment; + while ( !*(int *)v74 || (int)&pPlayer->pInventoryItems[v74] != pValue ) + { + ++v73; + v74 += 4; + if ( v73 >= 16 ) + break; + } + *(&pPlayers[i]->pEquipment.uOffHand + v73) = 0; } + } if ( player_choose <= 3 ) { pPlayer = &pParty->pPlayers[player_choose]; @@ -961,10 +924,7 @@ for(int i = 0; i < 4; ++i) { if ( pPlayers[i]->SubtractVariable((enum VariableType)EVT_WORD(_evt->v5), pValue) ) - { - ++curr_seq_num; break; - } } ++v130; } @@ -974,9 +934,9 @@ pPlayer = &pParty->pPlayers[player_choose]; pPlayer->SubtractVariable((enum VariableType)EVT_WORD(_evt->v5), pValue); } - ++curr_seq_num; - v4 = v124; - break; + ++curr_seq_num; + v4 = v124; + break; case EVENT_Set: pValue = EVT_DWORD(_evt->v7); if ( player_choose <= 3 )
--- a/MM7.vcxproj.filters Sun Mar 03 12:22:14 2013 +0000 +++ b/MM7.vcxproj.filters Sun Mar 03 18:39:35 2013 +0600 @@ -127,7 +127,6 @@ <ClInclude Include="mm7_data.h" /> <ClInclude Include="Allocator.h" /> <ClInclude Include="IndoorCamera.h" /> - <ClInclude Include="LayingItem.h" /> <ClInclude Include="Viewport.h" /> <ClInclude Include="MapInfo.h" /> <ClInclude Include="PlayerFrameTable.h" /> @@ -202,6 +201,7 @@ <ClInclude Include="resource.h" /> <ClInclude Include="stru346.h" /> <ClInclude Include="texts.h" /> + <ClInclude Include="SpriteObject.h" /> </ItemGroup> <ItemGroup> <Filter Include="lib"> @@ -258,7 +258,6 @@ <ClCompile Include="stru6.cpp" /> <ClCompile Include="AudioPlayer.cpp" /> <ClCompile Include="GUIButton.cpp" /> - <ClCompile Include="LayingItem.cpp" /> <ClCompile Include="VideoPlayer.cpp" /> <ClCompile Include="GUIProgressBar.cpp" /> <ClCompile Include="TileFrameTable.h" /> @@ -321,6 +320,7 @@ <ClCompile Include="texts.cpp" /> <ClCompile Include="mm7text_ru.cpp" /> <ClCompile Include="NPC.cpp" /> + <ClCompile Include="SpriteObject.cpp" /> </ItemGroup> <ItemGroup> <ResourceCompile Include="Might and Magic Trilogy.rc" />