Changeset 66 for trunk/LocalPlayer/Term.pas
- Timestamp:
- Jan 14, 2017, 12:37:47 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Term.pas
r64 r66 3363 3363 3364 3364 procedure TMainScreen.CreateParams(var p: TCreateParams); 3365 begin 3366 inherited; 3367 3368 if FullScreen then 3369 begin 3370 p.Style := $87000000; 3371 BorderStyle := bsNone; 3372 BorderIcons := []; 3373 end; 3374 end; 3375 3376 procedure TMainScreen.FormCreate(Sender: TObject); 3365 3377 var 3366 3378 DefaultOptionChecked: integer; 3367 3379 Reg: TRegistry; 3368 doinit: boolean; 3369 begin 3370 inherited; 3371 3372 // define which menu settings to save 3380 i, j: integer; 3381 begin 3382 // define which menu settings to save 3373 3383 SaveOption[0] := mAlEffectiveMovesOnly.Tag; 3374 3384 SaveOption[1] := mEnMoves.Tag; … … 3397 3407 3398 3408 Reg := TRegistry.Create; 3399 doinit := true; 3400 if Reg.KeyExists('SOFTWARE\cevo\RegVer9') then 3401 with Reg do 3402 begin 3403 doinit := false; 3404 OpenKey('SOFTWARE\cevo\RegVer9', false); 3405 if ValueExists('TileWidth') then 3406 xxt := ReadInteger('TileWidth') div 2 3407 else 3408 xxt := 48; 3409 if ValueExists('TileHeight') then 3410 yyt := ReadInteger('TileHeight') div 2 3411 else 3412 yyt := 24; 3413 if ValueExists('OptionChecked') then 3414 OptionChecked := ReadInteger('OptionChecked') 3415 else 3416 OptionChecked := DefaultOptionChecked; 3417 if ValueExists('MapOptionChecked') then 3418 MapOptionChecked := ReadInteger('MapOptionChecked') 3419 else 3420 MapOptionChecked := 1 shl moCityNames; 3421 if ValueExists('CityMapMask') then 3422 CityRepMask := Cardinal(ReadInteger('CityReport')) 3423 else 3424 CityRepMask := Cardinal(not chPopIncrease and not chNoGrowthWarning and 3409 with Reg do 3410 try 3411 OpenKey('SOFTWARE\cevo\RegVer9', false); 3412 if ValueExists('TileWidth') then xxt := ReadInteger('TileWidth') div 2 3413 else xxt := 48; 3414 if ValueExists('TileHeight') then yyt := ReadInteger('TileHeight') div 2 3415 else yyt := 24; 3416 if ValueExists('OptionChecked') then OptionChecked := ReadInteger('OptionChecked') 3417 else OptionChecked := DefaultOptionChecked; 3418 if ValueExists('MapOptionChecked') then MapOptionChecked := ReadInteger('MapOptionChecked') 3419 else MapOptionChecked := 1 shl moCityNames; 3420 if ValueExists('CityReport') then CityRepMask := Cardinal(ReadInteger('CityReport')) 3421 else CityRepMask := Cardinal(not chPopIncrease and not chNoGrowthWarning and 3425 3422 not chCaptured); 3426 3427 3428 3423 CloseKey; 3424 if OptionChecked and (7 shl 16) = 0 then 3425 OptionChecked := OptionChecked or (1 shl 16); 3429 3426 // old regver with no scrolling 3430 end; 3431 Reg.free; 3427 finally 3428 Free; 3429 end; 3432 3430 3433 3431 if FullScreen then … … 3444 3442 else 3445 3443 SoundMode := smOn; 3446 end; 3447 3448 procedure TMainScreen.FormCreate(Sender: TObject); 3449 var 3450 i, j: integer; 3451 begin 3444 3452 3445 sb := TPVScrollbar.Create; 3453 3446 {$IFDEF WINDOWS}{ TODO } … … 3464 3457 for j := 0 to nSaveOption - 1 do 3465 3458 if Components[i].Tag and $FF = SaveOption[j] then 3466 TMenuItem(Components[i]).Checked := 1 shl j and OptionChecked<> 0;3459 TMenuItem(Components[i]).Checked := ((1 shl j) and OptionChecked) <> 0; 3467 3460 end 3468 3461 else if Components[i] is TButtonBase then … … 7999 7992 8000 7993 Reg := TRegistry.Create; 8001 Reg.OpenKey('SOFTWARE\cevo\RegVer9', true); 8002 Reg.WriteInteger('TileWidth', xxt * 2); 8003 Reg.WriteInteger('TileHeight', yyt * 2); 8004 Reg.WriteInteger('OptionChecked', OptionChecked); 8005 Reg.WriteInteger('MapOptionChecked', MapOptionChecked); 8006 Reg.WriteInteger('CityReport', integer(CityRepMask)); 8007 Reg.CloseKey; 8008 Reg.free; 7994 with Reg do 7995 try 7996 OpenKey('SOFTWARE\cevo\RegVer9', true); 7997 WriteInteger('TileWidth', xxt * 2); 7998 WriteInteger('TileHeight', yyt * 2); 7999 WriteInteger('OptionChecked', OptionChecked); 8000 WriteInteger('MapOptionChecked', MapOptionChecked); 8001 WriteInteger('CityReport', integer(CityRepMask)); 8002 CloseKey; 8003 finally 8004 Free; 8005 end; 8009 8006 end; 8010 8007
Note:
See TracChangeset
for help on using the changeset viewer.