comparison UI/UIPopup.cpp @ 1588:e6ac4919b22c

Слияние
author Ritor1
date Mon, 09 Sep 2013 09:13:40 +0600
parents 9f8b3e904e14
children 43d3536a20f7 bb2378f58767
comparison
equal deleted inserted replaced
1587:b42e6f35e03d 1588:e6ac4919b22c
1 #ifdef _MSC_VER 1 #ifdef _MSC_VER
2 #define _CRT_SECURE_NO_WARNINGS 2 #define _CRT_SECURE_NO_WARNINGS
3 #endif 3 #endif
4
5 #include <assert.h>
6 4
7 #include "..\MM7.h" 5 #include "..\MM7.h"
8 6
9 #include "..\Mouse.h" 7 #include "..\Mouse.h"
10 8
282 if (pItemsTable->pItems[inspect_item->uItemID].uEquipType == EQUIP_GOLD) 280 if (pItemsTable->pItems[inspect_item->uItemID].uEquipType == EQUIP_GOLD)
283 v77 = inspect_item->uSpecEnchantmentType; 281 v77 = inspect_item->uSpecEnchantmentType;
284 if ( uActiveCharacter ) 282 if ( uActiveCharacter )
285 { 283 {
286 //try to identify 284 //try to identify
287 if (!inspect_item->Identified()) 285 if (!inspect_item->IsIdentified())
288 { 286 {
289 287
290 v11 = inspect_item; 288 v11 = inspect_item;
291 if ( pPlayers[uActiveCharacter]->CanIdentify(inspect_item) == 1 ) 289 if ( pPlayers[uActiveCharacter]->CanIdentify(inspect_item) == 1 )
292 inspect_item->SetIdentified(); 290 inspect_item->SetIdentified();
293 v83 = SPEECH_9; 291 v83 = SPEECH_9;
294 if ( !inspect_item->Identified() ) 292 if ( !inspect_item->IsIdentified() )
295 { 293 {
296 ShowStatusBarString(pGlobalTXT_LocalizationStrings[446], 2u);//"Identify Failed" 294 ShowStatusBarString(pGlobalTXT_LocalizationStrings[446], 2u);//"Identify Failed"
297 } 295 }
298 else 296 else
299 { 297 {
306 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)(int)v83, 0); 304 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)(int)v83, 0);
307 dword_4E455C = 0; 305 dword_4E455C = 0;
308 } 306 }
309 } 307 }
310 inspect_item->UpdateTempBonus(pParty->uTimePlayed); 308 inspect_item->UpdateTempBonus(pParty->uTimePlayed);
311 if (inspect_item->Broken()) 309 if (inspect_item->IsBroken())
312 { 310 {
313 if ( pPlayers[uActiveCharacter]->CanRepair(inspect_item) == 1 ) 311 if ( pPlayers[uActiveCharacter]->CanRepair(inspect_item) == 1 )
314 inspect_item->uAttributes = inspect_item->uAttributes & 0xFFFFFFFD | 1; 312 inspect_item->uAttributes = inspect_item->uAttributes & 0xFFFFFFFD | 1;
315 v83 = SPEECH_11; 313 v83 = SPEECH_11;
316 if ( !inspect_item->Broken() ) 314 if ( !inspect_item->IsBroken() )
317 v83 = SPEECH_10; 315 v83 = SPEECH_10;
318 else 316 else
319 ShowStatusBarString(pGlobalTXT_LocalizationStrings[448], 2u);//"Repair Failed" 317 ShowStatusBarString(pGlobalTXT_LocalizationStrings[448], 2u);//"Repair Failed"
320 if ( dword_4E455C ) 318 if ( dword_4E455C )
321 { 319 {
325 } 323 }
326 } 324 }
327 //v13 = _this->uAttributes; 325 //v13 = _this->uAttributes;
328 //v14 = _this->Identified(); 326 //v14 = _this->Identified();
329 //a2.y = inspect_item->Identified(); 327 //a2.y = inspect_item->Identified();
330 if (inspect_item->Broken()) 328 if (inspect_item->IsBroken())
331 { 329 {
332 wHintWindow.DrawMessageBox(0); 330 wHintWindow.DrawMessageBox(0);
333 //v15 = &; 331 //v15 = &;
334 pRenderer->SetTextureClipRect(wHintWindow.uFrameX + 12, wHintWindow.uFrameY + 12, 332 pRenderer->SetTextureClipRect(wHintWindow.uFrameX + 12, wHintWindow.uFrameY + 12,
335 wHintWindow.uFrameX + wHintWindow.uFrameWidth - 12, 333 wHintWindow.uFrameX + wHintWindow.uFrameWidth - 12,
337 wHintWindow.uFrameWidth -= 24; 335 wHintWindow.uFrameWidth -= 24;
338 wHintWindow.uFrameHeight -= 12; 336 wHintWindow.uFrameHeight -= 12;
339 wHintWindow.uFrameZ = wHintWindow.uFrameX + wHintWindow.uFrameWidth - 1; 337 wHintWindow.uFrameZ = wHintWindow.uFrameX + wHintWindow.uFrameWidth - 1;
340 wHintWindow.uFrameW = wHintWindow.uFrameY + wHintWindow.uFrameHeight - 1; 338 wHintWindow.uFrameW = wHintWindow.uFrameY + wHintWindow.uFrameHeight - 1;
341 pRenderer->DrawTransparentRedShade(wHintWindow.uFrameX + v78, v81 + wHintWindow.uFrameY + 30, v73); 339 pRenderer->DrawTransparentRedShade(wHintWindow.uFrameX + v78, v81 + wHintWindow.uFrameY + 30, v73);
342 if ( inspect_item->Identified()) 340 if ( inspect_item->IsIdentified())
343 v16 = inspect_item->GetIdentifiedName(); 341 v16 = inspect_item->GetIdentifiedName();
344 else 342 else
345 v16 = item_desc->pUnidentifiedName; 343 v16 = item_desc->pUnidentifiedName;
346 wHintWindow.DrawTitleText(pFontArrus, 0, 0xCu, var88, v16, 3u); 344 wHintWindow.DrawTitleText(pFontArrus, 0, 0xCu, var88, v16, 3u);
347 v17 = pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[32], &wHintWindow, 0, 0); //"Broken Item" 345 v17 = pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[32], &wHintWindow, 0, 0); //"Broken Item"
354 v73->Release(); 352 v73->Release();
355 pIcons_LOD->SyncLoadedFilesCount(); 353 pIcons_LOD->SyncLoadedFilesCount();
356 } 354 }
357 return; 355 return;
358 } 356 }
359 if (!inspect_item->Identified()) 357 if (!inspect_item->IsIdentified())
360 { 358 {
361 wHintWindow.DrawMessageBox(0); 359 wHintWindow.DrawMessageBox(0);
362 pRenderer->SetTextureClipRect(wHintWindow.uFrameX + 12, wHintWindow.uFrameY + 12, 360 pRenderer->SetTextureClipRect(wHintWindow.uFrameX + 12, wHintWindow.uFrameY + 12,
363 wHintWindow.uFrameX + wHintWindow.uFrameWidth - 12, 361 wHintWindow.uFrameX + wHintWindow.uFrameWidth - 12,
364 wHintWindow.uFrameY + wHintWindow.uFrameHeight - 12); 362 wHintWindow.uFrameY + wHintWindow.uFrameHeight - 12);