Changeset 469 for trunk/LocalPlayer
- Timestamp:
- Dec 3, 2023, 8:33:43 PM (12 months ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/CityScreen.lfm
r232 r469 1 1 object CityDlg: TCityDlg 2 2 Left = 1186 3 Height = 480 3 4 Top = 183 5 Width = 640 4 6 BorderIcons = [] 5 7 BorderStyle = bsNone -
trunk/LocalPlayer/CityScreen.pas
r468 r469 8 8 Protocol, ClientTools, ScreenTools, IsoEngine, BaseWin, LCLIntf, LCLType, 9 9 Messages, SysUtils, Classes, ButtonA, ButtonC, Area, GraphType, Texture, 10 System.UITypes,11 10 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.ExtCtrls{$ELSE} 12 11 Graphics, Controls, Forms, ExtCtrls{$ENDIF}; … … 195 194 procedure TCityDlg.FormCreate(Sender: TObject); 196 195 begin 197 inherited;198 196 RedTex := TTexture.Create; 199 197 BarTex := TTexture.Create; … … 277 275 278 276 UnshareBitmap(Back); 279 BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight,277 BitBltCanvas(Back.Canvas, 0, 0, Width, Height, 280 278 MainTexture.Image.Canvas, 0, 0); 281 ImageOp_B(Back, Template, 0, 0, 0, 0, ClientWidth, ClientHeight);279 ImageOp_B(Back, Template, 0, 0, 0, 0, Width, Height); 282 280 end; 283 281 end; … … 364 362 end; 365 363 end; 366 Brush. style := TBrushStyle.bsClear;364 Brush.Style := TBrushStyle.bsClear; 367 365 end; 368 366 end; … … 539 537 Brush.Color := $FFFFFF; 540 538 FillRect(Rect(8, 7, 36, 32)); 541 Brush. style := TBrushStyle.bsClear;539 Brush.Style := TBrushStyle.bsClear; 542 540 Font.Color := $000000; 543 541 S := IntToStr(C.Size); -
trunk/LocalPlayer/IsoEngine.pas
r468 r469 97 97 Status: Integer); 98 98 procedure PaintCity(X, Y: Integer; const CityInfo: TCityInfo; 99 accessory: Boolean = True);99 Accessory: Boolean = True); 100 100 procedure BitBltBitmap(Src: TBitmap; X, Y, Width, Height, xSrc, ySrc, 101 101 Rop: Integer); … … 715 715 if Flags and unFortified <> 0 then 716 716 begin 717 { DataCanvas :=HGrTerrain.Data.Canvas;718 MaskCanvas :=HGrTerrain.Mask.Canvas;719 TSprite(X, Y+16,12*9+7);}717 { DataCanvas := HGrTerrain.Data.Canvas; 718 MaskCanvas := HGrTerrain.Mask.Canvas; 719 TSprite(X, Y + 16, 12 * 9 + 7); } 720 720 Sprite(HGrStdUnits, X, Y, xxu * 2, yyu * 2, 1 + 6 * (xxu * 2 + 1), 1); 721 721 end; … … 724 724 725 725 procedure TIsoMap.PaintCity(X, Y: Integer; const CityInfo: TCityInfo; 726 accessory: Boolean);727 var 728 age: Integer;726 Accessory: Boolean); 727 var 728 Age: Integer; 729 729 cHGr: TGraphicSet; 730 730 cpix: Integer; … … 737 737 S: string; 738 738 begin 739 age := GetAge(CityInfo.Owner);739 Age := GetAge(CityInfo.Owner); 740 740 if CityInfo.size < 5 then 741 741 xGr := 0 … … 746 746 else 747 747 xGr := 3; 748 Tribe[CityInfo.Owner].InitAge( age);749 if age < 2 then748 Tribe[CityInfo.Owner].InitAge(Age); 749 if Age < 2 then 750 750 begin 751 751 cHGr := Tribe[CityInfo.Owner].cHGr; … … 764 764 if ciWalled and CityInfo.Flags <> 0 then 765 765 Sprite(HGrCities, X - xxt, Y - 2 * yyt, 2 * xxt, 3 * yyt, 766 (xGr + 4) * (2 * xxt + 1) + 1, 1 + ( age - 2) * (3 * yyt + 1))766 (xGr + 4) * (2 * xxt + 1) + 1, 1 + (Age - 2) * (3 * yyt + 1)) 767 767 else 768 768 Sprite(HGrCities, X - xxt, Y - 2 * yyt, 2 * xxt, 3 * yyt, 769 xGr * (2 * xxt + 1) + 1, 1 + ( age - 2) * (3 * yyt + 1));770 end; 771 772 if not accessory then769 xGr * (2 * xxt + 1) + 1, 1 + (Age - 2) * (3 * yyt + 1)); 770 end; 771 772 if not Accessory then 773 773 Exit; 774 774 775 { if ciCapital and CityInfo.Flags<>0 then 776 Sprite(Tribe[CityInfo.Owner].symHGr,X+cpic.xf,Y-13+cpic.yf,13,14, 777 1+Tribe[CityInfo.Owner].sympix mod 10 *65, 778 1+Tribe[CityInfo.Owner].sympix div 10 *49); {capital -- paint flag } 775 { if ciCapital and CityInfo.Flags <> 0 then 776 Sprite(Tribe[CityInfo.Owner].symHGr, X + cpic.xf, Y - 13 + cpic.yf, 13, 14, 777 1 + Tribe[CityInfo.Owner].sympix mod 10 * 65, 778 1 + Tribe[CityInfo.Owner].sympix div 10 * 49); (*capital -- paint flag *) 779 } 779 780 780 781 if MyMap[CityInfo.Loc] and fObserved <> 0 then 781 782 begin 782 if age < 2 then783 if Age < 2 then 783 784 begin 784 785 cpic := Tribe[CityInfo.Owner].CityPicture[xGr]; … … 788 789 else 789 790 begin 790 cpic := CitiesPictures.Pictures[ age, xGr];791 cpic := CitiesPictures.Pictures[Age, xGr]; 791 792 xShield := X - xxt + cpic.xShield; 792 793 yShield := Y - 2 * yyt + cpic.yShield; … … 1240 1241 else if ShowObjects then 1241 1242 begin 1242 { if (CityLoc <0) and (UnFocus>=0) and (Loc=MyUn[UnFocus].Loc) then1243 if BlinkOn then TSprite(X, Y,8+9*0)1244 else TSprite(X, Y,8+9*1); }1243 { if (CityLoc < 0) and (UnFocus >= 0) and (Loc = MyUn[UnFocus].Loc) then 1244 if BlinkOn then TSprite(X, Y, 8 + 9 * 0) 1245 else TSprite(X, Y, 8 + 9 * 1); } 1245 1246 1246 1247 NameCity; … … 1279 1280 PaintUnit(X + (xxt - xxu), Y + (yyt - yyu_anchor), UnitInfo, 1280 1281 MyUn[uix].Status); 1281 // if Showuix then Textout(x +16,y+5,$80FF00,IntToStr(uix));1282 // if Showuix then Textout(x + 16, y + 5, $80FF00, IntToStr(uix)); 1282 1283 end 1283 1284 else {$ENDIF} PaintUnit(X + (xxt - xxu), Y + (yyt - yyu_anchor), UnitInfo, 0); … … 1306 1307 procedure TIsoMap.PaintGrid(X, Y, nx, ny: Integer); 1307 1308 1308 procedure ClippedLine(dx0, dy0: Integer; mirror: Boolean);1309 procedure ClippedLine(dx0, dy0: Integer; Mirror: Boolean); 1309 1310 var 1310 1311 x0, x1, dxmin, dymin, dxmax, dymax, N: Integer; … … 1317 1318 dymax := (RealBottom - Y - 1) div yyt + 1; 1318 1319 N := dymax - dy0; 1319 if mirror then1320 if Mirror then 1320 1321 begin 1321 1322 if dx0 - dxmin < N then … … 1325 1326 N := N - (dx0 - dxmax); 1326 1327 dy0 := dy0 + (dx0 - dxmax); 1327 dx0 := dxmax 1328 dx0 := dxmax; 1328 1329 end; 1329 1330 if dy0 < dymin then … … 1331 1332 N := N - (dymin - dy0); 1332 1333 dx0 := dx0 - (dymin - dy0); 1333 dy0 := dymin 1334 dy0 := dymin; 1334 1335 end; 1335 1336 end … … 1342 1343 N := N - (dxmin - dx0); 1343 1344 dy0 := dy0 + (dxmin - dx0); 1344 dx0 := dxmin 1345 dx0 := dxmin; 1345 1346 end; 1346 1347 if dy0 < dymin then … … 1348 1349 N := N - (dymin - dy0); 1349 1350 dx0 := dx0 + (dymin - dy0); 1350 dy0 := dymin 1351 dy0 := dymin; 1351 1352 end; 1352 1353 end; 1353 1354 if N <= 0 then 1354 1355 Exit; 1355 if mirror then1356 if Mirror then 1356 1357 begin 1357 1358 x0 := X + dx0 * xxt - 1; … … 1363 1364 x1 := X + (dx0 + N) * xxt; 1364 1365 end; 1365 moveto(x0, Y + dy0 * yyt);1366 lineto(x1, Y + (dy0 + N) * yyt);1366 MoveTo(x0, Y + dy0 * yyt); 1367 LineTo(x1, Y + (dy0 + N) * yyt); 1367 1368 end; 1368 1369 end; … … 1454 1455 begin 1455 1456 if CityAllowClick then 1456 pen.Color := $FFFFFF1457 Pen.Color := $FFFFFF 1457 1458 else 1458 pen.Color := $000000;1459 pen.Width := 1;1459 Pen.Color := $000000; 1460 Pen.Width := 1; 1460 1461 for I := 0 to 3 do 1461 1462 begin 1462 moveto(xm - xxt * (4 - I), ym + yyt * (1 + I));1463 lineto(xm + xxt * (1 + I), ym - yyt * (4 - I));1464 moveto(xm - xxt * (4 - I), ym - yyt * (1 + I));1465 lineto(xm + xxt * (1 + I), ym + yyt * (4 - I));1463 MoveTo(xm - xxt * (4 - I), ym + yyt * (1 + I)); 1464 LineTo(xm + xxt * (1 + I), ym - yyt * (4 - I)); 1465 MoveTo(xm - xxt * (4 - I), ym - yyt * (1 + I)); 1466 LineTo(xm + xxt * (1 + I), ym + yyt * (4 - I)); 1466 1467 end; 1467 moveto(xm - xxt * 4, ym + yyt * 1);1468 lineto(xm - xxt * 1, ym + yyt * 4);1469 moveto(xm + xxt * 1, ym + yyt * 4);1470 lineto(xm + xxt * 4, ym + yyt * 1);1471 moveto(xm - xxt * 4, ym - yyt * 1);1472 lineto(xm - xxt * 1, ym - yyt * 4);1473 moveto(xm + xxt * 1, ym - yyt * 4);1474 lineto(xm + xxt * 4, ym - yyt * 1);1475 pen.Width := 1;1468 MoveTo(xm - xxt * 4, ym + yyt * 1); 1469 LineTo(xm - xxt * 1, ym + yyt * 4); 1470 MoveTo(xm + xxt * 1, ym + yyt * 4); 1471 LineTo(xm + xxt * 4, ym + yyt * 1); 1472 MoveTo(xm - xxt * 4, ym - yyt * 1); 1473 LineTo(xm - xxt * 1, ym - yyt * 4); 1474 MoveTo(xm + xxt * 1, ym - yyt * 4); 1475 LineTo(xm + xxt * 4, ym - yyt * 1); 1476 Pen.Width := 1; 1476 1477 end; 1477 1478 end;
Note:
See TracChangeset
for help on using the changeset viewer.