Mercurial > mm7
comparison Player.cpp @ 1353:8f69f77a0067
Player::PlayEmotion removed unused variables, deleted a useless secion of code (unused calculations)
author | Grumpy7 |
---|---|
date | Sat, 13 Jul 2013 12:35:02 +0200 |
parents | 88f80476c99c |
children | 05becb008006 |
comparison
equal
deleted
inserted
replaced
1352:88f80476c99c | 1353:8f69f77a0067 |
---|---|
593 // 4948B1: using guessed type int var_1C[5]; | 593 // 4948B1: using guessed type int var_1C[5]; |
594 | 594 |
595 //----- (00494A25) -------------------------------------------------------- | 595 //----- (00494A25) -------------------------------------------------------- |
596 void Player::PlayEmotion(CHARACTER_EXPRESSION_ID new_expression, int a3) | 596 void Player::PlayEmotion(CHARACTER_EXPRESSION_ID new_expression, int a3) |
597 { | 597 { |
598 //signed int v3; // eax@1 | |
599 //CHARACTER_EXPRESSION_ID v4; // dx@1 | |
600 signed int v5; // edi@15 | |
601 PlayerFrame *v6; // esi@17 | |
602 signed int v7; // eax@20 | |
603 | |
604 //LOWORD(v3) = this->expression; | |
605 //v4 = expr; | |
606 unsigned int v3 = expression; | 598 unsigned int v3 = expression; |
607 if (expression == CHARACTER_EXPRESSION_DEAD || expression == CHARACTER_EXPRESSION_ERADICATED) | 599 if (expression == CHARACTER_EXPRESSION_DEAD || expression == CHARACTER_EXPRESSION_ERADICATED) |
608 { | 600 { |
609 return; | 601 return; |
610 } | 602 } |
620 { | 612 { |
621 return; | 613 return; |
622 } | 614 } |
623 } | 615 } |
624 } | 616 } |
625 //LOWORD(v3) = a3; | |
626 v5 = 0; | |
627 this->uExpressionTimeLength = a3; | |
628 this->uExpressionTimePassed = 0; | 617 this->uExpressionTimePassed = 0; |
629 if ( !a3 ) | 618 if ( !a3 ) |
630 { | 619 { |
631 if ( (signed int)pPlayerFrameTable->uNumFrames <= 0 ) | |
632 { | |
633 LABEL_20: | |
634 v7 = 0; | |
635 } | |
636 else | |
637 { | |
638 v6 = pPlayerFrameTable->pFrames; | |
639 while ( v6->expression != new_expression ) | |
640 { | |
641 ++v5; | |
642 ++v6; | |
643 if ( v5 >= (signed int)pPlayerFrameTable->uNumFrames ) | |
644 goto LABEL_20; | |
645 } | |
646 v7 = v5; | |
647 } | |
648 //v4 = expr; | |
649 this->uExpressionTimeLength = 8 * pPlayerFrameTable->pFrames[a3].uAnimLength; | 620 this->uExpressionTimeLength = 8 * pPlayerFrameTable->pFrames[a3].uAnimLength; |
621 } | |
622 else | |
623 { | |
624 this->uExpressionTimeLength = 0; | |
650 } | 625 } |
651 expression = new_expression; | 626 expression = new_expression; |
652 viewparams->bRedrawGameUI = 1; | 627 viewparams->bRedrawGameUI = 1; |
653 } | 628 } |
654 | 629 |