comparison mm7_5.cpp @ 604:8724a4b3ca45

Слияние
author Ritor1
date Thu, 07 Mar 2013 09:15:15 +0600
parents 628694cd5744
children 5cfb5dadf330
comparison
equal deleted inserted replaced
603:ac6fe92c7e36 604:8724a4b3ca45
297 if ( bDialogueUI_InitializeActor_NPC_ID ) 297 if ( bDialogueUI_InitializeActor_NPC_ID )
298 { 298 {
299 //Actor::Actor(&actor); 299 //Actor::Actor(&actor);
300 memset(&actor, 0, 0x344u); 300 memset(&actor, 0, 0x344u);
301 dword_5B65D0_dialogue_actor_npc_id = bDialogueUI_InitializeActor_NPC_ID; 301 dword_5B65D0_dialogue_actor_npc_id = bDialogueUI_InitializeActor_NPC_ID;
302 actor.uNPC_ID = bDialogueUI_InitializeActor_NPC_ID; 302 actor.sNPC_ID = bDialogueUI_InitializeActor_NPC_ID;
303 actor.InitializeDialogue(0); 303 actor.InitializeDialogue(0);
304 bDialogueUI_InitializeActor_NPC_ID = 0; 304 bDialogueUI_InitializeActor_NPC_ID = 0;
305 } 305 }
306 if ( pMessageQueue_50CBD0->uNumMessages ) 306 if ( pMessageQueue_50CBD0->uNumMessages )
307 { 307 {
327 if ( !uActiveCharacter ) 327 if ( !uActiveCharacter )
328 continue; 328 continue;
329 viewparams->field_48 = v0; 329 viewparams->field_48 = v0;
330 if ( pMessageQueue_50CBD0->uNumMessages ) 330 if ( pMessageQueue_50CBD0->uNumMessages )
331 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; 331 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
332 dword_5B65D0_dialogue_actor_npc_id = pActors[uMessageParam].uNPC_ID; 332 dword_5B65D0_dialogue_actor_npc_id = pActors[uMessageParam].sNPC_ID;
333 pActor = &pActors[uMessageParam]; 333 pActor = &pActors[uMessageParam];
334 //goto _actor_init_dlg; 334 //goto _actor_init_dlg;
335 pActor->InitializeDialogue(v0); 335 pActor->InitializeDialogue(v0);
336 continue; 336 continue;
337 case UIMSG_StartHireling1Dialogue: 337 case UIMSG_StartHireling1Dialogue:
381 381
382 if ( (signed int)(hireling_idx + (unsigned __int8)pParty->field_709) < uAction ) 382 if ( (signed int)(hireling_idx + (unsigned __int8)pParty->field_709) < uAction )
383 { 383 {
384 //Actor::Actor(&actor); 384 //Actor::Actor(&actor);
385 memset(&actor, 0, 0x344u); 385 memset(&actor, 0, 0x344u);
386 actor.uNPC_ID += -1 - (unsigned __int8)pParty->field_709 - hireling_idx; 386 actor.sNPC_ID += -1 - (unsigned __int8)pParty->field_709 - hireling_idx;
387 pActor = &actor; 387 pActor = &actor;
388 pActor->InitializeDialogue(v0); 388 pActor->InitializeDialogue(v0);
389 } 389 }
390 } 390 }
391 continue; 391 continue;
15809 } 15809 }
15810 } 15810 }
15811 } 15811 }
15812 if ( (signed int)((char *)v17 + (unsigned __int8)pParty->field_709) < v1 ) 15812 if ( (signed int)((char *)v17 + (unsigned __int8)pParty->field_709) < v1 )
15813 { 15813 {
15814 uDialogue_SpeakingActorNPC_ID = -1 - (unsigned __int8)pParty->field_709 - (int)v17; 15814 sDialogue_SpeakingActorNPC_ID = -1 - (unsigned __int8)pParty->field_709 - (int)v17;
15815 v5 = GetNewNPCData(uDialogue_SpeakingActorNPC_ID, (int)&a2); 15815 v5 = GetNewNPCData(sDialogue_SpeakingActorNPC_ID, (int)&a2);
15816 v6 = v5; 15816 v6 = v5;
15817 if ( v5 ) 15817 if ( v5 )
15818 { 15818 {
15819 if ( a2 == 57 ) 15819 if ( a2 == 57 )
15820 v7 = pNPCTopics[512].pText; 15820 v7 = pNPCTopics[512].pText;
15976 else 15976 else
15977 { 15977 {
15978 v9 = pX + pSRZBufferLineOffsets[pY]; 15978 v9 = pX + pSRZBufferLineOffsets[pY];
15979 if ( pRenderer->pActiveZBuffer[v9] & 0xFFFF ) 15979 if ( pRenderer->pActiveZBuffer[v9] & 0xFFFF )
15980 { 15980 {
15981 v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)pChestWindow->ptr_1C + 18* *((short *)&pChests[0].igChestItems[139].uExpireTime 15981
15982 + (pRenderer->pActiveZBuffer[v9] & 0xFFFF) + 2662 * (unsigned int)pChestWindow->ptr_1C + 3)); 15982 // __debugbreak(); // invalid indexing will result in invalid object ptr
15983 // v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)pChestWindow->ptr_1C + 18* *((short *)&pChests[0].igChestItems[139].uExpireTime
15984 // + (pRenderer->pActiveZBuffer[v9] & 0xFFFF) + 2662 * (unsigned int)pChestWindow->ptr_1C + 3));
15985 v10=pChests[pChestWindow->par1C].pInventoryIndices[(pRenderer->pActiveZBuffer[v9] & 0xFFFF)-1];
15986 v8 =&pChests[pChestWindow->par1C].igChestItems[v10-1];
15983 GameUI_DrawItemInfo(v8); 15987 GameUI_DrawItemInfo(v8);
15984 } 15988 }
15985 } 15989 }
15986 break; 15990 break;
15987 } 15991 }
16022 { 16026 {
16023 if (!( (signed int)pX < 566 || (signed int)pX > 629 || (signed int)pY < 156 || (signed int)pY > 229 )) 16027 if (!( (signed int)pX < 566 || (signed int)pX > 629 || (signed int)pY < 156 || (signed int)pY > 229 ))
16024 { 16028 {
16025 pAudioPlayer->StopChannels(-1, -1); 16029 pAudioPlayer->StopChannels(-1, -1);
16026 v3 = (void *)1; 16030 v3 = (void *)1;
16027 }
16028 else
16029 {
16030 sub_416B01(v3);
16031 } 16031 }
16032 } 16032 }
16033 else 16033 else
16034 { 16034 {
16035 pAudioPlayer->StopChannels(-1, -1); 16035 pAudioPlayer->StopChannels(-1, -1);