comparison GUIWindow.cpp @ 1913:ab1c03cc2219

mm7_1.cpp remove
author Ritor1
date Tue, 22 Oct 2013 17:21:09 +0600
parents 211dfe2d8db1
children 918a8cebd7a4
comparison
equal deleted inserted replaced
1912:3f0b9ffd788c 1913:ab1c03cc2219
25 #include "Autonotes.h" 25 #include "Autonotes.h"
26 #include "Awards.h" 26 #include "Awards.h"
27 #include "Chest.h" 27 #include "Chest.h"
28 #include "Outdoor.h" 28 #include "Outdoor.h"
29 #include "Game.h" 29 #include "Game.h"
30 #include "IconFrameTable.h"
30 31
31 32
32 #include "mm7_data.h" 33 #include "mm7_data.h"
33 34
34 typedef struct _RGBColor 35 typedef struct _RGBColor
2358 { 2359 {
2359 pGUIWindow_ScrollWindow->Release(); 2360 pGUIWindow_ScrollWindow->Release();
2360 pGUIWindow_ScrollWindow = 0; 2361 pGUIWindow_ScrollWindow = 0;
2361 } 2362 }
2362 } 2363 }
2364 //----- (004226EF) --------------------------------------------------------
2365 void SetUserInterface(PartyAlignment align, bool bReplace)
2366 {
2367 extern void set_default_ui_skin();
2368 set_default_ui_skin();
2369
2370 if (align == PartyAlignment_Evil)
2371 {
2372 if ( bReplace )
2373 {
2374 pTexture_RightFrame->Reload("ib-r-C.pcx");
2375 pTexture_BottomFrame->Reload("ib-b-C.pcx");
2376 pTexture_TopFrame->Reload("ib-t-C.pcx");
2377 pTexture_LeftFrame->Reload("ib-l-C.pcx");
2378 pTexture_StatusBar->Reload("IB-Foot-c.pcx");
2379 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-C", 2);
2380 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Minimap_Loop], "ib-autmask-c", 2);
2381 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Compas], "IB-COMP-C", 2);
2382 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-c", 2);
2383 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-c", 2);
2384 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-c", 2);
2385 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-C", 2);
2386 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-C", 2);
2387 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-C", 2);
2388 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-C", 2);
2389 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-C", 2);
2390 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-c", 2);
2391 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-c", 2);
2392 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-c", 2);
2393 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-c", 2);
2394
2395 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-c", 2);
2396 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-c", 2);
2397 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-c", 2);
2398 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-c", 2);
2399
2400 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeC");
2401 pIconsFrameTable->InitializeAnimation(pUIAnim_WizardEye->uIconID);
2402 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchC");
2403 pIconsFrameTable->InitializeAnimation(pUIAnum_Torchlight->uIconID);
2404
2405 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-c", 2);
2406 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc-c", 2);
2407 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven-c", 2);
2408 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Parchment], "parchment", 2);
2409 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B4], "cornr_ll-c", 2);
2410 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B0], "cornr_lr-c", 2);
2411 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076AC], "cornr_ul-c", 2);
2412 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A8], "cornr_ur-c", 2);
2413 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A4], "edge_btm-c", 2);
2414 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A0], "edge_lf-c", 2);
2415 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50769C], "edge_rt-c", 2);
2416 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507698], "edge_top-c", 2);
2417 pIcons_LOD->ReloadTexture(pTexture_591428, "endcap-c", 2);
2418 }
2419 else
2420 {
2421 pTexture_RightFrame->Load("ib-r-C.pcx", 0);
2422 pTexture_BottomFrame->Load("ib-b-c.pcx", 0);
2423 pTexture_TopFrame->Load("ib-t-C.pcx", 0);
2424 pTexture_LeftFrame->Load("ib-l-C.pcx", 0);
2425 pTexture_StatusBar->Load("IB-Foot-c.pcx", 0);
2426 uTextureID_right_panel = pIcons_LOD->LoadTexture("ib-mb-C", TEXTURE_16BIT_PALETTE);
2427 uTextureID_Minimap_Loop = pIcons_LOD->LoadTexture("ib-autmask-c", TEXTURE_16BIT_PALETTE);
2428 uTextureID_Compas = pIcons_LOD->LoadTexture("IB-COMP-C", TEXTURE_16BIT_PALETTE);
2429 dword_5079D0 = pIcons_LOD->LoadTexture("IB-InitG-c", TEXTURE_16BIT_PALETTE);
2430 dword_5079C8 = pIcons_LOD->LoadTexture("IB-InitY-c", TEXTURE_16BIT_PALETTE);
2431 dword_5079CC = pIcons_LOD->LoadTexture("IB-InitR-c", TEXTURE_16BIT_PALETTE);
2432 uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-C", TEXTURE_16BIT_PALETTE);
2433 uTextureID_Btn_NPCRight = pIcons_LOD->LoadTexture("IB-NPCRD-C", TEXTURE_16BIT_PALETTE);
2434 uTextureID_Btn_ZoomIn = pIcons_LOD->LoadTexture("ib-autout-C", TEXTURE_16BIT_PALETTE);
2435 uTextureID_Btn_ZoomOut = pIcons_LOD->LoadTexture("ib-autin-C", TEXTURE_16BIT_PALETTE);
2436 uTextureID_GameUI_CharSelectionFrame = pIcons_LOD->LoadTexture("IB-selec-C", TEXTURE_16BIT_PALETTE);
2437 uTextureID_Btn_CastSpell = pIcons_LOD->LoadTexture("ib-m1d-c", TEXTURE_16BIT_PALETTE);
2438 uTextureID_Btn_Rest = pIcons_LOD->LoadTexture("ib-m2d-c", TEXTURE_16BIT_PALETTE);
2439 uTextureID_Btn_QuickReference = pIcons_LOD->LoadTexture("ib-m3d-c", TEXTURE_16BIT_PALETTE);
2440 uTextureID_Btn_GameSettings = pIcons_LOD->LoadTexture("ib-m4d-c", TEXTURE_16BIT_PALETTE);
2441 uExitCancelTextureId = pIcons_LOD->LoadTexture("ib-bcu-c", TEXTURE_16BIT_PALETTE);
2442 uTextureID_PlayerBuff_Bless = pIcons_LOD->LoadTexture("isg-01-c", TEXTURE_16BIT_PALETTE);
2443 uTextureID_PlayerBuff_Preservation = pIcons_LOD->LoadTexture("isg-02-c", TEXTURE_16BIT_PALETTE);
2444 uTextureID_PlayerBuff_Hammerhands = pIcons_LOD->LoadTexture("isg-03-c", TEXTURE_16BIT_PALETTE);
2445 uTextureID_PlayerBuff_PainReflection = pIcons_LOD->LoadTexture("isg-04-c", TEXTURE_16BIT_PALETTE);
2446 uTextureID_50795C = pIcons_LOD->LoadTexture("evtnpc-c", TEXTURE_16BIT_PALETTE);
2447 uTextureID_CharacterUI_InventoryBackground = pIcons_LOD->LoadTexture("fr_inven", TEXTURE_16BIT_PALETTE);
2448 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeC");
2449 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID);
2450 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchC");
2451 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID);
2452 }
2453 uGameUIFontMain = TargetColor(0xC8u, 0, 0);
2454 uGameUIFontShadow = TargetColor(10, 0, 0);
2455 }
2456 else if (align == PartyAlignment_Neutral)
2457 {
2458 if ( bReplace )
2459 {
2460 pTexture_RightFrame->Reload("ib-r-a.pcx");
2461 pTexture_BottomFrame->Reload("ib-b-a.pcx");
2462 pTexture_TopFrame->Reload("ib-t-a.pcx");
2463 pTexture_LeftFrame->Reload("ib-l-a.pcx");
2464 pTexture_StatusBar->Reload("IB-Foot-a.pcx");
2465 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-a", 2);
2466 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Minimap_Loop], "ib-autmask-a", 2);
2467 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Compas], "IB-COMP-a", 2);
2468 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-a", 2);
2469 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-a", 2);
2470 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-a", 2);
2471 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-a", 2);
2472 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-a", 2);
2473 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-a", 2);
2474 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-a", 2);
2475 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-a", 2);
2476 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-a", 2);
2477 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-a", 2);
2478 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-a", 2);
2479 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-a", 2);
2480 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-a", 2);
2481 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-a", 2);
2482 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-a", 2);
2483 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-a", 2);
2484 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeA");
2485 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID);
2486 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA");
2487 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID);
2488 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-a", 2);
2489 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc", 2);
2490 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven", 2);
2491 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Parchment], "parchment", 2);
2492 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B4], "cornr_ll", 2);
2493 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B0], "cornr_lr", 2);
2494 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076AC], "cornr_ul", 2);
2495 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A8], "cornr_ur", 2);
2496 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A4], "edge_btm", 2);
2497 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A0], "edge_lf", 2);
2498 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50769C], "edge_rt", 2);
2499 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507698], "edge_top", 2);
2500 pIcons_LOD->ReloadTexture(pTexture_591428, "endcap", 2);
2501 }
2502 else
2503 {
2504 pTexture_RightFrame->Load("ib-r-A.pcx", 0);
2505 pTexture_BottomFrame->Load("ib-b-A.pcx", 0);
2506 pTexture_TopFrame->Load("ib-t-A.pcx", 0);
2507 pTexture_LeftFrame->Load("ib-l-A.pcx", 0);
2508 pTexture_StatusBar->Load("IB-Foot-a.pcx", 0);
2509 uTextureID_right_panel = pIcons_LOD->LoadTexture("ib-mb-A", TEXTURE_16BIT_PALETTE);
2510 uTextureID_Minimap_Loop = pIcons_LOD->LoadTexture("ib-autmask-a", TEXTURE_16BIT_PALETTE);
2511 uTextureID_Compas = pIcons_LOD->LoadTexture("IB-COMP-A", TEXTURE_16BIT_PALETTE);
2512 dword_5079D0 = pIcons_LOD->LoadTexture("IB-InitG-a", TEXTURE_16BIT_PALETTE);
2513 dword_5079C8 = pIcons_LOD->LoadTexture("IB-InitY-a", TEXTURE_16BIT_PALETTE);
2514 dword_5079CC = pIcons_LOD->LoadTexture("IB-InitR-a", TEXTURE_16BIT_PALETTE);
2515 uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-A", TEXTURE_16BIT_PALETTE);
2516 uTextureID_Btn_NPCRight = pIcons_LOD->LoadTexture("IB-NPCRD-A", TEXTURE_16BIT_PALETTE);
2517 uTextureID_GameUI_CharSelectionFrame = pIcons_LOD->LoadTexture("IB-selec-A", TEXTURE_16BIT_PALETTE);
2518 uTextureID_Btn_CastSpell = pIcons_LOD->LoadTexture("ib-m1d-a", TEXTURE_16BIT_PALETTE);
2519 uTextureID_Btn_Rest = pIcons_LOD->LoadTexture("ib-m2d-a", TEXTURE_16BIT_PALETTE);
2520 uTextureID_Btn_QuickReference = pIcons_LOD->LoadTexture("ib-m3d-a", TEXTURE_16BIT_PALETTE);
2521 uTextureID_Btn_GameSettings = pIcons_LOD->LoadTexture("ib-m4d-a", TEXTURE_16BIT_PALETTE);
2522 uTextureID_Btn_ZoomIn = pIcons_LOD->LoadTexture("ib-autout-a", TEXTURE_16BIT_PALETTE);
2523 uTextureID_Btn_ZoomOut = pIcons_LOD->LoadTexture("ib-autin-a", TEXTURE_16BIT_PALETTE);
2524 uExitCancelTextureId = pIcons_LOD->LoadTexture("ib-bcu-a", TEXTURE_16BIT_PALETTE);
2525 uTextureID_PlayerBuff_Bless = pIcons_LOD->LoadTexture("isg-01-a", TEXTURE_16BIT_PALETTE);
2526 uTextureID_PlayerBuff_Preservation = pIcons_LOD->LoadTexture("isg-02-a", TEXTURE_16BIT_PALETTE);
2527 uTextureID_PlayerBuff_Hammerhands = pIcons_LOD->LoadTexture("isg-03-a", TEXTURE_16BIT_PALETTE);
2528 uTextureID_PlayerBuff_PainReflection = pIcons_LOD->LoadTexture("isg-04-a", TEXTURE_16BIT_PALETTE);
2529 uTextureID_50795C = pIcons_LOD->LoadTexture("evtnpc", TEXTURE_16BIT_PALETTE);
2530 uTextureID_CharacterUI_InventoryBackground = pIcons_LOD->LoadTexture("fr_inven", TEXTURE_16BIT_PALETTE);
2531 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeA");
2532 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID);
2533 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA");
2534 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID);
2535 uTextureID_Parchment = pIcons_LOD->LoadTexture("parchment", TEXTURE_16BIT_PALETTE);
2536 uTextureID_5076B4 = pIcons_LOD->LoadTexture("cornr_ll", TEXTURE_16BIT_PALETTE);
2537 uTextureID_5076B0 = pIcons_LOD->LoadTexture("cornr_lr", TEXTURE_16BIT_PALETTE);
2538 uTextureID_5076AC = pIcons_LOD->LoadTexture("cornr_ul", TEXTURE_16BIT_PALETTE);
2539 uTextureID_5076A8 = pIcons_LOD->LoadTexture("cornr_ur", TEXTURE_16BIT_PALETTE);
2540 uTextureID_5076A4 = pIcons_LOD->LoadTexture("edge_btm", TEXTURE_16BIT_PALETTE);
2541 uTextureID_5076A0 = pIcons_LOD->LoadTexture("edge_lf", TEXTURE_16BIT_PALETTE);
2542 uTextureID_50769C = pIcons_LOD->LoadTexture("edge_rt", TEXTURE_16BIT_PALETTE);
2543 uTextureID_507698 = pIcons_LOD->LoadTexture("edge_top", TEXTURE_16BIT_PALETTE);
2544 pTexture_591428 = pIcons_LOD->LoadTexturePtr("endcap", TEXTURE_16BIT_PALETTE);
2545 }
2546 uGameUIFontMain = TargetColor(0xAu, 0, 0);
2547 uGameUIFontShadow = TargetColor(230, 214, 193);
2548 }
2549 else if (align == PartyAlignment_Good)
2550 {
2551 if ( bReplace )
2552 {
2553 pTexture_RightFrame->Reload("ib-r-B.pcx");
2554 pTexture_BottomFrame->Reload("ib-b-B.pcx");
2555 pTexture_TopFrame->Reload("ib-t-B.pcx");
2556 pTexture_LeftFrame->Reload("ib-l-B.pcx");
2557 pTexture_StatusBar->Reload("IB-Foot-b.pcx");
2558 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-B", 2);
2559 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Minimap_Loop], "ib-autmask-b", 2);
2560 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Compas], "IB-COMP-B", 2);
2561 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-b", 2);
2562 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-b", 2);
2563 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-b", 2);
2564 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-B", 2);
2565 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-B", 2);
2566 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-B", 2);
2567 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-B", 2);
2568 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-B", 2);
2569 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-b", 2);
2570 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-b", 2);
2571 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-b", 2);
2572 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-b", 2);
2573 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-b", 2);
2574 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-b", 2);
2575 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-b", 2);
2576 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-b", 2);
2577 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeB");
2578 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID);
2579 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchB");
2580 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID);
2581 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-b", 2);
2582 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc-b", 2);
2583 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven-b", 2);
2584 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Parchment], "parchment", 2);
2585 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B4], "cornr_ll-b", 2);
2586 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B0], "cornr_lr-b", 2);
2587 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076AC], "cornr_ul-b", 2);
2588 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A8], "cornr_ur-b", 2);
2589 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A4], "edge_btm-b", 2);
2590 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A0], "edge_lf-b", 2);
2591 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50769C], "edge_rt-b", 2);
2592 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507698], "edge_top-b", 2);
2593 pIcons_LOD->ReloadTexture(pTexture_591428, "endcap-b", 2);
2594 }
2595 uGameUIFontMain = TargetColor(0, 0, 0xC8u);
2596 uGameUIFontShadow = TargetColor(255, 255, 255);
2597 }
2598 else Error("Invalid alignment type: %u", align);
2599 }
2600 //----- (0041D20D) --------------------------------------------------------
2601 void DrawBuff_remaining_time_string( int uY, struct GUIWindow *window, __int64 remaining_time, struct GUIFont *Font )
2602 {
2603 unsigned int full_time; // esi@1
2604 signed __int64 hours; // kr00_8@1
2605 const char *text; // eax@2
2606 signed __int64 minutes; // [sp+10h] [bp-10h]@1
2607 signed __int64 seconds; // [sp+18h] [bp-8h]@1
2608 unsigned int day; // [sp+24h] [bp+4h]@1
2609
2610 full_time = (signed __int64)((double)remaining_time * 0.234375);
2611 day = (unsigned int)((full_time / 60) / 60) / 24;
2612 hours = ((full_time / 60) / 60) % 24;
2613 minutes = (signed __int64)(full_time / 60) % 60;
2614 seconds = (signed __int64)full_time % 60;
2615 strcpy(pTmpBuf.data(), "\r020");
2616 if ( day )
2617 {
2618 text = pGlobalTXT_LocalizationStrings[57]; // Days
2619 if ( day <= 1 )
2620 text = pGlobalTXT_LocalizationStrings[56]; // Day
2621 sprintfex(pTmpBuf2.data(), "%d %s ", (int)day, text);
2622 strcat(pTmpBuf.data(), pTmpBuf2.data());
2623 }
2624 if ( hours )
2625 {
2626 if ( hours <= 1 )
2627 text = pGlobalTXT_LocalizationStrings[109];// Hour
2628 else
2629 text = pGlobalTXT_LocalizationStrings[110];// Hours
2630 sprintfex(pTmpBuf2.data(), "%d %s ", (int)hours, text);
2631 strcat(pTmpBuf.data(), pTmpBuf2.data());
2632 }
2633 if ( minutes && !day )
2634 {
2635 if ( minutes <= 1 )
2636 text = pGlobalTXT_LocalizationStrings[437];// Minute
2637 else
2638 text = pGlobalTXT_LocalizationStrings[436];// Minutes
2639 sprintfex(pTmpBuf2.data(), "%d %s ", (int)minutes, text);
2640 strcat(pTmpBuf.data(), pTmpBuf2.data());
2641 }
2642 if ( seconds && !hours )
2643 {
2644 if ( seconds <= 1 )
2645 text = pGlobalTXT_LocalizationStrings[439];// Second
2646 else
2647 text = pGlobalTXT_LocalizationStrings[438];// Seconds
2648 sprintfex(pTmpBuf2.data(), "%d %s ", (int)seconds, text);
2649 strcat(pTmpBuf.data(), pTmpBuf2.data());
2650 }
2651 window->DrawText(Font, 32, uY, 0, pTmpBuf.data(), 0, 0, 0);
2652 }