- Timestamp:
- Jan 8, 2017, 10:20:03 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 deleted
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 11 11 lib 12 12 heaptrclog.trc 13 c-evo
-
- Property svn:ignore
-
trunk/AI/AI.pas
r23 r29 1 {$INCLUDE switches.inc}1 {$INCLUDE Switches.inc} 2 2 unit AI; 3 3 -
trunk/AI/AIProject.lpr
r23 r29 1 {$INCLUDE switches.inc}1 {$INCLUDE Switches.inc} 2 2 library AIProject; 3 3 -
trunk/AI/CustomAI.pas
r23 r29 1 {$INCLUDE switches.inc}1 {$INCLUDE Switches.inc} 2 2 unit CustomAI; 3 3 -
trunk/AI/Pile.pas
r23 r29 2 2 main parts contributed by Rassim Eminli } 3 3 4 {$INCLUDE switches.inc}4 {$INCLUDE Switches.inc} 5 5 unit Pile; 6 6 -
trunk/AI/ToolAI.pas
r23 r29 1 {$INCLUDE switches.inc}1 {$INCLUDE Switches.inc} 2 2 unit ToolAI; 3 3 -
trunk/GameServer.pas
r24 r29 183 183 T: TextFile; 184 184 s: string; 185 185 Key: string; 186 Value: string; 186 187 begin 187 188 Notify := NotifyFunction; … … 204 205 nBrain := bixFirstAI; 205 206 bixBeginner := bixFirstAI; 206 if FindFirst(HomeDir + ' *.ai.txt', $21, f) = 0 then207 if FindFirst(HomeDir + 'AI' + DirectorySeparator + '*.ai.txt', $21, f) = 0 then 207 208 repeat 208 209 with Brain[nBrain] do 209 210 begin 210 211 FileName := Copy(f.Name, 1, Length(f.Name) - 7); 211 DLLName := HomeDir + FileName;212 DLLName := HomeDir + 'AI' + DirectorySeparator + FileName; 212 213 Name := Copy(f.Name, 1, Length(f.Name) - 7); 213 214 Credits := ''; … … 216 217 Initialized := false; 217 218 ServerVersion := 0; 218 AssignFile(T, HomeDir + f.Name);219 AssignFile(T, HomeDir + 'AI' + DirectorySeparator + f.Name); 219 220 Reset(T); 220 221 while not EOF(T) do … … 222 223 ReadLn(T, s); 223 224 s := trim(s); 224 if Copy(s, 1, 5) = '#NAME' then 225 Name := Copy(s, 7, 255) 226 else if Copy(s, 1, 10) = '#.NET' then 225 if Pos(' ', S) > 0 then begin 226 Key := Copy(S, 1, Pos(' ', S) - 1); 227 Value := Trim(Copy(S, Pos(' ', S) + 1, Length(S))); 228 end else begin 229 Key := S; 230 Value := ''; 231 end; 232 if Key = '#NAME' then 233 Name := Value 234 else if Key = '#.NET' then 227 235 Flags := Flags or fDotNet 228 else if Copy(s, 1, 9)= '#BEGINNER' then236 else if Key = '#BEGINNER' then 229 237 bixBeginner := nBrain 230 else if Copy(s, 1, 5) = '#PATH' then 231 DLLName := HomeDir + trim(Copy(s, 7, 255)) 232 else if Copy(s, 1, 12) = '#GAMEVERSION' then 233 for i := 13 to Length(s) do 234 case s[i] of 238 else if Key = '#PATH' then 239 DLLName := HomeDir + 'AI' + DirectorySeparator + Value 240 {$IFDEF WINDOWS}{$IFDEF CPU32} 241 else if Key = '#PATH_WIN32' then 242 DLLName := HomeDir + 'AI' + DirectorySeparator + Value 243 {$ENDIF}{$ENDIF} 244 {$IFDEF WINDOWS}{$IFDEF CPU64} 245 else if Key = '#PATH_WIN64' then 246 DLLName := HomeDir + 'AI' + DirectorySeparator + Value 247 {$ENDIF}{$ENDIF} 248 {$IFDEF LINUX}{$IFDEF CPU32} 249 else if Key = '#PATH_LINUX32' then 250 DLLName := HomeDir + 'AI' + DirectorySeparator + Value 251 {$ENDIF}{$ENDIF} 252 {$IFDEF LINUX}{$IFDEF CPU64} 253 else if Key = '#PATH_LINUX64' then 254 DLLName := HomeDir + 'AI' + DirectorySeparator + Value 255 {$ENDIF}{$ENDIF} 256 else if Key = '#GAMEVERSION' then 257 for i := 1 to Length(Value) do 258 case Value[i] of 235 259 '0' .. '9': 236 260 ServerVersion := ServerVersion and $FFFF00 + ServerVersion and 237 $FF * 10 + ord( s[i]) - 48;261 $FF * 10 + ord(Value[i]) - 48; 238 262 '.': 239 263 ServerVersion := ServerVersion shl 8; 240 264 end 241 else if Copy(s, 1, 8)= '#CREDITS' then242 Credits := Copy(s, 10, 255)265 else if Key = '#CREDITS' then 266 Credits := Value 243 267 end; 244 268 CloseFile(T); -
trunk/Integrated.lpi
r27 r29 430 430 <StackChecks Value="True"/> 431 431 </Checks> 432 <VerifyObjMethodCallValidity Value="True"/>433 432 </CodeGeneration> 434 433 <Linking> -
trunk/LocalPlayer/CityScreen.pas
r28 r29 216 216 Back.Height := ClientHeight; 217 217 Template := TBitmap.Create; 218 LoadGraphicFile(Template, HomeDir + 'Graphics \City', gfNoGamma);218 LoadGraphicFile(Template, HomeDir + 'Graphics' + DirectorySeparator + 'City', gfNoGamma); 219 219 Template.PixelFormat := pf8bit; 220 220 CityMapTemplate := TBitmap.Create; 221 LoadGraphicFile(CityMapTemplate, HomeDir + 'Graphics \BigCityMap', gfNoGamma);221 LoadGraphicFile(CityMapTemplate, HomeDir + 'Graphics' + DirectorySeparator + 'BigCityMap', gfNoGamma); 222 222 CityMapTemplate.PixelFormat := pf8bit; 223 223 SmallCityMapTemplate := TBitmap.Create; 224 LoadGraphicFile(SmallCityMapTemplate, HomeDir + 'Graphics \SmallCityMap',224 LoadGraphicFile(SmallCityMapTemplate, HomeDir + 'Graphics' + DirectorySeparator + 'SmallCityMap', 225 225 gfNoGamma); 226 226 SmallCityMapTemplate.PixelFormat := pf24bit; -
trunk/LocalPlayer/Draft.pas
r21 r29 6 6 uses 7 7 Protocol, ClientTools, Term, ScreenTools, PVSB, BaseWin, 8 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls, 9 ButtonA, ButtonB, Area; 8 9 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls, 10 ButtonA, 11 ButtonB, ButtonBase, Area; 10 12 11 13 type … … 89 91 Back.Height := ClientHeight; 90 92 Template := TBitmap.Create; 91 LoadGraphicFile(Template, HomeDir + 'Graphics \MiliRes', gfNoGamma);93 LoadGraphicFile(Template, HomeDir + 'Graphics' + DirectorySeparator + 'MiliRes', gfNoGamma); 92 94 Template.PixelFormat := pf8bit; 93 95 end; -
trunk/LocalPlayer/Help.pas
r28 r29 6 6 uses 7 7 Protocol, ScreenTools, BaseWin, StringTables, 8 8 9 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, 9 ExtCtrls, ButtonB, PVSB, Types;10 ExtCtrls, ButtonB, PVSB, ButtonBase, Types; 10 11 11 12 const … … 40 41 41 42 THyperText = class(TStringList) 42 public43 43 procedure AddLine(s: String = ''; Format: integer = 0; Picpix: integer = 0; 44 44 LinkCategory: integer = 0; LinkIndex: integer = 0); … … 1169 1169 List := TStringList.Create; 1170 1170 plus := TStringList.Create; 1171 if FindFirst(HomeDir + 'Graphics \*.credits.txt', $27, sr) = 0 then1171 if FindFirst(HomeDir + 'Graphics' + DirectorySeparator + '*.credits.txt', $27, sr) = 0 then 1172 1172 repeat 1173 plus.LoadFromFile(HomeDir + 'Graphics \'+ sr.Name);1173 plus.LoadFromFile(HomeDir + 'Graphics' + DirectorySeparator + sr.Name); 1174 1174 List.AddStrings(plus); 1175 1175 until FindNext(sr) <> 0; … … 1203 1203 begin 1204 1204 List := TStringList.Create; 1205 List.LoadFromFile(HomeDir + 'Sounds \sound.credits.txt');1205 List.LoadFromFile(HomeDir + 'Sounds' + DirectorySeparator + 'sound.credits.txt'); 1206 1206 for i := 0 to List.Count - 1 do 1207 1207 begin … … 1917 1917 case Link and $FF of 1918 1918 1: 1919 OpenDocument(pchar(HomeDir + 'AI Template \AI development manual.html'));{ *Převedeno z ShellExecute* }1919 OpenDocument(pchar(HomeDir + 'AI Template' + DirectorySeparator + 'AI development manual.html'));{ *Převedeno z ShellExecute* } 1920 1920 2: 1921 1921 OpenURL('http://c-evo.org');{ *Převedeno z ShellExecute* } -
trunk/LocalPlayer/NatStat.pas
r21 r29 6 6 uses 7 7 Protocol, ClientTools, Term, ScreenTools, BaseWin, 8 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, 9 ButtonB, ButtonC, Menus, EOTButton; 8 9 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, 10 ButtonBase, ButtonB, ButtonC, Menus, EOTButton; 10 11 11 12 type -
trunk/LocalPlayer/Term.pas
r28 r29 10 10 Protocol, Tribes, PVSB, ClientTools, ScreenTools, BaseWin, Messg, ButtonBase, 11 11 12 LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms, Menus,12 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, Menus, 13 13 ExtCtrls, dateutils, Platform, 14 Button B, ButtonC, EOTButton, Area;14 ButtonA, ButtonB, ButtonC, EOTButton, Area; 15 15 16 16 const … … 3417 3417 doinit := false; 3418 3418 OpenKey('SOFTWARE\cevo\RegVer9', false); 3419 try 3420 if ValueExists('TileWidth') then xxt := ReadInteger('TileWidth') div 2; 3421 if ValueExists('TileHeight') then yyt := ReadInteger('TileHeight') div 2; 3422 if ValueExists('OptionChecked') then OptionChecked := ReadInteger('OptionChecked'); 3423 if ValueExists('MapOptionChecked') then MapOptionChecked := ReadInteger('MapOptionChecked'); 3424 if ValueExists('CityMapMask') then CityRepMask := Cardinal(ReadInteger('CityReport')); 3425 except 3426 doinit := true; 3427 end; 3419 if ValueExists('TileWidth') then xxt := ReadInteger('TileWidth') div 2 3420 else xxt := 48; 3421 if ValueExists('TileHeight') then yyt := ReadInteger('TileHeight') div 2 3422 else yyt := 24; 3423 if ValueExists('OptionChecked') then OptionChecked := ReadInteger('OptionChecked') 3424 else OptionChecked := DefaultOptionChecked; 3425 if ValueExists('MapOptionChecked') then MapOptionChecked := ReadInteger('MapOptionChecked') 3426 else MapOptionChecked := 1 shl moCityNames; 3427 if ValueExists('CityMapMask') then CityRepMask := Cardinal(ReadInteger('CityReport')) 3428 else CityRepMask := Cardinal(not chPopIncrease and not chNoGrowthWarning and 3429 not chCaptured); 3428 3430 CloseKey; 3429 3431 if OptionChecked and (7 shl 16) = 0 then … … 3431 3433 // old regver with no scrolling 3432 3434 end; 3433 Reg.free; 3434 if doinit then 3435 begin 3436 xxt := 48; 3437 yyt := 24; 3438 OptionChecked := DefaultOptionChecked; 3439 MapOptionChecked := 1 shl moCityNames; 3440 CityRepMask := Cardinal(not chPopIncrease and not chNoGrowthWarning and 3441 not chCaptured); 3442 end; 3443 3444 if FullScreen then 3445 begin 3435 Reg.Free; 3436 3437 if FullScreen then begin 3446 3438 p.Style := $87000000; 3447 3439 BorderStyle := bsNone; … … 3454 3446 SoundMode := smOnAlt 3455 3447 else 3456 SoundMode := smOn 3448 SoundMode := smOn; 3457 3449 end; 3458 3450 … … 4978 4970 GotoOnly: boolean; 4979 4971 begin 4980 Dist := 0;4981 4972 if ClientMode >= scContact then 4982 4973 exit; -
trunk/LocalPlayer/UnitStat.pas
r21 r29 6 6 uses 7 7 Protocol, ClientTools, Term, ScreenTools, BaseWin, 8 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, 9 ButtonB, ButtonC; 8 9 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, ButtonA, 10 ButtonB, 11 ButtonBase, ButtonC; 10 12 11 13 type … … 81 83 Back.Height := hMax; 82 84 Template := TBitmap.Create; 83 LoadGraphicFile(Template, HomeDir + 'Graphics \Unit', gfNoGamma);85 LoadGraphicFile(Template, HomeDir + 'Graphics' + DirectorySeparator + 'Unit', gfNoGamma); 84 86 Template.PixelFormat := pf8bit; 85 87 end; -
trunk/ScreenTools.pas
r28 r29 9 9 {$ENDIF} 10 10 StringTables, 11 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls,11 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, 12 12 Forms, Menus; 13 13 … … 192 192 193 193 uses 194 Directories, Sound, Registry; 194 Directories, Sound, ButtonBase, ButtonA, ButtonB, 195 196 Registry; 195 197 196 198 var … … 384 386 procedure ApplyGamma(Start, Stop: pbyte); 385 387 begin 386 while Start < Stopdo388 while integer(Start) < integer(Stop) do 387 389 begin 388 390 Start^ := GammaLUT[Start^]; … … 442 444 FirstLine := bmp.ScanLine[0]; 443 445 LastLine := bmp.ScanLine[bmp.Height - 1]; 444 if FirstLine < LastLinethen446 if integer(FirstLine) < integer(LastLine) then 445 447 ApplyGamma(pointer(FirstLine), @LastLine[bmp.Width]) 446 448 else … … 502 504 FirstLine := bmp.ScanLine[0]; 503 505 LastLine := bmp.ScanLine[bmp.Height - 1]; 504 if FirstLine < LastLinethen506 if integer(FirstLine) < integer(LastLine) then 505 507 ApplyGamma(pointer(FirstLine), @LastLine[bmp.Width]) 506 508 else … … 620 622 // X channel = background amp (old Dst content), 128=original brightness 621 623 type 622 TPixel = array [0..2] of Byte; 623 PPixel = ^TPixel; 624 TPixel = array [0 .. 2] of Byte; 624 625 var 625 626 i, Brightness, test: integer; 626 627 PixelSrc: ^Byte; 627 PixelDst: PPixel;628 PixelDst: ^TPixel; 628 629 begin 629 630 {TODO assert(Src.PixelFormat = pf8bit);} … … 652 653 while yDst < h do 653 654 begin 654 PixelDst := dst.ScanLine[yDst] + 3 * xDst;655 PixelSrc := Src.ScanLine[ySrc] + xSrc;655 PixelDst := pointer(integer(dst.ScanLine[yDst]) + 3 * xDst); 656 PixelSrc := pointer(integer(Src.ScanLine[ySrc]) + xSrc); 656 657 for i := 0 to w - 1 do 657 658 begin … … 672 673 else 673 674 PixelDst[0] := test; // Blue 674 PixelDst := Pointer(PixelDst) + 3;675 PixelSrc := Pointer(PixelSrc) + 1;675 PixelDst := pointer(integer(PixelDst) + 3); 676 PixelSrc := pointer(integer(PixelSrc) + 1); 676 677 end; 677 678 inc(yDst); … … 763 764 while y < h do 764 765 begin 765 Pixel := bmp.ScanLine[y] + 3 * x;766 Pixel := pointer(integer(bmp.ScanLine[y]) + 3 * x); 766 767 for i := 0 to w - 1 do 767 768 begin … … 776 777 Pixel[1] := Green; 777 778 Pixel[2] := Red; 778 Pixel := Pointer(Pixel) + 3;779 Pixel := pointer(integer(Pixel) + 3); 779 780 end; 780 781 inc(y); -
trunk/Start.pas
r28 r29 199 199 for I := 0 to nPlOffered - 1 do 200 200 begin 201 if i = 0 then 202 s := ':StdIntf' 203 else 204 s := 'StdAI'; 201 if i = 0 then s := ':StdIntf' 202 else s := 'StdAI'; 205 203 WriteString('Control' + IntToStr(i), s); 206 204 WriteInteger('Diff' + IntToStr(i), 2);
Note:
See TracChangeset
for help on using the changeset viewer.