comparison UI/UIPopup.cpp @ 2092:a869b0376b48

enums and BLV_UpdateDoors()
author Ritor1
date Thu, 12 Dec 2013 13:55:42 +0600
parents 259df09dfb50
children 52415f8bf7c2
comparison
equal deleted inserted replaced
2091:75edfa36c4de 2092:a869b0376b48
312 Str += pFontSmallnum->CalcTextHeight(pItemsTable->pItems[inspect_item->uItemID].pDescription, &iteminfo_window, 100, 0); 312 Str += pFontSmallnum->CalcTextHeight(pItemsTable->pItems[inspect_item->uItemID].pDescription, &iteminfo_window, 100, 0);
313 iteminfo_window.uFrameHeight = pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), 313 iteminfo_window.uFrameHeight = pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(),
314 TEXTURE_16BIT_PALETTE)->uTextureHeight + v81 + 54; 314 TEXTURE_16BIT_PALETTE)->uTextureHeight + v81 + 54;
315 if ( (signed int)Str > (signed int)iteminfo_window.uFrameHeight ) 315 if ( (signed int)Str > (signed int)iteminfo_window.uFrameHeight )
316 iteminfo_window.uFrameHeight = (unsigned int)Str; 316 iteminfo_window.uFrameHeight = (unsigned int)Str;
317 if ( inspect_item->uAttributes & 8 && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) ) 317 if ( inspect_item->uAttributes & ITEM_TEMP_BONUS && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) )
318 iteminfo_window.uFrameHeight += LOBYTE(pFontComic->uFontHeight); 318 iteminfo_window.uFrameHeight += LOBYTE(pFontComic->uFontHeight);
319 v85 = 0; 319 v85 = 0;
320 if ( pFontArrus->uFontHeight ) 320 if ( pFontArrus->uFontHeight )
321 { 321 {
322 iteminfo_window.uFrameWidth -= 24; 322 iteminfo_window.uFrameWidth -= 24;
364 iteminfo_window.DrawText(pFontComic, 100, iteminfo_window.uFrameHeight - LOBYTE(pFontComic->uFontHeight), 0, pTmpBuf.data(), 0, 0, 0); 364 iteminfo_window.DrawText(pFontComic, 100, iteminfo_window.uFrameHeight - LOBYTE(pFontComic->uFontHeight), 0, pTmpBuf.data(), 0, 0, 0);
365 pRenderer->ResetTextureClipRect(); 365 pRenderer->ResetTextureClipRect();
366 } 366 }
367 else 367 else
368 { 368 {
369 if ( (inspect_item->uAttributes & 8) && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) ) 369 if ( (inspect_item->uAttributes & ITEM_TEMP_BONUS) && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) )
370 { 370 {
371 init_summoned_item(&v67, inspect_item->uExpireTime - pParty->uTimePlayed); 371 init_summoned_item(&v67, inspect_item->uExpireTime - pParty->uTimePlayed);
372 strcpy(pTmpBuf.data(), "Duration:"); 372 strcpy(pTmpBuf.data(), "Duration:");
373 Str = (char *)(v67.field_18_expire_year - game_starting_year); 373 Str = (char *)(v67.field_18_expire_year - game_starting_year);
374 if (v67.field_18_expire_year != 1168 ) 374 if (v67.field_18_expire_year != 1168 )
391 } 391 }
392 iteminfo_window.DrawText(pFontComic, 100, iteminfo_window.uFrameHeight - 2 * LOBYTE(pFontComic->uFontHeight), 0, pTmpBuf.data(), 0, 0, 0); 392 iteminfo_window.DrawText(pFontComic, 100, iteminfo_window.uFrameHeight - 2 * LOBYTE(pFontComic->uFontHeight), 0, pTmpBuf.data(), 0, 0, 0);
393 } 393 }
394 sprintf(pTmpBuf.data(), "%s: %lu", pGlobalTXT_LocalizationStrings[465], inspect_item->GetValue()); 394 sprintf(pTmpBuf.data(), "%s: %lu", pGlobalTXT_LocalizationStrings[465], inspect_item->GetValue());
395 iteminfo_window.DrawText(pFontComic, 100, iteminfo_window.uFrameHeight - LOBYTE(pFontComic->uFontHeight), 0, pTmpBuf.data(), 0, 0, 0); 395 iteminfo_window.DrawText(pFontComic, 100, iteminfo_window.uFrameHeight - LOBYTE(pFontComic->uFontHeight), 0, pTmpBuf.data(), 0, 0, 0);
396 if ( BYTE1(inspect_item->uAttributes) & 1 ) 396 if ( inspect_item->uAttributes & ITEM_STOLEN )
397 pText = pGlobalTXT_LocalizationStrings[187]; //"Stolen" 397 pText = pGlobalTXT_LocalizationStrings[187]; //"Stolen"
398 else 398 else
399 { 399 {
400 if ( !(BYTE1(inspect_item->uAttributes) & 2) ) 400 if ( !(inspect_item->uAttributes & ITEM_HARDENED) )
401 { 401 {
402 pRenderer->ResetTextureClipRect(); 402 pRenderer->ResetTextureClipRect();
403 if ( !areWeLoadingTexture ) 403 if ( !areWeLoadingTexture )
404 { 404 {
405 pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)->Release(); 405 pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)->Release();