diff Player.cpp @ 1459:2ca62c9e7b3c

Function names
author Nomad
date Wed, 21 Aug 2013 16:06:50 +0200
parents 934074e7fcc1
children 845907a747d3
line wrap: on
line diff
--- a/Player.cpp	Wed Aug 21 14:26:36 2013 +0200
+++ b/Player.cpp	Wed Aug 21 16:06:50 2013 +0200
@@ -162,7 +162,7 @@
 
 
 //----- (00490913) --------------------------------------------------------
-signed int  PlayerCreation_GetUnspentAttributePointCount()
+int PlayerCreation_GetUnspentAttributePointCount()
 {
   signed int v0; // edi@1
   int raceId; // ebx@2
@@ -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 )