comparison Player.cpp @ 828:0f56abdcce94

Massive refactors of spells + PID (packed id) macros introduced.
author Nomad
date Wed, 27 Mar 2013 00:27:38 +0200
parents 5e3f4bf3b8e6
children dfd683c4f538
comparison
equal deleted inserted replaced
824:fe4c8b113548 828:0f56abdcce94
23 #include "Autonotes.h" 23 #include "Autonotes.h"
24 #include "Awards.h" 24 #include "Awards.h"
25 #include "texts.h" 25 #include "texts.h"
26 26
27 #include "mm7_data.h" 27 #include "mm7_data.h"
28 #include "MM7.h"
28 29
29 30
30 31
31 32
32 33
580 signed int v7; // ecx@5 581 signed int v7; // ecx@5
581 unsigned __int8 v8; // al@6 582 unsigned __int8 v8; // al@6
582 int v9; // eax@10 583 int v9; // eax@10
583 //unsigned int pVoiceID; // ecx@10 584 //unsigned int pVoiceID; // ecx@10
584 int v11; // esi@10 585 int v11; // esi@10
585 signed int v12; // eax@11 586 //signed int v12; // eax@11
586 signed int v13; // esi@12 587 signed int v13; // esi@12
587 int v14; // eax@12 588 int v14; // eax@12
588 //int v15; // eax@17 589 //int v15; // eax@17
589 CHARACTER_EXPRESSION_ID expression; // ebx@17 590 CHARACTER_EXPRESSION_ID expression; // ebx@17
590 signed int v17; // ecx@19 591 signed int v17; // ecx@19
627 v11 = v20[v9 % v5]; 628 v11 = v20[v9 % v5];
628 629
629 if (int _v1 = byte_4ECF08[v11 - 1][uVoiceID]) 630 if (int _v1 = byte_4ECF08[v11 - 1][uVoiceID])
630 { 631 {
631 pSoundId = rand() % _v1 + 2 * (v11 + 50 * uVoiceID) + 4998; 632 pSoundId = rand() % _v1 + 2 * (v11 + 50 * uVoiceID) + 4998;
632 v12 = (8 * pPlayerNum + 312) | OBJECT_Player; 633 pAudioPlayer->PlaySound((SoundID)pSoundId, PID(OBJECT_Player, pPlayerNum + 39), 0, -1, 0, 0, pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f, 0);
633 pAudioPlayer->PlaySound((SoundID)pSoundId, v12, 0, -1, 0, 0, pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f, 0);
634 } 634 }
635 } 635 }
636 } 636 }
637 637
638 v13 = 0; 638 v13 = 0;
4547 } 4547 }
4548 4548
4549 //----- (0048E96A) -------------------------------------------------------- 4549 //----- (0048E96A) --------------------------------------------------------
4550 void Player::SetRecoveryTime(signed int rec) 4550 void Player::SetRecoveryTime(signed int rec)
4551 { 4551 {
4552 assert(rec > 0); 4552 assert(rec >= 0);
4553 4553
4554 if (rec > uTimeToRecovery) 4554 if (rec > uTimeToRecovery)
4555 uTimeToRecovery = rec; 4555 uTimeToRecovery = rec;
4556 4556
4557 if (pPlayers[uActiveCharacter] == this && !some_active_character) 4557 if (pPlayers[uActiveCharacter] == this && !some_active_character)