1070 procedure doStepActionTimer(Gear: PGear); |
1070 procedure doStepActionTimer(Gear: PGear); |
1071 begin |
1071 begin |
1072 dec(Gear^.Timer); |
1072 dec(Gear^.Timer); |
1073 case Gear^.Kind of |
1073 case Gear^.Kind of |
1074 gtATStartGame: |
1074 gtATStartGame: |
1075 begin |
1075 begin |
1076 AllInactive := false; |
1076 AllInactive := false; |
1077 if Gear^.Timer = 0 then |
1077 if Gear^.Timer = 0 then |
1078 begin |
1078 begin |
1079 AddCaption(trmsg[sidStartFight], cWhiteColor, capgrpGameState); |
1079 AddCaption(trmsg[sidStartFight], cWhiteColor, capgrpGameState); |
|
1080 end |
|
1081 end; |
|
1082 gtATSmoothWindCh: |
|
1083 begin |
|
1084 if Gear^.Timer = 0 then |
|
1085 begin |
|
1086 if WindBarWidth < Gear^.Tag then inc(WindBarWidth) |
|
1087 else if WindBarWidth > Gear^.Tag then dec(WindBarWidth); |
|
1088 if WindBarWidth <> Gear^.Tag then Gear^.Timer := 10; |
1080 end |
1089 end |
1081 end; |
1090 end; |
1082 gtATSmoothWindCh: |
1091 gtATFinishGame: |
1083 begin |
1092 begin |
1084 if Gear^.Timer = 0 then |
1093 AllInactive := false; |
1085 begin |
1094 if Gear^.Timer = 1000 then |
1086 if WindBarWidth < Gear^.Tag then inc(WindBarWidth) |
1095 begin |
1087 else if WindBarWidth > Gear^.Tag then dec(WindBarWidth); |
1096 ScreenFade := sfToBlack; |
1088 if WindBarWidth <> Gear^.Tag then Gear^.Timer := 10; |
1097 ScreenFadeValue := 0; |
1089 end |
1098 ScreenFadeSpeed := 1; |
1090 end; |
1099 end; |
1091 gtATFinishGame: |
1100 if Gear^.Timer = 0 then |
1092 begin |
1101 begin |
1093 AllInactive := false; |
1102 SendIPC('N'); |
1094 if Gear^.Timer = 1000 then |
1103 SendIPC('q'); |
1095 begin |
1104 GameState := gsExit |
1096 ScreenFade := sfToBlack; |
1105 end |
1097 ScreenFadeValue := 0; |
1106 end; |
1098 ScreenFadeSpeed := 1; |
1107 end; |
1099 end; |
|
1100 if Gear^.Timer = 0 then |
|
1101 begin |
|
1102 SendIPC('N'); |
|
1103 SendIPC('q'); |
|
1104 GameState := gsExit |
|
1105 end |
|
1106 end; |
|
1107 end; |
|
1108 if Gear^.Timer = 0 then DeleteGear(Gear) |
1108 if Gear^.Timer = 0 then DeleteGear(Gear) |
1109 end; |
1109 end; |
1110 |
1110 |
1111 //////////////////////////////////////////////////////////////////////////////// |
1111 //////////////////////////////////////////////////////////////////////////////// |
1112 procedure doStepPickHammerWork(Gear: PGear); |
1112 procedure doStepPickHammerWork(Gear: PGear); |