hedgewars/uTypes.pas
branchui-scaling
changeset 15283 c4fd2813b127
parent 13385 ec1491bb5acc
parent 15230 4576e41c0692
child 15665 63e2b7b2ec47
equal deleted inserted replaced
13390:0135e64c6c66 15283:c4fd2813b127
    37 
    37 
    38     // Possible states of the game
    38     // Possible states of the game
    39     TGameState = (gsLandGen, gsStart, gsGame, gsConfirm, gsExit, gsSuspend);
    39     TGameState = (gsLandGen, gsStart, gsGame, gsConfirm, gsExit, gsSuspend);
    40 
    40 
    41     // Game types that help determining what the engine is actually supposed to do
    41     // Game types that help determining what the engine is actually supposed to do
    42     TGameType = (gmtLocal, gmtDemo, gmtNet, gmtSave, gmtLandPreview, gmtSyntax, gmtRecord);
    42     TGameType = (gmtLocal, gmtDemo, gmtNet, gmtSave, gmtLandPreview, gmtBadSyntax, gmtRecord, gmtSyntaxHelp);
    43 
    43 
    44     // Different files are stored in different folders, this enumeration is used to tell which folder to use
    44     // Different files are stored in different folders, this enumeration is used to tell which folder to use
    45     TPathType = (ptNone, ptData, ptGraphics, ptThemes, ptCurrTheme, ptConfig, ptTeams, ptMaps,
    45     TPathType = (ptNone, ptData, ptGraphics, ptThemes, ptCurrTheme, ptConfig, ptTeams, ptMaps,
    46             ptMapCurrent, ptDemos, ptSounds, ptGraves, ptFonts, ptForts, ptLocale,
    46             ptMapCurrent, ptDemos, ptSounds, ptGraves, ptFonts, ptForts, ptLocale,
    47             ptAmmoMenu, ptHedgehog, ptVoices, ptHats, ptFlags, ptMissionMaps,
    47             ptAmmoMenu, ptHedgehog, ptVoices, ptHats, ptFlags, ptMissionMaps,
    48             ptSuddenDeath, ptButtons, ptShaders);
    48             ptSuddenDeath, ptButtons, ptShaders, ptDefaultVoice, ptMisc);
    49 
    49 
    50     // Available sprites for displaying stuff
    50     // Available sprites for displaying stuff
    51     TSprite = (sprWater, sprCloud, sprBomb, sprBigDigit, sprBigDigitGray, sprBigDigitGreen,
    51     TSprite = (sprWater, sprCloud, sprBomb, sprBigDigit, sprBigDigitGray, sprBigDigitGreen,
    52             sprBigDigitRed, sprFrame, sprLag, sprArrow, sprBazookaShell, sprTargetP, sprBee,
    52             sprBigDigitRed, sprFrame, sprLag, sprArrow, sprBazookaShell, sprTargetP, sprBee,
    53             sprSmokeTrace, sprRopeHook, sprExplosion50, sprMineOff,
    53             sprSmokeTrace, sprRopeHook, sprExplosion50, sprMineOff,
    59             sprHHTelepMask, sprSwitch, sprParachute, sprTarget, sprRopeNode,
    59             sprHHTelepMask, sprSwitch, sprParachute, sprTarget, sprRopeNode,
    60             sprQuestion, sprPowerBar, sprWindBar, sprWindL, sprWindR,
    60             sprQuestion, sprPowerBar, sprWindBar, sprWindL, sprWindR,
    61 {$IFDEF USE_TOUCH_INTERFACE}
    61 {$IFDEF USE_TOUCH_INTERFACE}
    62             sprFireButton, sprArrowUp, sprArrowDown, sprArrowLeft, sprArrowRight,
    62             sprFireButton, sprArrowUp, sprArrowDown, sprArrowLeft, sprArrowRight,
    63             sprJumpWidget, sprAMWidget, sprPauseButton, sprTimerButton, sprTargetButton,
    63             sprJumpWidget, sprAMWidget, sprPauseButton, sprTimerButton, sprTargetButton,
    64             sprSwitchButton,
    64             sprSwitchButton, sprBounceButton,
    65 {$ENDIF}
    65 {$ENDIF}
    66             sprFlake, sprHandRope, sprHandBazooka, sprHandShotgun,
    66             sprFlake, sprHandRope, sprHandBazooka, sprHandShotgun,
    67             sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer,
    67             sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer,
    68             sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath,
    68             sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath,
    69             sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft,
    69             sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft,
    88             sprHandResurrector, sprCross, sprAirDrill, sprNapalmBomb,
    88             sprHandResurrector, sprCross, sprAirDrill, sprNapalmBomb,
    89             sprBulletHit, sprSnowball, sprHandSnowball, sprSnow,
    89             sprBulletHit, sprSnowball, sprHandSnowball, sprSnow,
    90             sprSDFlake, sprSDWater, sprSDCloud, sprSDSplash, sprSDDroplet, sprTardis,
    90             sprSDFlake, sprSDWater, sprSDCloud, sprSDSplash, sprSDDroplet, sprTardis,
    91             sprSlider, sprBotlevels, sprHandKnife, sprKnife, sprStar, sprIceTexture, sprIceGun,
    91             sprSlider, sprBotlevels, sprHandKnife, sprKnife, sprStar, sprIceTexture, sprIceGun,
    92             sprFrozenHog, sprAmRubber, sprBoing, sprCustom1, sprCustom2, sprCustom3, sprCustom4,
    92             sprFrozenHog, sprAmRubber, sprBoing, sprCustom1, sprCustom2, sprCustom3, sprCustom4,
    93             sprCustom5, sprCustom6, sprCustom7, sprCustom8, sprAirMine, sprHandAirMine,
    93             sprCustom5, sprCustom6, sprCustom7, sprCustom8, sprFrozenAirMine, sprAirMine, sprHandAirMine,
    94             sprFlakeL, sprSDFlakeL, sprCloudL, sprSDCloudL, sprDuck, sprHandDuck, sprMinigun
    94             sprFlakeL, sprSDFlakeL, sprCloudL, sprSDCloudL, sprCreeper, sprHandCreeper, sprMinigun,
       
    95             sprSliderInverted, sprFingerBack, sprFingerBackInv, sprTargetPBack, sprTargetPBackInv,
       
    96             sprHealthHud, sprHealthPoisonHud, sprVampHud, sprKarmaHud, sprMedicHud, sprMedicPoisonHud,
       
    97             sprHaloHud, sprInvulnHUD, sprAmPiano, sprHandLandGun, sprFirePunch, sprThroughWrap
    95             );
    98             );
    96 
    99 
    97     // Gears that interact with other Gears and/or Land
   100     // Gears that interact with other Gears and/or Land
    98     // first row of gears (<gtExplosives) should be avoided when searching a spawn place
   101     // first row of gears (<gtExplosives) should be avoided when searching a spawn place
    99     TGearType = (gtFlame, gtHedgehog, gtMine, gtCase, gtAirMine, gtExplosives, 
   102     TGearType = (gtFlame, gtHedgehog, gtMine, gtCase, gtAirMine, gtExplosives, 
   106             gtWhip, gtKamikaze, gtCake, gtSeduction, gtWatermelon, gtMelonPiece, // 35
   109             gtWhip, gtKamikaze, gtCake, gtSeduction, gtWatermelon, gtMelonPiece, // 35
   107             gtHellishBomb, gtWaterUp, gtDrill, gtBallGun, gtBall, gtRCPlane, // 41
   110             gtHellishBomb, gtWaterUp, gtDrill, gtBallGun, gtBall, gtRCPlane, // 41
   108             gtSniperRifleShot, gtJetpack, gtMolotov, gtBirdy, // 45
   111             gtSniperRifleShot, gtJetpack, gtMolotov, gtBirdy, // 45
   109             gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 51
   112             gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 51
   110             gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 56
   113             gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 56
   111             gtNapalmBomb, gtSnowball, gtFlake, {gtStructure,} gtLandGun, gtTardis, // 61
   114             gtNapalmBomb, gtSnowball, gtFlake, gtLandGun, gtTardis, // 61
   112             gtIceGun, gtAddAmmo, gtGenericFaller, gtKnife, gtDuck, gtMinigun, gtMinigunBullet); // 68
   115             gtIceGun, gtAddAmmo, gtGenericFaller, gtKnife, gtCreeper, gtMinigun, gtMinigunBullet); // 68
   113 
   116 
   114     // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.)
   117     // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.)
   115     TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
   118     TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
   116             vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble,
   119             vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble,
   117             vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtShell,
   120             vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtShell,
   119             vgtFeather, vgtHealthTag, vgtSmokeTrace, vgtEvilTrace, vgtExplosion,
   122             vgtFeather, vgtHealthTag, vgtSmokeTrace, vgtEvilTrace, vgtExplosion,
   120             vgtBigExplosion, vgtChunk, vgtNote, vgtLineTrail, vgtBulletHit, vgtCircle,
   123             vgtBigExplosion, vgtChunk, vgtNote, vgtLineTrail, vgtBulletHit, vgtCircle,
   121             vgtSmoothWindBar, vgtStraightShot, vgtNoPlaceWarn);
   124             vgtSmoothWindBar, vgtStraightShot, vgtNoPlaceWarn);
   122 
   125 
   123     // Damage can be caused by different sources
   126     // Damage can be caused by different sources
   124     TDamageSource = (dsUnknown, dsFall, dsBullet, dsExplosion, dsShove, dsPoison);
   127     TDamageSource = (dsUnknown, dsFall, dsBullet, dsExplosion, dsShove, dsPoison, dsHammer);
   125 
   128 
   126     // Available sounds
   129     // Available sounds
   127     TSound = (sndNone,
   130     TSound = (sndNone,
   128             sndGrenadeImpact, sndExplosion, sndThrowPowerUp, sndThrowRelease,
   131             sndGrenadeImpact, sndExplosion, sndThrowPowerUp, sndThrowRelease,
   129             sndSplash, sndShotgunReload, sndShotgunFire, sndGraveImpact,
   132             sndSplash, sndShotgunReload, sndShotgunFire, sndGraveImpact,
   148             sndPiano8, sndSkip, sndSineGun, sndOoff1, sndOoff2, sndOoff3, sndWhack,
   151             sndPiano8, sndSkip, sndSineGun, sndOoff1, sndOoff2, sndOoff3, sndWhack,
   149             sndComeonthen, sndParachute, sndBump, sndResurrector, sndPlane, sndTardis, sndFrozenHogImpact,
   152             sndComeonthen, sndParachute, sndBump, sndResurrector, sndPlane, sndTardis, sndFrozenHogImpact,
   150             sndIceBeam, sndHogFreeze, sndAirMineImpact, sndKnifeImpact, sndExtraTime, sndLaserSight,
   153             sndIceBeam, sndHogFreeze, sndAirMineImpact, sndKnifeImpact, sndExtraTime, sndLaserSight,
   151             sndInvulnerable, sndJetpackLaunch, sndJetpackBoost, sndPortalShot, sndPortalSwitch,
   154             sndInvulnerable, sndJetpackLaunch, sndJetpackBoost, sndPortalShot, sndPortalSwitch,
   152             sndPortalOpen, sndBlowTorch, sndCountdown1, sndCountdown2, sndCountdown3, sndCountdown4,
   155             sndPortalOpen, sndBlowTorch, sndCountdown1, sndCountdown2, sndCountdown3, sndCountdown4,
   153             sndDuckDrop, sndDuckWater, sndDuckDie, sndCustom1, sndCustom2, sndCustom3, sndCustom4,
   156             sndCreeperDrop, sndCreeperWater, sndCreeperDie, sndCustom1, sndCustom2, sndCustom3, sndCustom4,
   154             sndCustom5, sndCustom6, sndCustom7, sndCustom8, sndMinigun);
   157             sndCustom5, sndCustom6, sndCustom7, sndCustom8, sndMinigun, sndFlamethrower, sndIceBeamIdle,
       
   158             sndLandGun, sndCaseImpact, sndExtraDamage, sndFirePunchHit, sndGrenade, sndThisOneIsMine,
       
   159             sndWhatThe, sndSoLong, sndOhDear, sndGonnaGetYou, sndDrat, sndBugger, sndAmazing,
       
   160             sndBrilliant, sndExcellent, sndFire, sndWatchThis, sndRunAway, sndRevenge, sndCutItOut,
       
   161             sndLeaveMeAlone, sndOuch, sndHmm, sndKiss, sndFlyAway, sndPlaneWater);
   155 
   162 
   156     // Available ammo types to be used by hedgehogs
   163     // Available ammo types to be used by hedgehogs
   157     TAmmoType  = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6
   164     TAmmoType  = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6
   158             amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, // 13
   165             amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, // 13
   159             amBaseballBat, amParachute, amAirAttack, amMineStrike, amBlowTorch, // 18
   166             amBaseballBat, amParachute, amAirAttack, amMineStrike, amBlowTorch, // 18
   160             amGirder, amTeleport, amSwitch, amMortar, amKamikaze, amCake, // 24
   167             amGirder, amTeleport, amSwitch, amMortar, amKamikaze, amCake, // 24
   161             amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun, // 30
   168             amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun, // 30
   162             amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35
   169             amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35
   163             amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42
   170             amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42
   164             amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48
   171             amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48
   165             amResurrector, amDrillStrike, amSnowball, amTardis, {amStructure,} amLandGun, // 53
   172             amResurrector, amDrillStrike, amSnowball, amTardis, amLandGun, // 53
   166             amIceGun, amKnife, amRubber, amAirMine, amDuck, amMinigun); // 59
   173             amIceGun, amKnife, amRubber, amAirMine, amCreeper, amMinigun); // 59
       
   174     // NOTE: If we ever reach 126 ammo types, make sure to skip ammo type number 126 because it's
       
   175     // reserved as synonym for amNothing. See also chSetWeapon.
   167 
   176 
   168     // Different kind of crates that e.g. hedgehogs can pick up
   177     // Different kind of crates that e.g. hedgehogs can pick up
   169     TCrateType = (HealthCrate, AmmoCrate, UtilityCrate);
   178     TCrateType = (HealthCrate, AmmoCrate, UtilityCrate);
   170 
   179 
   171     THWFont = (fnt16, fntBig, fntSmall, fntChat {$IFNDEF MOBILE}, CJKfnt16, CJKfntBig, CJKfntSmall, CJKfntChat{$ENDIF});
   180     THWFont = (fnt16, fntBig, fntSmall, fntChat {$IFNDEF MOBILE}, CJKfnt16, CJKfntBig, CJKfntSmall, CJKfntChat{$ENDIF});
   174             capgrpMessage, capgrpMessage2, capgrpAmmostate);
   183             capgrpMessage, capgrpMessage2, capgrpAmmostate);
   175 
   184 
   176     TStatInfoType = (siGameResult, siMaxStepDamage, siMaxStepKills, siKilledHHs,
   185     TStatInfoType = (siGameResult, siMaxStepDamage, siMaxStepKills, siKilledHHs,
   177             siClanHealth, siTeamStats, siPlayerKills, siMaxTeamDamage,
   186             siClanHealth, siTeamStats, siPlayerKills, siMaxTeamDamage,
   178             siMaxTeamKills, siMaxTurnSkips, siCustomAchievement, siGraphTitle,
   187             siMaxTeamKills, siMaxTurnSkips, siCustomAchievement, siGraphTitle,
   179             siPointType);
   188             siPointType, siTeamRank, siEverAfter);
   180 
   189 
   181     // Various 'emote' animations a hedgehog can do
   190     // Various 'emote' animations a hedgehog can do
   182     TWave = (waveRollup, waveSad, waveWave, waveHurrah, waveLemonade, waveShrug, waveJuggle);
   191     TWave = (waveRollup, waveSad, waveWave, waveHurrah, waveLemonade, waveShrug, waveJuggle);
   183 
   192 
   184     TRenderMode = (rmDefault, rmLeftEye, rmRightEye);
   193     TRenderMode = (rmDefault, rmLeftEye, rmRightEye);
   248             Active: Boolean;            // Is gear Active (running step code)
   257             Active: Boolean;            // Is gear Active (running step code)
   249             Kind: TGearType;
   258             Kind: TGearType;
   250             doStep: TGearStepProcedure; // Code the gear is running
   259             doStep: TGearStepProcedure; // Code the gear is running
   251             AmmoType : TAmmoType;       // Ammo type associated with this kind of gear
   260             AmmoType : TAmmoType;       // Ammo type associated with this kind of gear
   252             RenderTimer: Boolean;       // Will visually display Timer if true
   261             RenderTimer: Boolean;       // Will visually display Timer if true
       
   262             RenderHealth: Boolean;      // Will visually display Health if true
   253             Target : TPoint;            // Gear target. Will render in uGearsRender unless a special case is added
   263             Target : TPoint;            // Gear target. Will render in uGearsRender unless a special case is added
   254             AIHints: LongWord;          // hints for ai.
   264             AIHints: LongWord;          // hints for ai.
   255             LastDamage: PHedgehog;      // Used to track damage source for stats
   265             LastDamage: PHedgehog;      // Used to track damage source for stats
   256             CollisionIndex: LongInt;    // Position in collision array
   266             CollisionIndex: LongInt;    // Position in collision array
   257             Message: LongWord;          // Game messages are stored here. See gm bitmasks in uConsts
   267             Message: LongWord;          // Game messages are stored here. See gm bitmasks in uConsts
   266             PortalCounter: LongWord; // Necessary to interrupt portal loops.  Not possible to avoid infinite loops without it.
   276             PortalCounter: LongWord; // Necessary to interrupt portal loops.  Not possible to avoid infinite loops without it.
   267 // Don't use these if you're using generic movement like doStepFallingGear and explosion shoves. Generally recommended not to use.
   277 // Don't use these if you're using generic movement like doStepFallingGear and explosion shoves. Generally recommended not to use.
   268             Radius: LongInt;     // Radius. If not using uCollisions, is usually used to indicate area of effect
   278             Radius: LongInt;     // Radius. If not using uCollisions, is usually used to indicate area of effect
   269             CollisionMask: Word; // Masking off Land impact  FF7F for example ignores current hog and crates
   279             CollisionMask: Word; // Masking off Land impact  FF7F for example ignores current hog and crates
   270             AdvBounce: Longword; // Triggers 45 bounces. Is a counter to avoid edge cases
   280             AdvBounce: Longword; // Triggers 45 bounces. Is a counter to avoid edge cases
       
   281             Sticky: Boolean;     // True if gear is *normally* able to stick to landscape on impact
   271             Elasticity: hwFloat;
   282             Elasticity: hwFloat;
   272             Friction  : hwFloat;
   283             Friction  : hwFloat;
   273             Density   : hwFloat; // Density is kind of a mix of size and density. Impacts distance thrown, wind.
   284             Density   : hwFloat; // Density is kind of a mix of size and density. Impacts distance thrown, wind.
   274             ImpactSound: TSound; // first sound, others have to be after it in the sounds def.
   285             ImpactSound: TSound; // first sound, others have to be after it in the sounds def.
   275             nImpactSounds: Word; // count of ImpactSounds.
   286             nImpactSounds: Word; // count of ImpactSounds.
   324         uid: Longword;
   335         uid: Longword;
   325         Layer: byte;
   336         Layer: byte;
   326         end;
   337         end;
   327 
   338 
   328     TStatistics = record
   339     TStatistics = record
   329         DamageRecv,
   340         DamageRecv,              // total damage received
   330         DamageGiven: Longword;
   341         DamageGiven: Longword;   // total damage dealt
   331         StepDamageRecv,
   342         StepDamageRecvInRow,     // number of enemy turns in row this hog received any damage
   332         StepDamageGiven,
   343         StepDamageRecv,          // damage received in this turn
   333         StepKills: Longword;
   344         StepDamageGiven,         // damage dealt in this turn
   334         StepPoisoned,
   345         StepKills: Longword;     // kills in this turn
   335         StepDied,
   346         StepPoisoned,            // whether hog got poisoned this turn
   336         Sacrificed: boolean;
   347         StepDied,                // whether hog died this turn
   337         MaxStepDamageRecv,
   348         Sacrificed,              // whether hog was sacrificed in suicide attack (kamikaze, piano)
   338         MaxStepDamageGiven,
   349         GotRevenge: boolean;     // whether hog got revenge in this turn
   339         MaxStepKills: Longword;
   350         StepRevenge: boolean;    // whether hog's revenge mode was activated in this turn
       
   351         MaxStepDamageRecv,       // most damage received in one turn
       
   352         MaxStepDamageGiven,      // most damage dealt in one turn
       
   353         MaxStepKills: Longword;  // most kills in one turn
   340         FinishedTurns: Longword;
   354         FinishedTurns: Longword;
   341         end;
   355         end;
   342 
   356 
   343     TTeamStats = record
   357     TTeamStats = record
   344         Kills : Longword;
   358         Kills : Longword;
   347         TeamKills : Longword;
   361         TeamKills : Longword;
   348         TurnSkips : Longword;
   362         TurnSkips : Longword;
   349         TeamDamage : Longword;
   363         TeamDamage : Longword;
   350         end;
   364         end;
   351 
   365 
       
   366     PClanDeathLogEntry = ^TClanDeathLogEntry;
       
   367 
       
   368     TClanDeathLogEntry = record
       
   369         Turn : Longword; // turn in which the clans were killed
       
   370         KilledClans : array[0..Pred(cMaxTeams)] of PClan; // array of clans that have died
       
   371         KilledClansCount: Longword; // number of clans that died
       
   372         NextEntry : PClanDeathLogEntry; // linked list
       
   373         end;
       
   374 
       
   375 
   352     TBinds = record
   376     TBinds = record
   353                  indices: array[0..cKbdMaxIndex] of byte;
   377                  indices: array[0..cKbdMaxIndex] of byte;
   354                  // zeroth element is reserved, indices[i] == 0 means no binding
   378                  // zeroth element is reserved, indices[i] == 0 means no binding
   355                  binds: array[0..255] of shortstring;
   379                  binds: array[0..255] of shortstring;
   356                  lastIndex: byte;
   380                  lastIndex: byte;
   365         end;
   389         end;
   366 
   390 
   367     TVoice = record
   391     TVoice = record
   368         snd: TSound;
   392         snd: TSound;
   369         voicepack: PVoicePack;
   393         voicepack: PVoicePack;
       
   394         isFallback: boolean;
   370         end;
   395         end;
   371 
   396 
   372     THHAmmo = array[0..cMaxSlotIndex, 0..cMaxSlotAmmoIndex] of TAmmo;
   397     THHAmmo = array[0..cMaxSlotIndex, 0..cMaxSlotAmmoIndex] of TAmmo;
   373     PHHAmmo = ^THHAmmo;
   398     PHHAmmo = ^THHAmmo;
   374 
   399 
   393             stats: TStatistics;
   418             stats: TStatistics;
   394             Hat: shortstring;
   419             Hat: shortstring;
   395             InitialHealth: LongInt; // used for gfResetHealth
   420             InitialHealth: LongInt; // used for gfResetHealth
   396             King: boolean;  // Flag for a bunch of hedgehog attributes
   421             King: boolean;  // Flag for a bunch of hedgehog attributes
   397             Unplaced: boolean;  // Flag for hog placing mode
   422             Unplaced: boolean;  // Flag for hog placing mode
       
   423             UnplacedKing: boolean;  // Flag for king placing phase in King Mode
   398             Timer: Longword;
   424             Timer: Longword;
   399             HealthBarHealth: LongInt;
   425             HealthBarHealth: LongInt;
   400             Effects: array[THogEffect] of LongInt;
   426             Effects: array[THogEffect] of LongInt;
       
   427             RevengeHog: PHedgehog;   // For which hog this hog wants revenge most. For sndRevenge taunt
       
   428             FlownOffMap: boolean; // When hedgehog has flown far away off the map left or right
   401             end;
   429             end;
   402 
   430 
   403     TTeam = record
   431     TTeam = record
   404             Clan: PClan;
   432             Clan: PClan;
   405             TeamName: shortstring;
   433             TeamName: shortstring;
   423             AttackBar: LongWord;
   451             AttackBar: LongWord;
   424             HedgehogsNumber: Longword;
   452             HedgehogsNumber: Longword;
   425             voicepack: PVoicepack;
   453             voicepack: PVoicepack;
   426             PlayerHash: shortstring;   // md5 hash of player name. For temporary enabling of hats as thank you. Hashed for privacy of players
   454             PlayerHash: shortstring;   // md5 hash of player name. For temporary enabling of hats as thank you. Hashed for privacy of players
   427             stats: TTeamStats;
   455             stats: TTeamStats;
       
   456             Passive: boolean; // if true, team will not participate in game. It is treated as if all its hedgehogs are frozen.
       
   457                               // updating this value requires updating Passive in TClan as well!
       
   458             hasKing: boolean; // true if team has a living king
   428             hasGone: boolean;
   459             hasGone: boolean;
   429             skippedTurns: Longword;
   460             skippedTurns: Longword;
   430             isGoneFlagPendingToBeSet, isGoneFlagPendingToBeUnset: boolean;
   461             isGoneFlagPendingToBeSet, isGoneFlagPendingToBeUnset: boolean;
   431             luaTeamValue: ansistring;
   462             luaTeamValue: ansistring;
   432             hasLuaTeamValue: boolean;
   463             hasLuaTeamValue: boolean;
   440             TagTeamIndex: Longword;
   471             TagTeamIndex: Longword;
   441             CurrTeam: LongWord;
   472             CurrTeam: LongWord;
   442             ClanHealth: LongInt;
   473             ClanHealth: LongInt;
   443             ClanIndex: LongInt;
   474             ClanIndex: LongInt;
   444             TurnNumber: LongWord;
   475             TurnNumber: LongWord;
       
   476             DeathLogged: boolean; // true if clan is dead and its latest death has been logged in the clan death log
       
   477             StatsHandled : boolean; // true if clan's rank has been handled for stats screen
   445             Flawless: boolean;
   478             Flawless: boolean;
       
   479             Passive: boolean; // informational. Must be set to true if all of the teams are passive
       
   480             LocalOrAlly: boolean; // true if at least 1 team in the clan is a local team. A local team is a non-extdriven team controlled by a human
   446             end;
   481             end;
   447 
   482 
   448      cdeclPtr = procedure; cdecl;
   483      cdeclPtr = procedure; cdecl;
   449      cdeclIntPtr = procedure(num: LongInt); cdecl;
   484      cdeclIntPtr = procedure(num: LongInt); cdecl;
   450      funcDoublePtr = function: Double;
   485      funcDoublePtr = function: Double;
   466             sidLowGravity, sidExtraDamage, sidInvulnerable, sidExtraTime,
   501             sidLowGravity, sidExtraDamage, sidInvulnerable, sidExtraTime,
   467             sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack,
   502             sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack,
   468             sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb,
   503             sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb,
   469             sidSineGun, sidFlamethrower,sidSMine, sidHammer, sidResurrector,
   504             sidSineGun, sidFlamethrower,sidSMine, sidHammer, sidResurrector,
   470             sidDrillStrike, sidSnowball, sidNothing, sidTardis,
   505             sidDrillStrike, sidSnowball, sidNothing, sidTardis,
   471             {sidStructure,} sidLandGun, sidIceGun, sidKnife, sidRubber, sidAirMine,
   506             sidLandGun, sidIceGun, sidKnife, sidRubber, sidAirMine,
   472             sidDuck, sidMinigun);
   507             sidCreeper, sidMinigun);
   473 
   508 
   474     TMsgStrId = (sidLoading, sidDraw, sidWinner, sidVolume, sidPaused,
   509     TMsgStrId = (sidLoading, sidDraw, sidWinner, sidVolume, sidPaused,
   475             sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
   510             sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
   476             sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD, sidReady,
   511             sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD, sidReady,
   477             sidBounce1, sidBounce2, sidBounce3, sidBounce4, sidBounce5, sidBounce,
   512             sidBounce1, sidBounce2, sidBounce3, sidBounce4, sidBounce5, sidBounce,
   478             sidMute, sidAFK, sidAutoCameraOff, sidAutoCameraOn, sidPressTarget,
   513             sidMute, sidAFK, sidAutoCameraOff, sidAutoCameraOn, sidPressTarget,
   479             sidNotAvailableInSD, sidHealthGain, sidEmptyCrate, sidUnknownKey,
   514             sidNotAvailableInSD, sidHealthGain, sidEmptyCrate, sidUnknownKey,
   480             sidWinner2, sidWinner3, sidWinner4, sidWinner5, sidWinner6,
   515             sidWinner2, sidWinner3, sidWinner4, sidWinner5, sidWinner6,
   481             sidWinner7, sidWinnerAll, sidTeamGone, sidTeamBack, sidAutoSkip,
   516             sidWinner7, sidWinnerAll, sidTeamGone, sidTeamBack, sidAutoSkip,
   482             sidFPS);
   517             sidFPS, sidLuaParsingOff, sidLuaParsingOn, sidLuaParsingDenied,
       
   518             sidAmmoCount, sidChat, sidChatTeam, sidChatHog, sidUnknownGearValue);
       
   519 
       
   520     TCmdHelpStrId = (
       
   521             sidCmdHeaderBasic, sidCmdTogglechat, sidCmdTeam, sidCmdMe,
       
   522             sidCmdPause, sidCmdPauseNet, sidCmdFullscreen, sidCmdQuit,
       
   523             sidCmdHelp, sidCmdHelpTaunts, sidCmdHistory, sidLua,
       
   524 
       
   525             sidCmdHeaderTaunts, sidCmdSpeech, sidCmdThink, sidCmdYell,
       
   526             sidCmdSpeechNumberHint, sidCmdHsa, sidCmdHta, sidCmdHya,
       
   527             sidCmdHurrah, sidCmdIlovelotsoflemonade, sidCmdJuggle,
       
   528             sidCmdRollup, sidCmdShrug, sidCmdWave, sidCmdUnknown,
       
   529             sidCmdHelpRoom, sidCmdHelpRoomFail);
   483 
   530 
   484     // Events that are important for the course of the game or at least interesting for other reasons
   531     // Events that are important for the course of the game or at least interesting for other reasons
   485     TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw,
   532     TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw,
   486             eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped,
   533             eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped,
   487             eidHurtSelf, eidHomerun, eidGone, eidPoisoned, eidResurrected,
   534             eidHurtSelf, eidHomerun, eidGone, eidPoisoned, eidResurrected,