comparison mm7_4.cpp @ 1413:3881d2f94eb1

UseNPCSkill DIALOGUE_USE_NPC_ABILITY
author Nomad
date Sat, 27 Jul 2013 16:09:00 +0200
parents 2423bc2af692
children 9a1adf08f4ed
comparison
equal deleted inserted replaced
1412:182d58b2a34c 1413:3881d2f94eb1
528 } 528 }
529 529
530 //----- (00487DA9) -------------------------------------------------------- 530 //----- (00487DA9) --------------------------------------------------------
531 void __cdecl sub_487DA9() 531 void __cdecl sub_487DA9()
532 { 532 {
533 char *v0; // eax@1 533 for (int i = 0; i < 20000; ++i)
534 534 array_77EC08[i].field_108 = 0;
535 v0 = &array_77EC08[0].field_108;
536 do
537 {
538 *v0 = 0;
539 v0 += 268;
540 }
541 while ( (signed int)v0 < (signed int)&pVerticesSR_801A10[4] );
542 } 535 }
543 536
544 //----- (00487DBE) -------------------------------------------------------- 537 //----- (00487DBE) --------------------------------------------------------
545 void Software_ResetNewEdges() 538 void Software_ResetNewEdges()
546 { 539 {
583 s = s_replace; 576 s = s_replace;
584 if ( v_replace != -1.0 ) 577 if ( v_replace != -1.0 )
585 v = v_replace; 578 v = v_replace;
586 HSV2RGB(&r, &g, &b, h, s, v); 579 HSV2RGB(&r, &g, &b, h, s, v);
587 580
588 return (((uint)floorf(r * 255.0f + 0.5f) & 0xFF) << 16) | 581 return (((uint)round(r * 255.0f) & 0xFF) << 16) |
589 (((uint)floorf(g * 255.0f + 0.5f) & 0xFF) << 8) | 582 (((uint)round(g * 255.0f) & 0xFF) << 8) |
590 ((uint)floorf(b * 255.0f + 0.5f) & 0xFF); 583 (((uint)round(b * 255.0f) & 0xFF));
591 } 584 }
592 585
593 //----- (0048B561) -------------------------------------------------------- 586 //----- (0048B561) --------------------------------------------------------
594 int fixpoint_from_float(float val) 587 int fixpoint_from_float(float val)
595 { 588 {
3733 else if ( (signed int)newDialogueType > 84 && (signed int)newDialogueType <= 88 ) 3726 else if ( (signed int)newDialogueType > 84 && (signed int)newDialogueType <= 88 )
3734 { 3727 {
3735 ArenaFight(); 3728 ArenaFight();
3736 return; 3729 return;
3737 } 3730 }
3738 else if(newDialogueType == DIALOGUE_9) 3731 else if(newDialogueType == DIALOGUE_USE_NPC_ABILITY)
3739 { 3732 {
3740 if ( !sub_4BB756(speakingNPC->uProfession) ) 3733 if (UseNPCSkill((NPCProf)speakingNPC->uProfession) == 0)
3741 { 3734 {
3742 if ( speakingNPC->uProfession != 41 ) 3735 if ( speakingNPC->uProfession != GateMaster )
3743 speakingNPC->bHasUsedTheAbility = 1; 3736 speakingNPC->bHasUsedTheAbility = 1;
3744 3737
3745 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); 3738 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
3746 } 3739 }
3747 else 3740 else
3748 { 3741 ShowStatusBarString(pGlobalTXT_LocalizationStrings[140], 2); //"Your packs are already full!"
3749 ShowStatusBarString(pGlobalTXT_LocalizationStrings[140], 2u); //"Your packs are already full!"
3750 }
3751 } 3742 }
3752 else if(newDialogueType == DIALOGUE_13) 3743 else if(newDialogueType == DIALOGUE_13)
3753 { 3744 {
3754 if (!speakingNPC->Hired()) 3745 if (!speakingNPC->Hired())
3755 { 3746 {