Changeset 21
- Timestamp:
- Jan 8, 2017, 3:12:18 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Back.pas
r20 r21 5 5 6 6 uses 7 LCLIntf, LCLType, LMessages, Messages,SysUtils, Classes, Graphics, Forms;7 LCLIntf, LCLType, SysUtils, Classes, Graphics, Forms; 8 8 9 9 type -
trunk/Database.pas
r10 r21 891 891 Dist[i, j] := Distance(RareLoc[i], RareLoc[j]); 892 892 893 ibest := 0; 894 jbest := 0; 893 895 MinDist := Distance(0, MapSize - lx shr 1) shr 1; 894 896 for RareType := 1 to 3 do … … 1290 1292 1291 1293 var 1292 p1, p2, nAlive, c, Loc, Loc1, CntGood, CntGoodGrass, MinDist, Tries,i, j, n,1293 nsc, TestLoc, V21, V8, BestDist, TestDist, MinGood, nIrrLoc, xLoc, yLoc, qx,1294 qy,FineDistSQR, nRest: integer;1294 p1, p2, nAlive, c, Loc, Loc1, CntGood, CntGoodGrass, MinDist, i, j, n, 1295 nsc, V21, V8, BestDist, TestDist, MinGood, nIrrLoc, 1296 FineDistSQR, nRest: integer; 1295 1297 ccount: array [0 .. lxmax * lymax - 1] of word; 1296 1298 sc, StartLoc0, sccount: array [1 .. nPl] of integer; -
trunk/Inp.pas
r9 r21 7 7 ScreenTools, Messg, 8 8 9 LCLIntf, LCLType, LMessages, Messages,SysUtils, Classes, Graphics, Controls, Forms,10 ButtonA, StdCtrls , ButtonB, ButtonBase;9 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, 10 ButtonA, StdCtrls; 11 11 12 12 type -
trunk/Integrated.lpi
r17 r21 342 342 <StackChecks Value="True"/> 343 343 </Checks> 344 <VerifyObjMethodCallValidity Value="True"/> 344 345 </CodeGeneration> 345 346 <Linking> -
trunk/LocalPlayer/BaseWin.pas
r17 r21 7 7 ScreenTools, Messg, 8 8 9 LCLIntf, LCLType, LMessages, Messages,SysUtils, Classes, Graphics, Controls, Forms;9 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms; 10 10 11 11 type -
trunk/LocalPlayer/Battle.pas
r17 r21 6 6 uses 7 7 ScreenTools, Protocol, Messg, ButtonBase, ButtonA, Types, LCLIntf, LCLType, 8 9 Messages, SysUtils, Classes, Graphics, Controls, Forms; 8 SysUtils, Classes, Graphics, Controls, Forms; 10 9 11 10 type -
trunk/LocalPlayer/Diagram.pas
r17 r21 5 5 6 6 uses 7 BaseWin, 8 9 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, 10 ButtonB, ButtonBase, Menus; 7 BaseWin, LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, 8 ButtonB, Menus; 11 9 12 10 type … … 230 228 end; 231 229 230 y0 := 0; 232 231 if max > 0 then 233 232 begin -
trunk/LocalPlayer/Draft.pas
r20 r21 6 6 uses 7 7 Protocol, ClientTools, Term, ScreenTools, PVSB, BaseWin, 8 9 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls, 10 ButtonA, 11 ButtonB, ButtonBase, Area; 8 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls, 9 ButtonA, ButtonB, Area; 12 10 13 11 type … … 91 89 Back.Height := ClientHeight; 92 90 Template := TBitmap.Create; 93 LoadGraphicFile(Template, HomeDir + 'Graphics ' + DirectorySeparator + 'MiliRes', gfNoGamma);91 LoadGraphicFile(Template, HomeDir + 'Graphics\MiliRes', gfNoGamma); 94 92 Template.PixelFormat := pf8bit; 95 93 end; -
trunk/LocalPlayer/Enhance.pas
r17 r21 7 7 ScreenTools, BaseWin, Protocol, ClientTools, Term, LCLIntf, LCLType, 8 8 9 Messages,SysUtils, Classes, Graphics, Controls, Forms,10 ButtonB ase, ButtonB, ButtonC, Menus;9 SysUtils, Classes, Graphics, Controls, Forms, 10 ButtonB, ButtonC, Menus; 11 11 12 12 type -
trunk/LocalPlayer/Help.pas
r20 r21 6 6 uses 7 7 Protocol, ScreenTools, BaseWin, StringTables, 8 9 8 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, 10 ExtCtrls, ButtonB, PVSB, ButtonBase,Types;9 ExtCtrls, ButtonB, PVSB, Types; 11 10 12 11 const … … 41 40 42 41 THyperText = class(TStringList) 42 public 43 43 procedure AddLine(s: String = ''; Format: integer = 0; Picpix: integer = 0; 44 44 LinkCategory: integer = 0; LinkIndex: integer = 0); … … 1165 1165 List := TStringList.Create; 1166 1166 plus := TStringList.Create; 1167 if FindFirst(HomeDir + 'Graphics ' + DirectorySeparator + '*.credits.txt', $27, sr) = 0 then1167 if FindFirst(HomeDir + 'Graphics\*.credits.txt', $27, sr) = 0 then 1168 1168 repeat 1169 plus.LoadFromFile(HomeDir + 'Graphics ' + DirectorySeparator+ sr.Name);1169 plus.LoadFromFile(HomeDir + 'Graphics\' + sr.Name); 1170 1170 List.AddStrings(plus); 1171 1171 until FindNext(sr) <> 0; … … 1199 1199 begin 1200 1200 List := TStringList.Create; 1201 List.LoadFromFile(HomeDir + 'Sounds ' + DirectorySeparator + 'sound.credits.txt');1201 List.LoadFromFile(HomeDir + 'Sounds\sound.credits.txt'); 1202 1202 for i := 0 to List.Count - 1 do 1203 1203 begin … … 1913 1913 case Link and $FF of 1914 1914 1: 1915 OpenDocument(pchar(HomeDir + 'AI Template ' + DirectorySeparator + 'AI development manual.html'));{ *Převedeno z ShellExecute* }1915 OpenDocument(pchar(HomeDir + 'AI Template\AI development manual.html'));{ *Převedeno z ShellExecute* } 1916 1916 2: 1917 1917 OpenURL('http://c-evo.org');{ *Převedeno z ShellExecute* } -
trunk/LocalPlayer/IsoEngine.pas
r17 r21 7 7 Protocol, ClientTools, ScreenTools, Tribes, 8 8 {$IFNDEF SCR}Term, {$ENDIF} 9 LCLIntf, LCLType, LMessages,SysUtils, Classes, Graphics;9 LCLIntf, LCLType, SysUtils, Classes, Graphics; 10 10 11 11 type … … 33 33 FLeft, FTop, FRight, FBottom, RealTop, RealBottom, AttLoc, DefLoc, 34 34 DefHealth, FAdviceLoc: integer; 35 OutDC, DataDC, MaskDC: Cardinal;35 OutDC, DataDC, MaskDC: HDC; 36 36 function Connection4(Loc, Mask, Value: integer): integer; 37 37 function Connection8(Loc, Mask: integer): integer; -
trunk/LocalPlayer/MessgEx.pas
r17 r21 6 6 uses 7 7 Messg, Protocol, ScreenTools, Platform, DateUtils, 8 9 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, ButtonA, 10 ButtonB, ButtonBase, StdCtrls; 8 LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms, ButtonA, 9 ButtonB, StdCtrls; 11 10 12 11 type -
trunk/LocalPlayer/NatStat.pas
r20 r21 6 6 uses 7 7 Protocol, ClientTools, Term, ScreenTools, BaseWin, 8 9 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, 10 ButtonBase, ButtonB, ButtonC, Menus, EOTButton; 8 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, 9 ButtonB, ButtonC, Menus, EOTButton; 11 10 12 11 type -
trunk/LocalPlayer/Nego.pas
r17 r21 5 5 6 6 uses 7 ScreenTools, BaseWin, Protocol, Term, LCLType, 8 9 Messages, SysUtils, Classes, Graphics, Controls, Forms, ButtonA, 10 ButtonBase, ButtonB, ButtonC, ButtonN; 7 ScreenTools, BaseWin, Protocol, Term, LCLType, SysUtils, Classes, Graphics, 8 Controls, Forms, ButtonA, ButtonB, ButtonN; 11 9 12 10 const … … 101 99 102 100 uses 103 Messg, ClientTools, Diplomacy, Inp, Select, NatStat, Help,Tribes, MessgEx;101 Messg, ClientTools, Diplomacy, Inp, Select, NatStat, Tribes, MessgEx; 104 102 105 103 {$R *.dfm} … … 290 288 preview, Dot: boolean; 291 289 begin 290 nLines := 0; 292 291 for preview := true downto false do 293 292 begin -
trunk/LocalPlayer/Term.pas
r20 r21 10 10 Protocol, Tribes, PVSB, ClientTools, ScreenTools, BaseWin, Messg, ButtonBase, 11 11 12 LCLIntf, LCLType, LMessages,Messages, SysUtils, Classes, Graphics, Controls, Forms, Menus,12 LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms, Menus, 13 13 ExtCtrls, dateutils, Platform, 14 Button A, ButtonB, ButtonC, EOTButton, Area;14 ButtonB, ButtonC, EOTButton, Area; 15 15 16 16 const … … 4972 4972 GotoOnly: boolean; 4973 4973 begin 4974 Dist := 0; 4974 4975 if ClientMode >= scContact then 4975 4976 exit; -
trunk/LocalPlayer/UnitStat.pas
r20 r21 6 6 uses 7 7 Protocol, ClientTools, Term, ScreenTools, BaseWin, 8 9 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, ButtonA, 10 ButtonB, 11 ButtonBase, ButtonC; 8 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, 9 ButtonB, ButtonC; 12 10 13 11 type … … 83 81 Back.Height := hMax; 84 82 Template := TBitmap.Create; 85 LoadGraphicFile(Template, HomeDir + 'Graphics ' + DirectorySeparator + 'Unit', gfNoGamma);83 LoadGraphicFile(Template, HomeDir + 'Graphics\Unit', gfNoGamma); 86 84 Template.PixelFormat := pf8bit; 87 85 end; -
trunk/LocalPlayer/Wonders.pas
r17 r21 6 6 uses 7 7 ScreenTools, BaseWin, Protocol, 8 9 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, 10 ButtonBase, ButtonB; 8 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, ButtonB; 11 9 12 10 type -
trunk/Messg.pas
r20 r21 16 16 type 17 17 TDrawDlg = class(TForm) 18 public 18 19 constructor Create(AOwner: TComponent); override; 19 public20 20 procedure SmartInvalidate; virtual; 21 21 protected … … 126 126 TButtonBase(Components[cix]).Graphic := GrExt[HGrSystem].Data; 127 127 // if ButtonDownSound<>'*' then 128 // DownSound:=HomeDir+'Sounds '+DirectorySeparator+ButtonDownSound+'.wav';128 // DownSound:=HomeDir+'Sounds\'+ButtonDownSound+'.wav'; 129 129 // if ButtonUpSound<>'*' then 130 // UpSound:=HomeDir+'Sounds '+DirectorySeparator+ButtonUpSound+'.wav';130 // UpSound:=HomeDir+'Sounds\'+ButtonUpSound+'.wav'; 131 131 if Components[cix] is TButtonA then 132 132 TButtonA(Components[cix]).Font := UniFont[ftButton]; -
trunk/NoTerm.pas
r17 r21 6 6 uses 7 7 ScreenTools, Protocol, Messg, LCLIntf, LCLType, dateutils, Platform, 8 9 Messages, SysUtils, Classes, Graphics, Controls, Forms, 10 ButtonBase, ButtonB; 8 SysUtils, Classes, Graphics, Controls, Forms, ButtonB; 11 9 12 10 type -
trunk/ScreenTools.pas
r20 r21 9 9 {$ENDIF} 10 10 StringTables, 11 LCLIntf, LCLType, LMessages, Messages,SysUtils, Classes, Graphics, Controls,11 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, 12 12 Forms, Menus; 13 13 … … 192 192 193 193 uses 194 Directories, Sound, ButtonBase, ButtonA, ButtonB, 195 196 Registry; 194 Directories, Sound, Registry; 197 195 198 196 var … … 386 384 procedure ApplyGamma(Start, Stop: pbyte); 387 385 begin 388 while integer(Start) < integer(Stop)do386 while Start < Stop do 389 387 begin 390 388 Start^ := GammaLUT[Start^]; … … 443 441 FirstLine := bmp.ScanLine[0]; 444 442 LastLine := bmp.ScanLine[bmp.Height - 1]; 445 if integer(FirstLine) < integer(LastLine)then443 if FirstLine < LastLine then 446 444 ApplyGamma(pointer(FirstLine), @LastLine[bmp.Width]) 447 445 else … … 501 499 FirstLine := bmp.ScanLine[0]; 502 500 LastLine := bmp.ScanLine[bmp.Height - 1]; 503 if integer(FirstLine) < integer(LastLine)then501 if FirstLine < LastLine then 504 502 ApplyGamma(pointer(FirstLine), @LastLine[bmp.Width]) 505 503 else … … 612 610 // X channel = background amp (old Dst content), 128=original brightness 613 611 type 614 TPixel = array [0 .. 2] of Byte; 612 TPixel = array [0..2] of Byte; 613 PPixel = ^TPixel; 615 614 var 616 615 i, Brightness, test: integer; 617 616 PixelSrc: ^Byte; 618 PixelDst: ^TPixel;617 PixelDst: PPixel; 619 618 begin 620 619 {TODO assert(Src.PixelFormat = pf8bit);} … … 642 641 while yDst < h do 643 642 begin 644 PixelDst := pointer(integer(dst.ScanLine[yDst]) + 3 * xDst);645 PixelSrc := pointer(integer(Src.ScanLine[ySrc]) + xSrc);643 PixelDst := dst.ScanLine[yDst] + 3 * xDst; 644 PixelSrc := Src.ScanLine[ySrc] + xSrc; 646 645 for i := 0 to w - 1 do 647 646 begin … … 662 661 else 663 662 PixelDst[0] := test; // Blue 664 PixelDst := pointer(integer(PixelDst) + 3);665 PixelSrc := pointer(integer(PixelSrc) + 1);663 PixelDst := Pointer(PixelDst) + 3; 664 PixelSrc := Pointer(PixelSrc) + 1; 666 665 end; 667 666 inc(yDst); … … 751 750 while y < h do 752 751 begin 753 Pixel := pointer(integer(bmp.ScanLine[y]) + 3 * x);752 Pixel := bmp.ScanLine[y] + 3 * x; 754 753 for i := 0 to w - 1 do 755 754 begin … … 764 763 Pixel[1] := Green; 765 764 Pixel[2] := Red; 766 Pixel := pointer(integer(Pixel) + 3);765 Pixel := Pointer(Pixel) + 3; 767 766 end; 768 767 inc(y); -
trunk/Sound.pas
r18 r21 4 4 5 5 uses 6 Messages, SysUtils, Classes, Graphics, Controls, Forms {$IFDEF WINDOWS}, MMSystem {$ENDIF};6 Messages, SysUtils, Classes, Graphics, Controls, Forms {$IFDEF WINDOWS}, MMSystem, Windows{$ENDIF}; 7 7 8 8 function PrepareSound(FileName: string): integer; … … 73 73 begin 74 74 PlayParm.dwCallback := HWND; 75 mciSendCommand(FDeviceID, MCI_PLAY, MCI_NOTIFY, integer(@PlayParm));75 mciSendCommand(FDeviceID, MCI_PLAY, MCI_NOTIFY, DWORD_PTR(@PlayParm)); 76 76 end 77 77 {$ENDIF}
Note:
See TracChangeset
for help on using the changeset viewer.