Mercurial > mm7
comparison mm7_3.cpp @ 613:5bf285f56fa8
Слияние
author | Ritor1 |
---|---|
date | Thu, 07 Mar 2013 22:45:43 +0600 |
parents | 42d5777c2f47 628694cd5744 |
children | 5cfb5dadf330 |
comparison
equal
deleted
inserted
replaced
612:346dc5fc2969 | 613:5bf285f56fa8 |
---|---|
13308 | 13308 |
13309 } | 13309 } |
13310 | 13310 |
13311 | 13311 |
13312 //----- (00443E31) -------------------------------------------------------- | 13312 //----- (00443E31) -------------------------------------------------------- |
13313 void __cdecl LoadLevel_InitializeLevelStr() | 13313 void LoadLevel_InitializeLevelStr() |
13314 { | 13314 { |
13315 | 13315 |
13316 char Args[100]; | 13316 char Args[100]; |
13317 int string_num; | 13317 int string_num; |
13318 int max_string_length; | 13318 int max_string_length; |
13319 int current_string_length; | 13319 int current_string_length; |
13415 | 13415 |
13416 auto _evt = (_evt_raw *)(pLevelEVT + pEvent.uEventOffsetInEVT); | 13416 auto _evt = (_evt_raw *)(pLevelEVT + pEvent.uEventOffsetInEVT); |
13417 | 13417 |
13418 if (_evt->_e_type == EVENT_PlaySound) | 13418 if (_evt->_e_type == EVENT_PlaySound) |
13419 { | 13419 { |
13420 pSoundList->LoadSound( | 13420 pSoundList->LoadSound(EVT_DWORD(_evt->v5), 0); |
13421 _evt->v5 + | |
13422 ((_evt->v6 + ((_evt->v7 + ((unsigned int)_evt->v8 << 8)) << 8)) << 8), | |
13423 0); | |
13424 } | 13421 } |
13425 else if (_evt->_e_type == EVENT_OnMapReload) | 13422 else if (_evt->_e_type == EVENT_OnMapReload) |
13426 { | 13423 { |
13427 start_event_seq_number = pEvent.event_sequence_num; | 13424 start_event_seq_number = pEvent.event_sequence_num; |
13428 EventProcessor(pEvent.uEventID, 0, 0); | 13425 EventProcessor(pEvent.uEventID, 0, 0); |
14123 char *pInString=NULL; // [sp+110h] [bp-4h]@32 | 14120 char *pInString=NULL; // [sp+110h] [bp-4h]@32 |
14124 | 14121 |
14125 if ( !pDialogueWindow ) | 14122 if ( !pDialogueWindow ) |
14126 return; | 14123 return; |
14127 memcpy(&v51, pDialogueWindow, sizeof(v51)); | 14124 memcpy(&v51, pDialogueWindow, sizeof(v51)); |
14128 pNPC = GetNPCData(uDialogue_SpeakingActorNPC_ID); | 14125 pNPC = GetNPCData(sDialogue_SpeakingActorNPC_ID); |
14129 v1 = sub_445C8B(uDialogue_SpeakingActorNPC_ID); | 14126 v1 = sub_445C8B(sDialogue_SpeakingActorNPC_ID); |
14130 v51.uFrameWidth -= 10; | 14127 v51.uFrameWidth -= 10; |
14131 v51.uFrameZ -= 10; | 14128 v51.uFrameZ -= 10; |
14132 //v54 = v1; | 14129 //v54 = v1; |
14133 GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); | 14130 GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); |
14134 GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); | 14131 GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u); |
14424 } | 14421 } |
14425 pRenderer->DrawTextureIndexed(471, 445, (Texture *)(uExitCancelTextureId != -1 ? &pIcons_LOD->pTextures[uExitCancelTextureId] : 0)); | 14422 pRenderer->DrawTextureIndexed(471, 445, (Texture *)(uExitCancelTextureId != -1 ? &pIcons_LOD->pTextures[uExitCancelTextureId] : 0)); |
14426 } | 14423 } |
14427 | 14424 |
14428 //----- (004459F9) -------------------------------------------------------- | 14425 //----- (004459F9) -------------------------------------------------------- |
14429 NPCData *__fastcall GetNPCData(unsigned int npcid) | 14426 NPCData *__fastcall GetNPCData(signed int npcid) |
14430 { | 14427 { |
14431 unsigned int v1; // esi@1 | 14428 unsigned int v1; // esi@1 |
14432 NPCData *result; // eax@5 | 14429 NPCData *result; // eax@5 |
14433 int v3; // esi@9 | 14430 int v3; // esi@9 |
14434 int v4; // ecx@9 | 14431 int v4; // ecx@9 |
14461 } | 14458 } |
14462 return &pNPCStats->array_13EF4[npcid - 5000]; | 14459 return &pNPCStats->array_13EF4[npcid - 5000]; |
14463 } | 14460 } |
14464 if ( (signed int)npcid >= 5000 ) | 14461 if ( (signed int)npcid >= 5000 ) |
14465 return &pNPCStats->array_13EF4[npcid - 5000]; | 14462 return &pNPCStats->array_13EF4[npcid - 5000]; |
14466 if ( (uDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 ) | 14463 if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 ) |
14467 { | 14464 { |
14468 result = 0; | 14465 result = 0; |
14469 } | 14466 } |
14470 else | 14467 else |
14471 { | 14468 { |
14472 v3 = abs((int)uDialogue_SpeakingActorNPC_ID) - 1; | 14469 v3 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1; |
14473 v4 = 0; | 14470 v4 = 0; |
14474 v5 = 0; | 14471 v5 = 0; |
14475 v6 = pParty->pHirelings; | 14472 v6 = pParty->pHirelings; |
14476 do | 14473 do |
14477 { | 14474 { |
14519 } | 14516 } |
14520 | 14517 |
14521 | 14518 |
14522 if ( npcid >= 5000 ) | 14519 if ( npcid >= 5000 ) |
14523 return &pNPCStats->pAdditionalNPC[npcid - 5000]; | 14520 return &pNPCStats->pAdditionalNPC[npcid - 5000]; |
14524 if (uDialogue_SpeakingActorNPC_ID >= 0) | 14521 if (sDialogue_SpeakingActorNPC_ID >= 0) |
14525 { | 14522 { |
14526 result = 0; | 14523 result = 0; |
14527 } | 14524 } |
14528 else | 14525 else |
14529 { | 14526 { |
14530 v3 = uDialogue_SpeakingActorNPC_ID - 1; | 14527 v3 = abs(sDialogue_SpeakingActorNPC_ID) - 1; |
14531 v4 = 0; | 14528 v4 = 0; |
14532 | 14529 |
14533 for (i = 0; i < 4; ++i) | 14530 for (i = 0; i < 2; ++i) |
14534 { | 14531 { |
14535 if (pParty->pHirelings[i].pName) | 14532 if (pParty->pHirelings[i].pName) |
14536 pTmpBuf[v4++] = i; | 14533 pTmpBuf[v4++] = i; |
14537 } | 14534 } |
14538 | 14535 |
14598 *(int *)a2 = npcid - 5000; | 14595 *(int *)a2 = npcid - 5000; |
14599 return &pNPCStats->pAdditionalNPC[npcid - 5000]; | 14596 return &pNPCStats->pAdditionalNPC[npcid - 5000]; |
14600 } | 14597 } |
14601 if ( npcid >= 5000 ) | 14598 if ( npcid >= 5000 ) |
14602 goto LABEL_7; | 14599 goto LABEL_7; |
14603 if ( (uDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 ) | 14600 if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 ) |
14604 { | 14601 { |
14605 *(int *)a2 = 0; | 14602 *(int *)a2 = 0; |
14606 result = 0; | 14603 result = 0; |
14607 } | 14604 } |
14608 else | 14605 else |
14609 { | 14606 { |
14610 v5 = abs((int)uDialogue_SpeakingActorNPC_ID) - 1; | 14607 v5 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1; |
14611 v6 = 0; | 14608 v6 = 0; |
14612 v7 = 0; | 14609 v7 = 0; |
14613 v8 = pParty->pHirelings; | 14610 v8 = pParty->pHirelings; |
14614 do | 14611 do |
14615 { | 14612 { |
14672 return 1; | 14669 return 1; |
14673 return 2; | 14670 return 2; |
14674 } | 14671 } |
14675 if ( a1 >= 5000 ) | 14672 if ( a1 >= 5000 ) |
14676 return 2; | 14673 return 2; |
14677 v3 = abs((int)uDialogue_SpeakingActorNPC_ID) - 1; | 14674 v3 = abs((int)sDialogue_SpeakingActorNPC_ID) - 1; |
14678 v4 = 0; | 14675 v4 = 0; |
14679 v5 = 0; | 14676 v5 = 0; |
14680 v6 = pParty->pHirelings; | 14677 v6 = pParty->pHirelings; |
14681 do | 14678 do |
14682 { | 14679 { |
14707 | 14704 |
14708 | 14705 |
14709 //----- (0044603D) -------------------------------------------------------- | 14706 //----- (0044603D) -------------------------------------------------------- |
14710 void __cdecl sub_44603D() | 14707 void __cdecl sub_44603D() |
14711 { | 14708 { |
14712 uDialogue_SpeakingActorNPC_ID = 0; | 14709 sDialogue_SpeakingActorNPC_ID = 0; |
14713 pDialogueWindow->Release(); | 14710 pDialogueWindow->Release(); |
14714 pDialogueWindow = 0; | 14711 pDialogueWindow = 0; |
14715 pMiscTimer->Resume(); | 14712 pMiscTimer->Resume(); |
14716 pEventTimer->Resume(); | 14713 pEventTimer->Resume(); |
14717 } | 14714 } |