Mercurial > mm7
comparison mm7_5.cpp @ 199:66db86fa4ed2
Hireling dialogues
author | Nomad |
---|---|
date | Sat, 16 Feb 2013 22:20:51 +0200 |
parents | e6e348d66a75 |
children | 30aa44013f7a |
comparison
equal
deleted
inserted
replaced
198:e6e348d66a75 | 199:66db86fa4ed2 |
---|---|
67 signed int v0; // edi@6 | 67 signed int v0; // edi@6 |
68 char *v1; // esi@6 | 68 char *v1; // esi@6 |
69 unsigned int v2; // edx@7 | 69 unsigned int v2; // edx@7 |
70 Actor *pActor; // ecx@13 | 70 Actor *pActor; // ecx@13 |
71 int v4; // ecx@18 | 71 int v4; // ecx@18 |
72 NPCData *pNPCData0; // eax@18 | 72 //NPCData *pNPCData0; // eax@18 |
73 int v6; // edx@20 | 73 //int v6; // edx@20 |
74 int v7; // ecx@29 | 74 //int v7; // ecx@29 |
75 unsigned int v8; // edx@59 | 75 unsigned int v8; // edx@59 |
76 unsigned int v9; // ecx@60 | 76 unsigned int v9; // ecx@60 |
77 unsigned int v10; // ecx@73 | 77 unsigned int v10; // ecx@73 |
78 unsigned int v11; // eax@75 | 78 unsigned int v11; // eax@75 |
79 unsigned __int8 v12; // sf@75 | 79 unsigned __int8 v12; // sf@75 |
242 int v175; // [sp+0h] [bp-5FCh]@550 | 242 int v175; // [sp+0h] [bp-5FCh]@550 |
243 int v176; // [sp+0h] [bp-5FCh]@599 | 243 int v176; // [sp+0h] [bp-5FCh]@599 |
244 const char *v177; // [sp+0h] [bp-5FCh]@629 | 244 const char *v177; // [sp+0h] [bp-5FCh]@629 |
245 char *v178; // [sp+0h] [bp-5FCh]@637 | 245 char *v178; // [sp+0h] [bp-5FCh]@637 |
246 int v179; // [sp+4h] [bp-5F8h]@0 | 246 int v179; // [sp+4h] [bp-5F8h]@0 |
247 signed int _this; // [sp+14h] [bp-5E8h]@22 | 247 //signed int _this; // [sp+14h] [bp-5E8h]@22 |
248 signed int thisa; // [sp+14h] [bp-5E8h]@251 | 248 signed int thisa; // [sp+14h] [bp-5E8h]@251 |
249 signed int thisb; // [sp+14h] [bp-5E8h]@272 | 249 signed int thisb; // [sp+14h] [bp-5E8h]@272 |
250 Player *pPlayer7; // [sp+14h] [bp-5E8h]@373 | 250 Player *pPlayer7; // [sp+14h] [bp-5E8h]@373 |
251 Player *pPlayer8; // [sp+14h] [bp-5E8h]@377 | 251 Player *pPlayer8; // [sp+14h] [bp-5E8h]@377 |
252 char *thise; // [sp+14h] [bp-5E8h]@445 | 252 char *thise; // [sp+14h] [bp-5E8h]@445 |
331 dword_5B65D0_dialogue_actor_npc_id = pActors[uMessageParam].uNPC_ID; | 331 dword_5B65D0_dialogue_actor_npc_id = pActors[uMessageParam].uNPC_ID; |
332 pActor = &pActors[uMessageParam]; | 332 pActor = &pActors[uMessageParam]; |
333 //goto _actor_init_dlg; | 333 //goto _actor_init_dlg; |
334 pActor->InitializeDialogue(v0); | 334 pActor->InitializeDialogue(v0); |
335 continue; | 335 continue; |
336 case UIMSG_86: | 336 case UIMSG_StartHireling1Dialogue: |
337 case UIMSG_87: | 337 case UIMSG_StartHireling2Dialogue: |
338 if ( bNoNPCHiring != 1 && !pCurrentScreen ) | 338 { |
339 { | 339 if (bNoNPCHiring || pCurrentScreen) |
340 continue; | |
341 | |
340 if ( pMessageQueue_50CBD0->uNumMessages ) | 342 if ( pMessageQueue_50CBD0->uNumMessages ) |
341 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 343 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
342 uAction = 0; | 344 uAction = 0; |
343 uNumSeconds = uMessage - 134; | 345 uNumSeconds = uMessage - 134; |
344 v4 = 0; | 346 v4 = 0; |
345 pNPCData0 = pParty->pHirelings; | 347 |
346 do | 348 for (uint i = 0; i < 2; ++i) |
349 //pNPCData0 = pParty->pHirelings; | |
350 //do | |
347 { | 351 { |
348 if ( pNPCData0->pName ) | 352 if (pParty->pHirelings[i].pName) |
349 { | 353 //{ |
350 v6 = uAction++; | 354 //v6 = uAction++; |
351 pTmpBuf[v6] = v4; | 355 pTmpBuf[uAction++] = i; |
352 } | 356 //} |
353 ++pNPCData0; | 357 //++pNPCData0; |
354 ++v4; | 358 //++v4; |
355 } | 359 } |
356 while ( (signed int)pNPCData0 < (signed int)&pParty->pPickedItem ); | 360 //while ( (signed int)pNPCData0 < (signed int)&pParty->pPickedItem ); |
357 _this = 0; | 361 |
358 if ( (signed int)pNPCStats->uNumNewNPCs > 0 ) | 362 //_this = 0; |
363 for (uint i = 0; i < pNPCStats->uNumNewNPCs; ++i) | |
359 { | 364 { |
360 pNPCData4 = pNPCStats->pNewNPCData; | 365 auto npc = pNPCStats->pNewNPCData + i; |
361 do | 366 //do |
362 { | 367 //{ |
363 if ( pNPCData4->uFlags & 0x80 | 368 if (npc->uFlags & 0x80 && |
364 && (!pParty->pHirelings[0].pName || strcmp(pNPCData4->pName, pParty->pHirelings[0].pName)) | 369 (!pParty->pHirelings[0].pName || strcmp(npc->pName, pParty->pHirelings[0].pName)) && |
365 && (!pParty->pHirelings[1].pName || strcmp(pNPCData4->pName, pParty->pHirelings[1].pName)) ) | 370 (!pParty->pHirelings[1].pName || strcmp(npc->pName, pParty->pHirelings[1].pName)) ) |
366 { | 371 { |
367 v7 = uAction++; | 372 //v7 =; |
368 pTmpBuf[v7] = _this + 2; | 373 pTmpBuf[uAction++] = i + 2; |
369 } | 374 } |
370 ++_this; | 375 //++_this; |
371 ++pNPCData4; | 376 //++pNPCData4; |
372 } | 377 //} |
373 while ( _this < (signed int)pNPCStats->uNumNewNPCs ); | 378 //while ( _this < (signed int)pNPCStats->uNumNewNPCs ); |
374 } | 379 } |
375 if ( (signed int)(uNumSeconds + (unsigned __int8)pParty->field_709) < uAction ) | 380 if ( (signed int)(uNumSeconds + (unsigned __int8)pParty->field_709) < uAction ) |
376 { | 381 { |
377 //Actor::Actor(&actor); | 382 //Actor::Actor(&actor); |
378 memset(&actor, 0, 0x344u); | 383 memset(&actor, 0, 0x344u); |