Mercurial > mm7
comparison mm7_2.cpp @ 1284:2767980b98bb
Слияние
author | Ritor1 |
---|---|
date | Sat, 15 Jun 2013 17:39:20 +0600 |
parents | f11651288371 |
children | 89210052dbb4 62f4cdaa726b |
comparison
equal
deleted
inserted
replaced
1283:2a1ca27945e1 | 1284:2767980b98bb |
---|---|
7984 MENU_STATE GetCurrentMenuID() | 7984 MENU_STATE GetCurrentMenuID() |
7985 { | 7985 { |
7986 return uCurrentMenuID; | 7986 return uCurrentMenuID; |
7987 } | 7987 } |
7988 | 7988 |
7989 | |
7990 //----- (00467E7F) -------------------------------------------------------- | |
7991 void sub_467E7F_EquipBody(ITEM_EQUIP_TYPE uEquipType) | |
7992 { | |
7993 //unsigned int v1; // esi@1 | |
7994 int v2; // ebx@1 | |
7995 Player *v3; // eax@1 | |
7996 int v4; // edx@1 | |
7997 int v5; // esi@2 | |
7998 //int v6; // eax@2 | |
7999 unsigned int v7; // eax@3 | |
8000 ItemGen _this; // [sp+Ch] [bp-30h]@1 | |
8001 //Player *v9; // [sp+30h] [bp-Ch]@1 | |
8002 int v10; // [sp+34h] [bp-8h]@1 | |
8003 int *v11; // [sp+38h] [bp-4h]@1 | |
8004 | |
8005 static unsigned char byte_4E8398[200] = // 4E8398 | |
8006 { | |
8007 1, // EQUIP_OFF_HAND | |
8008 1, // EQUIP_MAIN_HAND | |
8009 2, // EQUIP_BOW | |
8010 3, // EQUIP_ARMOUR | |
8011 0, // EQUIP_SHIELD | |
8012 4, // EQUIP_HELMET | |
8013 5, // EQUIP_BELT | |
8014 6, // EQUIP_CLOAK | |
8015 7, // EQUIP_GAUNTLETS | |
8016 8, // EQUIP_BOOTS | |
8017 10, // EQUIP_RING | |
8018 9, // EQUIP_AMULET | |
8019 1, // EQUIP_WAND | |
8020 0, // EQUIP_REAGENT | |
8021 0, // EQUIP_POTION | |
8022 0, // EQUIP_SPELL_SCROLL | |
8023 0, // EQUIP_BOOK | |
8024 0, // EQUIP_MESSAGE_SCROLL | |
8025 0, // EQUIP_GOLD | |
8026 0, // EQUIP_GEM | |
8027 0, // EQUIP_NONE | |
8028 // ??? | |
8029 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, | |
8030 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, | |
8031 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, | |
8032 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
8033 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, | |
8034 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 1, 1, 1, | |
8035 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
8036 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0 | |
8037 }; | |
8038 | |
8039 _this.Reset(); | |
8040 v2 = byte_4E8398[uEquipType]; | |
8041 v3 = pPlayers[uActiveCharacter]; | |
8042 v11 = (int *)&v3->pEquipment.pIndices[v2]; | |
8043 v4 = *v11; | |
8044 v10 = *v11; | |
8045 if ( v10 ) | |
8046 { | |
8047 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); | |
8048 v5 = (int)((char *)v3 + 4 * (9 * v4 - 9)); | |
8049 *(char *)(v5 + 556) = 0; | |
8050 pParty->pPickedItem.Reset(); | |
8051 pParty->SetHoldingItem((ItemGen *)(v5 + 532)); | |
8052 _this.uBodyAnchor = v2 + 1; | |
8053 memcpy((void *)(v5 + 532), &_this, 0x24u); | |
8054 *v11 = v10; | |
8055 } | |
8056 else | |
8057 { | |
8058 v7 = v3->FindFreeInventorySlot(); | |
8059 if (v7 >= 0) | |
8060 { | |
8061 pParty->pPickedItem.uBodyAnchor = v2 + 1; | |
8062 memcpy(&v3->pInventoryItems[v7], &pParty->pPickedItem, sizeof(v3->pInventoryItems[v7])); | |
8063 *v11 = v7 + 1; | |
8064 pMouse->RemoveHoldingItem(); | |
8065 } | |
8066 } | |
8067 } | |
8068 | |
8069 //----- (00467F48) -------------------------------------------------------- | 7989 //----- (00467F48) -------------------------------------------------------- |
8070 void CreateMsgScrollWindow( signed int mscroll_id ) | 7990 void CreateMsgScrollWindow( signed int mscroll_id ) |
8071 { | 7991 { |
8072 signed int v1; // esi@1 | 7992 signed int v1; // esi@1 |
8073 | 7993 |
8237 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); | 8157 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); |
8238 return; | 8158 return; |
8239 } | 8159 } |
8240 if ( pParty->pPickedItem.uItemID == 604 ) | 8160 if ( pParty->pPickedItem.uItemID == 604 ) |
8241 { | 8161 { |
8242 sub_467E7F_EquipBody((ITEM_EQUIP_TYPE)3); | 8162 pPlayers[uActiveCharacter]->EquipBody((ITEM_EQUIP_TYPE)3); |
8243 WetsuitOn(uActiveCharacter); | 8163 WetsuitOn(uActiveCharacter); |
8244 return; | 8164 return; |
8245 } | 8165 } |
8246 v6 = v52; | 8166 v6 = v52; |
8247 switch ( v52 ) | 8167 switch ( v52 ) |
8262 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) && (v6 != 3 || bUnderwater) ) | 8182 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) && (v6 != 3 || bUnderwater) ) |
8263 { | 8183 { |
8264 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); | 8184 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); |
8265 return; | 8185 return; |
8266 } | 8186 } |
8267 sub_467E7F_EquipBody((ITEM_EQUIP_TYPE)v6); | 8187 pPlayers[uActiveCharacter]->EquipBody((ITEM_EQUIP_TYPE)v6); |
8268 if ( pParty->pPickedItem.uItemID == 604 ) | 8188 if ( pParty->pPickedItem.uItemID == 604 ) |
8269 WetsuitOff(uActiveCharacter); | 8189 WetsuitOff(uActiveCharacter); |
8270 return; | 8190 return; |
8271 case 0xAu: | 8191 case 0xAu: |
8272 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) | 8192 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) |