diff Player.cpp @ 1461:845907a747d3

Merge
author Gloval
date Wed, 21 Aug 2013 20:59:16 +0400
parents ff2118028c71 2ca62c9e7b3c
children a109bb203e28
line wrap: on
line diff
--- a/Player.cpp	Wed Aug 21 20:58:36 2013 +0400
+++ b/Player.cpp	Wed Aug 21 20:59:16 2013 +0400
@@ -162,7 +162,7 @@
 
 
 //----- (00490913) --------------------------------------------------------
-signed int __cdecl PlayerCreation_GetUnspentAttributePointCount()
+int PlayerCreation_GetUnspentAttributePointCount()
 {
   signed int v0; // edi@1
   int raceId; // ebx@2
@@ -5635,7 +5635,7 @@
 }
 
 //----- (004905F5) --------------------------------------------------------
-//signed int __thiscall PartyCreation_BtnPlusClick(Player *this, int eAttribute)
+//signed int  PartyCreation_BtnPlusClick(Player *this, int eAttribute)
 void Player::IncreaseAttribute( int eAttribute )
 {
   int raceId; // eax@1
@@ -6287,9 +6287,9 @@
         return;
         }
     else
-        {
-        if ( pParty->pPickedItem.uItemID == 616 ) //Genie Lamp
-            {
+    {
+      if (pParty->pPickedItem.uItemID == 616) //Genie Lamp
+      {
             thisa = pParty->uCurrentMonthWeek + 1;
             if ( pParty->uCurrentMonth >= 7 )
                 v74 = NULL;
@@ -6376,7 +6376,7 @@
                 }
             ShowStatusBarString(pTmpBuf.data(), 2u);
             pMouse->RemoveHoldingItem();
-            pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, player_num - 1);
+            pGame->pStru6Instance->SetPlayerBuffAnim(SPELL_QUEST_COMPLETED, player_num - 1);
             v3->PlaySound(SPEECH_93, 0);
             pAudioPlayer->PlaySound((SoundID)219, 0, 0, -1, 0, 0, 0, 0);
             if ( pParty->uDaysPlayed == 6 || pParty->uDaysPlayed == 20 )
@@ -6397,36 +6397,35 @@
             return;
             }
         else if ( pParty->pPickedItem.uItemID == 630 ) //Red Apple
-            {
+        {
             Party::GiveFood(1u);
-            pAudioPlayer->PlaySound((SoundID)(SOUND_PlayerCantCastSpell|0x2), 0, 0, -1, 0, 0, 0, 0);
-
-            }
+            pAudioPlayer->PlaySound(SOUND_EatApple, 0, 0, -1, 0, 0, 0, 0);
+        }
         else if ( pParty->pPickedItem.uItemID == 632 ) //Lute
                 {
-                pAudioPlayer->PlaySound((SoundID)133,  0, 0, -1, 0, 0, 0, 0);
+                pAudioPlayer->PlaySound(SOUND_PlayLute,  0, 0, -1, 0, 0, 0, 0);
                 return;
                 }
         else if ( pParty->pPickedItem.uItemID == 633 ) //Faerie Pipes
                 {
-                pAudioPlayer->PlaySound((SoundID)134,  0, 0, -1, 0, 0, 0, 0);
+                pAudioPlayer->PlaySound(SOUND_PlayFaeriePipes,  0, 0, -1, 0, 0, 0, 0);
                 return;
                 }
         else if ( pParty->pPickedItem.uItemID == 634 ) //Gryphonheart's Trumpet
                 {
-                pAudioPlayer->PlaySound((SoundID)135,  0, 0, -1, 0, 0, 0, 0);
+                pAudioPlayer->PlaySound(SOUND_PlayGryphonheartsTrumpet,  0, 0, -1, 0, 0, 0, 0);
                 return;
                 }
         else if ( pParty->pPickedItem.uItemID == 646 ) //Horseshoe
-                {
-                pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, player_num - 1);
-                v5 = PID(OBJECT_Player,player_num + 49);
+        {
+                pGame->pStru6Instance->SetPlayerBuffAnim(SPELL_QUEST_COMPLETED, player_num - 1);
+                v5 = PID(OBJECT_Player, player_num + 49);
                 pAudioPlayer->PlaySound(SOUND_20001, v5, 0, -1, 0, 0, 0, 0);
                 v3->AddVariable(VAR_NumSkillPoints, 2);
                 }
         else if ( pParty->pPickedItem.uItemID == 650 ) //Temple in a Bottle
                     {
-                    sub_44C28F_open_nwc_dungeon();
+                    TeleportToNWCDungeon();
                     return;
                     }
         else
@@ -8683,14 +8682,14 @@
 
 
 //----- (0049387A) --------------------------------------------------------
-int CycleCharacter(unsigned int _this)
+int CycleCharacter(bool backwards)
 {
   signed int result; // eax@1
   signed int v2; // ecx@2
   signed int v3; // ecx@8
 
   result = uActiveCharacter;
-  if ( _this )
+  if ( backwards )
   {
     v2 = 0;
     while ( 1 )
@@ -8784,7 +8783,7 @@
   return false;
 }
 //----- (0043EDB9) --------------------------------------------------------
-bool __thiscall sub_43EDB9_get_some_race_sex_relation_2(unsigned int a1)
+bool  sub_43EDB9_get_some_race_sex_relation_2(unsigned int a1)
 {
   unsigned int pNum; // ebp@1
   Player **pPlayer; // ebx@1
@@ -9371,7 +9370,7 @@
   }
 }
 //----- (00421EA6) --------------------------------------------------------
-void __cdecl OnInventoryLeftClick()
+void  OnInventoryLeftClick()
 {
   Player *v0; // ebx@1
   signed int v1; // eax@2