hedgewars/uTypes.pas
branchqmlfrontend
changeset 10817 48a53259fad8
parent 10748 dc587913987c
parent 10809 bb2e4e9944f7
child 10886 99273b7afbff
equal deleted inserted replaced
10757:f71275973737 10817:48a53259fad8
    85             sprCheese, sprHandCheese, sprHandFlamethrower, sprChunk, sprNote,
    85             sprCheese, sprHandCheese, sprHandFlamethrower, sprChunk, sprNote,
    86             sprSMineOff, sprSMineOn, sprHandSMine, sprHammer,
    86             sprSMineOff, sprSMineOn, sprHandSMine, sprHammer,
    87             sprHandResurrector, sprCross, sprAirDrill, sprNapalmBomb,
    87             sprHandResurrector, sprCross, sprAirDrill, sprNapalmBomb,
    88             sprBulletHit, sprSnowball, sprHandSnowball, sprSnow,
    88             sprBulletHit, sprSnowball, sprHandSnowball, sprSnow,
    89             sprSDFlake, sprSDWater, sprSDCloud, sprSDSplash, sprSDDroplet, sprTardis,
    89             sprSDFlake, sprSDWater, sprSDCloud, sprSDSplash, sprSDDroplet, sprTardis,
    90             sprSlider, sprBotlevels, sprHandKnife, sprKnife, sprStar, sprIceTexture, sprIceGun, sprFrozenHog, sprAmRubber, sprBoing, sprCustom1, sprCustom2
    90             sprSlider, sprBotlevels, sprHandKnife, sprKnife, sprStar, sprIceTexture, sprIceGun,
       
    91             sprFrozenHog, sprAmRubber, sprBoing, sprCustom1, sprCustom2, sprAirMine
    91             );
    92             );
    92 
    93 
    93     // Gears that interact with other Gears and/or Land
    94     // Gears that interact with other Gears and/or Land
    94     TGearType = (gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives, // these gears should be avoided when searching a spawn place
    95     TGearType = (gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives, // these gears should be avoided when searching a spawn place
    95             gtGrenade, gtShell, gtGrave, gtBee, // 8
    96             gtGrenade, gtShell, gtGrave, gtBee, // 8
   102             gtHellishBomb, gtWaterUp, gtDrill, gtBallGun, gtBall, gtRCPlane, // 40
   103             gtHellishBomb, gtWaterUp, gtDrill, gtBallGun, gtBall, gtRCPlane, // 40
   103             gtSniperRifleShot, gtJetpack, gtMolotov, gtBirdy, // 44
   104             gtSniperRifleShot, gtJetpack, gtMolotov, gtBirdy, // 44
   104             gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 50
   105             gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 50
   105             gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 55
   106             gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 55
   106             gtNapalmBomb, gtSnowball, gtFlake, {gtStructure,} gtLandGun, gtTardis, // 61
   107             gtNapalmBomb, gtSnowball, gtFlake, {gtStructure,} gtLandGun, gtTardis, // 61
   107             gtIceGun, gtAddAmmo, gtGenericFaller, gtKnife); // 65
   108             gtIceGun, gtAddAmmo, gtGenericFaller, gtKnife, gtAirMine); // 66
   108 
   109 
   109     // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.)
   110     // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.)
   110     TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
   111     TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
   111             vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble,
   112             vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble,
   112             vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtShell,
   113             vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtShell,
   152             amGirder, amTeleport, amSwitch, amMortar, amKamikaze, amCake, // 24
   153             amGirder, amTeleport, amSwitch, amMortar, amKamikaze, amCake, // 24
   153             amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun, // 30
   154             amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun, // 30
   154             amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35
   155             amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35
   155             amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42
   156             amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42
   156             amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48
   157             amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48
   157             amResurrector, amDrillStrike, amSnowball, amTardis, {amStructure,} amLandGun, amIceGun, amKnife, amRubber); // 56
   158             amResurrector, amDrillStrike, amSnowball, amTardis, {amStructure,} amLandGun, // 53
       
   159             amIceGun, amKnife, amRubber, amAirMine); // 57
   158 
   160 
   159     // Different kind of crates that e.g. hedgehogs can pick up
   161     // Different kind of crates that e.g. hedgehogs can pick up
   160     TCrateType = (HealthCrate, AmmoCrate, UtilityCrate);
   162     TCrateType = (HealthCrate, AmmoCrate, UtilityCrate);
   161 
   163 
   162     THWFont = (fnt16, fntBig, fntSmall {$IFNDEF MOBILE}, CJKfnt16, CJKfntBig, CJKfntSmall{$ENDIF});
   164     THWFont = (fnt16, fntBig, fntSmall {$IFNDEF MOBILE}, CJKfnt16, CJKfntBig, CJKfntSmall{$ENDIF});
   245             AIHints: LongWord;          // hints for ai.
   247             AIHints: LongWord;          // hints for ai.
   246             LastDamage: PHedgehog;      // Used to track damage source for stats
   248             LastDamage: PHedgehog;      // Used to track damage source for stats
   247             CollisionIndex: LongInt;    // Position in collision array
   249             CollisionIndex: LongInt;    // Position in collision array
   248             Message: LongWord;          // Game messages are stored here. See gm bitmasks in uConsts
   250             Message: LongWord;          // Game messages are stored here. See gm bitmasks in uConsts
   249             uid: Longword;              // Lua use this to reference gears
   251             uid: Longword;              // Lua use this to reference gears
       
   252             Hedgehog: PHedgehog;        // set to CurrentHedgehog on gear creation.  uStats damage code appears to assume it will never be nil and never be changed.  If you override it, make sure it is set to a non-nil PHedgehog before dealing damage.
   250 // Strongly recommended not to override these.  Will mess up generic operations like portaling
   253 // Strongly recommended not to override these.  Will mess up generic operations like portaling
   251             X : hwFloat;              // X/Y/dX/dY are position/velocity. People count on these having semi-normal values
   254             X : hwFloat;              // X/Y/dX/dY are position/velocity. People count on these having semi-normal values
   252             Y : hwFloat;
   255             Y : hwFloat;
   253             dX: hwFloat;
   256             dX: hwFloat;
   254             dY: hwFloat;
   257             dY: hwFloat;
   276             MsgParam: LongWord;      // Initially stored a set of messages. So usually gm values like Message. Frequently overriden
   279             MsgParam: LongWord;      // Initially stored a set of messages. So usually gm values like Message. Frequently overriden
   277 // These are not used generically, but should probably be used for purpose intended. Definitely shouldn't override pointer type
   280 // These are not used generically, but should probably be used for purpose intended. Definitely shouldn't override pointer type
   278             Tex: PTexture;          // A texture created by the gear. Shouldn't use for anything but textures
   281             Tex: PTexture;          // A texture created by the gear. Shouldn't use for anything but textures
   279             Tint: LongWord;         // Used to colour a texture
   282             Tint: LongWord;         // Used to colour a texture
   280             LinkedGear: PGear;      // Used to track a related gear. Portal pairs for example.
   283             LinkedGear: PGear;      // Used to track a related gear. Portal pairs for example.
   281             Hedgehog: PHedgehog;    // set to CurrentHedgehog on gear creation
       
   282             SoundChannel: LongInt;  // Used to track a sound the gear started
   284             SoundChannel: LongInt;  // Used to track a sound the gear started
   283             end;
   285             end;
   284     TPGearArray = array of PGear;
   286     TPGearArray = array of PGear;
   285     PGearArrayS = record
   287     PGearArrayS = record
   286         size: LongWord;
   288         size: LongWord;
   443             sidLowGravity, sidExtraDamage, sidInvulnerable, sidExtraTime,
   445             sidLowGravity, sidExtraDamage, sidInvulnerable, sidExtraTime,
   444             sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack,
   446             sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack,
   445             sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb,
   447             sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb,
   446             sidSineGun, sidFlamethrower,sidSMine, sidHammer, sidResurrector,
   448             sidSineGun, sidFlamethrower,sidSMine, sidHammer, sidResurrector,
   447             sidDrillStrike, sidSnowball, sidNothing, sidTardis,
   449             sidDrillStrike, sidSnowball, sidNothing, sidTardis,
   448             {sidStructure,} sidLandGun, sidIceGun, sidKnife, sidRubber);
   450             {sidStructure,} sidLandGun, sidIceGun, sidKnife, sidRubber, sidAirMine);
   449 
   451 
   450     TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused,
   452     TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused,
   451             sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
   453             sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
   452             sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD, sidReady,
   454             sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD, sidReady,
   453             sidBounce1, sidBounce2, sidBounce3, sidBounce4, sidBounce5, sidBounce,
   455             sidBounce1, sidBounce2, sidBounce3, sidBounce4, sidBounce5, sidBounce,