221 |
221 |
222 Gear:= Gear^.NextGear |
222 Gear:= Gear^.NextGear |
223 end; |
223 end; |
224 end; |
224 end; |
225 |
225 |
|
226 procedure processFlakes; |
|
227 var i: Longword; |
|
228 begin |
|
229 if GameTicks and $7 = 0 then |
|
230 for i:= 1 to FlakesCount do |
|
231 doStepSnowflake(@Flakes[i - 1]) |
|
232 end; |
|
233 |
226 procedure ProcessGears; |
234 procedure ProcessGears; |
227 var t, tmpGear: PGear; |
235 var t, tmpGear: PGear; |
228 i, j, AliveCount: LongInt; |
236 i, j, AliveCount: LongInt; |
229 s: ansistring; |
237 s: ansistring; |
230 prevtime: LongWord; |
238 prevtime: LongWord; |
709 x:= hwRound(Gear^.X) + WorldDx; |
720 x:= hwRound(Gear^.X) + WorldDx; |
710 y:= hwRound(Gear^.Y) + WorldDy; |
721 y:= hwRound(Gear^.Y) + WorldDy; |
711 RenderGear(Gear, x, y); |
722 RenderGear(Gear, x, y); |
712 end; |
723 end; |
713 Gear:= Gear^.NextGear |
724 Gear:= Gear^.NextGear |
|
725 end; |
|
726 |
|
727 for i:= 1 to FlakesCount do |
|
728 begin |
|
729 Gear:= @Flakes[i - 1]; |
|
730 if (Gear^.State and gstInvisible = 0) and (Gear^.Message and gmRemoveFromList = 0) then |
|
731 begin |
|
732 x:= hwRound(Gear^.X) + WorldDx; |
|
733 y:= hwRound(Gear^.Y) + WorldDy; |
|
734 RenderGear(Gear, x, y); |
|
735 end; |
714 end; |
736 end; |
715 |
737 |
716 if SpeechHogNumber > 0 then |
738 if SpeechHogNumber > 0 then |
717 DrawHHOrder(); |
739 DrawHHOrder(); |
718 end; |
740 end; |
995 end; |
1017 end; |
996 |
1018 |
997 snowRight:= max(LAND_WIDTH,4096)+512; |
1019 snowRight:= max(LAND_WIDTH,4096)+512; |
998 snowLeft:= -(snowRight-LAND_WIDTH); |
1020 snowLeft:= -(snowRight-LAND_WIDTH); |
999 |
1021 |
|
1022 FlakesCount:= 0; |
|
1023 { |
1000 if (not hasBorder) and cSnow then |
1024 if (not hasBorder) and cSnow then |
|
1025 begin |
1001 for i:= vobCount * Longword(max(LAND_WIDTH,4096)) div 2048 downto 1 do |
1026 for i:= vobCount * Longword(max(LAND_WIDTH,4096)) div 2048 downto 1 do |
1002 begin |
1027 begin |
1003 rx:=GetRandom(snowRight - snowLeft); |
1028 rx:=GetRandom(snowRight - snowLeft); |
1004 ry:=GetRandom(750); |
1029 ry:=GetRandom(750); |
1005 AddGear(rx + snowLeft, LongInt(LAND_HEIGHT) + ry - 1300, gtFlake, 0, _0, _0, 0) |
1030 AddGear(rx + snowLeft, LongInt(LAND_HEIGHT) + ry - 1300, gtFlake, 0, _0, _0, 0) |
1006 end |
1031 end |
|
1032 end |
|
1033 } |
|
1034 if (not hasBorder) and cSnow then |
|
1035 begin |
|
1036 FlakesCount:= vobCount * Longword(max(LAND_WIDTH,4096)) div 2048; |
|
1037 SetLength(Flakes, FlakesCount); |
|
1038 for i:= 0 to FlakesCount - 1 do |
|
1039 begin |
|
1040 rx:=GetRandom(snowRight - snowLeft); |
|
1041 ry:=GetRandom(750); |
|
1042 initializeGear(@Flakes[i], rx + snowLeft, LongInt(LAND_HEIGHT) + ry - 1300, gtFlake, 0, _0, _0, 0, 0) |
|
1043 end |
|
1044 end |
1007 end; |
1045 end; |
1008 |
1046 |
1009 // sort clans horizontally (bubble-sort, because why not) |
1047 // sort clans horizontally (bubble-sort, because why not) |
1010 procedure SortHHsByClan(); |
1048 procedure SortHHsByClan(); |
1011 var n, newn, i, j, k, p: LongInt; |
1049 var n, newn, i, j, k, p: LongInt; |