comparison mm7_2.cpp @ 1018:9ac94d00012e

Merge
author Grumpy7
date Tue, 21 May 2013 02:24:31 +0200
parents c45d51b3f4f4 a704435d3285
children 67e33708d815
comparison
equal deleted inserted replaced
1017:af20650a052f 1018:9ac94d00012e
862 } 862 }
863 pDialogueNPCCount = 0; 863 pDialogueNPCCount = 0;
864 pDialogueWindow->Release(); 864 pDialogueWindow->Release();
865 dialog_menu_id = HOUSE_DIALOGUE_NULL; 865 dialog_menu_id = HOUSE_DIALOGUE_NULL;
866 pDialogueWindow = 0; 866 pDialogueWindow = 0;
867 pIcons_LOD->_40F9C5(); 867 pIcons_LOD->SyncLoadedFilesCount();
868 v1 = uNumDialogueNPCPortraits; 868 v1 = uNumDialogueNPCPortraits;
869 if ( uNumDialogueNPCPortraits != 1 ) 869 if ( uNumDialogueNPCPortraits != 1 )
870 { 870 {
871 v2 = 0; 871 v2 = 0;
872 pBtn_ExitCancel = window_SpeakInHouse->pControlsHead; 872 pBtn_ExitCancel = window_SpeakInHouse->pControlsHead;
948 { 948 {
949 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)2); 949 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)2);
950 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2); 950 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);
951 return; 951 return;
952 } 952 }
953 taken_item = pPlayers[uActiveCharacter]->AddItem(0xFFFFFFFFu, bought_item->uItemID); 953 taken_item = pPlayers[uActiveCharacter]->AddItem(-1, bought_item->uItemID);
954 if ( taken_item ) 954 if ( taken_item )
955 { 955 {
956 bought_item->SetIdentified(); 956 bought_item->SetIdentified();
957 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[taken_item - 1], bought_item, 0x24u); 957 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[taken_item - 1], bought_item, 0x24u);
958 dword_F8B1E4 = 1; 958 dword_F8B1E4 = 1;
1106 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);// "You don't have enough gold" 1106 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);// "You don't have enough gold"
1107 return; 1107 return;
1108 } 1108 }
1109 } 1109 }
1110 } 1110 }
1111 v39 = pPlayers[uActiveCharacter]->AddItem(0xFFFFFFFFu, bought_item->uItemID); 1111 v39 = pPlayers[uActiveCharacter]->AddItem(-1, bought_item->uItemID);
1112 if ( v39 ) 1112 if ( v39 )
1113 { 1113 {
1114 bought_item->SetIdentified(); 1114 bought_item->SetIdentified();
1115 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v39 - 1], bought_item, sizeof(ItemGen)); 1115 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v39 - 1], bought_item, sizeof(ItemGen));
1116 if ( pPlayers[uActiveCharacter]->CanSteal() ) 1116 if ( pPlayers[uActiveCharacter]->CanSteal() )
9959 pGUIWindow_ScrollWindow = 0; 9959 pGUIWindow_ScrollWindow = 0;
9960 } 9960 }
9961 } 9961 }
9962 9962
9963 //----- (00467FB6) -------------------------------------------------------- 9963 //----- (00467FB6) --------------------------------------------------------
9964 char __cdecl CreateScrollWindow() 9964 void CreateScrollWindow()
9965 { 9965 {
9966 unsigned int v0; // eax@1 9966 unsigned int v0; // eax@1
9967 char *v1; // ST18_4@3 9967 char *v1; // ST18_4@3
9968 unsigned int v2; // eax@3 9968 unsigned int v2; // eax@3
9969 GUIWindow a1; // [sp+Ch] [bp-54h]@1 9969 GUIWindow a1; // [sp+Ch] [bp-54h]@1
9970 9970
9993 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1; 9993 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1;
9994 v1 = pItemsTable->pItems[(unsigned int)pGUIWindow_ScrollWindow->ptr_1C + 700].pName; 9994 v1 = pItemsTable->pItems[(unsigned int)pGUIWindow_ScrollWindow->ptr_1C + 700].pName;
9995 v2 = TargetColor(0xFFu, 0xFFu, 0x9Bu); 9995 v2 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
9996 sprintf(pTmpBuf, format_4E2D80, v2, v1); 9996 sprintf(pTmpBuf, format_4E2D80, v2, v1);
9997 a1.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf, 3u); 9997 a1.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf, 3u);
9998 return a1.DrawText( 9998 a1.DrawText(
9999 pFontSmallnum, 9999 pFontSmallnum,
10000 1, 10000 1,
10001 LOBYTE(pFontCreate->uFontHeight) - 3, 10001 LOBYTE(pFontCreate->uFontHeight) - 3,
10002 0, 10002 0,
10003 pScrolls[(unsigned int)pGUIWindow_ScrollWindow->ptr_1C], 10003 pScrolls[(unsigned int)pGUIWindow_ScrollWindow->ptr_1C],