25 procedure initModule; |
25 procedure initModule; |
26 procedure freeModule; |
26 procedure freeModule; |
27 |
27 |
28 implementation |
28 implementation |
29 uses uCommands, uTypes, uVariables, uIO, uDebug, uConsts, uScript, uUtils, SDLh, uWorld, uRandom, uCaptions |
29 uses uCommands, uTypes, uVariables, uIO, uDebug, uConsts, uScript, uUtils, SDLh, uWorld, uRandom, uCaptions |
|
30 , uVisualGearsList |
30 {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF}; |
31 {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF}; |
31 |
32 |
32 var prevGState: TGameState = gsConfirm; |
33 var prevGState: TGameState = gsConfirm; |
33 cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13); |
34 cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13); |
34 cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0); |
35 cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0); |
769 cMinesTime:= StrToInt(s) |
775 cMinesTime:= StrToInt(s) |
770 end; |
776 end; |
771 |
777 |
772 procedure chFastUntilLag(var s: shortstring); |
778 procedure chFastUntilLag(var s: shortstring); |
773 begin |
779 begin |
774 fastUntilLag:= StrToInt(s) <> 0 |
780 fastUntilLag:= StrToInt(s) <> 0; |
|
781 |
|
782 if not fastUntilLag then |
|
783 begin |
|
784 // update health bars and the wind indicator |
|
785 AddVisualGear(0, 0, vgtTeamHealthSorter); |
|
786 AddVisualGear(0, 0, vgtSmoothWindBar) |
|
787 end |
775 end; |
788 end; |
776 |
789 |
777 procedure chCampVar(var s:shortstring); |
790 procedure chCampVar(var s:shortstring); |
778 begin |
791 begin |
779 CampaignVariable := s; |
792 CampaignVariable := s; |
835 RegisterVariable('damagepct',@chDamagePercent , false); |
848 RegisterVariable('damagepct',@chDamagePercent , false); |
836 RegisterVariable('ropepct' , @chRopePercent , false); |
849 RegisterVariable('ropepct' , @chRopePercent , false); |
837 RegisterVariable('getawaytime' , @chGetAwayTime , false); |
850 RegisterVariable('getawaytime' , @chGetAwayTime , false); |
838 RegisterVariable('minedudpct',@chMineDudPercent, false); |
851 RegisterVariable('minedudpct',@chMineDudPercent, false); |
839 RegisterVariable('minesnum', @chLandMines , false); |
852 RegisterVariable('minesnum', @chLandMines , false); |
|
853 RegisterVariable('airmines', @chAirMines , false); |
840 RegisterVariable('explosives',@chExplosives , false); |
854 RegisterVariable('explosives',@chExplosives , false); |
841 RegisterVariable('gmflags' , @chGameFlags , false); |
855 RegisterVariable('gmflags' , @chGameFlags , false); |
842 RegisterVariable('turntime', @chHedgehogTurnTime, false); |
856 RegisterVariable('turntime', @chHedgehogTurnTime, false); |
843 RegisterVariable('minestime',@chMinesTime , false); |
857 RegisterVariable('minestime',@chMinesTime , false); |
844 RegisterVariable('quit' , @chQuit , true ); |
858 RegisterVariable('quit' , @chQuit , true ); |