hedgewars/uVariables.pas
changeset 10015 4feced261c68
parent 10009 88929358d2e1
parent 9954 bf51bc7e2808
child 10108 c68cf030eded
equal deleted inserted replaced
10014:56d2f2d5aad8 10015:4feced261c68
    19 {$INCLUDE "options.inc"}
    19 {$INCLUDE "options.inc"}
    20 
    20 
    21 unit uVariables;
    21 unit uVariables;
    22 interface
    22 interface
    23 
    23 
    24 uses SDLh, uTypes, uFloat, GLunit, uConsts, Math;
    24 uses SDLh, uTypes, uFloat, GLunit, uConsts, Math, uUtils, uMatrix;
    25 
    25 
    26 var
    26 var
    27 /////// init flags ///////
    27 /////// init flags ///////
    28     cMinScreenWidth    : LongInt;
    28     cMinScreenWidth    : LongInt;
    29     cMinScreenHeight   : LongInt;
    29     cMinScreenHeight   : LongInt;
   172     cLaserSighting  : boolean;
   172     cLaserSighting  : boolean;
   173     cVampiric       : boolean;
   173     cVampiric       : boolean;
   174     cArtillery      : boolean;
   174     cArtillery      : boolean;
   175     WeaponTooltipTex: PTexture;
   175     WeaponTooltipTex: PTexture;
   176     AmmoMenuInvalidated: boolean;
   176     AmmoMenuInvalidated: boolean;
   177     AmmoRect		: TSDL_Rect;
   177     AmmoRect        : TSDL_Rect;
   178     HHTexture       : PTexture;
   178     HHTexture       : PTexture;
   179     cMaxZoomLevel   : real;
   179     cMaxZoomLevel   : real;
   180     cMinZoomLevel   : real;
   180     cMinZoomLevel   : real;
   181     cZoomDelta      : real;
   181     cZoomDelta      : real;
   182     cMinMaxZoomLevelDelta : real;
   182     cMinMaxZoomLevelDelta : real;
   232 
   232 
   233 var
   233 var
   234     // these consts are here because they would cause circular dependencies in uConsts/uTypes
   234     // these consts are here because they would cause circular dependencies in uConsts/uTypes
   235     cPathz: array[TPathType] of shortstring = (
   235     cPathz: array[TPathType] of shortstring = (
   236         '',                              // ptNone
   236         '',                              // ptNone
   237         '/',                             // ptData
   237         '//',                            // ptData
   238         '/Graphics',                     // ptGraphics
   238         '/Graphics',                     // ptGraphics
   239         '/Themes',                       // ptThemes
   239         '/Themes',                       // ptThemes
   240         '/Themes/Bamboo',                // ptCurrTheme
   240         '/Themes/Bamboo',                // ptCurrTheme
   241         '/Teams',                        // ptTeams
   241         '/Teams',                        // ptTeams
   242         '/Maps',                         // ptMaps
   242         '/Maps',                         // ptMaps
   252         '/Sounds/voices',                // ptVoices
   252         '/Sounds/voices',                // ptVoices
   253         '/Graphics/Hats',                // ptHats
   253         '/Graphics/Hats',                // ptHats
   254         '/Graphics/Flags',               // ptFlags
   254         '/Graphics/Flags',               // ptFlags
   255         '/Missions/Maps',                // ptMissionMaps
   255         '/Missions/Maps',                // ptMissionMaps
   256         '/Graphics/SuddenDeath',         // ptSuddenDeath
   256         '/Graphics/SuddenDeath',         // ptSuddenDeath
   257         '/Graphics/Buttons'              // ptButton
   257         '/Graphics/Buttons',             // ptButton
       
   258         '/Shaders'                       // ptShaders
   258     );
   259     );
   259 
   260 
       
   261 var
   260     Fontz: array[THWFont] of THHFont = (
   262     Fontz: array[THWFont] of THHFont = (
   261             (Handle: nil;
   263             (Handle: nil;
   262             Height: 12;
   264             Height: 12;
   263             style: TTF_STYLE_NORMAL;
   265             style: TTF_STYLE_NORMAL;
   264             Name: 'DejaVuSans-Bold.ttf'),
   266             Name: 'DejaVuSans-Bold.ttf'),
   716             Ammo: TAmmo;
   718             Ammo: TAmmo;
   717             Slot: 0..cMaxSlotIndex;
   719             Slot: 0..cMaxSlotIndex;
   718             TimeAfterTurn: Longword;
   720             TimeAfterTurn: Longword;
   719             minAngle, maxAngle: Longword;
   721             minAngle, maxAngle: Longword;
   720             isDamaging: boolean;
   722             isDamaging: boolean;
   721             SkipTurns: Longword;
   723             SkipTurns: LongWord;
   722             PosCount: Longword;
   724             PosCount: Longword;
   723             PosSprite: TSprite;
   725             PosSprite: TSprite;
   724             ejectX, ejectY: Longint;
   726             ejectX, ejectY: Longint;
   725             end = (
   727             end = (
   726             (NameId: sidNothing;
   728             (NameId: sidNothing;
   749 // Grenade
   751 // Grenade
   750             (NameId: sidGrenade;
   752             (NameId: sidGrenade;
   751             NameTex: nil;
   753             NameTex: nil;
   752             Probability: 0;
   754             Probability: 0;
   753             NumberInCase: 1;
   755             NumberInCase: 1;
   754             Ammo: (Propz: ammoprop_Timerable or 
   756             Ammo: (Propz: ammoprop_Timerable or
   755                           ammoprop_Power or 
   757                           ammoprop_Power or
   756                           ammoprop_AltUse or 
   758                           ammoprop_AltUse or
   757                           ammoprop_SetBounce or
   759                           ammoprop_SetBounce or
   758                           ammoprop_NeedUpDown;
   760                           ammoprop_NeedUpDown;
   759                 Count: AMMO_INFINITE;
   761                 Count: AMMO_INFINITE;
   760                 NumPerTurn: 0;
   762                 NumPerTurn: 0;
   761                 Timer: 3000;
   763                 Timer: 3000;
   777 // ClusterBomb
   779 // ClusterBomb
   778             (NameId: sidClusterBomb;
   780             (NameId: sidClusterBomb;
   779             NameTex: nil;
   781             NameTex: nil;
   780             Probability: 100;
   782             Probability: 100;
   781             NumberInCase: 3;
   783             NumberInCase: 3;
   782             Ammo: (Propz: ammoprop_Timerable or 
   784             Ammo: (Propz: ammoprop_Timerable or
   783                           ammoprop_Power or 
   785                           ammoprop_Power or
   784                           ammoprop_AltUse or 
   786                           ammoprop_AltUse or
   785                           ammoprop_SetBounce or
   787                           ammoprop_SetBounce or
   786                           ammoprop_NeedUpDown;
   788                           ammoprop_NeedUpDown;
   787                 Count: 5;
   789                 Count: 5;
   788                 NumPerTurn: 0;
   790                 NumPerTurn: 0;
   789                 Timer: 3000;
   791                 Timer: 3000;
   805 // Bazooka
   807 // Bazooka
   806             (NameId: sidBazooka;
   808             (NameId: sidBazooka;
   807             NameTex: nil;
   809             NameTex: nil;
   808             Probability: 0;
   810             Probability: 0;
   809             NumberInCase: 1;
   811             NumberInCase: 1;
   810             Ammo: (Propz: ammoprop_Power or 
   812             Ammo: (Propz: ammoprop_Power or
   811                           ammoprop_AltUse or
   813                           ammoprop_AltUse or
   812                           ammoprop_NeedUpDown;
   814                           ammoprop_NeedUpDown;
   813                 Count: AMMO_INFINITE;
   815                 Count: AMMO_INFINITE;
   814                 NumPerTurn: 0;
   816                 NumPerTurn: 0;
   815                 Timer: 0;
   817                 Timer: 0;
   831 // Bee
   833 // Bee
   832             (NameId: sidBee;
   834             (NameId: sidBee;
   833             NameTex: nil;
   835             NameTex: nil;
   834             Probability: 100;
   836             Probability: 100;
   835             NumberInCase: 1;
   837             NumberInCase: 1;
   836             Ammo: (Propz: ammoprop_Power or 
   838             Ammo: (Propz: ammoprop_Power or
   837                           ammoprop_NeedTarget or 
   839                           ammoprop_NeedTarget or
   838                           ammoprop_DontHold or
   840                           ammoprop_DontHold or
   839                           ammoprop_NeedUpDown;
   841                           ammoprop_NeedUpDown;
   840                 Count: 2;
   842                 Count: 2;
   841                 NumPerTurn: 0;
   843                 NumPerTurn: 0;
   842                 Timer: 0;
   844                 Timer: 0;
   884 // PickHammer
   886 // PickHammer
   885             (NameId: sidPickHammer;
   887             (NameId: sidPickHammer;
   886             NameTex: nil;
   888             NameTex: nil;
   887             Probability: 0;
   889             Probability: 0;
   888             NumberInCase: 1;
   890             NumberInCase: 1;
   889             Ammo: (Propz: ammoprop_ForwMsgs or 
   891             Ammo: (Propz: ammoprop_ForwMsgs or
   890                           ammoprop_AttackInMove or 
   892                           ammoprop_AttackInMove or
   891                           ammoprop_NoCrosshair or 
   893                           ammoprop_NoCrosshair or
   892                           ammoprop_DontHold;
   894                           ammoprop_DontHold;
   893                 Count: 2;
   895                 Count: 2;
   894                 NumPerTurn: 0;
   896                 NumPerTurn: 0;
   895                 Timer: 0;
   897                 Timer: 0;
   896                 Pos: 0;
   898                 Pos: 0;
   967 // Mine
   969 // Mine
   968             (NameId: sidMine;
   970             (NameId: sidMine;
   969             NameTex: nil;
   971             NameTex: nil;
   970             Probability: 100;
   972             Probability: 100;
   971             NumberInCase: 1;
   973             NumberInCase: 1;
   972             Ammo: (Propz: ammoprop_NoCrosshair or 
   974             Ammo: (Propz: ammoprop_NoCrosshair or
   973                           ammoprop_AttackInMove or 
   975                           ammoprop_AttackInMove or
   974                           ammoprop_DontHold or 
   976                           ammoprop_DontHold or
   975                           ammoprop_AltUse or 
   977                           ammoprop_AltUse or
   976                           ammoprop_SetBounce;
   978                           ammoprop_SetBounce;
   977                 Count: 2;
   979                 Count: 2;
   978                 NumPerTurn: 0;
   980                 NumPerTurn: 0;
   979                 Timer: 0;
   981                 Timer: 0;
   980                 Pos: 0;
   982                 Pos: 0;
  1019 // Dynamite
  1021 // Dynamite
  1020             (NameId: sidDynamite;
  1022             (NameId: sidDynamite;
  1021             NameTex: nil;
  1023             NameTex: nil;
  1022             Probability: 100;
  1024             Probability: 100;
  1023             NumberInCase: 1;
  1025             NumberInCase: 1;
  1024             Ammo: (Propz: ammoprop_NoCrosshair or 
  1026             Ammo: (Propz: ammoprop_NoCrosshair or
  1025                           ammoprop_AttackInMove or 
  1027                           ammoprop_AttackInMove or
  1026                           ammoprop_DontHold or 
  1028                           ammoprop_DontHold or
  1027                           ammoprop_AltUse;
  1029                           ammoprop_AltUse;
  1028                 Count: 1;
  1030                 Count: 1;
  1029                 NumPerTurn: 0;
  1031                 NumPerTurn: 0;
  1030                 Timer: 0;
  1032                 Timer: 0;
  1031                 Pos: 0;
  1033                 Pos: 0;
  1046 // FirePunch
  1048 // FirePunch
  1047             (NameId: sidFirePunch;
  1049             (NameId: sidFirePunch;
  1048             NameTex: nil;
  1050             NameTex: nil;
  1049             Probability: 0;
  1051             Probability: 0;
  1050             NumberInCase: 1;
  1052             NumberInCase: 1;
  1051             Ammo: (Propz: ammoprop_NoCrosshair or 
  1053             Ammo: (Propz: ammoprop_NoCrosshair or
  1052                           ammoprop_ForwMsgs or 
  1054                           ammoprop_ForwMsgs or
  1053                           ammoprop_AttackInMove;
  1055                           ammoprop_AttackInMove;
  1054                 Count: AMMO_INFINITE;
  1056                 Count: AMMO_INFINITE;
  1055                 NumPerTurn: 0;
  1057                 NumPerTurn: 0;
  1056                 Timer: 0;
  1058                 Timer: 0;
  1057                 Pos: 0;
  1059                 Pos: 0;
  1342 // Kamikaze
  1344 // Kamikaze
  1343             (NameId: sidKamikaze;
  1345             (NameId: sidKamikaze;
  1344             NameTex: nil;
  1346             NameTex: nil;
  1345             Probability: 100;
  1347             Probability: 100;
  1346             NumberInCase: 1;
  1348             NumberInCase: 1;
  1347             Ammo: (Propz: ammoprop_ForwMsgs or 
  1349             Ammo: (Propz: ammoprop_ForwMsgs or
  1348                           ammoprop_DontHold or 
  1350                           ammoprop_DontHold or
  1349                           ammoprop_NeedUpDown or
  1351                           ammoprop_NeedUpDown or
  1350                           ammoprop_AttackInMove;
  1352                           ammoprop_AttackInMove;
  1351                 Count: 1;
  1353                 Count: 1;
  1352                 NumPerTurn: 0;
  1354                 NumPerTurn: 0;
  1353                 Timer: 0;
  1355                 Timer: 0;
  1369 // Cake
  1371 // Cake
  1370             (NameId: sidCake;
  1372             (NameId: sidCake;
  1371             NameTex: nil;
  1373             NameTex: nil;
  1372             Probability: 100;
  1374             Probability: 100;
  1373             NumberInCase: 1;
  1375             NumberInCase: 1;
  1374             Ammo: (Propz: ammoprop_ForwMsgs or 
  1376             Ammo: (Propz: ammoprop_ForwMsgs or
  1375                           ammoprop_NoCrosshair or 
  1377                           ammoprop_NoCrosshair or
  1376                           ammoprop_DontHold or
  1378                           ammoprop_DontHold or
  1377                           ammoprop_Track;
  1379                           ammoprop_Track;
  1378                 Count: 1;
  1380                 Count: 1;
  1379                 NumPerTurn: 0;
  1381                 NumPerTurn: 0;
  1380                 Timer: 0;
  1382                 Timer: 0;
  1396 // Seduction
  1398 // Seduction
  1397             (NameId: sidSeduction;
  1399             (NameId: sidSeduction;
  1398             NameTex: nil;
  1400             NameTex: nil;
  1399             Probability: 100;
  1401             Probability: 100;
  1400             NumberInCase: 1;
  1402             NumberInCase: 1;
  1401             Ammo: (Propz: ammoprop_ForwMsgs or 
  1403             Ammo: (Propz: ammoprop_ForwMsgs or
  1402                           ammoprop_DontHold or
  1404                           ammoprop_DontHold or
  1403                           ammoprop_NoCrosshair;
  1405                           ammoprop_NoCrosshair;
  1404                 Count: 1;
  1406                 Count: 1;
  1405                 NumPerTurn: 0;
  1407                 NumPerTurn: 0;
  1406                 Timer: 0;
  1408                 Timer: 0;
  1422 // Watermelon
  1424 // Watermelon
  1423             (NameId: sidWatermelon;
  1425             (NameId: sidWatermelon;
  1424             NameTex: nil;
  1426             NameTex: nil;
  1425             Probability: 400;
  1427             Probability: 400;
  1426             NumberInCase: 1;
  1428             NumberInCase: 1;
  1427             Ammo: (Propz: ammoprop_Timerable or 
  1429             Ammo: (Propz: ammoprop_Timerable or
  1428                           ammoprop_Power or 
  1430                           ammoprop_Power or
  1429                           ammoprop_NeedUpDown or
  1431                           ammoprop_NeedUpDown or
  1430                           ammoprop_AltUse;
  1432                           ammoprop_AltUse;
  1431                 Count: 0;
  1433                 Count: 0;
  1432                 NumPerTurn: 0;
  1434                 NumPerTurn: 0;
  1433                 Timer: 3000;
  1435                 Timer: 3000;
  1449 // HellishBomb ("Hellish Hand-Grenade")
  1451 // HellishBomb ("Hellish Hand-Grenade")
  1450             (NameId: sidHellishBomb;
  1452             (NameId: sidHellishBomb;
  1451             NameTex: nil;
  1453             NameTex: nil;
  1452             Probability: 400;
  1454             Probability: 400;
  1453             NumberInCase: 1;
  1455             NumberInCase: 1;
  1454             Ammo: (Propz: ammoprop_Power or 
  1456             Ammo: (Propz: ammoprop_Power or
  1455                           ammoprop_NeedUpDown or
  1457                           ammoprop_NeedUpDown or
  1456                           ammoprop_AltUse;
  1458                           ammoprop_AltUse;
  1457                 Count: 0;
  1459                 Count: 0;
  1458                 NumPerTurn: 0;
  1460                 NumPerTurn: 0;
  1459                 Timer: 5000;
  1461                 Timer: 5000;
  1503 // Drill ("Drill Rocket")
  1505 // Drill ("Drill Rocket")
  1504             (NameId: sidDrill;
  1506             (NameId: sidDrill;
  1505             NameTex: nil;
  1507             NameTex: nil;
  1506             Probability: 300;
  1508             Probability: 300;
  1507             NumberInCase: 1;
  1509             NumberInCase: 1;
  1508             Ammo: (Propz: ammoprop_Power or 
  1510             Ammo: (Propz: ammoprop_Power or
  1509                           ammoprop_NeedUpDown or
  1511                           ammoprop_NeedUpDown or
  1510                           ammoprop_AltUse;
  1512                           ammoprop_AltUse;
  1511                 Count: AMMO_INFINITE;
  1513                 Count: AMMO_INFINITE;
  1512                 NumPerTurn: 0;
  1514                 NumPerTurn: 0;
  1513                 Timer: 0;
  1515                 Timer: 0;
  1529 // Ballgun
  1531 // Ballgun
  1530             (NameId: sidBallgun;
  1532             (NameId: sidBallgun;
  1531             NameTex: nil;
  1533             NameTex: nil;
  1532             Probability: 400;
  1534             Probability: 400;
  1533             NumberInCase: 1;
  1535             NumberInCase: 1;
  1534             Ammo: (Propz: ammoprop_ForwMsgs or 
  1536             Ammo: (Propz: ammoprop_ForwMsgs or
  1535                           ammoprop_NeedUpDown or
  1537                           ammoprop_NeedUpDown or
  1536                           ammoprop_DontHold;
  1538                           ammoprop_DontHold;
  1537                 Count: AMMO_INFINITE;
  1539                 Count: AMMO_INFINITE;
  1538                 NumPerTurn: 0;
  1540                 NumPerTurn: 0;
  1539                 Timer: 5001;
  1541                 Timer: 5001;
  1814 // Molotov
  1816 // Molotov
  1815             (NameId: sidMolotov;
  1817             (NameId: sidMolotov;
  1816             NameTex: nil;
  1818             NameTex: nil;
  1817             Probability: 0;
  1819             Probability: 0;
  1818             NumberInCase: 1;
  1820             NumberInCase: 1;
  1819             Ammo: (Propz: ammoprop_Power or 
  1821             Ammo: (Propz: ammoprop_Power or
  1820                           ammoprop_NeedUpDown or
  1822                           ammoprop_NeedUpDown or
  1821                           ammoprop_AltUse;
  1823                           ammoprop_AltUse;
  1822                 Count: AMMO_INFINITE;
  1824                 Count: AMMO_INFINITE;
  1823                 NumPerTurn: 0;
  1825                 NumPerTurn: 0;
  1824                 Timer: 3000;
  1826                 Timer: 3000;
  1923 // GasBomb
  1925 // GasBomb
  1924             (NameId: sidGasBomb;
  1926             (NameId: sidGasBomb;
  1925             NameTex: nil;
  1927             NameTex: nil;
  1926             Probability: 0;
  1928             Probability: 0;
  1927             NumberInCase: 1;
  1929             NumberInCase: 1;
  1928             Ammo: (Propz: ammoprop_Timerable or 
  1930             Ammo: (Propz: ammoprop_Timerable or
  1929                           ammoprop_Power or 
  1931                           ammoprop_Power or
  1930                           ammoprop_AltUse or 
  1932                           ammoprop_AltUse or
  1931                           ammoprop_NeedUpDown or
  1933                           ammoprop_NeedUpDown or
  1932                           ammoprop_SetBounce;
  1934                           ammoprop_SetBounce;
  1933                 Count: AMMO_INFINITE;
  1935                 Count: AMMO_INFINITE;
  1934                 NumPerTurn: 0;
  1936                 NumPerTurn: 0;
  1935                 Timer: 3000;
  1937                 Timer: 3000;
  1976 // Flamethrower
  1978 // Flamethrower
  1977             (NameId: sidFlamethrower;
  1979             (NameId: sidFlamethrower;
  1978             NameTex: nil;
  1980             NameTex: nil;
  1979             Probability: 20;
  1981             Probability: 20;
  1980             NumberInCase: 1;
  1982             NumberInCase: 1;
  1981             Ammo: (Propz: ammoprop_ForwMsgs or 
  1983             Ammo: (Propz: ammoprop_ForwMsgs or
  1982                           ammoprop_NeedUpDown or
  1984                           ammoprop_NeedUpDown or
  1983                           ammoprop_DontHold;
  1985                           ammoprop_DontHold;
  1984                 Count: 1;
  1986                 Count: 1;
  1985                 NumPerTurn: 0;
  1987                 NumPerTurn: 0;
  1986                 Timer: 5001;
  1988                 Timer: 5001;
  2107 // Snowball/Mudball
  2109 // Snowball/Mudball
  2108             (NameId: sidSnowball;
  2110             (NameId: sidSnowball;
  2109             NameTex: nil;
  2111             NameTex: nil;
  2110             Probability: 0;
  2112             Probability: 0;
  2111             NumberInCase: 1;
  2113             NumberInCase: 1;
  2112             Ammo: (Propz: ammoprop_Power or 
  2114             Ammo: (Propz: ammoprop_Power or
  2113                           ammoprop_AltUse or
  2115                           ammoprop_AltUse or
  2114                           ammoprop_NoRoundEnd;
  2116                           ammoprop_NoRoundEnd;
  2115                 Count: 2;
  2117                 Count: 2;
  2116                 NumPerTurn: 0;
  2118                 NumPerTurn: 0;
  2117                 Timer: 0;
  2119                 Timer: 0;
  2125             maxAngle: 0;
  2127             maxAngle: 0;
  2126             isDamaging: false;
  2128             isDamaging: false;
  2127             SkipTurns: 0;
  2129             SkipTurns: 0;
  2128             PosCount: 1;
  2130             PosCount: 1;
  2129             PosSprite: sprWater;
  2131             PosSprite: sprWater;
  2130             ejectX: 0; 
  2132             ejectX: 0;
  2131             ejectY: 0),
  2133             ejectY: 0),
  2132 
  2134 
  2133 // Tardis
  2135 // Tardis
  2134             (NameId: sidTardis;
  2136             (NameId: sidTardis;
  2135             NameTex: nil;
  2137             NameTex: nil;
  2155             PosCount: 2;
  2157             PosCount: 2;
  2156             PosSprite: sprAmTeleport;
  2158             PosSprite: sprAmTeleport;
  2157             ejectX: 0;
  2159             ejectX: 0;
  2158             ejectY: 0),
  2160             ejectY: 0),
  2159 
  2161 
  2160 // Structure      
  2162 // Structure
  2161 {
  2163 {
  2162             (NameId: sidStructure;
  2164             (NameId: sidStructure;
  2163             NameTex: nil;
  2165             NameTex: nil;
  2164             Probability: 0;
  2166             Probability: 0;
  2165             NumberInCase: 1;
  2167             NumberInCase: 1;
  2183             PosCount: 1;
  2185             PosCount: 1;
  2184             PosSprite: sprWater;
  2186             PosSprite: sprWater;
  2185             ejectX: 0;
  2187             ejectX: 0;
  2186             ejectY: 0),
  2188             ejectY: 0),
  2187 }
  2189 }
  2188             
  2190 
  2189 // Land Gun
  2191 // Land Gun
  2190             (NameId: sidLandGun;
  2192             (NameId: sidLandGun;
  2191             NameTex: nil;
  2193             NameTex: nil;
  2192             Probability: 20;
  2194             Probability: 20;
  2193             NumberInCase: 1;
  2195             NumberInCase: 1;
  2213 // Freezer
  2215 // Freezer
  2214             (NameId: sidIceGun;
  2216             (NameId: sidIceGun;
  2215             NameTex: nil;
  2217             NameTex: nil;
  2216             Probability: 20;
  2218             Probability: 20;
  2217             NumberInCase: 1;
  2219             NumberInCase: 1;
  2218             Ammo: (Propz: ammoprop_ForwMsgs or 
  2220             Ammo: (Propz: ammoprop_ForwMsgs or
  2219                           ammoprop_NeedUpDown or
  2221                           ammoprop_NeedUpDown or
  2220                           ammoprop_DontHold;
  2222                           ammoprop_DontHold;
  2221                 Count: 1;
  2223                 Count: 1;
  2222                 NumPerTurn: 0;
  2224                 NumPerTurn: 0;
  2223                 Timer: 5001;
  2225                 Timer: 5001;
  2340     PauseTexture,
  2342     PauseTexture,
  2341     AFKTexture,
  2343     AFKTexture,
  2342     SyncTexture,
  2344     SyncTexture,
  2343     ConfirmTexture: PTexture;
  2345     ConfirmTexture: PTexture;
  2344     cScaleFactor: GLfloat;
  2346     cScaleFactor: GLfloat;
       
  2347     cStereoDepth: GLfloat;
  2345     SupportNPOTT: Boolean;
  2348     SupportNPOTT: Boolean;
  2346     Step: LongInt;
  2349     Step: LongInt;
  2347     MissionIcons: PSDL_Surface;
  2350     MissionIcons: PSDL_Surface;
  2348     ropeIconTex: PTexture;
  2351     ropeIconTex: PTexture;
  2349 
  2352 
  2363 
  2366 
  2364     DefaultBinds : TBinds;
  2367     DefaultBinds : TBinds;
  2365 
  2368 
  2366     lastTurnChecksum : Longword;
  2369     lastTurnChecksum : Longword;
  2367 
  2370 
  2368     cTestLua : Boolean;
  2371     mModelview: TMatrix4x4f;
       
  2372     mProjection: TMatrix4x4f;
       
  2373     vBuffer: GLuint; // vertex buffer
       
  2374     tBuffer: GLuint; // texture coords buffer
       
  2375     cBuffer: GLuint; // color buffer
       
  2376 
       
  2377     uCurrentMVPLocation: GLint;
       
  2378 
       
  2379     uMainMVPLocation: GLint;
       
  2380     uMainTintLocation: GLint;
       
  2381 
       
  2382     uWaterMVPLocation: GLint;
       
  2383 
       
  2384     aVertex: GLint;
       
  2385     aTexCoord: GLint;
       
  2386     aColor: GLint;
  2369 
  2387 
  2370 var trammo:  array[TAmmoStrId] of PChar;   // name of the weapon
  2388 var trammo:  array[TAmmoStrId] of PChar;   // name of the weapon
  2371     trammoc: array[TAmmoStrId] of PChar;   // caption of the weapon
  2389     trammoc: array[TAmmoStrId] of PChar;   // caption of the weapon
  2372     trammod: array[TAmmoStrId] of PChar;   // description of the weapon
  2390     trammod: array[TAmmoStrId] of PChar;   // description of the weapon
  2373     trmsg:   array[TMsgStrId]  of PChar;   // message of the event
  2391     trmsg:   array[TMsgStrId]  of PChar;   // message of the event
  2374     trgoal:  array[TGoalStrId] of PChar;   // message of the goal
  2392     trgoal:  array[TGoalStrId] of PChar;   // message of the goal
       
  2393     cTestLua : Boolean;
  2375 
  2394 
  2376 procedure preInitModule;
  2395 procedure preInitModule;
  2377 procedure initModule;
  2396 procedure initModule;
  2378 procedure freeModule;
  2397 procedure freeModule;
  2379 
  2398 
  2435         end;
  2454         end;
  2436     for msid:= Low(TMsgStrId) to High(TMsgStrId) do
  2455     for msid:= Low(TMsgStrId) to High(TMsgStrId) do
  2437         trmsg[msid]:= nil;
  2456         trmsg[msid]:= nil;
  2438     for gsid:= Low(TGoalStrId) to High(TGoalStrId) do
  2457     for gsid:= Low(TGoalStrId) to High(TGoalStrId) do
  2439         trgoal[gsid]:= nil;
  2458         trgoal[gsid]:= nil;
  2440         
  2459 
       
  2460 // TODO: fixme
       
  2461 {$IFDEF PAS2C}
       
  2462     cLocale:= 'en';
       
  2463 {$ELSE}
  2441     // TODO: we could just have one cLocale variables and drop strutils
  2464     // TODO: we could just have one cLocale variables and drop strutils
  2442     cLocale:= ExtractDelimited(1, cLocaleFName, StdWordDelims);
  2465     cLocale:= ExtractDelimited(1, cLocaleFName, StdWordDelims);
       
  2466 {$ENDIF}
  2443 
  2467 
  2444     cFlattenFlakes      := false;
  2468     cFlattenFlakes      := false;
  2445     cFlattenClouds      := false;
  2469     cFlattenClouds      := false;
  2446     cIce                := false;
  2470     cIce                := false;
  2447     cSnow               := false;
  2471     cSnow               := false;
  2573     cSeed           := '';
  2597     cSeed           := '';
  2574     cVolumeDelta    := 0;
  2598     cVolumeDelta    := 0;
  2575     cHasFocus       := true;
  2599     cHasFocus       := true;
  2576     cInactDelay     := 100;
  2600     cInactDelay     := 100;
  2577     ReadyTimeLeft   := 0;
  2601     ReadyTimeLeft   := 0;
  2578     
  2602 
  2579     disableLandBack := false;
  2603     disableLandBack := false;
  2580     ScreenFade      := sfNone;
  2604     ScreenFade      := sfNone;
  2581 
  2605 
  2582     // those values still are not perfect
  2606     // those values still are not perfect
  2583     cLeftScreenBorder:= round(-cMinZoomLevel * cScreenWidth);
  2607     cLeftScreenBorder:= round(-cMinZoomLevel * cScreenWidth);