changeset 2460:1921b140607a

VK_CONTROL
author Ritor1
date Thu, 31 Jul 2014 13:18:42 +0600
parents e5c88c2b02ab
children ff7f4995aa25
files Game.cpp Keyboard.cpp UI/UIGuilds.cpp UI/UIShops.cpp
diffstat 4 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/Game.cpp	Wed Jul 30 11:19:53 2014 +0600
+++ b/Game.cpp	Thu Jul 31 13:18:42 2014 +0600
@@ -3575,7 +3575,7 @@
             pAudioPlayer->PlaySound((SoundID)(rand() % 2 + 204), 0, 0, -1, 0, 0, 0, 0);
           else
           {
-            if ( GetAsyncKeyState(16) )
+            if ( GetAsyncKeyState(VK_SHIFT) )
             {
               --uAction;
               if ( uAction < 0 )
--- a/Keyboard.cpp	Wed Jul 30 11:19:53 2014 +0600
+++ b/Keyboard.cpp	Thu Jul 31 13:18:42 2014 +0600
@@ -154,7 +154,7 @@
 void KeyboardActionMapping::ResetKeys()
 {
   for (uint i = 0; i < 30; ++i)
-    pToggleTypes[i] = (KeyToggleType)GetAsyncKeyState(pVirtualKeyCodesMapping[i]);
+    GetAsyncKeyState(pVirtualKeyCodesMapping[i]);
 }
 
 //----- (00459E5A) --------------------------------------------------------
@@ -638,7 +638,7 @@
           case INPUT_TurnRight:
             if (pCurrentScreen != SCREEN_GAME)
               break;
-            if ( GetAsyncKeyState(17) )         // strafing
+            if ( GetAsyncKeyState(VK_CONTROL) )         // strafing
             {
               if (pParty->bTurnBasedModeOn)
               {
--- a/UI/UIGuilds.cpp	Wed Jul 30 11:19:53 2014 +0600
+++ b/UI/UIGuilds.cpp	Thu Jul 31 13:18:42 2014 +0600
@@ -189,7 +189,7 @@
         if ( pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C - 139][i].uItemID > 0 )
           ++v8;
       }
-      GetAsyncKeyState(17);
+      GetAsyncKeyState(VK_CONTROL);
       DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[195], 0);//"Select the Item to Buy"
       if ( !v8 )
       {
--- a/UI/UIShops.cpp	Wed Jul 30 11:19:53 2014 +0600
+++ b/UI/UIShops.cpp	Thu Jul 31 13:18:42 2014 +0600
@@ -98,7 +98,7 @@
           if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID)
             ++item_num;
         }
-        if ( GetAsyncKeyState(17) && pPlayers[uActiveCharacter]->CanSteal() )
+        if ( GetAsyncKeyState(VK_CONTROL) && pPlayers[uActiveCharacter]->CanSteal() )
           pText = pGlobalTXT_LocalizationStrings[185];//Украсть предмет
         else
           pText = pGlobalTXT_LocalizationStrings[195];//Выберите предмет для покупки
@@ -109,7 +109,7 @@
           if ( pRenderer->pActiveZBuffer[mouse.x + pSRZBufferLineOffsets[mouse.y]] & 0xFFFF )
           {
             item = &pParty->StandartItemsInShops[(int)window_SpeakInHouse->ptr_1C][(pRenderer->pActiveZBuffer[mouse.x + pSRZBufferLineOffsets[mouse.y]] & 0xFFFF) - 1];
-            if ( !GetAsyncKeyState(17) || !pPlayers[uActiveCharacter]->CanSteal() )
+            if ( !GetAsyncKeyState(VK_CONTROL) || !pPlayers[uActiveCharacter]->CanSteal() )
             {
               pText = BuildDialogueString(pMerchantsBuyPhrases[pPlayers[uActiveCharacter]->SelectPhrasesTransaction(item, BuildingType_WeaponShop, (int)window_SpeakInHouse->ptr_1C, 2)],
                                        uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 2, 0);
@@ -149,7 +149,7 @@
           if ( pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID )
             ++item_num;
         }
-        if ( GetAsyncKeyState(17) && pPlayers[uActiveCharacter]->CanSteal() )
+        if ( GetAsyncKeyState(VK_CONTROL) && pPlayers[uActiveCharacter]->CanSteal() )
           pText = pGlobalTXT_LocalizationStrings[185];
         else
             pText = pGlobalTXT_LocalizationStrings[196];
@@ -160,7 +160,7 @@
           if ( pRenderer->pActiveZBuffer[mouse.x + pSRZBufferLineOffsets[mouse.y]] & 0xFFFF )
           {
             item = &pParty->SpecialItemsInShops[(int)window_SpeakInHouse->ptr_1C][(pRenderer->pActiveZBuffer[mouse.x + pSRZBufferLineOffsets[mouse.y]] & 0xFFFF) - 1];
-            if ( !GetAsyncKeyState(17) || !pPlayers[uActiveCharacter]->CanSteal() )
+            if ( !GetAsyncKeyState(VK_CONTROL) || !pPlayers[uActiveCharacter]->CanSteal() )
             {
               pText = BuildDialogueString(pMerchantsBuyPhrases[pPlayers[uActiveCharacter]->SelectPhrasesTransaction(item, BuildingType_WeaponShop, (int)window_SpeakInHouse->ptr_1C, 2)],
                                        uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 2, 0);
@@ -433,7 +433,7 @@
         if ( pParty->StandartItemsInShops[window_SpeakInHouse->par1C][i].uItemID )
           ++pItemCount;
       }
-      if ( GetAsyncKeyState(17) == 0 || pPlayers[uActiveCharacter]->CanSteal() == 0 )
+      if ( GetAsyncKeyState(VK_CONTROL) == 0 || pPlayers[uActiveCharacter]->CanSteal() == 0 )
         pText = pGlobalTXT_LocalizationStrings[195]; //"Select the Item to Buy"
       else
         pText = pGlobalTXT_LocalizationStrings[185];//"Steal item"
@@ -444,7 +444,7 @@
         if ( !(pRenderer->pActiveZBuffer[mouse.x + pSRZBufferLineOffsets[mouse.y]] & 0xFFFF) )
           return;
         selected_item = &pParty->StandartItemsInShops[window_SpeakInHouse->par1C][(pRenderer->pActiveZBuffer[mouse.x + pSRZBufferLineOffsets[mouse.y]] & 0xFFFF) - 1];
-        if ( !GetAsyncKeyState(17) || !pPlayers[uActiveCharacter]->CanSteal())
+        if ( !GetAsyncKeyState(VK_CONTROL) || !pPlayers[uActiveCharacter]->CanSteal())
         {
           pText = BuildDialogueString(pMerchantsBuyPhrases[pPlayers[uActiveCharacter]->SelectPhrasesTransaction(selected_item, BuildingType_ArmorShop, window_SpeakInHouse->par1C, 2)],
                                  uActiveCharacter - 1, selected_item, (char *)window_SpeakInHouse->ptr_1C, 2, 0);
@@ -492,7 +492,7 @@
         if (pParty->SpecialItemsInShops[window_SpeakInHouse->par1C][i].uItemID)
           ++pItemCount;
       }
-      if ( !GetAsyncKeyState(17) || !pPlayers[uActiveCharacter]->CanSteal() )
+      if ( !GetAsyncKeyState(VK_CONTROL) || !pPlayers[uActiveCharacter]->CanSteal() )
         pText = pGlobalTXT_LocalizationStrings[196]; //Select the Special Item to Buy"
       else
         pText = pGlobalTXT_LocalizationStrings[185];
@@ -507,7 +507,7 @@
           selected_item = &pParty->StandartItemsInShops[window_SpeakInHouse->par1C][(pRenderer->pActiveZBuffer[mouse.x + pSRZBufferLineOffsets[mouse.y]] & 0xFFFF) - 1];
         else
           selected_item = &pParty->SpecialItemsInShops[window_SpeakInHouse->par1C][(pRenderer->pActiveZBuffer[mouse.x + pSRZBufferLineOffsets[mouse.y]] & 0xFFFF) - 1];
-        if ( !GetAsyncKeyState(17) || !pPlayers[uActiveCharacter]->CanSteal() )
+        if ( !GetAsyncKeyState(VK_CONTROL) || !pPlayers[uActiveCharacter]->CanSteal() )
         {
           pText = BuildDialogueString(pMerchantsBuyPhrases[pPlayers[uActiveCharacter]->SelectPhrasesTransaction(selected_item, BuildingType_ArmorShop, window_SpeakInHouse->par1C, 2)],
                  uActiveCharacter - 1, selected_item, (char *)window_SpeakInHouse->ptr_1C, 2, 0);
@@ -808,7 +808,7 @@
           if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID)
             ++item_num;
         }
-        if ( GetAsyncKeyState(17) && pPlayers[uActiveCharacter]->CanSteal() )
+        if ( GetAsyncKeyState(VK_CONTROL) && pPlayers[uActiveCharacter]->CanSteal() )
           DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[185], 0);
         else
           DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[195], 0);
@@ -821,7 +821,7 @@
         if ( pRenderer->pActiveZBuffer[mouse.x + pSRZBufferLineOffsets[mouse.y]] & 0xFFFF )
         {
           item = &pParty->StandartItemsInShops[(int)window_SpeakInHouse->ptr_1C][(pRenderer->pActiveZBuffer[mouse.x + pSRZBufferLineOffsets[mouse.y]] & 0xFFFF) - 1];
-          if ( !GetAsyncKeyState(17) || !pPlayers[uActiveCharacter]->CanSteal() )
+          if ( !GetAsyncKeyState(VK_CONTROL) || !pPlayers[uActiveCharacter]->CanSteal() )
           {
             v71 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(item, BuildingType_AlchemistShop, (int)window_SpeakInHouse->ptr_1C, 2);
             pText = BuildDialogueString(pMerchantsBuyPhrases[v71], uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 2, 0);
@@ -896,7 +896,7 @@
           if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][i].uItemID)
             ++item_num;
         }
-        if ( GetAsyncKeyState(17) && pPlayers[uActiveCharacter]->CanSteal() )
+        if ( GetAsyncKeyState(VK_CONTROL) && pPlayers[uActiveCharacter]->CanSteal() )
           DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[185], 0);
         else
           DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[196], 0);
@@ -909,7 +909,7 @@
         if ( pRenderer->pActiveZBuffer[mouse.x + pSRZBufferLineOffsets[mouse.y]] & 0xFFFF )
         {
           item = &pParty->SpecialItemsInShops[(int)window_SpeakInHouse->ptr_1C][(pRenderer->pActiveZBuffer[mouse.x + pSRZBufferLineOffsets[mouse.y]] & 0xFFFF) - 1];
-          if ( !GetAsyncKeyState(17) || !pPlayers[uActiveCharacter]->CanSteal() )
+          if ( !GetAsyncKeyState(VK_CONTROL) || !pPlayers[uActiveCharacter]->CanSteal() )
           {
             v71 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction(item, BuildingType_AlchemistShop, (int)window_SpeakInHouse->ptr_1C, 2);
             pText = BuildDialogueString(pMerchantsBuyPhrases[v71], uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 2, 0);