Changeset 324
- Timestamp:
- Mar 23, 2021, 3:09:11 PM (4 years ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/CityScreen.pas
r323 r324 1732 1732 end; } 1733 1733 1734 var1735 i, j, k: integer;1736 1737 1734 procedure TCityDlg.PageUpBtnClick(Sender: TObject); 1738 1735 begin … … 1771 1768 end; 1772 1769 1770 procedure SortImprovements; 1771 var 1772 i, j, k: integer; 1773 begin 1774 for i := 0 to nImp - 1 do 1775 ImpSorted[i] := i; 1776 for i := 0 to nImp - 2 do 1777 for j := i + 1 to nImp - 1 do 1778 if Prio(ImpSorted[i]) > Prio(ImpSorted[j]) then begin 1779 k := ImpSorted[i]; 1780 ImpSorted[i] := ImpSorted[j]; 1781 ImpSorted[j] := k; 1782 end; 1783 end; 1784 1773 1785 initialization 1774 1786 1775 for i := 0 to nImp - 1 do 1776 ImpSorted[i] := i; 1777 for i := 0 to nImp - 2 do 1778 for j := i + 1 to nImp - 1 do 1779 if Prio(ImpSorted[i]) > Prio(ImpSorted[j]) then 1780 begin 1781 k := ImpSorted[i]; 1782 ImpSorted[i] := ImpSorted[j]; 1783 ImpSorted[j] := k; 1784 end; 1787 SortImprovements; 1785 1788 1786 1789 end. -
trunk/LocalPlayer/IsoEngine.pas
r322 r324 14 14 15 15 TIsoMap = class 16 constructor Create;17 procedure SetOutput(Output: TBitmap);18 procedure SetPaintBounds(Left, Top, Right, Bottom: integer);19 procedure Paint(x, y, Loc, nx, ny, CityLoc, CityOwner: integer;20 UseBlink: boolean = false; CityAllowClick: boolean = false);21 procedure PaintUnit(x, y: integer; const UnitInfo: TUnitInfo;22 Status: integer);23 procedure PaintCity(x, y: integer; const CityInfo: TCityInfo;24 accessory: boolean = true);25 procedure BitBltBitmap(Src: TBitmap; x, y, Width, Height, xSrc, ySrc,26 Rop: integer);27 28 procedure AttackBegin(const ShowMove: TShowMove);29 procedure AttackEffect(const ShowMove: TShowMove);30 procedure AttackEnd;31 32 16 private 33 17 procedure CityGrid(xm, ym: integer; CityAllowClick: Boolean); … … 37 21 protected 38 22 FOutput: TBitmap; 39 FLeft, FTop, FRight, FBottom, RealTop, RealBottom, AttLoc, DefLoc, 40 DefHealth, FAdviceLoc: integer; 23 FLeft: Integer; 24 FTop: Integer; 25 FRight: Integer; 26 FBottom: Integer; 27 RealTop: Integer; 28 RealBottom: Integer; 29 AttLoc: Integer; 30 DefLoc: Integer; 31 DefHealth: Integer; 32 FAdviceLoc: Integer; 41 33 DataCanvas: TCanvas; 42 34 MaskCanvas: TCanvas; … … 53 45 procedure Sprite(HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: integer); 54 46 procedure TSprite(xDst, yDst, grix: integer; PureBlack: boolean = false); 55 56 47 public 48 constructor Create; 49 procedure SetOutput(Output: TBitmap); 50 procedure SetPaintBounds(Left, Top, Right, Bottom: integer); 51 procedure Paint(x, y, Loc, nx, ny, CityLoc, CityOwner: integer; 52 UseBlink: boolean = false; CityAllowClick: boolean = false); 53 procedure PaintUnit(x, y: integer; const UnitInfo: TUnitInfo; 54 Status: integer); 55 procedure PaintCity(x, y: integer; const CityInfo: TCityInfo; 56 accessory: boolean = true); 57 procedure BitBltBitmap(Src: TBitmap; x, y, Width, Height, xSrc, ySrc, 58 Rop: integer); 59 procedure AttackBegin(const ShowMove: TShowMove); 60 procedure AttackEffect(const ShowMove: TShowMove); 61 procedure AttackEnd; 57 62 property AdviceLoc: integer read FAdviceLoc write FAdviceLoc; 58 63 end; … … 1036 1041 if BordersOK and (1 shl p1) = 0 then 1037 1042 begin 1038 // Clearing before BitBltBitmap SRCCOPY shouldn't be neccesary but for some 1039 // reason without it code works different then under Delphi 1040 Borders.Canvas.FillRect(Bounds(0, p1 * (yyt * 2), xxt * 2, yyt * 2)); 1041 1043 UnshareBitmap(Borders); 1042 1044 BitBltCanvas(Borders.Canvas, 0, p1 * (yyt * 2), xxt * 2, 1043 1045 yyt * 2, HGrTerrain.Data.Canvas,
Note:
See TracChangeset
for help on using the changeset viewer.