Mercurial > mm7
comparison mm7_1.cpp @ 1018:9ac94d00012e
Merge
author | Grumpy7 |
---|---|
date | Tue, 21 May 2013 02:24:31 +0200 |
parents | c45d51b3f4f4 a704435d3285 |
children | 7735bdb3c30f |
comparison
equal
deleted
inserted
replaced
1017:af20650a052f | 1018:9ac94d00012e |
---|---|
347 } | 347 } |
348 } | 348 } |
349 } | 349 } |
350 | 350 |
351 //----- (0041D20D) -------------------------------------------------------- | 351 //----- (0041D20D) -------------------------------------------------------- |
352 char __fastcall sub_41D20D_buff_remaining_time_string(int ecx0, GUIWindow *edx0, __int64 a3, GUIFont *a2) | 352 void __fastcall sub_41D20D_buff_remaining_time_string( int ecx0, struct GUIWindow *edx0, __int64 a3, struct GUIFont *a2 ) |
353 { | 353 { |
354 unsigned int v4; // edi@1 | 354 unsigned int v4; // edi@1 |
355 unsigned int v5; // esi@1 | 355 unsigned int v5; // esi@1 |
356 unsigned int v6; // ebp@1 | 356 unsigned int v6; // ebp@1 |
357 unsigned int v7; // ebx@1 | 357 unsigned int v7; // ebx@1 |
358 signed __int64 v8; // ST34_8@1 | 358 signed __int64 v8; // ST34_8@1 |
412 else | 412 else |
413 v13 = pGlobalTXT_LocalizationStrings[438];// Seconds | 413 v13 = pGlobalTXT_LocalizationStrings[438];// Seconds |
414 sprintf(pTmpBuf2, "%d %s ", v18, v13); | 414 sprintf(pTmpBuf2, "%d %s ", v18, v13); |
415 strcat(pTmpBuf, pTmpBuf2); | 415 strcat(pTmpBuf, pTmpBuf2); |
416 } | 416 } |
417 return a1->DrawText(a2, 32, uY, 0, pTmpBuf, 0, 0, 0); | 417 a1->DrawText(a2, 32, uY, 0, pTmpBuf, 0, 0, 0); |
418 } | 418 } |
419 | 419 |
420 //----- (0041F54A) -------------------------------------------------------- | 420 //----- (0041F54A) -------------------------------------------------------- |
421 void __cdecl LoadActualSkyFrame() | 421 void __cdecl LoadActualSkyFrame() |
422 { | 422 { |
423 if ( pTexture_RestUI_CurrentSkyFrame ) | 423 if ( pTexture_RestUI_CurrentSkyFrame ) |
424 pTexture_RestUI_CurrentSkyFrame->Release(); | 424 pTexture_RestUI_CurrentSkyFrame->Release(); |
425 if ( pTexture_RestUI_CurrentHourglassFrame ) | 425 if ( pTexture_RestUI_CurrentHourglassFrame ) |
426 pTexture_RestUI_CurrentHourglassFrame->Release(); | 426 pTexture_RestUI_CurrentHourglassFrame->Release(); |
427 pIcons_LOD->_40F9C5(); | 427 pIcons_LOD->SyncLoadedFilesCount(); |
428 sprintf(pTmpBuf, "TERRA%03d", pParty->uCurrentMinute / 6 + 10 * pParty->uCurrentHour); | 428 sprintf(pTmpBuf, "TERRA%03d", pParty->uCurrentMinute / 6 + 10 * pParty->uCurrentHour); |
429 pTexture_RestUI_CurrentSkyFrame = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); | 429 pTexture_RestUI_CurrentSkyFrame = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); |
430 } | 430 } |
431 | 431 |
432 //----- (0041F5BE) -------------------------------------------------------- | 432 //----- (0041F5BE) -------------------------------------------------------- |
453 if ( pTexture_RestUI_CurrentHourglassFrame ) | 453 if ( pTexture_RestUI_CurrentHourglassFrame ) |
454 pTexture_RestUI_CurrentHourglassFrame->Release(); | 454 pTexture_RestUI_CurrentHourglassFrame->Release(); |
455 pTexture_RestUI_CurrentHourglassFrame = 0; | 455 pTexture_RestUI_CurrentHourglassFrame = 0; |
456 pTexture_RestUI_CurrentSkyFrame = 0; | 456 pTexture_RestUI_CurrentSkyFrame = 0; |
457 pIcons_LOD->_4114F2(); | 457 pIcons_LOD->_4114F2(); |
458 pIcons_LOD->_40F9C5(); | 458 pIcons_LOD->SyncLoadedFilesCount(); |
459 pCurrentScreen = SCREEN_GAME; | 459 pCurrentScreen = SCREEN_GAME; |
460 viewparams->bRedrawGameUI = 1; | 460 viewparams->bRedrawGameUI = 1; |
461 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) | 461 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) |
462 { | 462 { |
463 pOutdoor->UpdateSunlightVectors(); | 463 pOutdoor->UpdateSunlightVectors(); |
682 pItemsTable->pItems[pParty->pPickedItem.uItemID].pIconName, | 682 pItemsTable->pItems[pParty->pPickedItem.uItemID].pIconName, |
683 TEXTURE_16BIT_PALETTE); | 683 TEXTURE_16BIT_PALETTE); |
684 v1 = pIcons_LOD->GetTexture(v0); | 684 v1 = pIcons_LOD->GetTexture(v0); |
685 v11 = areWeLoadingTexture; | 685 v11 = areWeLoadingTexture; |
686 if ( uActiveCharacter | 686 if ( uActiveCharacter |
687 && (v2 = pPlayers[uActiveCharacter]->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID)) != 0 ) | 687 && (v2 = pPlayers[uActiveCharacter]->AddItem(-1, pParty->pPickedItem.uItemID)) != 0 ) |
688 { | 688 { |
689 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v2-1], &pParty->pPickedItem, 0x24u); | 689 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v2-1], &pParty->pPickedItem, 0x24u); |
690 pMouse->RemoveHoldingItem(); | 690 pMouse->RemoveHoldingItem(); |
691 } | 691 } |
692 else | 692 else |
693 { | 693 { |
694 v12 = 0; | 694 v12 = 0; |
695 v3 = pParty->pPlayers; | 695 v3 = pParty->pPlayers; |
696 while ( v3 <= &pParty->pPlayers[3] ) | 696 while ( v3 <= &pParty->pPlayers[3] ) |
697 { | 697 { |
698 v4 = v3->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID); | 698 v4 = v3->AddItem(-1, pParty->pPickedItem.uItemID); |
699 if ( v4 ) | 699 if ( v4 ) |
700 { | 700 { |
701 memcpy(&pParty->pPlayers[v12].pInventoryItems[v4], &pParty->pPickedItem, 0x24u); | 701 memcpy(&pParty->pPlayers[v12].pInventoryItems[v4], &pParty->pPickedItem, 0x24u); |
702 pMouse->RemoveHoldingItem(); | 702 pMouse->RemoveHoldingItem(); |
703 break; | 703 break; |
748 } | 748 } |
749 } | 749 } |
750 if ( !v11 ) | 750 if ( !v11 ) |
751 { | 751 { |
752 v1->Release(); | 752 v1->Release(); |
753 pIcons_LOD->_40F9C5(); | 753 pIcons_LOD->SyncLoadedFilesCount(); |
754 } | 754 } |
755 return 1; | 755 return 1; |
756 } | 756 } |
757 | 757 |
758 //----- (00421D00) -------------------------------------------------------- | 758 //----- (00421D00) -------------------------------------------------------- |
767 //v1 = uPlayerID; | 767 //v1 = uPlayerID; |
768 auto player = &pParty->pPlayers[uPlayerID - 1]; | 768 auto player = &pParty->pPlayers[uPlayerID - 1]; |
769 if (pParty->pPickedItem.uItemID) | 769 if (pParty->pPickedItem.uItemID) |
770 { | 770 { |
771 //v3 = player; | 771 //v3 = player; |
772 if (auto slot = player->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID)) | 772 if (auto slot = player->AddItem(-1, pParty->pPickedItem.uItemID)) |
773 { | 773 { |
774 memcpy(&player->pInventoryItems[slot-1], &pParty->pPickedItem, 0x24u); | 774 memcpy(&player->pInventoryItems[slot-1], &pParty->pPickedItem, 0x24u); |
775 viewparams->bRedrawGameUI = true; | 775 viewparams->bRedrawGameUI = true; |
776 pMouse->RemoveHoldingItem(); | 776 pMouse->RemoveHoldingItem(); |
777 return; | 777 return; |
959 if ( !pX ) | 959 if ( !pX ) |
960 { | 960 { |
961 pX = v0->AddItem2(0xFFFFFFFFu, &pParty->pPickedItem); | 961 pX = v0->AddItem2(0xFFFFFFFFu, &pParty->pPickedItem); |
962 if ( !pX ) | 962 if ( !pX ) |
963 { | 963 { |
964 v0->_49298B(&this_, v13 - 1, a4); | 964 v0->PutItemArInventoryIndex(&this_, v13 - 1, a4); |
965 memcpy((void *)a2.y, &this_, sizeof(ItemGen)); | 965 memcpy((void *)a2.y, &this_, sizeof(ItemGen)); |
966 return; | 966 return; |
967 } | 967 } |
968 } | 968 } |
969 v9 = this_.uItemID; | 969 v9 = this_.uItemID; |
971 pMouse->SetCursorBitmap(pItemsTable->pItems[v9].pIconName); | 971 pMouse->SetCursorBitmap(pItemsTable->pItems[v9].pIconName); |
972 return; | 972 return; |
973 } | 973 } |
974 v10 = v0->AddItem(a4, v7); | 974 v10 = v0->AddItem(a4, v7); |
975 pX = v10; | 975 pX = v10; |
976 if ( v10 || (v10 = v0->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID), (pX = v10) != 0) ) | 976 if ( v10 || (v10 = v0->AddItem(-1, pParty->pPickedItem.uItemID), (pX = v10) != 0) ) |
977 { | 977 { |
978 memcpy(&v0->pInventoryItems[v10-1], &pParty->pPickedItem, 0x24u); | 978 memcpy(&v0->pInventoryItems[v10-1], &pParty->pPickedItem, 0x24u); |
979 pMouse->RemoveHoldingItem(); | 979 pMouse->RemoveHoldingItem(); |
980 } | 980 } |
981 } | 981 } |
1151 pItemsTable->pItems[pParty->pPickedItem.uItemID].pIconName, | 1151 pItemsTable->pItems[pParty->pPickedItem.uItemID].pIconName, |
1152 TEXTURE_16BIT_PALETTE); | 1152 TEXTURE_16BIT_PALETTE); |
1153 if (v10 != -1) | 1153 if (v10 != -1) |
1154 pIcons_LOD->pTextures[v10].Release(); | 1154 pIcons_LOD->pTextures[v10].Release(); |
1155 pMouse->RemoveHoldingItem(); | 1155 pMouse->RemoveHoldingItem(); |
1156 pIcons_LOD->_40F9C5(); | 1156 pIcons_LOD->SyncLoadedFilesCount(); |
1157 return; | 1157 return; |
1158 } | 1158 } |
1159 v11 = pIndoor->pFaceExtras[v3->uFaceExtraID].uEventID; | 1159 v11 = pIndoor->pFaceExtras[v3->uFaceExtraID].uEventID; |
1160 } | 1160 } |
1161 else | 1161 else |