Changeset 189 for trunk/LocalPlayer/Term.pas
- Timestamp:
- May 7, 2020, 12:46:55 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.