150 if round(X) < cLeftScreenBorder then |
150 if round(X) < cLeftScreenBorder then |
151 begin |
151 begin |
152 X:= X + cScreenSpace; |
152 X:= X + cScreenSpace; |
153 moved:= true |
153 moved:= true |
154 end |
154 end |
155 else |
155 else if round(X) > cRightScreenBorder then |
156 if round(X) > cRightScreenBorder then |
156 begin |
157 begin |
157 X:= X - cScreenSpace; |
158 X:= X - cScreenSpace; |
158 moved:= true |
159 moved:= true |
159 end; |
160 end; |
|
161 // if round(Y) < (LAND_HEIGHT - 1024 - 75) then Y:= Y + 25.0; // For if flag is set for flakes rising upwards? |
160 // if round(Y) < (LAND_HEIGHT - 1024 - 75) then Y:= Y + 25.0; // For if flag is set for flakes rising upwards? |
162 if (Gear^.Layer = 2) and (round(Y) - 225 > LAND_HEIGHT) then |
161 if (Gear^.Layer = 2) and (round(Y) - 400 > LAND_HEIGHT) and (cGravityf >= 0) then |
163 begin |
162 begin |
164 X:= cLeftScreenBorder + random(cScreenSpace); |
163 X:= cLeftScreenBorder + random(cScreenSpace); |
165 Y:= Y - (1024 + 250 + random(50)); // TODO - configure in theme (jellies for example could use limited range) |
164 Y:= Y-(1024 + 400 + random(50)); // TODO - configure in theme (jellies for example could use limited range) |
166 moved:= true |
165 moved:= true |
167 end |
166 end |
168 else if (Gear^.Layer <> 2) and (round(Y) + 50 > LAND_HEIGHT) then |
167 else if (Gear^.Layer <> 2) and (round(Y) - 150 > LAND_HEIGHT) and (cGravityf >= 0) then |
169 begin |
168 begin |
170 X:= cLeftScreenBorder + random(cScreenSpace); |
169 X:= cLeftScreenBorder + random(cScreenSpace); |
171 Y:= Y - (1024 + random(25)); |
170 Y:= Y-(1024 + 200 + random(50)); |
|
171 moved:= true |
|
172 end |
|
173 else if (round(Y) < LAND_HEIGHT-1200) and (cGravityf < 0) then // gravity can make flakes move upwards |
|
174 begin |
|
175 X:= cLeftScreenBorder + random(cScreenSpace); |
|
176 if Gear^.Layer = 2 then |
|
177 Y:= Y+(1024 + 150 + random(100)) |
|
178 else |
|
179 Y:= Y+(1024 + random(50)); |
172 moved:= true |
180 moved:= true |
173 end; |
181 end; |
174 if moved then |
182 if moved then |
175 begin |
183 begin |
176 Angle:= random(360); |
184 Angle:= random(360); |