24 |
24 |
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, uConsole |
29 uses uCommands, uTypes, uVariables, uIO, uDebug, uConsts, uScript, uUtils, SDLh, uWorld, uRandom, uCaptions |
30 , uVisualGearsList, uGearsHedgehog |
30 , uVisualGearsList, uGearsHedgehog |
31 {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF}; |
31 {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF}; |
32 |
32 |
33 var prevGState: TGameState = gsConfirm; |
33 var prevGState: TGameState = gsConfirm; |
34 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, 0, 4, 5, 6, 15, 8, 8, 8, 8, 12, 13, 14); |
35 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, 0, 1, 2, 0, 0, 0, 0, 11, 8, 9, 10, 8, 8, 8, 8); |
36 |
36 |
37 procedure chGenCmd(var s: shortstring); |
37 procedure chGenCmd(var s: shortstring); |
38 begin |
38 begin |
39 case s[1] of |
39 case s[1] of |
40 'R': if ReadyTimeLeft > 0 then |
40 'R': if ReadyTimeLeft > 0 then |
623 end; |
623 end; |
624 |
624 |
625 procedure chRotateTags(var s: shortstring); |
625 procedure chRotateTags(var s: shortstring); |
626 begin |
626 begin |
627 s:= s; // avoid compiler hint |
627 s:= s; // avoid compiler hint |
628 if ((GameFlags and gfInvulnerable) = 0) then |
628 // Rotate Tags key + Precise: Toggle translucency only |
629 cTagsMask:= cTagsMasks[cTagsMask] |
629 if LocalMessage and gmPrecise = gmPrecise then |
|
630 if ((cTagsMask and htTransparent) = 0) then |
|
631 cTagsMask:= cTagsMask or htTransparent |
|
632 else |
|
633 cTagsMask:= cTagsMask and (not htTransparent) |
|
634 // Just the rotate tags key: Rotate hog tags |
630 else |
635 else |
631 cTagsMask:= cTagsMasksNoHealth[cTagsMask] |
636 if ((GameFlags and gfInvulnerable) = 0) then |
632 end; |
637 cTagsMask:= cTagsMasks[cTagsMask] |
|
638 else |
|
639 cTagsMask:= cTagsMasksNoHealth[cTagsMask] |
|
640 end; |
633 |
641 |
634 procedure chSpeedup_p(var s: shortstring); |
642 procedure chSpeedup_p(var s: shortstring); |
635 begin |
643 begin |
636 s:= s; // avoid compiler hint |
644 s:= s; // avoid compiler hint |
637 SpeedStart:= RealTicks; |
645 SpeedStart:= RealTicks; |