Changeset 7 for trunk/class
- Timestamp:
- Nov 22, 2012, 7:09:17 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 3 3 Lazes.lps 4 4 Lazes.dbg 5 Lazes
-
- Property svn:ignore
-
trunk/class/maze.pas
r1 r7 83 83 84 84 procedure ResetTags(const pValue: integer = 0); 85 procedure ResetState; 85 86 function GetCell(const pPosition: TCellPoint): TMazeCell; 86 87 function StartCell: TMazeCell; … … 211 212 212 213 procedure TMaze.ResetTags(const pValue: integer); 213 var row,col: integer; 214 var 215 row,col: integer; 214 216 begin 215 217 for row := 0 to Height-1 do 216 218 for col := 0 to Width-1 do 217 FMaze[row][col].Tag := pValue 219 FMaze[row][col].Tag := pValue; 220 end; 221 222 procedure TMaze.ResetState; 223 var 224 row,col: integer; 225 begin 226 for row := 0 to Height - 1 do 227 for col := 0 to Width - 1 do 228 FMaze[row, col].State := csEmpty; 218 229 end; 219 230 -
trunk/class/mazepainter.pas
r6 r7 70 70 constructor TMazePainter.Create(const pMaze: TMaze; pCanvas: TCanvas); 71 71 begin 72 Bmp := TBitMap.Create; 73 72 74 // Init the default drawing width and height 73 75 FCellDrawWidth := 15; … … 91 93 destructor TMazePainter.Destroy; 92 94 begin 93 bmp.Free;95 FreeAndNil(Bmp); 94 96 inherited Destroy; 95 97 end; … … 122 124 if isDirty then 123 125 begin 124 //FreeAndNil(bmp);125 //bmp := TBitMap.Create;126 126 bmp.SetSize(Width + 1, Height + 1); 127 127 Canvas := bmp.Canvas;
Note:
See TracChangeset
for help on using the changeset viewer.