Mercurial > mm7
comparison Player.cpp @ 1352:88f80476c99c
Player::PlayEmotion simplified main condition, renamed a few expression enum vals
author | Grumpy7 |
---|---|
date | Sat, 13 Jul 2013 11:56:57 +0200 |
parents | f1209ed77782 |
children | 8f69f77a0067 |
comparison
equal
deleted
inserted
replaced
1351:f1209ed77782 | 1352:88f80476c99c |
---|---|
585 } | 585 } |
586 } | 586 } |
587 if ( pSoundList->pSounds[v17].pSoundData[0] ) | 587 if ( pSoundList->pSounds[v17].pSoundData[0] ) |
588 expressionDuration = (sLastTrackLengthMS << 7) / 1000; | 588 expressionDuration = (sLastTrackLengthMS << 7) / 1000; |
589 } | 589 } |
590 /*LOWORD(v14) = */PlayEmotion(expression, expressionDuration); | 590 PlayEmotion(expression, expressionDuration); |
591 } | 591 } |
592 //return v14; | |
593 } | 592 } |
594 // 4948B1: using guessed type int var_1C[5]; | 593 // 4948B1: using guessed type int var_1C[5]; |
595 | 594 |
596 //----- (00494A25) -------------------------------------------------------- | 595 //----- (00494A25) -------------------------------------------------------- |
597 void Player::PlayEmotion(CHARACTER_EXPRESSION_ID new_expression, int a3) | 596 void Player::PlayEmotion(CHARACTER_EXPRESSION_ID new_expression, int a3) |
602 PlayerFrame *v6; // esi@17 | 601 PlayerFrame *v6; // esi@17 |
603 signed int v7; // eax@20 | 602 signed int v7; // eax@20 |
604 | 603 |
605 //LOWORD(v3) = this->expression; | 604 //LOWORD(v3) = this->expression; |
606 //v4 = expr; | 605 //v4 = expr; |
607 if (expression != CHARACTER_EXPRESSION_SLEEP && | 606 unsigned int v3 = expression; |
608 expression != CHARACTER_EXPRESSION_PERTIFIED || new_expression != CHARACTER_EXPRESSION_58) | 607 if (expression == CHARACTER_EXPRESSION_DEAD || expression == CHARACTER_EXPRESSION_ERADICATED) |
609 { | 608 { |
610 int v3 = (unsigned)expression; | 609 return; |
611 if ( (signed int)(unsigned __int16)v3 >= 2 ) | 610 } |
612 { | 611 else if (expression == CHARACTER_EXPRESSION_PERTIFIED && new_expression != CHARACTER_EXPRESSION_FALLING) |
613 if ( v3 <= 7 ) | 612 { |
614 goto LABEL_12; | 613 return; |
615 if ( v3 > 8 ) | 614 } |
616 { | 615 else |
617 if ( v3 > 11 ) | 616 { |
618 { | 617 if (expression != CHARACTER_EXPRESSION_SLEEP || new_expression != CHARACTER_EXPRESSION_FALLING) |
619 if ( v3 == CHARACTER_EXPRESSION_PERTIFIED ||( v3 > 97 && v3 <= 99) ) | 618 { |
620 return; | 619 if (v3 >= 2 && v3 <= 11 && v3 != 8 && !(new_expression == CHARACTER_EXPRESSION_DMGRECVD_MINOR || new_expression == CHARACTER_EXPRESSION_DMGRECVD_MODERATE || new_expression == CHARACTER_EXPRESSION_DMGRECVD_MAJOR)) |
621 goto LABEL_15; | 620 { |
622 } | 621 return; |
623 LABEL_12: | 622 } |
624 if (new_expression != CHARACTER_EXPRESSION_34 && new_expression != CHARACTER_EXPRESSION_35 && new_expression != CHARACTER_EXPRESSION_36) | 623 } |
625 return; | 624 } |
626 goto LABEL_15; | |
627 } | |
628 } | |
629 } | |
630 LABEL_15: | |
631 //LOWORD(v3) = a3; | 625 //LOWORD(v3) = a3; |
632 v5 = 0; | 626 v5 = 0; |
633 this->uExpressionTimeLength = a3; | 627 this->uExpressionTimeLength = a3; |
634 this->uExpressionTimePassed = 0; | 628 this->uExpressionTimePassed = 0; |
635 if ( !a3 ) | 629 if ( !a3 ) |