hedgewars/uTypes.pas
branchqmlfrontend
changeset 10886 99273b7afbff
parent 10817 48a53259fad8
parent 10874 059a6492176e
child 11071 3851ce4f2061
--- a/hedgewars/uTypes.pas	Mon Feb 16 22:33:15 2015 +0300
+++ b/hedgewars/uTypes.pas	Thu Apr 02 21:09:56 2015 +0300
@@ -92,20 +92,21 @@
             );
 
     // Gears that interact with other Gears and/or Land
-    TGearType = (gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives, // these gears should be avoided when searching a spawn place
-            gtGrenade, gtShell, gtGrave, gtBee, // 8
-            gtShotgunShot, gtPickHammer, gtRope,  // 11
-            gtDEagleShot, gtDynamite, gtClusterBomb, gtCluster, gtShover, // 16
-            gtFirePunch, gtATStartGame, // 18
-            gtATFinishGame, gtParachute, gtAirAttack, gtAirBomb, gtBlowTorch, // 23
-            gtGirder, gtTeleport, gtSwitcher, gtTarget, gtMortar, // 28
-            gtWhip, gtKamikaze, gtCake, gtSeduction, gtWatermelon, gtMelonPiece, // 34
-            gtHellishBomb, gtWaterUp, gtDrill, gtBallGun, gtBall, gtRCPlane, // 40
-            gtSniperRifleShot, gtJetpack, gtMolotov, gtBirdy, // 44
-            gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 50
-            gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 55
+    // first row of gears (<gtExplosives) should be avoided when searching a spawn place
+    TGearType = (gtFlame, gtHedgehog, gtMine, gtCase, gtAirMine, gtExplosives, 
+            gtGrenade, gtShell, gtGrave, gtBee, // 9
+            gtShotgunShot, gtPickHammer, gtRope,  // 12
+            gtDEagleShot, gtDynamite, gtClusterBomb, gtCluster, gtShover, // 17
+            gtFirePunch, gtATStartGame, // 19
+            gtATFinishGame, gtParachute, gtAirAttack, gtAirBomb, gtBlowTorch, // 24
+            gtGirder, gtTeleport, gtSwitcher, gtTarget, gtMortar, // 29
+            gtWhip, gtKamikaze, gtCake, gtSeduction, gtWatermelon, gtMelonPiece, // 35
+            gtHellishBomb, gtWaterUp, gtDrill, gtBallGun, gtBall, gtRCPlane, // 41
+            gtSniperRifleShot, gtJetpack, gtMolotov, gtBirdy, // 45
+            gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 51
+            gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 56
             gtNapalmBomb, gtSnowball, gtFlake, {gtStructure,} gtLandGun, gtTardis, // 61
-            gtIceGun, gtAddAmmo, gtGenericFaller, gtKnife, gtAirMine); // 66
+            gtIceGun, gtAddAmmo, gtGenericFaller, gtKnife); // 65
 
     // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.)
     TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
@@ -282,6 +283,7 @@
             Tint: LongWord;         // Used to colour a texture
             LinkedGear: PGear;      // Used to track a related gear. Portal pairs for example.
             SoundChannel: LongInt;  // Used to track a sound the gear started
+            Data: Pointer; // pointer to gear type specific data structure (if any)
             end;
     TPGearArray = array of PGear;
     PGearArrayS = record
@@ -515,6 +517,19 @@
             getDimensions, getImageDimensions: boolean;
             end;
 
+    // gear data types
+
+    const cakeh =   27;
+
+    type TCakeData = record
+        CakeI: integer;
+        CakePoints: array[0..Pred(cakeh)] of record
+            x, y: hwFloat;
+        end;
+    end;
+
+    PCakeData = ^TCakeData;
+
 implementation
 
 end.