Changeset 210 for branches/highdpi/LocalPlayer/UnitStat.pas
- Timestamp:
- May 9, 2020, 4:02:07 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/LocalPlayer/UnitStat.pas
r193 r210 5 5 6 6 uses 7 Protocol, ClientTools, Term, ScreenTools, BaseWin, UDpiControls,7 UDpiControls, Protocol, ClientTools, Term, ScreenTools, BaseWin, 8 8 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, 9 9 ButtonB, ButtonC; … … 83 83 Template := TDpiBitmap.Create; 84 84 Template.PixelFormat := pf24bit; 85 LoadGraphicFile(Template, HomeDir + 'Graphics'+ DirectorySeparator + 'Unit.png', gfNoGamma);85 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Unit.png', gfNoGamma); 86 86 end; 87 87 … … 97 97 begin 98 98 AgePrepared := MainTextureAge; 99 Dpi bitblt(Back.Canvas.Handle, 0, 0, wCommon, hOwnModel,100 MainTexture.Image.Canvas .Handle, (wMainTexture - wCommon) div 2,101 (hMainTexture - hOwnModel) div 2 , SRCCOPY);102 Dpi bitblt(Back.Canvas.Handle, wCommon, 0, wCommon, hEnemyModel,103 MainTexture.Image.Canvas .Handle, (wMainTexture - wCommon) div 2,104 (hMainTexture - hEnemyModel) div 2 , SRCCOPY);105 Dpi bitblt(Back.Canvas.Handle, 2 * wCommon, 0, wCommon, hEnemyUnit,106 MainTexture.Image.Canvas .Handle, (wMainTexture - wCommon) div 2,107 (hMainTexture - hEnemyUnit) div 2 , SRCCOPY);108 Dpi bitblt(Back.Canvas.Handle, 3 * wCommon, 0, wCommon, hEnemyCityDefense,109 MainTexture.Image.Canvas .Handle, (wMainTexture - wCommon) div 2,110 (hMainTexture - hEnemyCityDefense) div 2 , SRCCOPY);111 Dpi bitblt(Back.Canvas.Handle, 4 * wCommon, 0, wCommon, hEnemyCity,112 MainTexture.Image.Canvas .Handle, (wMainTexture - wCommon) div 2,113 (hMainTexture - hEnemyCity) div 2 , SRCCOPY);99 DpiBitCanvas(Back.Canvas, 0, 0, wCommon, hOwnModel, 100 MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2, 101 (hMainTexture - hOwnModel) div 2); 102 DpiBitCanvas(Back.Canvas, wCommon, 0, wCommon, hEnemyModel, 103 MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2, 104 (hMainTexture - hEnemyModel) div 2); 105 DpiBitCanvas(Back.Canvas, 2 * wCommon, 0, wCommon, hEnemyUnit, 106 MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2, 107 (hMainTexture - hEnemyUnit) div 2); 108 DpiBitCanvas(Back.Canvas, 3 * wCommon, 0, wCommon, hEnemyCityDefense, 109 MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2, 110 (hMainTexture - hEnemyCityDefense) div 2); 111 DpiBitCanvas(Back.Canvas, 4 * wCommon, 0, wCommon, hEnemyCity, 112 MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2, 113 (hMainTexture - hEnemyCity) div 2); 114 114 ImageOp_B(Back, Template, 0, 0, 0, 0, 5 * wCommon, hMax); 115 115 end … … 387 387 dkOwnModel: 388 388 begin 389 Dpi bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hOwnModel,390 Back.Canvas .Handle, 0, 0, SRCCOPY);389 DpiBitCanvas(offscreen.Canvas, 0, 0, wCommon, hOwnModel, 390 Back.Canvas, 0, 0); 391 391 yView := 13; 392 392 yTotal := 92; … … 394 394 dkEnemyModel: 395 395 begin 396 Dpi bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyModel,397 Back.Canvas .Handle, wCommon, 0, SRCCOPY);396 DpiBitCanvas(offscreen.Canvas, 0, 0, wCommon, hEnemyModel, 397 Back.Canvas, wCommon, 0); 398 398 yView := 13; 399 399 yTotal := 92; … … 401 401 dkEnemyUnit, dkOwnUnit: 402 402 begin 403 Dpi bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyUnit,404 Back.Canvas .Handle, 2 * wCommon, 0, SRCCOPY);403 DpiBitCanvas(offscreen.Canvas, 0, 0, wCommon, hEnemyUnit, 404 Back.Canvas, 2 * wCommon, 0); 405 405 yView := 13; 406 406 yTotal := 123; … … 408 408 dkEnemyCityDefense: 409 409 begin 410 Dpi bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyCityDefense,411 Back.Canvas .Handle, 3 * wCommon, 0, SRCCOPY);410 DpiBitCanvas(offscreen.Canvas, 0, 0, wCommon, hEnemyCityDefense, 411 Back.Canvas, 3 * wCommon, 0); 412 412 yView := 171; 413 413 yTotal := 231; … … 415 415 dkEnemyCity: 416 416 begin 417 Dpi bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyCity,418 Back.Canvas .Handle, 4 * wCommon, 0, SRCCOPY);417 DpiBitCanvas(offscreen.Canvas, 0, 0, wCommon, hEnemyCity, 418 Back.Canvas, 4 * wCommon, 0); 419 419 end; 420 420 end; … … 445 445 yImp + ySizeSmall, MainTexture.clBevelLight, 446 446 MainTexture.clBevelShade); 447 Dpi bitblt(offscreen.Canvas.Handle, x, yImp, xSizeSmall, ySizeSmall,448 SmallImp.Canvas .Handle, j mod 7 * xSizeSmall,449 (j + SystemIconLines * 7) div 7 * ySizeSmall , SRCCOPY);447 DpiBitCanvas(offscreen.Canvas, x, yImp, xSizeSmall, ySizeSmall, 448 SmallImp.Canvas, j mod 7 * xSizeSmall, 449 (j + SystemIconLines * 7) div 7 * ySizeSmall); 450 450 inc(x, xSizeSmall + 4) 451 451 end; … … 564 564 * (yyt * 3 + 1)); 565 565 end; 566 Dpi bitblt(offscreen.Canvas.Handle, xView, yView + 16, 64, 32,567 Buffer.Canvas .Handle, 1, 0, SRCCOPY);566 DpiBitCanvas(offscreen.Canvas, xView, yView + 16, 64, 32, 567 Buffer.Canvas, 1, 0); 568 568 569 569 // show unit, experience and health
Note:
See TracChangeset
for help on using the changeset viewer.