comparison Player.cpp @ 130:1c471f3629fb

Party expressions update
author Nomad
date Mon, 11 Feb 2013 19:40:49 +0200
parents acff5a5d563b
children 9b0d651821f1
comparison
equal deleted inserted replaced
122:48bea61a12a5 130:1c471f3629fb
667 } 667 }
668 } 668 }
669 if ( pSoundList->pSounds[v17].pSoundData[0] ) 669 if ( pSoundList->pSounds[v17].pSoundData[0] )
670 pPlayerNum = (sLastTrackLengthMS << 7) / 1000; 670 pPlayerNum = (sLastTrackLengthMS << 7) / 1000;
671 } 671 }
672 LOWORD(v14) = pPlayer2->PlayEmotion(pExpression, pPlayerNum); 672 LOWORD(v14) = pPlayer2->PlayEmotion((CHARACTER_EXPRESSION_ID)pExpression, pPlayerNum);
673 } 673 }
674 return v14; 674 return v14;
675 } 675 }
676 // 4948B1: using guessed type int var_1C[5]; 676 // 4948B1: using guessed type int var_1C[5];
677 677
678 //----- (00494A25) -------------------------------------------------------- 678 //----- (00494A25) --------------------------------------------------------
679 __int16 Player::PlayEmotion(int a2, int a3) 679 __int16 Player::PlayEmotion(CHARACTER_EXPRESSION_ID expr, int a3)
680 { 680 {
681 signed int v3; // eax@1 681 signed int v3; // eax@1
682 unsigned __int16 v4; // dx@1 682 CHARACTER_EXPRESSION_ID v4; // dx@1
683 signed int v5; // edi@15 683 signed int v5; // edi@15
684 PlayerFrame *v6; // esi@17 684 PlayerFrame *v6; // esi@17
685 signed int v7; // eax@20 685 signed int v7; // eax@20
686 686
687 LOWORD(v3) = this->uExpressionID; 687 LOWORD(v3) = this->expression;
688 v4 = a2; 688 v4 = expr;
689 if ( (short)v3 != 4 && (short)v3 != 12 || a2 != 58 ) 689 if ( (short)v3 != 4 && (short)v3 != 12 || expr != 58 )
690 { 690 {
691 v3 = (unsigned __int16)v3; 691 v3 = (unsigned __int16)v3;
692 if ( (signed int)(unsigned __int16)v3 >= 2 ) 692 if ( (signed int)(unsigned __int16)v3 >= 2 )
693 { 693 {
694 if ( v3 <= 7 ) 694 if ( v3 <= 7 )
700 if ( v3 == 12 || v3 > 97 && v3 <= 99 ) 700 if ( v3 == 12 || v3 > 97 && v3 <= 99 )
701 return v3; 701 return v3;
702 goto LABEL_15; 702 goto LABEL_15;
703 } 703 }
704 LABEL_12: 704 LABEL_12:
705 if ( a2 != 34 && a2 != 35 && a2 != 36 ) 705 if ( expr != 34 && expr != 35 && expr != 36 )
706 return v3; 706 return v3;
707 goto LABEL_15; 707 goto LABEL_15;
708 } 708 }
709 } 709 }
710 } 710 }
721 v7 = 0; 721 v7 = 0;
722 } 722 }
723 else 723 else
724 { 724 {
725 v6 = pPlayerFrameTable->pFrames; 725 v6 = pPlayerFrameTable->pFrames;
726 while ( v6->uSequenceID != a2 ) 726 while ( v6->expression != expr )
727 { 727 {
728 ++v5; 728 ++v5;
729 ++v6; 729 ++v6;
730 if ( v5 >= (signed int)pPlayerFrameTable->uNumFrames ) 730 if ( v5 >= (signed int)pPlayerFrameTable->uNumFrames )
731 goto LABEL_20; 731 goto LABEL_20;
732 } 732 }
733 v7 = v5; 733 v7 = v5;
734 } 734 }
735 v4 = a2; 735 v4 = expr;
736 LOWORD(v3) = 8 * pPlayerFrameTable->pFrames[v3].uAnimLength; 736 LOWORD(v3) = 8 * pPlayerFrameTable->pFrames[v3].uAnimLength;
737 this->uExpressionTimeLength = v3; 737 this->uExpressionTimeLength = v3;
738 } 738 }
739 this->uExpressionID = v4; 739 this->expression = v4;
740 viewparams->bRedrawGameUI = 1; 740 viewparams->bRedrawGameUI = 1;
741 return v3; 741 return v3;
742 } 742 }
743 743
744 //----- (0049327B) -------------------------------------------------------- 744 //----- (0049327B) --------------------------------------------------------
2277 _ranged_atk_bonus = 0; 2277 _ranged_atk_bonus = 0;
2278 field_1A95 = 0; 2278 field_1A95 = 0;
2279 _ranged_dmg_bonus = 0; 2279 _ranged_dmg_bonus = 0;
2280 field_1A97 = 0; 2280 field_1A97 = 0;
2281 2281
2282 uExpressionID = 0; 2282 expression = CHARACTER_EXPRESSION_INVALID;
2283 uExpressionTimePassed = 0; 2283 uExpressionTimePassed = 0;
2284 uExpressionTimeLength = 0; 2284 uExpressionTimeLength = 0;
2285 2285
2286 uNumDivineInterventionCastsThisDay = 0; 2286 uNumDivineInterventionCastsThisDay = 0;
2287 uNumArmageddonCasts = 0; 2287 uNumArmageddonCasts = 0;