equal
deleted
inserted
replaced
164 end; |
164 end; |
165 |
165 |
166 procedure ProcessGears; |
166 procedure ProcessGears; |
167 var t: PGear; |
167 var t: PGear; |
168 i, AliveCount: LongInt; |
168 i, AliveCount: LongInt; |
169 s: shortstring; |
169 s: ansistring; |
170 prevtime: LongWord; |
170 prevtime: LongWord; |
171 begin |
171 begin |
172 prevtime:= TurnTimeLeft; |
172 prevtime:= TurnTimeLeft; |
173 ScriptCall('onGameTick'); |
173 ScriptCall('onGameTick'); |
174 if GameTicks mod 20 = 0 then ScriptCall('onGameTick20'); |
174 if GameTicks mod 20 = 0 then ScriptCall('onGameTick20'); |
214 if curHandledGear^.Active then |
214 if curHandledGear^.Active then |
215 begin |
215 begin |
216 if curHandledGear^.RenderTimer and (curHandledGear^.Timer > 500) and ((curHandledGear^.Timer mod 1000) = 0) then |
216 if curHandledGear^.RenderTimer and (curHandledGear^.Timer > 500) and ((curHandledGear^.Timer mod 1000) = 0) then |
217 begin |
217 begin |
218 FreeTexture(curHandledGear^.Tex); |
218 FreeTexture(curHandledGear^.Tex); |
219 curHandledGear^.Tex:= RenderStringTex(inttostr(curHandledGear^.Timer div 1000), cWhiteColor, fntSmall); |
219 curHandledGear^.Tex:= RenderStringTex(ansistring(inttostr(curHandledGear^.Timer div 1000)), cWhiteColor, fntSmall); |
220 end; |
220 end; |
221 curHandledGear^.doStep(curHandledGear); |
221 curHandledGear^.doStep(curHandledGear); |
222 // might be useful later |
222 // might be useful later |
223 //ScriptCall('onGearStep', Gear^.uid); |
223 //ScriptCall('onGearStep', Gear^.uid); |
224 end |
224 end |
325 //ChangeMusic(SDMusic) |
325 //ChangeMusic(SDMusic) |
326 end |
326 end |
327 else if (TotalRounds < cSuddenDTurns) and (not isInMultiShoot) then |
327 else if (TotalRounds < cSuddenDTurns) and (not isInMultiShoot) then |
328 begin |
328 begin |
329 i:= cSuddenDTurns - TotalRounds; |
329 i:= cSuddenDTurns - TotalRounds; |
330 s:= inttostr(i); |
330 s:= ansistring(inttostr(i)); |
331 if i = 1 then |
331 if i = 1 then |
332 AddCaption(trmsg[sidRoundSD], cWhiteColor, capgrpGameState) |
332 AddCaption(trmsg[sidRoundSD], cWhiteColor, capgrpGameState) |
333 else if (i = 2) or ((i > 0) and ((i mod 50 = 0) or ((i <= 25) and (i mod 5 = 0)))) then |
333 else if (i = 2) or ((i > 0) and ((i mod 50 = 0) or ((i <= 25) and (i mod 5 = 0)))) then |
334 AddCaption(Format(trmsg[sidRoundsSD], s), cWhiteColor, capgrpGameState); |
334 AddCaption(FormatA(trmsg[sidRoundsSD], s), cWhiteColor, capgrpGameState); |
335 end; |
335 end; |
336 end; |
336 end; |
337 if bBetweenTurns |
337 if bBetweenTurns |
338 or isInMultiShoot |
338 or isInMultiShoot |
339 or (TotalRounds = -1) then |
339 or (TotalRounds = -1) then |