18 |
18 |
19 unit uMisc; |
19 unit uMisc; |
20 interface |
20 interface |
21 uses uConsts, SDLh, uFloat, GL; |
21 uses uConsts, SDLh, uFloat, GL; |
22 {$INCLUDE options.inc} |
22 {$INCLUDE options.inc} |
23 var isCursorVisible : boolean = false; |
23 var |
24 isTerminated : boolean = false; |
24 isCursorVisible : boolean = false; |
25 isInLag : boolean = false; |
25 isTerminated : boolean = false; |
26 isPaused : boolean = false; |
26 isInLag : boolean = false; |
27 isSoundEnabled : boolean = true; |
27 isPaused : boolean = false; |
28 isSEBackup : boolean = true; |
28 isSoundEnabled : boolean = true; |
29 isInMultiShoot : boolean = false; |
29 isSEBackup : boolean = true; |
30 isSpeed : boolean = false; |
30 isInMultiShoot : boolean = false; |
31 |
31 isSpeed : boolean = false; |
32 GameState : TGameState = Low(TGameState); |
32 |
33 GameType : TGameType = gmtLocal; |
33 GameState : TGameState = Low(TGameState); |
34 GameFlags : Longword = 0; |
34 GameType : TGameType = gmtLocal; |
35 TurnTimeLeft : Longword = 0; |
35 GameFlags : Longword = 0; |
36 cHedgehogTurnTime: Longword = 45000; |
36 TurnTimeLeft : Longword = 0; |
37 cMaxAIThinkTime : Longword = 9000; |
37 cHedgehogTurnTime: Longword = 45000; |
38 |
38 cMaxAIThinkTime : Longword = 9000; |
39 cCloudsNumber : LongInt = 9; |
39 |
40 cScreenWidth : LongInt = 1024; |
40 cCloudsNumber : LongInt = 9; |
41 cScreenHeight : LongInt = 768; |
41 cScreenWidth : LongInt = 1024; |
42 cBits : LongInt = 16; |
42 cScreenHeight : LongInt = 768; |
43 cBitsStr : string[2] = '16'; |
43 cBits : LongInt = 16; |
44 cTagsMask : byte = 7; |
44 cBitsStr : string[2] = '16'; |
45 |
45 cTagsMask : byte = 7; |
46 cWaterLine : LongInt = 1024; |
46 |
47 cVisibleWater : LongInt = 128; |
47 cWaterLine : LongInt = 1024; |
48 cGearScrEdgesDist: LongInt = 240; |
48 cVisibleWater : LongInt = 128; |
49 cCursorEdgesDist : LongInt = 40; |
49 cGearScrEdgesDist: LongInt = 240; |
50 cTeamHealthWidth : LongInt = 128; |
50 cCursorEdgesDist : LongInt = 40; |
51 cAltDamage : boolean = true; |
51 cTeamHealthWidth : LongInt = 128; |
52 |
52 cAltDamage : boolean = true; |
53 GameTicks : LongWord = 0; |
53 |
54 |
54 GameTicks : LongWord = 0; |
55 cSkyColor : Longword = 0; |
55 |
56 cWhiteColor : Longword = $FFFFFFFF; |
56 cSkyColor : Longword = 0; |
57 cColorNearBlack : Longword = $FF000010; |
57 cWhiteColor : Longword = $FFFFFFFF; |
58 cExplosionBorderColor : LongWord = $808080; |
58 cColorNearBlack : Longword = $FF000010; |
59 |
59 cExplosionBorderColor : LongWord = $808080; |
60 cShowFPS : boolean = true; |
60 |
61 cCaseFactor : Longword = 5; {0..9} |
61 cShowFPS : boolean = true; |
62 cLandAdditions: Longword = 4; |
62 cCaseFactor : Longword = 5; {0..9} |
63 cFullScreen : boolean = true; |
63 cLandAdditions: Longword = 4; |
64 cLocaleFName : shortstring = 'en.txt'; |
64 cFullScreen : boolean = true; |
65 cSeed : shortstring = ''; |
65 cLocaleFName : shortstring = 'en.txt'; |
66 cInitVolume : LongInt = 128; |
66 cSeed : shortstring = ''; |
67 cVolumeDelta : LongInt = 0; |
67 cInitVolume : LongInt = 128; |
68 cTimerInterval : Longword = 5; |
68 cVolumeDelta : LongInt = 0; |
69 cHasFocus : boolean = true; |
69 cTimerInterval : Longword = 5; |
70 cInactDelay : Longword = 1500; |
70 cHasFocus : boolean = true; |
|
71 cInactDelay : Longword = 1500; |
|
72 |
|
73 bBetweenTurns: boolean = false; |
|
74 cHealthDecrease: LongWord = 1; |
71 |
75 |
72 {$WARNINGS OFF} |
76 {$WARNINGS OFF} |
73 cAirPlaneSpeed: hwFloat = (isNegative: false; QWordValue: 6012954214); // 1.4 |
77 cAirPlaneSpeed: hwFloat = (isNegative: false; QWordValue: 6012954214); // 1.4 |
74 cBombsSpeed : hwFloat = (isNegative: false; QWordValue: 429496729); |
78 cBombsSpeed : hwFloat = (isNegative: false; QWordValue: 429496729); |
75 {$WARNINGS ON} |
79 {$WARNINGS ON} |
76 |
80 |
77 var |
81 var |
78 cSendEmptyPacketTime : LongWord = 2000; |
82 cSendEmptyPacketTime : LongWord = 2000; |
79 cSendCursorPosTime : LongWord = 50; |
83 cSendCursorPosTime : LongWord = 50; |
80 ShowCrosshair : boolean; |
84 ShowCrosshair : boolean; |
81 cDrownSpeed, |
85 cDrownSpeed, |
82 cMaxWindSpeed, |
86 cMaxWindSpeed, |
83 cWindSpeed, |
87 cWindSpeed, |
84 cGravity: hwFloat; |
88 cGravity: hwFloat; |
85 |
89 |
86 flagMakeCapture: boolean = false; |
90 flagMakeCapture: boolean = false; |
87 |
91 |
88 InitStepsFlags: Longword = 0; |
92 InitStepsFlags: Longword = 0; |
89 |
93 |
90 RealTicks: Longword = 0; |
94 RealTicks: Longword = 0; |
91 |
95 |
92 AttackBar: LongInt = 0; // 0 - none, 1 - just bar at the right-down corner, 2 - like in WWP |
96 AttackBar: LongInt = 0; // 0 - none, 1 - just bar at the right-down corner, 2 - like in WWP |
93 |
97 |
94 function hwSign(r: hwFloat): LongInt; |
98 function hwSign(r: hwFloat): LongInt; |
95 function Min(a, b: LongInt): LongInt; |
99 function Min(a, b: LongInt): LongInt; |
96 function Max(a, b: LongInt): LongInt; |
100 function Max(a, b: LongInt): LongInt; |
97 procedure OutError(Msg: String; isFatalError: boolean); |
101 procedure OutError(Msg: String; isFatalError: boolean); |