comparison NPC.cpp @ 2215:e9625ad08541

fog fix and change 640,480 - window->GetWidth(), window->GetHeight()
author Ritor1
date Fri, 14 Feb 2014 18:08:30 +0600
parents d28d3c006077
children 10c909eb6766
comparison
equal deleted inserted replaced
2214:20995bb8895a 2215:e9625ad08541
1589 NPCData *v1; // edi@1 1589 NPCData *v1; // edi@1
1590 1590
1591 v0 = 0; 1591 v0 = 0;
1592 v1 = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) )];//- 1 1592 v1 = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) )];//- 1
1593 pDialogueWindow->Release(); 1593 pDialogueWindow->Release();
1594 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15Eu, WINDOW_MainMenu, 0, 0); 1594 pDialogueWindow = GUIWindow::Create(0, 0, window->GetWidth(), 350, WINDOW_MainMenu, 0, 0);
1595 pBtn_ExitCancel = pDialogueWindow->CreateButton( 0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0, 1595 pBtn_ExitCancel = pDialogueWindow->CreateButton( 471, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0,
1596 pGlobalTXT_LocalizationStrings[34], //"Cancel" 1596 pGlobalTXT_LocalizationStrings[34], //"Cancel"
1597 pIcons_LOD->GetTexture(uExitCancelTextureId), 1597 pIcons_LOD->GetTexture(uExitCancelTextureId),
1598 0); 1598 0);
1599 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); 1599 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0);
1600 if ( pNPCStats->pProfessions[v1->uProfession].pBenefits)//*(&pNPCStats->field_13A5C + 5 * v1->uProfession) ) 1600 if ( pNPCStats->pProfessions[v1->uProfession].pBenefits)//*(&pNPCStats->field_13A5C + 5 * v1->uProfession) )
1601 { 1601 {
1602 pDialogueWindow->CreateButton( 0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Du, 0, 1602 pDialogueWindow->CreateButton( 480, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Du, 0,
1603 pGlobalTXT_LocalizationStrings[407], 0);//"More Information" 1603 pGlobalTXT_LocalizationStrings[407], 0);//"More Information"
1604 v0 = 1; 1604 v0 = 1;
1605 } 1605 }
1606 pDialogueWindow->CreateButton( 0x1E0u, 30 * v0 + 160, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Cu, 0, 1606 pDialogueWindow->CreateButton( 0x1E0u, 30 * v0 + 160, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Cu, 0,
1607 pGlobalTXT_LocalizationStrings[406], 0); //"Hire" 1607 pGlobalTXT_LocalizationStrings[406], 0); //"Hire"
1626 num_menu_buttons = 0; 1626 num_menu_buttons = 0;
1627 pDialogueNPCCount = (_this + 1); 1627 pDialogueNPCCount = (_this + 1);
1628 if ( _this + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic ) 1628 if ( _this + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic )
1629 { 1629 {
1630 pDialogueWindow->Release(); 1630 pDialogueWindow->Release();
1631 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); 1631 pDialogueWindow = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_MainMenu, 0, 0);
1632 sprintfex(sHouseName.data(), pGlobalTXT_LocalizationStrings[LOCSTR_ENTER_S], pMapStats->pInfos[uHouse_ExitPic].pName); 1632 sprintfex(sHouseName.data(), pGlobalTXT_LocalizationStrings[LOCSTR_ENTER_S], pMapStats->pInfos[uHouse_ExitPic].pName);
1633 pBtn_ExitCancel = pDialogueWindow->CreateButton(566, 445, 75, 33, 1, 0, UIMSG_Escape, 0, 'N', pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0);// "Cancel" 1633 pBtn_ExitCancel = pDialogueWindow->CreateButton(566, 445, 75, 33, 1, 0, UIMSG_Escape, 0, 'N', pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0);// "Cancel"
1634 pBtn_YES = pDialogueWindow->CreateButton(486, 445, 75, 33, 1, 0, UIMSG_BF, 1, 'Y', sHouseName.data(), pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0); 1634 pBtn_YES = pDialogueWindow->CreateButton(486, 445, 75, 33, 1, 0, UIMSG_BF, 1, 'Y', sHouseName.data(), pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0);
1635 pDialogueWindow->CreateButton( pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63u, 73u, 1, 0, UIMSG_BF, 1u, 0x20u, sHouseName.data(), 0); 1635 pDialogueWindow->CreateButton( pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63u, 73u, 1, 0, UIMSG_BF, 1u, 0x20u, sHouseName.data(), 0);
1636 pDialogueWindow->CreateButton(8, 8, 460, 344, 1, 0, UIMSG_BF, 1, 0x59u, sHouseName.data(), 0); 1636 pDialogueWindow->CreateButton(8, 8, 460, 344, 1, 0, UIMSG_BF, 1, 0x59u, sHouseName.data(), 0);
1645 else 1645 else
1646 { 1646 {
1647 for ( i = 0; i < uNumDialogueNPCPortraits; ++i ) 1647 for ( i = 0; i < uNumDialogueNPCPortraits; ++i )
1648 HouseNPCPortraitsButtonsList[i]->Release(); 1648 HouseNPCPortraitsButtonsList[i]->Release();
1649 } 1649 }
1650 pDialogueWindow = GUIWindow::Create(0, 0, 640, 345, WINDOW_MainMenu, 0, 0); 1650 pDialogueWindow = GUIWindow::Create(0, 0, window->GetWidth(), 345, WINDOW_MainMenu, 0, 0);
1651 pBtn_ExitCancel = pDialogueWindow->CreateButton( 471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, 1651 pBtn_ExitCancel = pDialogueWindow->CreateButton( 471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0,
1652 pGlobalTXT_LocalizationStrings[74],// "End Conversation" 1652 pGlobalTXT_LocalizationStrings[74],// "End Conversation"
1653 pIcons_LOD->GetTexture(uExitCancelTextureId), 0); 1653 pIcons_LOD->GetTexture(uExitCancelTextureId), 0);
1654 pDialogueWindow->CreateButton(8, 8, 450, 320, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); 1654 pDialogueWindow->CreateButton(8, 8, 450, 320, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0);
1655 if ( pDialogueNPCCount == 1 && dword_591080 ) 1655 if ( pDialogueNPCCount == 1 && dword_591080 )