equal
deleted
inserted
replaced
64 |
64 |
65 procedure OnDestroy; forward; |
65 procedure OnDestroy; forward; |
66 |
66 |
67 //////////////////////////////// |
67 //////////////////////////////// |
68 procedure DoTimer(Lag: LongInt); |
68 procedure DoTimer(Lag: LongInt); |
69 const MusicTimerTicks: Longword = 0; |
|
70 var s: string; |
69 var s: string; |
71 begin |
70 begin |
72 inc(RealTicks, Lag); |
71 inc(RealTicks, Lag); |
73 |
|
74 inc(MusicTimerTicks, Lag); |
|
75 if (MusicTimerTicks > 3000) and (GameState > gsStart) then |
|
76 begin |
|
77 PlayMusic; |
|
78 MusicTimerTicks:= 0 |
|
79 end; |
|
80 |
72 |
81 case GameState of |
73 case GameState of |
82 gsLandGen: begin |
74 gsLandGen: begin |
83 GenMap; |
75 GenMap; |
84 GameState:= gsStart; |
76 GameState:= gsStart; |
85 end; |
77 end; |
86 gsStart: begin |
78 gsStart: begin |
87 InitPlaylistChunk(GetRandom(High(LongWord))); |
|
88 AddClouds; |
79 AddClouds; |
89 AssignHHCoords; |
80 AssignHHCoords; |
90 AddMiscGears; |
81 AddMiscGears; |
91 StoreLoad; |
82 StoreLoad; |
92 ResetKbd; |
83 ResetKbd; |
95 begin |
86 begin |
96 isSEBackup:= isSoundEnabled; |
87 isSEBackup:= isSoundEnabled; |
97 isSoundEnabled:= false |
88 isSoundEnabled:= false |
98 end; |
89 end; |
99 FinishProgress; |
90 FinishProgress; |
|
91 PlayMusic; |
100 GameState:= gsGame |
92 GameState:= gsGame |
101 end; |
93 end; |
102 gsConfirm, |
94 gsConfirm, |
103 gsGame: begin |
95 gsGame: begin |
104 ProcessKbd; |
96 ProcessKbd; |