- Timestamp:
- Dec 24, 2023, 11:24:57 PM (11 months ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Battle.pas
r496 r505 112 112 VLightGradient(ca, xm - 8, ym + 8 + LABaseDamage, LADamage - LABaseDamage, 113 113 FanaticColor); 114 BitBltCanvas(ca, xm - 12, ym - 12, 24, 24, 115 HGrSystem.Mask.Canvas, 26, 146, SRCAND); 116 BitBltCanvas(ca, xm - 12, ym - 12, 24, 24, 117 HGrSystem.Data.Canvas, 26, 146, SRCPAINT); 114 Sprite(ca, HGrSystem, xm - 12, ym - 12, 24, 24, 26, 146); 118 115 119 116 LabelText := Format('%d', [Forecast.AStr]); … … 139 136 BitBltCanvas(ca, xm + 9 + LDDamage - 7, ym - 6, 14, 17, 140 137 HGrSystem.Mask.Canvas, 51, 153, SRCAND); 141 BitBltCanvas(ca, xm + 8 + LDDamage - 7, ym - 7, 14, 17, 142 HGrSystem.Mask.Canvas, 51, 153, SRCAND); 143 BitBltCanvas(ca, xm + 8 + LDDamage - 7, ym - 7, 14, 17, 144 HGrSystem.Data.Canvas, 51, 153, SRCPAINT); 138 Sprite(ca, HGrSystem, xm + 8 + LDDamage - 7, ym - 7, 14, 17, 51, 153); 145 139 end; 146 140 LabelText := Format('%d', [DDamage]); … … 159 153 BitBltCanvas(ca, xm - 6, ym + 9 + LADamage - 7, 14, 17, 160 154 HGrSystem.Mask.Canvas, 51, 153, SRCAND); 161 BitBltCanvas(ca, xm - 7, ym + 8 + LADamage - 7, 14, 17, 162 HGrSystem.Mask.Canvas, 51, 153, SRCAND); 163 BitBltCanvas(ca, xm - 7, ym + 8 + LADamage - 7, 14, 17, 164 HGrSystem.Data.Canvas, 51, 153, SRCPAINT); 155 Sprite(ca, HGrSystem, xm - 7, ym + 8 + LADamage - 7, 14, 17, 51, 153); 165 156 end; 166 157 LabelText := Format('%d', [MyUn[uix].Health - Forecast.EndHealthAtt]); -
trunk/LocalPlayer/MessgEx.pas
r484 r505 195 195 if GameMode = cMovie then 196 196 begin 197 if not ((GameMode = cMovie) and (MovieSpeed = 4)) then197 if not ((GameMode = cMovie) and (MovieSpeed = 4)) then 198 198 begin 199 199 MovieCancelled := False; … … 230 230 ix, iy, xDst, yDst, dx, dy, xIcon, yIcon: Integer; 231 231 BookRect: TRect; 232 x1, xR, yR, share: Single;232 x1, xR, yR, Share: Single; 233 233 Screwed: TScrewed; 234 234 SrcPtr: TPixelPointer; … … 257 257 for dy := 0 to 1 do begin 258 258 if dx = 0 then 259 share := 1 - xR259 Share := 1 - xR 260 260 else 261 share := xR;261 Share := xR; 262 262 if dy = 0 then 263 share := share * (1 - yR)263 Share := Share * (1 - yR) 264 264 else 265 share := share * yR;265 Share := Share * yR; 266 266 if (xDst + dx < wScrewed) and 267 267 (yDst + dy < hScrewed) then begin 268 268 Screwed[xDst + dx, yDst + dy, 0] := Screwed[xDst + dx, yDst + dy, 0] 269 + share * SrcPtr.Pixel^.B;269 + Share * SrcPtr.Pixel^.B; 270 270 Screwed[xDst + dx, yDst + dy, 1] := Screwed[xDst + dx, yDst + dy, 1] 271 + share * SrcPtr.Pixel^.G;271 + Share * SrcPtr.Pixel^.G; 272 272 Screwed[xDst + dx, yDst + dy, 2] := Screwed[xDst + dx, yDst + dy, 2] 273 + share * SrcPtr.Pixel^.R;273 + Share * SrcPtr.Pixel^.R; 274 274 Screwed[xDst + dx, yDst + dy, 3] := Screwed[xDst + dx, yDst + dy, 275 3] + share;275 3] + Share; 276 276 end; 277 277 end; … … 313 313 procedure TMessgExDlg.PaintEnemyArmy; 314 314 var 315 emix, ix, iy, X, Y, count, UnitsInLine: Integer;315 emix, ix, iy, X, Y, Count, UnitsInLine: Integer; 316 316 begin 317 317 ix := 0; … … 322 322 UnitsInLine := nLostArmy; 323 323 for emix := 0 to MyRO.nEnemyModel - 1 do 324 for count := 0 to LostArmy[emix] - 1 do324 for Count := 0 to LostArmy[emix] - 1 do 325 325 begin 326 326 X := Width div 2 + ix * 64 - UnitsInLine * 32; … … 328 328 with MyRO.EnemyModel[emix], Tribe[Owner].ModelPicture[mix] do 329 329 begin 330 BitBltCanvas(Canvas, X, Y, 64, 48, HGr.Mask.Canvas, 331 pix mod 10 * 65 + 1, pix div 10 * 49 + 1, SRCAND); 332 BitBltCanvas(Canvas, X, Y, 64, 48, HGr.Data.Canvas, 333 pix mod 10 * 65 + 1, pix div 10 * 49 + 1, SRCPAINT); 330 Sprite(Canvas, HGr, X, Y, 64, 48, pix mod 10 * 65 + 1, pix div 10 * 49 + 1); 334 331 end; 335 332 … … 401 398 FrameImage(Canvas, BigImp, Width div 2 - 28, 24, xSizeBig, 402 399 ySizeBig, 0, 0); 403 BitBltCanvas(Canvas, Width div 2 - 32, 20, 64, 44, 404 HGr.Mask.Canvas, pix mod 10 * 65 + 1, 405 pix div 10 * 49 + 1, SRCAND); 406 BitBltCanvas(Canvas, Width div 2 - 32, 20, 64, 44, 407 HGr.Data.Canvas, pix mod 10 * 65 + 1, 408 pix div 10 * 49 + 1, SRCPAINT); 400 Sprite(Canvas, HGr, Width div 2 - 32, 20, 64, 44, pix mod 10 * 65 + 1, 401 pix div 10 * 49 + 1); 409 402 end; 410 403 mikBook: -
trunk/Packages/CevoComponents/ButtonN.pas
r471 r505 36 36 37 37 procedure Register; 38 38 39 39 40 implementation -
trunk/Packages/CevoComponents/ScreenTools.pas
r502 r505 32 32 function LoadGraphicFile(Bmp: TBitmap; FileName: string; Options: TLoadGraphicFileOptions = []): Boolean; 33 33 function LoadGraphicSet(const Name: string; Transparency: Boolean = True): TGraphicSet; 34 procedure Dump( dst: TBitmap; HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: Integer);34 procedure Dump(Dst: TBitmap; HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: Integer); 35 35 procedure BitmapReplaceColor(Dst: TBitmap; X, Y, Width, Height: Integer; OldColor, NewColor: TColor); 36 36 procedure Sprite(Canvas: TCanvas; HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: Integer); 37 37 overload; 38 procedure Sprite(dst: TBitmap; HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: Integer); 38 procedure Sprite(Canvas: TCanvas; xDst, yDst: Integer; GraphicSetItem: TGraphicSetItem); 39 overload; 40 procedure Sprite(Dst: TBitmap; HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: Integer); 39 41 overload; 40 42 procedure MakeBlue(Dst: TBitmap; X, Y, Width, Height: Integer); … … 85 87 procedure VDarkGradient(Canvas: TCanvas; X, Y, Height, Kind: Integer); 86 88 procedure UnderlinedTitleValue(Canvas: TCanvas; Title, Value: string; X, Y, Width: Integer); 87 procedure NumberBar( dst: TBitmap; X, Y: Integer; Cap: string; val: Integer;89 procedure NumberBar(Dst: TBitmap; X, Y: Integer; Cap: string; val: Integer; 88 90 T: TTexture); 89 procedure CountBar( dst: TBitmap; X, Y, W: Integer; Kind: Integer;91 procedure CountBar(Dst: TBitmap; X, Y, W: Integer; Kind: Integer; 90 92 Cap: string; val: Integer; T: TTexture); 91 93 procedure PaintProgressBar(Canvas: TCanvas; Kind, X, Y, Pos, Growth, Max: Integer; … … 562 564 end; 563 565 564 procedure Dump( dst: TBitmap; HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: Integer);565 begin 566 BitBltCanvas( dst.Canvas, xDst, yDst, Width, Height,566 procedure Dump(Dst: TBitmap; HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: Integer); 567 begin 568 BitBltCanvas(Dst.Canvas, xDst, yDst, Width, Height, 567 569 HGr.Data.Canvas, xGr, yGr); 568 570 end; … … 863 865 procedure Sprite(Canvas: TCanvas; HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: Integer); 864 866 begin 865 BitBltCanvas(Canvas, xDst, yDst, Width, Height, 866 HGr.Mask.Canvas, xGr, yGr, SRCAND); 867 BitBltCanvas(Canvas, xDst, yDst, Width, Height, 868 HGr.Data.Canvas, xGr, yGr, SRCPAINT); 869 end; 870 871 procedure Sprite(dst: TBitmap; HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: Integer); 872 begin 873 BitBltCanvas(dst.Canvas, xDst, yDst, Width, Height, 874 HGr.Mask.Canvas, xGr, yGr, SRCAND); 875 BitBltCanvas(dst.Canvas, xDst, yDst, Width, Height, 876 HGr.Data.Canvas, xGr, yGr, SRCPAINT); 867 BitBltCanvas(Canvas, xDst, yDst, Width, Height, HGr.Mask.Canvas, xGr, yGr, SRCAND); 868 BitBltCanvas(Canvas, xDst, yDst, Width, Height, HGr.Data.Canvas, xGr, yGr, SRCPAINT); 869 end; 870 871 procedure Sprite(Canvas: TCanvas; xDst, yDst: Integer; GraphicSetItem: TGraphicSetItem); 872 begin 873 Sprite(Canvas, GraphicSetItem.GraphicSet, xDst, yDst, GraphicSetItem.Width, 874 GraphicSetItem.Height, GraphicSetItem.Left, GraphicSetItem.Top); 875 end; 876 877 procedure Sprite(Dst: TBitmap; HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: Integer); 878 begin 879 Sprite(Dst.Canvas, HGr, xDst, yDst, Width, Height, xGr, yGr); 877 880 end; 878 881 … … 1211 1214 procedure PaintIcon(X, Y, Kind: Integer); 1212 1215 begin 1213 BitBltCanvas(Canvas, X, Y + 6, 10, 10, HGrSystem.Mask.Canvas, 1214 66 + Kind mod 11 * 11, 115 + Kind div 11 * 11, SRCAND); 1215 BitBltCanvas(Canvas, X, Y + 6, 10, 10, HGrSystem.Data.Canvas, 1216 66 + Kind mod 11 * 11, 115 + Kind div 11 * 11, SRCPAINT); 1216 Sprite(Canvas, HGrSystem, X, Y + 6, 10, 10, 1217 66 + Kind mod 11 * 11, 115 + Kind div 11 * 11); 1217 1218 end; 1218 1219 … … 1383 1384 end; 1384 1385 1385 procedure NumberBar( dst: TBitmap; X, Y: Integer; Cap: string;1386 procedure NumberBar(Dst: TBitmap; X, Y: Integer; Cap: string; 1386 1387 val: Integer; T: TTexture); 1387 1388 var … … 1390 1391 if val > 0 then 1391 1392 begin 1392 DLine( dst.Canvas, X - 2, X + 170, Y + 16, T.ColorBevelShade,1393 DLine(Dst.Canvas, X - 2, X + 170, Y + 16, T.ColorBevelShade, 1393 1394 T.ColorBevelLight); 1394 LoweredTextOut( dst.Canvas, -1, T, X - 2, Y, Cap);1395 LoweredTextOut(Dst.Canvas, -1, T, X - 2, Y, Cap); 1395 1396 S := IntToStr(val); 1396 RisedTextOut( dst.Canvas, X + 170 - BiColorTextWidth(dst.Canvas,1397 RisedTextOut(Dst.Canvas, X + 170 - BiColorTextWidth(Dst.Canvas, 1397 1398 S), Y, S); 1398 1399 end; 1399 1400 end; 1400 1401 1401 procedure CountBar( dst: TBitmap; X, Y, W: Integer; Kind: Integer;1402 procedure CountBar(Dst: TBitmap; X, Y, W: Integer; Kind: Integer; 1402 1403 Cap: string; val: Integer; T: TTexture); 1403 1404 var … … 1409 1410 Exit; 1410 1411 Assert(Kind >= 0); 1411 with dst.Canvas do1412 with Dst.Canvas do 1412 1413 begin 1413 1414 // xIcon:=x+100; 1414 1415 // yIcon:=y; 1415 // DLine( dst.Canvas,x-2,x+170+32,y+16,T.ColorBevelShade,T.ColorBevelLight);1416 // DLine(Dst.Canvas,x-2,x+170+32,y+16,T.ColorBevelShade,T.ColorBevelLight); 1416 1417 1417 1418 xIcon := X - 5; 1418 1419 yIcon := Y + 15; 1419 DLine( dst.Canvas, X - 2, xIcon + W + 2, yIcon + 16, T.ColorBevelShade,1420 DLine(Dst.Canvas, X - 2, xIcon + W + 2, yIcon + 16, T.ColorBevelShade, 1420 1421 T.ColorBevelLight); 1421 1422 … … 1425 1426 else 1426 1427 cl := -1; 1427 LoweredTextOut( dst.Canvas, cl, T, X - 2, Y, Cap);1428 LoweredTextOut( dst.Canvas, cl, T,1429 xIcon + W + 2 - BiColorTextWidth( dst.Canvas, S), yIcon, S);1428 LoweredTextOut(Dst.Canvas, cl, T, X - 2, Y, Cap); 1429 LoweredTextOut(Dst.Canvas, cl, T, 1430 xIcon + W + 2 - BiColorTextWidth(Dst.Canvas, S), yIcon, S); 1430 1431 1431 1432 if (Kind = 12) and (val >= 100) then … … 1441 1442 for I := 0 to val mod 10 - 1 do 1442 1443 begin 1443 BitBltCanvas( dst.Canvas, xIcon + 4 + I * (14 * ld div sd), yIcon + 2 + 1, 14,1444 BitBltCanvas(Dst.Canvas, xIcon + 4 + I * (14 * ld div sd), yIcon + 2 + 1, 14, 1444 1445 14, HGrSystem.Mask.Canvas, 67 + Kind mod 8 * 15, 1445 1446 70 + Kind div 8 * 15, SRCAND); 1446 Sprite( dst, HGrSystem, xIcon + 3 + I * (14 * ld div sd), yIcon + 2,1447 Sprite(Dst, HGrSystem, xIcon + 3 + I * (14 * ld div sd), yIcon + 2, 1447 1448 14, 14, 67 + Kind mod 8 * 15, 70 + Kind div 8 * 15); 1448 1449 end; 1449 1450 for I := 0 to val div 10 - 1 do 1450 1451 begin 1451 BitBltCanvas( dst.Canvas, xIcon + 4 + (val mod 10) *1452 BitBltCanvas(Dst.Canvas, xIcon + 4 + (val mod 10) * 1452 1453 (14 * ld div sd) + I * (14 * ld div sd), yIcon + 3, 14, 14, 1453 1454 HGrSystem.Mask.Canvas, 67 + 7 mod 8 * 15, 1454 1455 70 + 7 div 8 * 15, SRCAND); 1455 Sprite( dst, HGrSystem, xIcon + 3 + (val mod 10) *1456 Sprite(Dst, HGrSystem, xIcon + 3 + (val mod 10) * 1456 1457 (14 * ld div sd) + I * (14 * ld div sd), yIcon + 2, 14, 1457 1458 14, 67 + 7 mod 8 * 15, … … 1474 1475 for I := 0 to val div 10 - 1 do 1475 1476 begin 1476 BitBltCanvas( dst.Canvas, xIcon + 4 + I * (14 * ld div sd), yIcon + 3, 14, 14,1477 BitBltCanvas(Dst.Canvas, xIcon + 4 + I * (14 * ld div sd), yIcon + 3, 14, 14, 1477 1478 HGrSystem.Mask.Canvas, 67 + Kind mod 8 * 15, 1478 1479 70 + Kind div 8 * 15, SRCAND); 1479 Sprite( dst, HGrSystem, xIcon + 3 + I * (14 * ld div sd), yIcon + 2,1480 Sprite(Dst, HGrSystem, xIcon + 3 + I * (14 * ld div sd), yIcon + 2, 1480 1481 14, 14, 67 + Kind mod 8 * 15, 70 + Kind div 8 * 15); 1481 1482 end; 1482 1483 for I := 0 to val mod 10 - 1 do 1483 1484 begin 1484 BitBltCanvas( dst.Canvas, xIcon + 4 + (val div 10) *1485 BitBltCanvas(Dst.Canvas, xIcon + 4 + (val div 10) * 1485 1486 (14 * ld div sd) + I * (10 * ld div sd), yIcon + 7, 10, 10, 1486 1487 HGrSystem.Mask.Canvas, 66 + Kind mod 11 * 11, 1487 1488 115 + Kind div 11 * 11, SRCAND); 1488 Sprite( dst, HGrSystem, xIcon + 3 + (val div 10) *1489 Sprite(Dst, HGrSystem, xIcon + 3 + (val div 10) * 1489 1490 (14 * ld div sd) + I * (10 * ld div sd), yIcon + 6, 10, 1490 1491 10, 66 + Kind mod 11 * 11, -
trunk/Start.pas
r496 r505 649 649 650 650 if Page = pgMain then begin 651 651 if SelectedAction <> maNone then // mark selected action 652 652 for I := 0 to (ClientWidth - 2 * ActionSideBorder) div wBuffer + 1 do 653 653 begin … … 714 714 for I := 12 to 19 do 715 715 if (I < 13) or (I > 17) then begin 716 BitBltCanvas(Canvas, 9 + I * 27, yLogo - 2, Ornament.Width, Ornament.Height, 717 HGrSystem2.Mask.Canvas, Ornament.Left, Ornament.Top, SRCAND); 718 BitBltCanvas(Canvas, 9 + I * 27, yLogo - 2, Ornament.Width, Ornament.Height, 719 HGrSystem2.Data.Canvas, Ornament.Left, Ornament.Top, SRCPAINT); 716 Sprite(Canvas, 9 + I * 27, yLogo - 2, Ornament); 720 717 end; 721 718 PaintLogo(Canvas, 69 + 11 * 27, yLogo, MainTexture.ColorBevelLight, … … 796 793 S := Phrases.Lookup('AUTODIFF', AutoDiff - 1); 797 794 RisedTextOut(Canvas, 272 - BiColorTextWidth(Canvas, S), y0Mini + 61, S); 798 799 795 for I := 0 to 19 do 800 796 if (I < 2) or (I > 6) then begin 801 BitBltCanvas(Canvas, 9 + I * 27, yLogo - 2, Ornament.Width, Ornament.Height, 802 HGrSystem2.Mask.Canvas, Ornament.Left, Ornament.Top, SRCAND); 803 BitBltCanvas(Canvas, 9 + I * 27, yLogo - 2, Ornament.Width, Ornament.Height, 804 HGrSystem2.Data.Canvas, Ornament.Left, Ornament.Top, SRCPAINT); 797 Sprite(Canvas, 9 + I * 27, yLogo - 2, Ornament); 805 798 end; 806 799 PaintLogo(Canvas, 69, yLogo, MainTexture.ColorBevelLight,
Note:
See TracChangeset
for help on using the changeset viewer.