Mercurial > mm7
comparison UI/UIPopup.cpp @ 2069:259df09dfb50
32bits almost there
author | Nomad |
---|---|
date | Tue, 03 Dec 2013 20:18:17 +0200 |
parents | f9698295c0bd |
children | a869b0376b48 |
comparison
equal
deleted
inserted
replaced
2061:b2a434d65344 | 2069:259df09dfb50 |
---|---|
201 pRenderer->DrawTransparentRedShade(iteminfo_window.uFrameX + v78, v81 + iteminfo_window.uFrameY + 30, pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)); | 201 pRenderer->DrawTransparentRedShade(iteminfo_window.uFrameX + v78, v81 + iteminfo_window.uFrameY + 30, pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)); |
202 if ( inspect_item->IsIdentified()) | 202 if ( inspect_item->IsIdentified()) |
203 pText = (char *)inspect_item->GetIdentifiedName(); | 203 pText = (char *)inspect_item->GetIdentifiedName(); |
204 else | 204 else |
205 pText = pItemsTable->pItems[inspect_item->uItemID].pUnidentifiedName; | 205 pText = pItemsTable->pItems[inspect_item->uItemID].pUnidentifiedName; |
206 iteminfo_window.DrawTitleText(pFontArrus, 0, 0xCu, TargetColor(0xFFu, 0xFFu, 0x9Bu), pText, 3); | 206 iteminfo_window.DrawTitleText(pFontArrus, 0, 0xCu, Color16(0xFFu, 0xFFu, 0x9Bu), pText, 3); |
207 iteminfo_window.DrawTitleText(pFontArrus, 0x64u, ((signed int)iteminfo_window.uFrameHeight >> 1) - pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[32], &iteminfo_window, 0, 0) / 2, | 207 iteminfo_window.DrawTitleText(pFontArrus, 0x64u, ((signed int)iteminfo_window.uFrameHeight >> 1) - pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[32], &iteminfo_window, 0, 0) / 2, |
208 TargetColor(0xFFu, 0x19u, 0x19u), pGlobalTXT_LocalizationStrings[32], 3); //"Broken Item" | 208 Color16(0xFFu, 0x19u, 0x19u), pGlobalTXT_LocalizationStrings[32], 3); //"Broken Item" |
209 pRenderer->ResetTextureClipRect(); | 209 pRenderer->ResetTextureClipRect(); |
210 if ( !areWeLoadingTexture ) | 210 if ( !areWeLoadingTexture ) |
211 { | 211 { |
212 pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)->Release(); | 212 pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)->Release(); |
213 pIcons_LOD->SyncLoadedFilesCount(); | 213 pIcons_LOD->SyncLoadedFilesCount(); |
222 iteminfo_window.uFrameWidth -= 24; | 222 iteminfo_window.uFrameWidth -= 24; |
223 iteminfo_window.uFrameHeight -= 12; | 223 iteminfo_window.uFrameHeight -= 12; |
224 iteminfo_window.uFrameZ = iteminfo_window.uFrameX + iteminfo_window.uFrameWidth - 1; | 224 iteminfo_window.uFrameZ = iteminfo_window.uFrameX + iteminfo_window.uFrameWidth - 1; |
225 iteminfo_window.uFrameW = iteminfo_window.uFrameY + iteminfo_window.uFrameHeight - 1; | 225 iteminfo_window.uFrameW = iteminfo_window.uFrameY + iteminfo_window.uFrameHeight - 1; |
226 pRenderer->DrawTextureTransparent(iteminfo_window.uFrameX + v78, v81 + iteminfo_window.uFrameY + 30, pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)); | 226 pRenderer->DrawTextureTransparent(iteminfo_window.uFrameX + v78, v81 + iteminfo_window.uFrameY + 30, pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)); |
227 iteminfo_window.DrawTitleText(pFontArrus, 0, 0xCu, TargetColor(0xFFu, 0xFFu, 0x9Bu), pItemsTable->pItems[inspect_item->uItemID].pUnidentifiedName, 3); | 227 iteminfo_window.DrawTitleText(pFontArrus, 0, 0xCu, Color16(0xFFu, 0xFFu, 0x9Bu), pItemsTable->pItems[inspect_item->uItemID].pUnidentifiedName, 3); |
228 iteminfo_window.DrawTitleText(pFontArrus, 0x64u, ((signed int)iteminfo_window.uFrameHeight >> 1) - pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[232], &iteminfo_window, 0, 0) / 2, | 228 iteminfo_window.DrawTitleText(pFontArrus, 0x64u, ((signed int)iteminfo_window.uFrameHeight >> 1) - pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[232], &iteminfo_window, 0, 0) / 2, |
229 TargetColor(0xFFu, 0x19u, 0x19u), pGlobalTXT_LocalizationStrings[232], 3);//"Not Identified" | 229 Color16(0xFFu, 0x19u, 0x19u), pGlobalTXT_LocalizationStrings[232], 3);//"Not Identified" |
230 pRenderer->ResetTextureClipRect(); | 230 pRenderer->ResetTextureClipRect(); |
231 if ( !areWeLoadingTexture ) | 231 if ( !areWeLoadingTexture ) |
232 { | 232 { |
233 pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)->Release(); | 233 pIcons_LOD->LoadTexturePtr(inspect_item->GetIconName(), TEXTURE_16BIT_PALETTE)->Release(); |
234 pIcons_LOD->SyncLoadedFilesCount(); | 234 pIcons_LOD->SyncLoadedFilesCount(); |
353 v28 = pItemsTable->pItems[inspect_item->uItemID].pDescription; | 353 v28 = pItemsTable->pItems[inspect_item->uItemID].pDescription; |
354 if ( *v28 ) | 354 if ( *v28 ) |
355 iteminfo_window.DrawText(pFontSmallnum, 100, v34, 0, v28, 0, 0, 0); | 355 iteminfo_window.DrawText(pFontSmallnum, 100, v34, 0, v28, 0, 0, 0); |
356 iteminfo_window.uFrameX += 12; | 356 iteminfo_window.uFrameX += 12; |
357 iteminfo_window.uFrameWidth -= 24; | 357 iteminfo_window.uFrameWidth -= 24; |
358 iteminfo_window.DrawTitleText(pFontArrus, 0, 0xCu, TargetColor(0xFFu, 0xFFu, 0x9Bu), inspect_item->GetIdentifiedName(), 3); | 358 iteminfo_window.DrawTitleText(pFontArrus, 0, 0xCu, Color16(0xFFu, 0xFFu, 0x9Bu), inspect_item->GetIdentifiedName(), 3); |
359 iteminfo_window.uFrameWidth += 24; | 359 iteminfo_window.uFrameWidth += 24; |
360 iteminfo_window.uFrameX -= 12; | 360 iteminfo_window.uFrameX -= 12; |
361 if ( v77 ) | 361 if ( v77 ) |
362 { | 362 { |
363 sprintf(pTmpBuf.data(), "%s: %lu", pGlobalTXT_LocalizationStrings[465], v77);//"Value" | 363 sprintf(pTmpBuf.data(), "%s: %lu", pGlobalTXT_LocalizationStrings[465], v77);//"Value" |
522 v106.uScreenSpaceY = v115 + (window->uFrameY + 52) + pSprites_LOD->pSpriteHeaders[v10->pHwSpriteIDs[0]].uHeight; | 522 v106.uScreenSpaceY = v115 + (window->uFrameY + 52) + pSprites_LOD->pSpriteHeaders[v10->pHwSpriteIDs[0]].uHeight; |
523 v106.pPalette = PaletteManager::Get_Dark_or_Red_LUT(v10->uPaletteIndex, 0, 1); | 523 v106.pPalette = PaletteManager::Get_Dark_or_Red_LUT(v10->uPaletteIndex, 0, 1); |
524 v106.sZValue = 0; | 524 v106.sZValue = 0; |
525 v106.uFlags = 0; | 525 v106.uFlags = 0; |
526 pRenderer->SetRasterClipRect(0, 0, 0x27Fu, 0x1DFu); | 526 pRenderer->SetRasterClipRect(0, 0, 0x27Fu, 0x1DFu); |
527 pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportY - 1, TargetColor(0xE1u, 255, 0x9Bu)); | 527 pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportY - 1, Color16(0xE1u, 255, 0x9Bu)); |
528 pRenderer->RasterLine2D( v106.uViewportX + 129, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportW + 1, TargetColor(0xE1u, 255, 0x9Bu)); | 528 pRenderer->RasterLine2D( v106.uViewportX + 129, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportW + 1, Color16(0xE1u, 255, 0x9Bu)); |
529 pRenderer->RasterLine2D(v106.uViewportX + 129, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportW + 1, TargetColor(0xE1u, 255, 0x9Bu)); | 529 pRenderer->RasterLine2D(v106.uViewportX + 129, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportW + 1, Color16(0xE1u, 255, 0x9Bu)); |
530 pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportY - 1, TargetColor(0xE1u, 255, 0x9Bu)); | 530 pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportY - 1, Color16(0xE1u, 255, 0x9Bu)); |
531 if ( pRenderer->pRenderD3D ) | 531 if ( pRenderer->pRenderD3D ) |
532 { | 532 { |
533 v106.uScreenSpaceY = v115 + v106.uViewportY + pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uBufferHeight; | 533 v106.uScreenSpaceY = v115 + v106.uViewportY + pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uBufferHeight; |
534 memset(&Dst, 0, 0x64u); | 534 memset(&Dst, 0, 0x64u); |
535 Dst.dwSize = 100; | 535 Dst.dwSize = 100; |
566 v84.right = v106.uViewportZ; | 566 v84.right = v106.uViewportZ; |
567 v84.bottom = v106.uViewportW; | 567 v84.bottom = v106.uViewportW; |
568 ErrD3D(pRenderer->pBackBuffer4->Blt(&v84, 0, 0, 16778240u, &Dst)); | 568 ErrD3D(pRenderer->pBackBuffer4->Blt(&v84, 0, 0, 16778240u, &Dst)); |
569 if ( pRenderer->uTargetGBits == 5 ) | 569 if ( pRenderer->uTargetGBits == 5 ) |
570 { | 570 { |
571 __debugbreak(); // no monster popup for r5g5b5 yet | 571 __debugbreak(); // no monster popup for r5g5b5 will be |
572 memset(&pDesc, 0, 0x7Cu); | 572 memset(&pDesc, 0, 0x7Cu); |
573 pDesc.dwSize = 124; | 573 pDesc.dwSize = 124; |
574 if ( pRenderer->LockSurface_DDraw4(pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface, &pDesc, DDLOCK_WAIT)) | 574 if ( pRenderer->LockSurface_DDraw4(pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface, &pDesc, DDLOCK_WAIT)) |
575 { | 575 { |
576 v20 = (char *)dst_y; | 576 v20 = (char *)dst_y; |
577 v110 = pDesc.lpSurface; | 577 v110 = pDesc.lpSurface; |
578 if (dst_y < dst_w) | 578 if (dst_y < dst_w) |
579 { | 579 { |
580 v21 = dst_x; | 580 v21 = dst_x; |
581 v22 = &pRenderer->pTargetSurface[dst_y * pRenderer->uTargetSurfacePitch + dst_x]; | 581 //v22 = &pRenderer->pTargetSurface[dst_y * pRenderer->uTargetSurfacePitch + dst_x]; |
582 ushort* _v22_2 = v22; | 582 ushort* _v22_2 = v22; |
583 v23 = i - dst_y; | 583 v23 = i - dst_y; |
584 v115 = i - dst_y; | 584 v115 = i - dst_y; |
585 while ( 1 ) | 585 while ( 1 ) |
586 { | 586 { |
621 { | 621 { |
622 ushort* src = (unsigned __int16 *)pDesc.lpSurface; | 622 ushort* src = (unsigned __int16 *)pDesc.lpSurface; |
623 uint num_top_scanlines_above_frame_y = i - dst_y; | 623 uint num_top_scanlines_above_frame_y = i - dst_y; |
624 for (uint y = dst_y; y < dst_w; ++y) | 624 for (uint y = dst_y; y < dst_w; ++y) |
625 { | 625 { |
626 ushort* dst = &pRenderer->pTargetSurface[y * pRenderer->uTargetSurfacePitch + dst_x]; | 626 //ushort* dst = &pRenderer->pTargetSurface[y * pRenderer->uTargetSurfacePitch + dst_x]; |
627 | 627 |
628 uint src_y = num_top_scanlines_above_frame_y + y; | 628 uint src_y = num_top_scanlines_above_frame_y + y; |
629 for (uint x = dst_x; x < dst_z; ++x) | 629 for (uint x = dst_x; x < dst_z; ++x) |
630 { | 630 { |
631 uint src_x = v107 - dst_x + x; // num scanlines left to frame_x + current x | 631 uint src_x = v107 - dst_x + x; // num scanlines left to frame_x + current x |
632 | 632 |
633 uint idx = pDesc.dwHeight * src_y / pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaHeight * (pDesc.lPitch / sizeof(short)) + | 633 uint idx = pDesc.dwHeight * src_y / pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaHeight * (pDesc.lPitch / sizeof(short)) + |
634 pDesc.dwWidth * src_x / pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaWidth; | 634 pDesc.dwWidth * src_x / pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaWidth; |
635 uint b = src[idx] & 0x1F; | 635 uint b = src[idx] & 0x1F; |
636 *dst++ = b | 2 * (src[idx] & 0xFFE0); | 636 //*dst++ = b | 2 * (src[idx] & 0xFFE0); |
637 pRenderer->WritePixel16(y, x, b | 2 * (src[idx] & 0xFFE0)); | |
637 } | 638 } |
638 } | 639 } |
639 pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface->Unlock(0); | 640 pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface->Unlock(0); |
640 } | 641 } |
641 } | 642 } |
659 if ( pActors[uActorID].dword_000334_unique_name ) | 660 if ( pActors[uActorID].dword_000334_unique_name ) |
660 strncpy(pTmpBuf.data(), pMonsterStats->pPlaceStrings[pActors[uActorID].dword_000334_unique_name], 2000); | 661 strncpy(pTmpBuf.data(), pMonsterStats->pPlaceStrings[pActors[uActorID].dword_000334_unique_name], 2000); |
661 else | 662 else |
662 strncpy(pTmpBuf.data(), pMonsterStats->pInfos[pActors[uActorID].pMonsterInfo.uID].pName, 2000); | 663 strncpy(pTmpBuf.data(), pMonsterStats->pInfos[pActors[uActorID].pMonsterInfo.uID].pName, 2000); |
663 } | 664 } |
664 window->DrawTitleText(pFontComic, 0, 0xCu, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); | 665 window->DrawTitleText(pFontComic, 0, 0xCu, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); |
665 //health bar | 666 //health bar |
666 Actor::DrawHealthBar(&pActors[uActorID], window); | 667 Actor::DrawHealthBar(&pActors[uActorID], window); |
667 | 668 |
668 normal_level = 0; | 669 normal_level = 0; |
669 expert_level = 0; | 670 expert_level = 0; |
731 master_level = 1;// | 732 master_level = 1;// |
732 grandmaster_level = 1;// | 733 grandmaster_level = 1;// |
733 for_effects = 1; | 734 for_effects = 1; |
734 } | 735 } |
735 | 736 |
736 window->DrawText(pFontSmallnum, 12, 196, TargetColor(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[631], 0, 0, 0);//Effects | 737 window->DrawText(pFontSmallnum, 12, 196, Color16(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[631], 0, 0, 0);//Effects |
737 if ( !for_effects ) | 738 if ( !for_effects ) |
738 window->DrawText(pFontSmallnum, 28, LOBYTE(pFontSmallnum->uFontHeight) + 193, TargetColor(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[630], 0, 0, 0);//? | 739 window->DrawText(pFontSmallnum, 28, LOBYTE(pFontSmallnum->uFontHeight) + 193, Color16(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[630], 0, 0, 0);//? |
739 else | 740 else |
740 { | 741 { |
741 pText = ""; | 742 pText = ""; |
742 pTextHeight = LOBYTE(pFontSmallnum->uFontHeight) + 193; | 743 pTextHeight = LOBYTE(pFontSmallnum->uFontHeight) + 193; |
743 for ( uint i = 1; i <= 21; ++i ) | 744 for ( uint i = 1; i <= 21; ++i ) |
837 pTextHeight = pTextHeight + *(char *)((int)pFontSmallnum + 5) - 3; | 838 pTextHeight = pTextHeight + *(char *)((int)pFontSmallnum + 5) - 3; |
838 } | 839 } |
839 } | 840 } |
840 } | 841 } |
841 if ( pText == "" ) | 842 if ( pText == "" ) |
842 window->DrawText(pFontSmallnum, 28, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[153], 0, 0, 0);//Νες | 843 window->DrawText(pFontSmallnum, 28, pTextHeight, Color16(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[153], 0, 0, 0);//Νες |
843 } | 844 } |
844 | 845 |
845 if ( normal_level ) | 846 if ( normal_level ) |
846 { | 847 { |
847 sprintf(pTmpBuf.data(), "%s\f%05u\t100%d\n", pGlobalTXT_LocalizationStrings[108], 0, pActors[uActorID].pMonsterInfo.uHP); | 848 sprintf(pTmpBuf.data(), "%s\f%05u\t100%d\n", pGlobalTXT_LocalizationStrings[108], 0, pActors[uActorID].pMonsterInfo.uHP); |
848 window->DrawText(pFontSmallnum, 150, (int)v106.uViewportY, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); | 849 window->DrawText(pFontSmallnum, 150, (int)v106.uViewportY, Color16(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); |
849 pTextHeight = v106.uViewportY + LOBYTE(pFontSmallnum->uFontHeight) - 3; | 850 pTextHeight = v106.uViewportY + LOBYTE(pFontSmallnum->uFontHeight) - 3; |
850 sprintf(pTmpBuf.data(), "%s\f%05u\t100%d\n", pGlobalTXT_LocalizationStrings[12], 0, pActors[uActorID].pMonsterInfo.uAC);//Armor Class | 851 sprintf(pTmpBuf.data(), "%s\f%05u\t100%d\n", pGlobalTXT_LocalizationStrings[12], 0, pActors[uActorID].pMonsterInfo.uAC);//Armor Class |
851 } | 852 } |
852 else | 853 else |
853 { | 854 { |
854 sprintf(pTmpBuf.data(), "%s\f%05u\t100%s\n", pGlobalTXT_LocalizationStrings[108], 0, pGlobalTXT_LocalizationStrings[630]);//? | 855 sprintf(pTmpBuf.data(), "%s\f%05u\t100%s\n", pGlobalTXT_LocalizationStrings[108], 0, pGlobalTXT_LocalizationStrings[630]);//? |
855 window->DrawText(pFontSmallnum, 150, (int)v106.uViewportY, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); | 856 window->DrawText(pFontSmallnum, 150, (int)v106.uViewportY, Color16(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); |
856 pTextHeight = v106.uViewportY + LOBYTE(pFontSmallnum->uFontHeight) - 3; | 857 pTextHeight = v106.uViewportY + LOBYTE(pFontSmallnum->uFontHeight) - 3; |
857 sprintf(pTmpBuf.data(), "%s\f%05u\t100%s\n", pGlobalTXT_LocalizationStrings[12], 0, (unsigned int)pGlobalTXT_LocalizationStrings[630]);//? | 858 sprintf(pTmpBuf.data(), "%s\f%05u\t100%s\n", pGlobalTXT_LocalizationStrings[12], 0, (unsigned int)pGlobalTXT_LocalizationStrings[630]);//? |
858 } | 859 } |
859 window->DrawText(pFontSmallnum, 150, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); | 860 window->DrawText(pFontSmallnum, 150, pTextHeight, Color16(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); |
860 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 6 + LOBYTE(pFontSmallnum->uFontHeight); | 861 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 6 + LOBYTE(pFontSmallnum->uFontHeight); |
861 | 862 |
862 content[0] = pGlobalTXT_LocalizationStrings[87]; | 863 content[0] = pGlobalTXT_LocalizationStrings[87]; |
863 content[1] = pGlobalTXT_LocalizationStrings[6]; | 864 content[1] = pGlobalTXT_LocalizationStrings[6]; |
864 content[2] = pGlobalTXT_LocalizationStrings[240]; | 865 content[2] = pGlobalTXT_LocalizationStrings[240]; |
872 content[10] = pGlobalTXT_LocalizationStrings[54]; | 873 content[10] = pGlobalTXT_LocalizationStrings[54]; |
873 | 874 |
874 if ( expert_level ) | 875 if ( expert_level ) |
875 { | 876 { |
876 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, content[pActors[uActorID].pMonsterInfo.uAttack1Type]);//Attack | 877 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, content[pActors[uActorID].pMonsterInfo.uAttack1Type]);//Attack |
877 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); | 878 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, Color16(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); |
878 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; | 879 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; |
879 if ( pActors[uActorID].pMonsterInfo.uAttack1DamageBonus ) | 880 if ( pActors[uActorID].pMonsterInfo.uAttack1DamageBonus ) |
880 sprintf(pTmpBuf.data(), "%s\f%05u\t080%dd%d+%d\n", pGlobalTXT_LocalizationStrings[53], | 881 sprintf(pTmpBuf.data(), "%s\f%05u\t080%dd%d+%d\n", pGlobalTXT_LocalizationStrings[53], |
881 0, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceRolls, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceSides, pActors[uActorID].pMonsterInfo.uAttack1DamageBonus); | 882 0, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceRolls, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceSides, pActors[uActorID].pMonsterInfo.uAttack1DamageBonus); |
882 else | 883 else |
884 0, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceRolls, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceSides); | 885 0, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceRolls, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceSides); |
885 } | 886 } |
886 else | 887 else |
887 { | 888 { |
888 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, pGlobalTXT_LocalizationStrings[630]); | 889 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, pGlobalTXT_LocalizationStrings[630]); |
889 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); | 890 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, Color16(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); |
890 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; | 891 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; |
891 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[53], 0, pGlobalTXT_LocalizationStrings[630]); | 892 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[53], 0, pGlobalTXT_LocalizationStrings[630]); |
892 } | 893 } |
893 window->DrawText(pFontSmallnum, 150, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); | 894 window->DrawText(pFontSmallnum, 150, pTextHeight, Color16(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); |
894 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 6 + LOBYTE(pFontSmallnum->uFontHeight); | 895 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 6 + LOBYTE(pFontSmallnum->uFontHeight); |
895 | 896 |
896 if ( !master_level ) | 897 if ( !master_level ) |
897 { | 898 { |
898 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[628], 0, pGlobalTXT_LocalizationStrings[630]);//"Spell" "?" | 899 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[628], 0, pGlobalTXT_LocalizationStrings[630]);//"Spell" "?" |
899 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); | 900 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, Color16(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); |
900 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; | 901 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; |
901 } | 902 } |
902 else | 903 else |
903 { | 904 { |
904 pText = pGlobalTXT_LocalizationStrings[628];//Spell | 905 pText = pGlobalTXT_LocalizationStrings[628];//Spell |
905 if ( pActors[uActorID].pMonsterInfo.uSpell1ID && pActors[uActorID].pMonsterInfo.uSpell2ID ) | 906 if ( pActors[uActorID].pMonsterInfo.uSpell1ID && pActors[uActorID].pMonsterInfo.uSpell2ID ) |
906 pText = pGlobalTXT_LocalizationStrings[629];//Spells | 907 pText = pGlobalTXT_LocalizationStrings[629];//Spells |
907 if ( pActors[uActorID].pMonsterInfo.uSpell1ID ) | 908 if ( pActors[uActorID].pMonsterInfo.uSpell1ID ) |
908 { | 909 { |
909 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", pText, 0, pSpellStats->pInfos[pActors[uActorID].pMonsterInfo.uSpell1ID].pShortName);//"%s\f%05u\t060%s\n" | 910 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", pText, 0, pSpellStats->pInfos[pActors[uActorID].pMonsterInfo.uSpell1ID].pShortName);//"%s\f%05u\t060%s\n" |
910 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); | 911 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, Color16(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); |
911 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; | 912 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; |
912 } | 913 } |
913 if ( pActors[uActorID].pMonsterInfo.uSpell2ID ) | 914 if ( pActors[uActorID].pMonsterInfo.uSpell2ID ) |
914 { | 915 { |
915 sprintf(pTmpBuf.data(), "\f%05u\t070%s\n", 0, pSpellStats->pInfos[pActors[uActorID].pMonsterInfo.uSpell2ID].pShortName);//"%s\f%05u\t060%s\n" | 916 sprintf(pTmpBuf.data(), "\f%05u\t070%s\n", 0, pSpellStats->pInfos[pActors[uActorID].pMonsterInfo.uSpell2ID].pShortName);//"%s\f%05u\t060%s\n" |
916 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); | 917 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, Color16(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); |
917 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; | 918 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; |
918 } | 919 } |
919 if ( !pActors[uActorID].pMonsterInfo.uSpell1ID && !pActors[uActorID].pMonsterInfo.uSpell2ID ) | 920 if ( !pActors[uActorID].pMonsterInfo.uSpell1ID && !pActors[uActorID].pMonsterInfo.uSpell2ID ) |
920 { | 921 { |
921 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", pGlobalTXT_LocalizationStrings[628], 0, pGlobalTXT_LocalizationStrings[153]);//"%s\f%05u\t060%s\n" | 922 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", pGlobalTXT_LocalizationStrings[628], 0, pGlobalTXT_LocalizationStrings[153]);//"%s\f%05u\t060%s\n" |
922 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); | 923 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, Color16(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); |
923 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; | 924 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; |
924 } | 925 } |
925 } | 926 } |
926 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; | 927 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; |
927 window->DrawText(pFontSmallnum, 150, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[626], 0, 0, 0);//Immune | 928 window->DrawText(pFontSmallnum, 150, pTextHeight, Color16(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[626], 0, 0, 0);//Immune |
928 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; | 929 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; |
929 | 930 |
930 string_name[0] = pGlobalTXT_LocalizationStrings[87];//Fire | 931 string_name[0] = pGlobalTXT_LocalizationStrings[87];//Fire |
931 string_name[1] = pGlobalTXT_LocalizationStrings[6];//Air | 932 string_name[1] = pGlobalTXT_LocalizationStrings[6];//Air |
932 string_name[2] = pGlobalTXT_LocalizationStrings[240]; | 933 string_name[2] = pGlobalTXT_LocalizationStrings[240]; |
963 pText = pGlobalTXT_LocalizationStrings[627];//Resistant | 964 pText = pGlobalTXT_LocalizationStrings[627];//Resistant |
964 else | 965 else |
965 pText = pGlobalTXT_LocalizationStrings[153];//None | 966 pText = pGlobalTXT_LocalizationStrings[153];//None |
966 } | 967 } |
967 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", string_name[i], 0, pText); | 968 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", string_name[i], 0, pText); |
968 window->DrawText(pFontSmallnum, 170, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); | 969 window->DrawText(pFontSmallnum, 170, pTextHeight, Color16(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); |
969 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; | 970 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; |
970 } | 971 } |
971 } | 972 } |
972 else | 973 else |
973 { | 974 { |
974 for ( uint i = 0; i < 10; ++i ) | 975 for ( uint i = 0; i < 10; ++i ) |
975 { | 976 { |
976 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", string_name[i], 0, pGlobalTXT_LocalizationStrings[630]); // "?" | 977 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", string_name[i], 0, pGlobalTXT_LocalizationStrings[630]); // "?" |
977 window->DrawText(pFontSmallnum, 170, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); | 978 window->DrawText(pFontSmallnum, 170, pTextHeight, Color16(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0); |
978 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; | 979 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3; |
979 } | 980 } |
980 } | 981 } |
981 //cast spell: Detect life | 982 //cast spell: Detect life |
982 if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_DETECT_LIFE].uExpireTime > 0 ) | 983 if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_DETECT_LIFE].uExpireTime > 0 ) |
1025 pGlobalTXT_LocalizationStrings[432], v35 + 3, v35 + 5, pMasterSkillDesc[uPlayerSkillType], // Master | 1026 pGlobalTXT_LocalizationStrings[432], v35 + 3, v35 + 5, pMasterSkillDesc[uPlayerSkillType], // Master |
1026 pGlobalTXT_LocalizationStrings[96], v35 + 3, v35 + 5, pGrandSkillDesc[uPlayerSkillType]); // Grand | 1027 pGlobalTXT_LocalizationStrings[96], v35 + 3, v35 + 5, pGrandSkillDesc[uPlayerSkillType]); // Grand |
1027 } | 1028 } |
1028 else | 1029 else |
1029 { | 1030 { |
1030 sprintf(Source, "\f%05d", TargetColor(0xFFu, 0xFFu, 0xFFu)); | 1031 sprintf(Source, "\f%05d", Color16(0xFFu, 0xFFu, 0xFFu)); |
1031 strcat(a2, Source); | 1032 strcat(a2, Source); |
1032 strcat(a2, "%s: +%d"); | 1033 strcat(a2, "%s: +%d"); |
1033 sprintf(static_sub_417BB5_out_string, a2, pSkillDesc[uPlayerSkillType], | 1034 sprintf(static_sub_417BB5_out_string, a2, pSkillDesc[uPlayerSkillType], |
1034 pGlobalTXT_LocalizationStrings[431], v35 + 3, v35 + 5, pNormalSkillDesc[uPlayerSkillType], | 1035 pGlobalTXT_LocalizationStrings[431], v35 + 3, v35 + 5, pNormalSkillDesc[uPlayerSkillType], |
1035 pGlobalTXT_LocalizationStrings[433], v35 + 3, v35 + 5, pExpertSkillDesc[uPlayerSkillType], | 1036 pGlobalTXT_LocalizationStrings[433], v35 + 3, v35 + 5, pExpertSkillDesc[uPlayerSkillType], |
1272 spell_info_window.DrawMessageBox(0); | 1273 spell_info_window.DrawMessageBox(0); |
1273 spell_info_window.uFrameWidth -= 12; | 1274 spell_info_window.uFrameWidth -= 12; |
1274 spell_info_window.uFrameHeight -= 12; | 1275 spell_info_window.uFrameHeight -= 12; |
1275 spell_info_window.uFrameZ = spell_info_window.uFrameX + spell_info_window.uFrameWidth - 1; | 1276 spell_info_window.uFrameZ = spell_info_window.uFrameX + spell_info_window.uFrameWidth - 1; |
1276 spell_info_window.uFrameW = spell_info_window.uFrameHeight + spell_info_window.uFrameY - 1; | 1277 spell_info_window.uFrameW = spell_info_window.uFrameHeight + spell_info_window.uFrameY - 1; |
1277 spell_info_window.DrawTitleText(pFontArrus, 0x78u, 0xCu, TargetColor(0xFFu, 0xFFu, 0x9Bu), spell->pName, 3); | 1278 spell_info_window.DrawTitleText(pFontArrus, 0x78u, 0xCu, Color16(0xFFu, 0xFFu, 0x9Bu), spell->pName, 3); |
1278 spell_info_window.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2.data(), 0, 0, 0); | 1279 spell_info_window.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2.data(), 0, 0, 0); |
1279 spell_info_window.uFrameWidth = 108; | 1280 spell_info_window.uFrameWidth = 108; |
1280 spell_info_window.uFrameZ = spell_info_window.uFrameX + 107; | 1281 spell_info_window.uFrameZ = spell_info_window.uFrameX + 107; |
1281 spell_info_window.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[pPlayers[uActiveCharacter]->lastOpenedSpellbookPage + 12], 3); | 1282 spell_info_window.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[pPlayers[uActiveCharacter]->lastOpenedSpellbookPage + 12], 3); |
1282 sprintf( pTmpBuf.data(), "%s\n%d", pGlobalTXT_LocalizationStrings[LOCSTR_SP_COST], | 1283 sprintf( pTmpBuf.data(), "%s\n%d", pGlobalTXT_LocalizationStrings[LOCSTR_SP_COST], |
1572 popup_window.uFrameWidth -= 24; | 1573 popup_window.uFrameWidth -= 24; |
1573 popup_window.uFrameY += 12; | 1574 popup_window.uFrameY += 12; |
1574 popup_window.uFrameHeight -= 12; | 1575 popup_window.uFrameHeight -= 12; |
1575 popup_window.uFrameZ = popup_window.uFrameX + popup_window.uFrameWidth - 1; | 1576 popup_window.uFrameZ = popup_window.uFrameX + popup_window.uFrameWidth - 1; |
1576 popup_window.uFrameW = popup_window.uFrameY + popup_window.uFrameHeight - 1; | 1577 popup_window.uFrameW = popup_window.uFrameY + popup_window.uFrameHeight - 1; |
1577 sprintf(pTmpBuf.data(), "\f%05d%s\f00000\n", TargetColor(0xFF, 0xFF, 0x9B), pStr); | 1578 sprintf(pTmpBuf.data(), "\f%05d%s\f00000\n", Color16(0xFF, 0xFF, 0x9B), pStr); |
1578 popup_window.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf.data(), 3); | 1579 popup_window.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf.data(), 3); |
1579 popup_window.DrawText(pFontSmallnum, 1, pFontLucida->uFontHeight, 0, pHint, 0, 0, 0); | 1580 popup_window.DrawText(pFontSmallnum, 1, pFontLucida->uFontHeight, 0, pHint, 0, 0, 0); |
1580 } | 1581 } |
1581 break; | 1582 break; |
1582 } | 1583 } |