equal
deleted
inserted
replaced
33 |
33 |
34 const dirs: array[0..3] of TPoint = ((X: 0; Y: -1), (X: 1; Y: 0),(X: 0; Y: 1),(X: -1; Y: 0)); |
34 const dirs: array[0..3] of TPoint = ((X: 0; Y: -1), (X: 1; Y: 0),(X: 0; Y: 1),(X: -1; Y: 0)); |
35 |
35 |
36 procedure PrevAngle(Gear: PGear; dA: LongInt); inline; |
36 procedure PrevAngle(Gear: PGear; dA: LongInt); inline; |
37 begin |
37 begin |
38 Gear^.Angle := (LongInt(Gear^.Angle) + 4 - dA) mod 4 |
38 Gear^.Angle := (Gear^.Angle - dA) and 3 |
39 end; |
39 end; |
40 |
40 |
41 procedure NextAngle(Gear: PGear; dA: LongInt); inline; |
41 procedure NextAngle(Gear: PGear; dA: LongInt); inline; |
42 begin |
42 begin |
43 Gear^.Angle := (LongInt(Gear^.Angle) + 4 + dA) mod 4 |
43 Gear^.Angle := (Gear^.Angle + dA) and 3 |
44 end; |
44 end; |
45 |
45 |
46 procedure cakeStep(Gear: PGear); |
46 procedure cakeStep(Gear: PGear); |
47 var |
47 var |
48 xx, yy, xxn, yyn: LongInt; |
48 xx, yy, xxn, yyn: LongInt; |