comparison mm7_5.cpp @ 1793:4dee76d79c78

dword_5B65CC to npcIdToDismissAfterDialogue, Party::field_709 to Party::hirelingScrollPosition
author Grumpy7
date Sun, 06 Oct 2013 09:19:12 +0200
parents 421c29d4ab3e
children 35c1e4ff6ba7
comparison
equal deleted inserted replaced
1792:3155be890554 1793:4dee76d79c78
355 //++pNPCData4; 355 //++pNPCData4;
356 //} 356 //}
357 //while ( _this < (signed int)pNPCStats->uNumNewNPCs ); 357 //while ( _this < (signed int)pNPCStats->uNumNewNPCs );
358 } 358 }
359 359
360 if ( (signed int)(hireling_idx + (unsigned __int8)pParty->field_709) < uAction ) 360 if ( (signed int)(hireling_idx + pParty->hirelingScrollPosition) < uAction )
361 { 361 {
362 //Actor::Actor(&actor); 362 //Actor::Actor(&actor);
363 memset(&actor, 0, 0x344u); 363 memset(&actor, 0, 0x344u);
364 actor.sNPC_ID += -1 - (unsigned __int8)pParty->field_709 - hireling_idx; 364 actor.sNPC_ID += -1 - pParty->hirelingScrollPosition - hireling_idx;
365 pActor = &actor; 365 pActor = &actor;
366 GameUI_InitializeDialogue(&actor, true); 366 GameUI_InitializeDialogue(&actor, true);
367 } 367 }
368 } 368 }
369 continue; 369 continue;
1341 continue; 1341 continue;
1342 case SCREEN_INPUT_BLV://click escape 1342 case SCREEN_INPUT_BLV://click escape
1343 if ( uCurrentHouse_Animation == 153 ) 1343 if ( uCurrentHouse_Animation == 153 )
1344 PlayHouseSound(0x99u, HouseSound_Greeting_2); 1344 PlayHouseSound(0x99u, HouseSound_Greeting_2);
1345 pVideoPlayer->Unload(); 1345 pVideoPlayer->Unload();
1346 if ( dword_5B65CC ) 1346 if ( npcIdToDismissAfterDialogue )
1347 { 1347 {
1348 pParty->field_709 = 0; 1348 pParty->hirelingScrollPosition = 0;
1349 LOBYTE(pNPCStats->pNewNPCData[dword_5B65CC].uFlags) &= 0x7Fu; 1349 LOBYTE(pNPCStats->pNewNPCData[npcIdToDismissAfterDialogue].uFlags) &= 0x7Fu;
1350 pParty->CountHirelings(); 1350 pParty->CountHirelings();
1351 viewparams->bRedrawGameUI = true; 1351 viewparams->bRedrawGameUI = true;
1352 dword_5B65CC = 0; 1352 npcIdToDismissAfterDialogue = 0;
1353 } 1353 }
1354 DialogueEnding(); 1354 DialogueEnding();
1355 pCurrentScreen = SCREEN_GAME; 1355 pCurrentScreen = SCREEN_GAME;
1356 viewparams->bRedrawGameUI = true; 1356 viewparams->bRedrawGameUI = true;
1357 continue; 1357 continue;
1358 case SCREEN_NPC_DIALOGUE://click escape 1358 case SCREEN_NPC_DIALOGUE://click escape
1359 if ( dword_5B65CC ) 1359 if ( npcIdToDismissAfterDialogue )
1360 { 1360 {
1361 pParty->field_709 = 0; 1361 pParty->hirelingScrollPosition = 0;
1362 LOBYTE(pNPCStats->pNewNPCData[dword_5B65CC].uFlags) &= 0x7Fu; 1362 LOBYTE(pNPCStats->pNewNPCData[npcIdToDismissAfterDialogue].uFlags) &= 0x7Fu;
1363 pParty->CountHirelings(); 1363 pParty->CountHirelings();
1364 viewparams->bRedrawGameUI = true; 1364 viewparams->bRedrawGameUI = true;
1365 dword_5B65CC = 0; 1365 npcIdToDismissAfterDialogue = 0;
1366 } 1366 }
1367 //goto LABEL_317; 1367 //goto LABEL_317;
1368 DialogueEnding(); 1368 DialogueEnding();
1369 pCurrentScreen = SCREEN_GAME; 1369 pCurrentScreen = SCREEN_GAME;
1370 viewparams->bRedrawGameUI = true; 1370 viewparams->bRedrawGameUI = true;
1572 case UIMSG_ScrollNPCPanel://Right and Left button for NPCPanel 1572 case UIMSG_ScrollNPCPanel://Right and Left button for NPCPanel
1573 if ( uMessageParam ) 1573 if ( uMessageParam )
1574 { 1574 {
1575 GUIWindow::Create(626, 179, 0, 0, WINDOW_PressedButton2, (int)pBtn_NPCRight, 0); 1575 GUIWindow::Create(626, 179, 0, 0, WINDOW_PressedButton2, (int)pBtn_NPCRight, 0);
1576 v37 = (pParty->pHirelings[0].pName != 0) + (pParty->pHirelings[1].pName != 0) + (unsigned __int8)pParty->field_70A - 2; 1576 v37 = (pParty->pHirelings[0].pName != 0) + (pParty->pHirelings[1].pName != 0) + (unsigned __int8)pParty->field_70A - 2;
1577 if ( (unsigned __int8)pParty->field_709 < v37 ) 1577 if ( pParty->hirelingScrollPosition < v37 )
1578 { 1578 {
1579 ++pParty->field_709;//??? maybe number of the first cell??? 1579 ++pParty->hirelingScrollPosition;//??? maybe number of the first cell???
1580 if ( (unsigned __int8)pParty->field_709 >= v37 ) 1580 if ( pParty->hirelingScrollPosition >= v37 )
1581 pParty->field_709 = (pParty->pHirelings[0].pName != 0) + (pParty->pHirelings[1].pName != 0) + pParty->field_70A - 2; 1581 pParty->hirelingScrollPosition = (pParty->pHirelings[0].pName != 0) + (pParty->pHirelings[1].pName != 0) + pParty->field_70A - 2;
1582 } 1582 }
1583 } 1583 }
1584 else 1584 else
1585 { 1585 {
1586 GUIWindow::Create(469, 179, 0, 0, WINDOW_PressedButton2, (int)pBtn_NPCLeft, 0); 1586 GUIWindow::Create(469, 179, 0, 0, WINDOW_PressedButton2, (int)pBtn_NPCLeft, 0);
1587 if ( pParty->field_709 ) 1587 /*if ( pParty->field_709 )
1588 { 1588 {
1589 --pParty->field_709; 1589 --pParty->field_709;
1590 if ( pParty->field_709 < 1 ) 1590 if ( pParty->field_709 < 1 )
1591 pParty->field_709 = 0; 1591 pParty->field_709 = 0;
1592 } 1592 }*/
1593 } 1593 }
1594 GameUI_DrawHiredNPCs(); 1594 GameUI_DrawHiredNPCs();
1595 continue; 1595 continue;
1596 case UIMSG_TransitionUI_Confirm: 1596 case UIMSG_TransitionUI_Confirm:
1597 if ( pMessageQueue_50CBD0->uNumMessages ) 1597 if ( pMessageQueue_50CBD0->uNumMessages )