Changeset 106 for trunk/History.pas
- Timestamp:
- Dec 9, 2024, 8:54:41 PM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/History.pas
r104 r106 29 29 Pos: TPoint; 30 30 Value: Integer; 31 Unmergable: Boolean; 31 32 end; 32 33 … … 36 37 Moves: THistoryMoves; 37 38 InitialTiles: array of TTilePosValue; 39 DisabledTiles: array of TPoint; 38 40 procedure Clear; 39 41 constructor Create; … … 148 150 WriteInteger('Y' + IntToStr(I), InitialTiles[I].Pos.Y); 149 151 WriteInteger('Value' + IntToStr(I), InitialTiles[I].Value); 150 end; 152 WriteBool('Unmergable' + IntToStr(I), InitialTiles[I].Unmergable); 153 end; 154 155 CurrentContext := TRegistryContext.Create(RegContext.RootKey, RegContext.Key + '\DisabledTilesPos'); 156 for I := 0 to Length(DisabledTiles) - 1 do begin 157 WriteInteger('X' + IntToStr(I), DisabledTiles[I].X); 158 WriteInteger('Y' + IntToStr(I), DisabledTiles[I].Y); 159 end; 160 151 161 Moves.SaveToRegistry(Reg, RegContext); 152 162 end; … … 164 174 ReadIntegerWithDefault('Y' + IntToStr(I), 0)); 165 175 InitialTiles[I].Value := ReadIntegerWithDefault('Value' + IntToStr(I), 0); 166 end; 167 end; 168 Moves.LoadFromRegistry(Reg, RegContext); 176 InitialTiles[I].Unmergable := ReadBoolWithDefault('Unmergable' + IntToStr(I), False); 177 end; 178 179 CurrentContext := TRegistryContext.Create(RegContext.RootKey, RegContext.Key + '\DisabledTilesPos'); 180 SetLength(DisabledTiles, ReadIntegerWithDefault('Count', 0)); 181 for I := 0 to Length(DisabledTiles) - 1 do begin 182 DisabledTiles[I] := Point(ReadIntegerWithDefault('X' + IntToStr(I), 0), 183 ReadIntegerWithDefault('Y' + IntToStr(I), 0)); 184 end; 185 186 Moves.LoadFromRegistry(Reg, RegContext); 187 end; 169 188 end; 170 189
Note:
See TracChangeset
for help on using the changeset viewer.