- Timestamp:
- Mar 8, 2021, 10:11:47 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Global.pas
r190 r301 6 6 CevoExt = '.cevo'; 7 7 CevoMapExt = '.cevo map'; 8 CevoHomepage = 'http://c-evo.org'; 9 CevoContact = 'http://c-evo.org/_sg/contact'; 10 CevoContactBug = 'http://c-evo.org/_sg/contact/cevobug.html'; 8 CevoTribeExt = '.tribe.txt'; 9 CevoHomepage = 'https://app.zdechov.net/c-evo'; 10 CevoContact = 'https://app.zdechov.net/c-evo#Contact'; 11 CevoContactBug = 'https://app.zdechov.net/c-evo/report/1'; 11 12 AppRegistryKey = '\SOFTWARE\C-evo'; 12 13 AITemplateFileName = 'AI Template' + DirectorySeparator + 'AI development manual.html'; 14 13 15 14 16 implementation -
trunk/LocalPlayer/IsoEngine.pas
r290 r301 703 703 end; 704 704 Textout(xShield + 2, yShield - 1, LabelTextColor, s); 705 end 705 end; 706 706 end; { PaintCity } 707 707 -
trunk/LocalPlayer/Term.pas
r295 r301 786 786 function CreateTribe(p: integer; FileName: string; Original: boolean): boolean; 787 787 begin 788 if not FileExists(LocalizedFilePath('Tribes' + DirectorySeparator + FileName + 789 '.tribe.txt')) then 790 begin 791 result := false; 792 exit 788 FileName := LocalizedFilePath('Tribes' + DirectorySeparator + FileName + 789 CevoTribeExt); 790 if not FileExists(FileName) then 791 begin 792 Result := False; 793 Exit; 793 794 end; 794 795 … … 1413 1414 begin 1414 1415 UnusedTribeFiles.Clear; 1415 ok := FindFirst(LocalizedFilePath('Tribes') + DirectorySeparator + '* .tribe.txt',1416 ok := FindFirst(LocalizedFilePath('Tribes') + DirectorySeparator + '*' + CevoTribeExt, 1416 1417 faArchive + faReadOnly, SearchRec) = 0; 1417 1418 if not ok then 1418 1419 begin 1419 1420 FindClose(SearchRec); 1420 ok := FindFirst(LocalizedFilePath('Tribes' + DirectorySeparator + '* .tribe.txt'),1421 ok := FindFirst(LocalizedFilePath('Tribes' + DirectorySeparator + '*' + CevoTribeExt), 1421 1422 faArchive + faReadOnly, SearchRec) = 0; 1422 1423 end; 1423 1424 if ok then 1424 1425 repeat 1425 SearchRec.Name := Copy(SearchRec.Name, 1, Length(SearchRec.Name) - 10);1426 SearchRec.Name := Copy(SearchRec.Name, 1, Length(SearchRec.Name) - Length(CevoTribeExt)); 1426 1427 if GetTribeInfo(SearchRec.Name, Name, Color) then 1427 1428 UnusedTribeFiles.AddObject(SearchRec.Name, TObject(Color)); … … 1432 1433 function TMainScreen.ChooseUnusedTribe: integer; 1433 1434 var 1434 i, j, ColorDistance, BestColorDistance, TestColorDistance, 1435 CountBest: integer; 1435 i: Integer; 1436 j: Integer; 1437 ColorDistance: Integer; 1438 BestColorDistance: Integer; 1439 TestColorDistance: Integer; 1440 CountBest: Integer; 1436 1441 begin 1437 1442 assert(UnusedTribeFiles.Count > 0); -
trunk/LocalPlayer/Tribes.pas
r300 r301 5 5 6 6 uses 7 Protocol, ScreenTools, LazFileUtils, Classes, Graphics, SysUtils ;7 Protocol, ScreenTools, LazFileUtils, Classes, Graphics, SysUtils, Global; 8 8 9 9 type … … 49 49 {$IFNDEF SCR} function TString(Template: string): string; 50 50 function TPhrase(Item: string): string; {$ENDIF} 51 procedure SetModelPicture(const Info: TModelPictureInfo; IsNew: boolean);51 procedure SetModelPicture(const Info: TModelPictureInfo; IsNew: Boolean); 52 52 function ChooseModelPicture(var Picture: TModelPictureInfo; 53 Code, Turn: Integer; ForceNew: boolean): boolean;53 Code, Turn: Integer; ForceNew: Boolean): Boolean; 54 54 procedure InitAge(Age: Integer); 55 55 protected … … 68 68 function CityName(Founder: Integer): string; 69 69 function ModelCode(const ModelInfo: TModelInfo): Integer; 70 procedure FindStdModelPicture( code: Integer; var pix: Integer; var Name: string);71 function GetTribeInfo(FileName: string; var Name: string; var Color: TColor): boolean;70 procedure FindStdModelPicture(Code: Integer; var pix: Integer; var Name: string); 71 function GetTribeInfo(FileName: string; var Name: string; var Color: TColor): Boolean; 72 72 procedure FindPosition(HGr, x, y, xmax, ymax: Integer; Mark: TColor; 73 73 var xp, yp: Integer); … … 231 231 end; 232 232 233 procedure FindStdModelPicture( code: Integer; var pix: Integer; var Name: string);233 procedure FindStdModelPicture(Code: Integer; var pix: Integer; var Name: string); 234 234 var 235 235 i: Integer; … … 239 239 Input := StdUnitScript[i]; 240 240 pix := GetNum; 241 if code = GetNum then241 if Code = GetNum then 242 242 begin 243 243 Name := Get; … … 249 249 250 250 function GetTribeInfo(FileName: string; var Name: string; 251 var Color: TColor): boolean;251 var Color: TColor): Boolean; 252 252 var 253 253 Found: Integer; … … 258 258 Found := 0; 259 259 AssignFile(TribeScript, LocalizedFilePath('Tribes' + DirectorySeparator + 260 FileName + '.tribe.txt'));260 FileName + CevoTribeExt)); 261 261 Reset(TribeScript); 262 262 while not EOF(TribeScript) do … … 285 285 var 286 286 Line: Integer; 287 Variant: char;287 Variant: Char; 288 288 Item: string; 289 289 begin … … 292 292 Name[Variant] := ''; 293 293 Script := TStringList.Create; 294 Script.LoadFromFile(LocalizedFilePath('Tribes' + DirectorySeparator + 295 FileName + '.tribe.txt')); 294 Script.LoadFromFile(FileName); 296 295 CityLine0 := 0; 297 296 nCityLines := 0; … … 476 475 end; 477 476 478 procedure TTribe.SetModelPicture(const Info: TModelPictureInfo; IsNew: boolean);477 procedure TTribe.SetModelPicture(const Info: TModelPictureInfo; IsNew: Boolean); 479 478 var 480 479 i: Integer;
Note:
See TracChangeset
for help on using the changeset viewer.