535 s: string[15]; |
535 s: string[15]; |
536 highlight: Boolean; |
536 highlight: Boolean; |
537 offset, offsetX, offsetY, ScreenBottom: LongInt; |
537 offset, offsetX, offsetY, ScreenBottom: LongInt; |
538 VertexBuffer: array [0..3] of TVertex2f; |
538 VertexBuffer: array [0..3] of TVertex2f; |
539 begin |
539 begin |
540 if not isPaused then |
540 if not isPaused and (ReadyTimeLeft = 0) then |
541 begin |
541 begin |
542 if ZoomValue < zoom then |
542 if ZoomValue < zoom then |
543 begin |
543 begin |
544 zoom:= zoom - 0.002 * Lag; |
544 zoom:= zoom - 0.002 * Lag; |
545 if ZoomValue > zoom then |
545 if ZoomValue > zoom then |
546 zoom:= ZoomValue |
546 zoom:= ZoomValue |
547 end |
547 end |
548 else |
548 else |
549 if ZoomValue > zoom then |
549 if ZoomValue > zoom then |
550 begin |
550 begin |
551 zoom:= zoom + 0.002 * Lag; |
551 zoom:= zoom + 0.002 * Lag; |
552 if ZoomValue < zoom then |
552 if ZoomValue < zoom then |
553 zoom:= ZoomValue |
553 zoom:= ZoomValue |
666 offsetX:= cScreenHeight - 13; |
666 offsetX:= cScreenHeight - 13; |
667 {$ELSE} |
667 {$ELSE} |
668 offsetX:= 48; |
668 offsetX:= 48; |
669 {$ENDIF} |
669 {$ENDIF} |
670 offsetY:= cOffsetY; |
670 offsetY:= cOffsetY; |
671 if TurnTimeLeft <> 0 then |
671 if (TurnTimeLeft <> 0) or (ReadyTimeLeft <> 0) then |
672 begin |
672 begin |
673 i:= Succ(Pred(TurnTimeLeft) div 1000); |
673 if ReadyTimeLeft <> 0 then |
|
674 i:= Succ(Pred(ReadyTimeLeft) div 1000) |
|
675 else |
|
676 i:= Succ(Pred(TurnTimeLeft) div 1000); |
|
677 |
674 if i>99 then t:= 112 |
678 if i>99 then t:= 112 |
675 else if i>9 then t:= 96 |
679 else if i>9 then t:= 96 |
676 else t:= 80; |
680 else t:= 80; |
677 DrawSprite(sprFrame, -(cScreenWidth shr 1) + t + offsetY, cScreenHeight - offsetX, 1); |
681 DrawSprite(sprFrame, -(cScreenWidth shr 1) + t + offsetY, cScreenHeight - offsetX, 1); |
678 while i > 0 do |
682 while i > 0 do |
851 |
855 |
852 DrawChat; |
856 DrawChat; |
853 |
857 |
854 if fastUntilLag then DrawCentered(0, (cScreenHeight shr 1), SyncTexture); |
858 if fastUntilLag then DrawCentered(0, (cScreenHeight shr 1), SyncTexture); |
855 if isPaused then DrawCentered(0, (cScreenHeight shr 1), PauseTexture); |
859 if isPaused then DrawCentered(0, (cScreenHeight shr 1), PauseTexture); |
856 |
860 if ReadyTimeLeft > 0 then |
857 if not isFirstFrame and ((missionTimer <> 0) or isPaused or fastUntilLag or (GameState = gsConfirm)) then |
861 begin |
858 begin |
862 // TODO: move outside drawing code or do a spearate step in ugears? |
859 if missionTimer > 0 then dec(missionTimer, Lag); |
863 if (ReadyTimeLeft = 1) or (ReadyTimeLeft < Lag) then |
|
864 if (CurrentTeam^.ExtDriven or (CurrentHedgehog^.BotLevel > 0)) then |
|
865 PlaySound(sndIllGetYou, CurrentTeam^.voicepack) |
|
866 else |
|
867 PlaySound(sndYesSir, CurrentTeam^.voicepack); |
|
868 |
|
869 if ReadyTimeLeft > Lag then |
|
870 dec(ReadyTimeLeft, Lag) |
|
871 else |
|
872 ReadyTimeLeft:= 0; |
|
873 DrawCentered(0, (cScreenHeight shr 1), ReadyTexture); |
|
874 end; |
|
875 if not isFirstFrame and (missionTimer <> 0) or isPaused or fastUntilLag or (GameState = gsConfirm) then |
|
876 begin |
|
877 if (ReadyTimeLeft = 0) and (missionTimer > 0) then dec(missionTimer, Lag); |
860 if missionTimer < 0 then missionTimer:= 0; // avoid subtracting below 0 |
878 if missionTimer < 0 then missionTimer:= 0; // avoid subtracting below 0 |
861 if missionTex <> nil then |
879 if missionTex <> nil then |
862 DrawCentered(0, min((cScreenHeight shr 1) + 100, cScreenHeight - 48 - missionTex^.h), missionTex); |
880 DrawCentered(0, min((cScreenHeight shr 1) + 100, cScreenHeight - 48 - missionTex^.h), missionTex); |
863 end; |
881 end; |
864 |
882 |