Changeset 189
- Timestamp:
- May 7, 2020, 12:46:55 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Back.pas
r188 r189 42 42 if FullScreen then begin 43 43 if not Assigned(Img) then begin 44 FileName := HomeDir + 'Graphics'+ DirectorySeparator + 'Background.png';44 FileName := GetGraphicsDir + DirectorySeparator + 'Background.png'; 45 45 if FileExists(FileName) then begin 46 46 Img := TBitmap.Create; -
trunk/Integrated.lpi
r166 r189 95 95 </Item2> 96 96 </RequiredPackages> 97 <Units Count="4 0">97 <Units Count="41"> 98 98 <Unit0> 99 99 <Filename Value="Integrated.lpr"/> … … 328 328 <IsPartOfProject Value="True"/> 329 329 </Unit39> 330 <Unit40> 331 <Filename Value="Global.pas"/> 332 <IsPartOfProject Value="True"/> 333 </Unit40> 330 334 </Units> 331 335 </ProjectOptions> -
trunk/Integrated.lpr
r166 r189 58 58 Application.Initialize; 59 59 Application.Title := 'c-evo'; 60 Directories. InitUnit;60 Directories.UnitInit; 61 61 ScreenTools.UnitInit; 62 62 Application.CreateForm(TDirectDlg, DirectDlg); -
trunk/LocalPlayer/CityScreen.pas
r188 r189 216 216 Template := TBitmap.Create; 217 217 Template.PixelFormat := pf24bit; 218 LoadGraphicFile(Template, HomeDir + 'Graphics'+ DirectorySeparator + 'City.png', gfNoGamma);218 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'City.png', gfNoGamma); 219 219 CityMapTemplate := TBitmap.Create; 220 220 CityMapTemplate.PixelFormat := pf24bit; 221 LoadGraphicFile(CityMapTemplate, HomeDir + 'Graphics'+ DirectorySeparator + 'BigCityMap.png', gfNoGamma);221 LoadGraphicFile(CityMapTemplate, GetGraphicsDir + DirectorySeparator + 'BigCityMap.png', gfNoGamma); 222 222 SmallCityMapTemplate := TBitmap.Create; 223 223 SmallCityMapTemplate.PixelFormat := pf24bit; 224 LoadGraphicFile(SmallCityMapTemplate, HomeDir + 'Graphics'+ DirectorySeparator + 'SmallCityMap.png',224 LoadGraphicFile(SmallCityMapTemplate, GetGraphicsDir + DirectorySeparator + 'SmallCityMap.png', 225 225 gfNoGamma); 226 226 SmallCityMap := TBitmap.Create; -
trunk/LocalPlayer/Draft.pas
r188 r189 92 92 Template := TBitmap.Create; 93 93 Template.PixelFormat := pf24bit; 94 LoadGraphicFile(Template, HomeDir + 'Graphics'+ DirectorySeparator + 'MiliRes.png', gfNoGamma);94 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'MiliRes.png', gfNoGamma); 95 95 end; 96 96 -
trunk/LocalPlayer/Help.pas
r188 r189 5 5 6 6 uses 7 Protocol, ScreenTools, BaseWin, StringTables, Math, 8 L CLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms,9 ExtCtrls,ButtonB, PVSB, Types, fgl;7 Protocol, ScreenTools, BaseWin, StringTables, Math, LCLIntf, LCLType, 8 LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls, 9 ButtonB, PVSB, Types, fgl; 10 10 11 11 const … … 123 123 HelpDlg: THelpDlg; 124 124 125 125 126 implementation 126 127 127 128 uses 128 Directories, ClientTools, Term, Tribes, Inp, Messg, PixelPointer ;129 Directories, ClientTools, Term, Tribes, Inp, Messg, PixelPointer, Global; 129 130 130 131 {$R *.lfm} … … 1229 1230 List := TStringList.Create; 1230 1231 Plus := TStringList.Create; 1231 if FindFirst( HomeDir + 'Graphics'+ DirectorySeparator + '*.credits.txt', $27, sr) = 0 then1232 if FindFirst(GetGraphicsDir + DirectorySeparator + '*.credits.txt', $27, sr) = 0 then 1232 1233 repeat 1233 Plus.LoadFromFile( HomeDir + 'Graphics'+ DirectorySeparator + sr.Name);1234 Plus.LoadFromFile(GetGraphicsDir + DirectorySeparator + sr.Name); 1234 1235 List.AddStrings(Plus); 1235 1236 until FindNext(sr) <> 0; … … 1262 1263 begin 1263 1264 List := TStringList.Create; 1264 List.LoadFromFile( HomeDir + 'Sounds'+ DirectorySeparator + 'sound.credits.txt');1265 List.LoadFromFile(GetSoundsDir + DirectorySeparator + 'sound.credits.txt'); 1265 1266 for i := 0 to List.Count - 1 do begin 1266 1267 s := List[i]; … … 1948 1949 case Link and $FF of 1949 1950 1: OpenDocument(pchar(HomeDir + 'AI Template' + DirectorySeparator + 'AI development manual.html')); 1950 2: OpenURL( 'http://c-evo.org');1951 3: OpenURL( 'http://c-evo.org/_sg/contact');1951 2: OpenURL(CevoHomepage); 1952 3: OpenURL(CevoHomepageContact); 1952 1953 end 1953 1954 else -
trunk/LocalPlayer/IsoEngine.pas
r188 r189 620 620 if Flags and unFortified <> 0 then 621 621 begin 622 { Data DC:=GrExt[HGrTerrain].Data.Canvas.Handle;623 Mask DC:=GrExt[HGrTerrain].Mask.Canvas.Handle;622 { DataCanvas:=GrExt[HGrTerrain].Data.Canvas; 623 MaskCanvas:=GrExt[HGrTerrain].Mask.Canvas; 624 624 TSprite(x,y+16,12*9+7); } 625 625 Sprite(HGrStdUnits, x, y, xxu * 2, yyu * 2, 1 + 6 * (xxu * 2 + 1), 1); -
trunk/LocalPlayer/NatStat.pas
r188 r189 93 93 Template := TBitmap.Create; 94 94 Template.PixelFormat := pf24bit; 95 LoadGraphicFile(Template, HomeDir + 'Graphics'+ DirectorySeparator + 'Nation.png', gfNoGamma);95 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Nation.png', gfNoGamma); 96 96 end; 97 97 -
trunk/LocalPlayer/Term.pas
r188 r189 273 273 procedure RectInvalidate(Left, Top, Rigth, Bottom: integer); 274 274 procedure SmartRectInvalidate(Left, Top, Rigth, Bottom: integer); 275 procedure LoadSettings; 275 276 procedure SaveSettings; 276 277 procedure OnScroll(var m: TMessage); message WM_VSCROLL; … … 467 468 Directories, IsoEngine, CityScreen, Draft, MessgEx, Select, CityType, Help, 468 469 UnitStat, Log, Diagram, NatStat, Wonders, Enhance, Nego, PixelPointer, Sound, 469 Battle, Rates, TechTree, Registry ;470 Battle, Rates, TechTree, Registry, Global; 470 471 471 472 {$R *.lfm} … … 3407 3408 procedure TMainScreen.FormCreate(Sender: TObject); 3408 3409 var 3409 DefaultOptionChecked: integer;3410 Reg: TRegistry;3411 3410 i, j: integer; 3412 3411 begin … … 3437 3436 SaveOption[20] := mAlFastMoves.Tag; 3438 3437 SaveOption[21] := mAlNoMoves.Tag; 3439 DefaultOptionChecked := 1 shl 1 + 1 shl 7 + 1 shl 10 + 1 shl 12 + 1 shl 14 + 3440 1 shl 18 + 1 shl 19; 3441 3442 Reg := TRegistry.Create; 3443 with Reg do 3444 try 3445 OpenKey(AppRegistryKey, false); 3446 if ValueExists('TileWidth') then xxt := ReadInteger('TileWidth') div 2 3447 else xxt := 48; 3448 if ValueExists('TileHeight') then yyt := ReadInteger('TileHeight') div 2 3449 else yyt := 24; 3450 if ValueExists('OptionChecked') then OptionChecked := ReadInteger('OptionChecked') 3451 else OptionChecked := DefaultOptionChecked; 3452 if ValueExists('MapOptionChecked') then MapOptionChecked := ReadInteger('MapOptionChecked') 3453 else MapOptionChecked := 1 shl moCityNames; 3454 if ValueExists('CityReport') then CityRepMask := Cardinal(ReadInteger('CityReport')) 3455 else CityRepMask := Cardinal(not chPopIncrease and not chNoGrowthWarning and 3456 not chCaptured); 3457 if OptionChecked and (7 shl 16) = 0 then 3458 OptionChecked := OptionChecked or (1 shl 16); 3459 // old regver with no scrolling 3460 finally 3461 Free; 3462 end; 3463 3464 if 1 shl 13 and OptionChecked <> 0 then 3465 SoundMode := smOff 3466 else if 1 shl 15 and OptionChecked <> 0 then 3467 SoundMode := smOnAlt 3468 else 3469 SoundMode := smOn; 3438 3439 LoadSettings; 3470 3440 3471 3441 Screen.Cursors[crImpDrag] := LoadCursor(HInstance, 'DRAG'); … … 7777 7747 end; 7778 7748 7749 procedure TMainScreen.LoadSettings; 7750 var 7751 Reg: TRegistry; 7752 DefaultOptionChecked: Integer; 7753 begin 7754 DefaultOptionChecked := 1 shl 1 + 1 shl 7 + 1 shl 10 + 1 shl 12 + 1 shl 14 + 7755 1 shl 18 + 1 shl 19; 7756 Reg := TRegistry.Create; 7757 with Reg do try 7758 OpenKey(AppRegistryKey, False); 7759 if ValueExists('TileWidth') then xxt := ReadInteger('TileWidth') div 2 7760 else xxt := 48; 7761 if ValueExists('TileHeight') then yyt := ReadInteger('TileHeight') div 2 7762 else yyt := 24; 7763 if ValueExists('OptionChecked') then OptionChecked := ReadInteger('OptionChecked') 7764 else OptionChecked := DefaultOptionChecked; 7765 if ValueExists('MapOptionChecked') then MapOptionChecked := ReadInteger('MapOptionChecked') 7766 else MapOptionChecked := 1 shl moCityNames; 7767 if ValueExists('CityReport') then CityRepMask := Cardinal(ReadInteger('CityReport')) 7768 else CityRepMask := Cardinal(not chPopIncrease and not chNoGrowthWarning and 7769 not chCaptured); 7770 if OptionChecked and (7 shl 16) = 0 then 7771 OptionChecked := OptionChecked or (1 shl 16); 7772 // old regver with no scrolling 7773 finally 7774 Free; 7775 end; 7776 7777 if 1 shl 13 and OptionChecked <> 0 then 7778 SoundMode := smOff 7779 else if 1 shl 15 and OptionChecked <> 0 then 7780 SoundMode := smOnAlt 7781 else 7782 SoundMode := smOn; 7783 end; 7784 7779 7785 procedure TMainScreen.mRepClicked(Sender: TObject); 7780 7786 begin -
trunk/LocalPlayer/UnitStat.pas
r188 r189 83 83 Template := TBitmap.Create; 84 84 Template.PixelFormat := pf24bit; 85 LoadGraphicFile(Template, HomeDir + 'Graphics'+ DirectorySeparator + 'Unit.png', gfNoGamma);85 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Unit.png', gfNoGamma); 86 86 end; 87 87 -
trunk/Messg.pas
r173 r189 82 82 if OpenSound <> '' then 83 83 PostMessage(Handle, WM_PLAYSOUND, 0, 0); 84 end; { FormPaint }84 end; 85 85 86 86 procedure TMessgDlg.Button1Click(Sender: TObject); … … 97 97 begin 98 98 if Key = #13 then 99 ModalResult := mrOK 99 ModalResult := mrOK; 100 100 // else if (Key=#27) and (Button2.Visible) then ModalResult:=mrCancel 101 101 end; … … 108 108 Kind := mkOK; 109 109 ShowModal; 110 end 110 end; 111 111 end; 112 112 … … 119 119 Kind := mkOK; 120 120 ShowModal; 121 end 121 end; 122 122 end; 123 123 -
trunk/Packages/CevoComponents/Directories.pas
r169 r189 10 10 11 11 function LocalizedFilePath(const Path: string): string; 12 procedure InitUnit;12 procedure UnitInit; 13 13 function GetSavedDir(Home: Boolean = False): string; 14 14 function GetMapsDir(Home: Boolean = False): string; 15 function GetGraphicsDir: string; 16 function GetSoundsDir: string; 15 17 16 18 … … 30 32 31 33 if Lang = '' then begin 32 33 34 34 for i := 1 to Paramcount - 1 do 35 if (ParamStrUTF8(i) = '--LANG') or (ParamStrUTF8(i) = '-l') or 36 (ParamStrUTF8(i) = '--lang') then 35 37 Lang := ParamStrUTF8(i + 1); 36 38 end; … … 59 61 end; 60 62 61 procedure InitUnit;63 procedure UnitInit; 62 64 var 63 65 AppDataDir: string; … … 113 115 end; 114 116 117 function GetGraphicsDir: string; 118 begin 119 Result := HomeDir + 'Graphics'; 120 end; 121 122 function GetSoundsDir: string; 123 begin 124 Result := HomeDir + 'Sounds'; 125 end; 126 115 127 end. -
trunk/Packages/CevoComponents/DrawDlg.pas
r174 r189 176 176 // ButtonDownSound, ButtonUpSound: string; 177 177 begin 178 // ButtonDownSound :=Sounds.Lookup('BUTTON_DOWN');179 // ButtonUpSound :=Sounds.Lookup('BUTTON_UP');178 // ButtonDownSound := Sounds.Lookup('BUTTON_DOWN'); 179 // ButtonUpSound := Sounds.Lookup('BUTTON_UP'); 180 180 for cix := 0 to ComponentCount - 1 do 181 181 if Components[cix] is TButtonBase then 182 182 begin 183 183 TButtonBase(Components[cix]).Graphic := GrExt[HGrSystem].Data; 184 // if ButtonDownSound <>'*' then185 // DownSound :=HomeDir+'Sounds'+ DirectorySeparator + ButtonDownSound + '.wav';186 // if ButtonUpSound <>'*' then187 // UpSound :=HomeDir+'Sounds'+ DirectorySeparator + ButtonUpSound + '.wav';184 // if ButtonDownSound <> '*' then 185 // DownSound := GetSoundsDir + DirectorySeparator + ButtonDownSound + '.wav'; 186 // if ButtonUpSound <> '*' then 187 // UpSound := GetSoundsDir + DirectorySeparator + ButtonUpSound + '.wav'; 188 188 if Components[cix] is TButtonA then 189 189 TButtonA(Components[cix]).Font := UniFont[ftButton]; -
trunk/Packages/CevoComponents/ScreenTools.pas
r188 r189 188 188 189 189 UniFont: array [TFontType] of TFont; 190 AppRegistryKey: string = '\SOFTWARE\C-evo';190 Gamma: Integer; // global gamma correction (cent) 191 191 192 192 procedure UnitInit; 193 193 procedure UnitDone; 194 procedure InitGammaLookupTable; 195 194 196 195 197 implementation … … 204 206 {$ENDIF} 205 207 206 Gamma: Integer; // global gamma correction (cent) 207 GammaLookupTable: array [0 .. 255] of Byte; 208 GammaLookupTable: array [0..255] of Byte; 208 209 209 210 {$IFDEF WINDOWS} … … 468 469 Source := TBitmap.Create; 469 470 Source.PixelFormat := pf24bit; 470 FileName := HomeDir + 'Graphics'+ DirectorySeparator + Name;471 FileName := GetGraphicsDir + DirectorySeparator + Name; 471 472 if not LoadGraphicFile(Source, FileName) then begin 472 473 Result := -1; … … 1352 1353 with MainTexture do begin 1353 1354 MainTextureAge := Age; 1354 LoadGraphicFile(Image, HomeDir + 'Graphics'+ DirectorySeparator +1355 LoadGraphicFile(Image, GetGraphicsDir + DirectorySeparator + 1355 1356 'Texture' + IntToStr(Age + 1) + '.jpg'); 1356 1357 clBevelLight := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelLight]; … … 1391 1392 1392 1393 if Sounds = nil then Sounds := TStringTable.Create; 1393 if not Sounds.LoadFromFile( HomeDir + 'Sounds'+ DirectorySeparator + 'sound.txt') then1394 if not Sounds.LoadFromFile(GetSoundsDir + DirectorySeparator + 'sound.txt') then 1394 1395 begin 1395 1396 FreeAndNil(Sounds); … … 1470 1471 1471 1472 procedure UnitInit; 1472 var 1473 Reg: TRegistry; 1474 begin 1475 Reg := TRegistry.Create; 1476 with Reg do 1477 try 1478 OpenKey(AppRegistryKey, True); 1479 if ValueExists('Gamma') then 1480 Gamma := ReadInteger('Gamma') 1481 else 1482 begin 1483 Gamma := 100; 1484 WriteInteger('Gamma', Gamma); 1485 end; 1486 if ValueExists('Locale') then 1487 LocaleCode := ReadString('Locale') 1488 else 1489 LocaleCode := ''; 1490 finally 1491 Free; 1492 end; 1493 1494 if Gamma <> 100 then InitGammaLookupTable; 1473 begin 1474 Gamma := 100; 1475 InitGammaLookupTable; 1495 1476 1496 1477 {$IFDEF WINDOWS} … … 1512 1493 Templates := TBitmap.Create; 1513 1494 Templates.PixelFormat := pf24bit; 1514 LoadGraphicFile(Templates, HomeDir + 'Graphics'+ DirectorySeparator +1495 LoadGraphicFile(Templates, GetGraphicsDir + DirectorySeparator + 1515 1496 'Templates.png', gfNoGamma); 1516 1497 Colors := TBitmap.Create; 1517 1498 Colors.PixelFormat := pf24bit; 1518 LoadGraphicFile(Colors, HomeDir + 'Graphics'+ DirectorySeparator + 'Colors.png');1499 LoadGraphicFile(Colors, GetGraphicsDir + DirectorySeparator + 'Colors.png'); 1519 1500 Paper := TBitmap.Create; 1520 1501 Paper.PixelFormat := pf24bit; 1521 LoadGraphicFile(Paper, HomeDir + 'Graphics'+ DirectorySeparator + 'Paper.jpg');1502 LoadGraphicFile(Paper, GetGraphicsDir + DirectorySeparator + 'Paper.jpg'); 1522 1503 BigImp := TBitmap.Create; 1523 1504 BigImp.PixelFormat := pf24bit; 1524 LoadGraphicFile(BigImp, HomeDir + 'Graphics'+ DirectorySeparator + 'Icons.png');1505 LoadGraphicFile(BigImp, GetGraphicsDir + DirectorySeparator + 'Icons.png'); 1525 1506 MainTexture.Image := TBitmap.Create; 1526 1507 MainTextureAge := -2; … … 1532 1513 procedure UnitDone; 1533 1514 var 1534 Reg: TRegistry;1535 1515 I: integer; 1536 1516 begin 1537 Reg := TRegistry.Create;1538 with Reg do1539 try1540 OpenKey(AppRegistryKey, True);1541 WriteString('Locale', LocaleCode);1542 WriteInteger('Gamma', Gamma);1543 if FullScreen then WriteInteger('ScreenMode', 1)1544 else WriteInteger('ScreenMode', 0);1545 finally1546 Free;1547 end;1548 1549 1517 RestoreResolution; 1550 1518 for I := 0 to nGrExt - 1 do begin -
trunk/Packages/CevoComponents/Sound.pas
r174 r189 290 290 Result := (WavFileName <> '') and (WavFileName[1] <> '[') and (WavFileName <> '*'); 291 291 if Result then 292 // SndPlaySound(pchar( HomeDir+'Sounds' +DirectorySeparator+WavFileName+'.wav'),SND_ASYNC)293 PlaySound( HomeDir + 'Sounds'+ DirectorySeparator + WavFileName);292 // SndPlaySound(pchar(GetSoundsDir + DirectorySeparator + WavFileName + '.wav'), SND_ASYNC) 293 PlaySound(GetSoundsDir + DirectorySeparator + WavFileName); 294 294 {$ENDIF} 295 295 end; … … 307 307 Assert(WavFileName[1] <> '['); 308 308 if (WavFileName <> '') and (WavFileName[1] <> '[') and (WavFileName <> '*') then 309 PrepareSound( HomeDir + 'Sounds'+ DirectorySeparator + WavFileName);309 PrepareSound(GetSoundsDir + DirectorySeparator + WavFileName); 310 310 {$ENDIF} 311 311 end; -
trunk/Start.pas
r188 r189 153 153 invalidateTab0: boolean = false); overload; 154 154 procedure LoadConfig; 155 procedure SaveConfig; 155 156 end; 156 157 … … 162 163 163 164 uses 164 Directories, Direct, ScreenTools, Inp, Back, Locale, PixelPointer;165 Global, Directories, Direct, ScreenTools, Inp, Back, Locale, PixelPointer; 165 166 166 167 {$R *.lfm} 167 168 168 169 const 169 CevoExt = '.cevo';170 CevoMapExt = '.cevo map';171 170 // predefined world size 172 171 // attention: lx*ly+1 must be prime! … … 467 466 DirectDlg.Top := (Screen.Height - DirectDlg.Height) div 2; 468 467 469 if FullScreen then 470 begin 468 if FullScreen then begin 471 469 Location := Point((Screen.Width - 800) * 3 div 8, 472 470 Screen.Height - Height - (Screen.Height - 600) div 3); … … 484 482 SetWindowRgn(Handle, r0, False); 485 483 DeleteObject(r0); // causes crash with Windows 95 486 end 487 else 488 begin 484 end else begin 489 485 Left := (Screen.Width - Width) div 2; 490 486 Top := (Screen.Height - Height) div 2; … … 599 595 procedure TStartDlg.FormDestroy(Sender: TObject); 600 596 begin 597 SaveConfig; 601 598 FreeAndNil(FormerGames); 602 599 FreeAndNil(Maps); … … 622 619 DeleteObject(r1); 623 620 end; 624 if not invalidateTab0 then 625 begin 621 if not invalidateTab0 then begin 626 622 r1 := CreateRectRgn(0, 0, 6 + 36, 3 + 38); // tab 0 icon 627 623 CombineRgn(r0, r0, r1, RGN_DIFF); … … 652 648 WriteInteger('Diff' + IntToStr(I), 2); 653 649 end; 654 WriteInteger('MultiControl', 0);655 650 656 651 OpenKey(AppRegistryKey, True); 652 if ValueExists('Gamma') then Gamma := ReadInteger('Gamma') 653 else Gamma := 100; 654 if Gamma <> 100 then InitGammaLookupTable; 655 if ValueExists('Locale') then LocaleCode := ReadString('Locale') 656 else LocaleCode := ''; 657 657 if ValueExists('WorldSize') then WorldSize := Reg.ReadInteger('WorldSize') 658 658 else WorldSize := DefaultWorldSize; … … 680 680 if ValueExists('ResolutionFreq') then 681 681 ResolutionFreq := ReadInteger('ResolutionFreq'); 682 if ValueExists('MultiControl') then 683 MultiControl := ReadInteger('MultiControl') 684 else MultiControl := 0; 682 685 {$IFDEF WINDOWS} 683 686 if ScreenMode = 2 then … … 685 688 ResolutionFreq); 686 689 {$ENDIF} 690 finally 691 Free; 692 end; 693 end; 694 695 procedure TStartDlg.SaveConfig; 696 var 697 Reg: TRegistry; 698 begin 699 Reg := TRegistry.Create; 700 with Reg do try 701 OpenKey(AppRegistryKey, True); 702 WriteInteger('WorldSize', WorldSize); 703 WriteInteger('LandMass', StartLandMass); 704 WriteString('Locale', LocaleCode); 705 WriteInteger('Gamma', Gamma); 706 if FullScreen then WriteInteger('ScreenMode', 1) 707 else WriteInteger('ScreenMode', 0); 708 WriteInteger('MultiControl', MultiControl); 687 709 finally 688 710 Free; … … 1163 1185 end; 1164 1186 1165 // save settings and AI assignment1187 // Save settings and AI assignment 1166 1188 if Page = pgStartRandom then begin 1167 WriteInteger('WorldSize', WorldSize); 1168 WriteInteger('LandMass', StartLandMass); 1169 1189 SaveConfig; 1170 1190 OpenKey(AppRegistryKey + '\AI', True); 1171 1191 if AutoDiff < 0 then … … 1177 1197 WriteInteger('Diff' + IntToStr(I), Difficulty[I]); 1178 1198 end; 1179 WriteInteger('MultiControl', MultiControl);1180 1199 end; 1181 1200 … … 1237 1256 MapFileName := Format(Phrases.Lookup('MAP'), [MapCount]) + CevoMapExt; 1238 1257 EditMap(MapFileName, WorldSizes[WorldSize].X, WorldSizes[WorldSize].Y, StartLandMass); 1239 end 1240 end 1258 end; 1259 end; 1241 1260 end; 1242 1261 … … 1505 1524 PlayersBrain[p1] := Brains[j]; 1506 1525 end; 1507 MultiControl := Reg.ReadInteger('MultiControl');1508 1526 finally 1509 1527 Free; … … 1655 1673 OpenDocument(pchar(HomeDir + 'AI Template' + DirectorySeparator + 'AI development manual.html')); 1656 1674 maWeb: 1657 OpenURL( 'http://c-evo.org')1675 OpenURL(CevoHomepage); 1658 1676 end; 1659 1677 end
Note:
See TracChangeset
for help on using the changeset viewer.