hedgewars/uTypes.pas
branchios-develop
changeset 13413 ba39a1d396c0
parent 13404 8ce83caec236
child 13463 b587cdb03bac
equal deleted inserted replaced
13411:6e8b807bda4b 13413:ba39a1d396c0
    34     HwColor4f = record
    34     HwColor4f = record
    35         r, g, b, a: byte;
    35         r, g, b, a: byte;
    36         end;
    36         end;
    37 
    37 
    38     // Possible states of the game
    38     // Possible states of the game
    39     TGameState = (gsLandGen, gsStart, gsGame, gsChat, 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, gmtSyntax, gmtRecord);
    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
    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
    94             sprFlakeL, sprSDFlakeL, sprCloudL, sprSDCloudL, sprDuck, sprHandDuck, sprMinigun
    95             );
    95             );
    96 
    96 
    97     // Gears that interact with other Gears and/or Land
    97     // Gears that interact with other Gears and/or Land
    98     // first row of gears (<gtExplosives) should be avoided when searching a spawn place
    98     // first row of gears (<gtExplosives) should be avoided when searching a spawn place
    99     TGearType = (gtFlame, gtHedgehog, gtMine, gtCase, gtAirMine, gtExplosives, 
    99     TGearType = (gtFlame, gtHedgehog, gtMine, gtCase, gtAirMine, gtExplosives, 
   107             gtHellishBomb, gtWaterUp, gtDrill, gtBallGun, gtBall, gtRCPlane, // 41
   107             gtHellishBomb, gtWaterUp, gtDrill, gtBallGun, gtBall, gtRCPlane, // 41
   108             gtSniperRifleShot, gtJetpack, gtMolotov, gtBirdy, // 45
   108             gtSniperRifleShot, gtJetpack, gtMolotov, gtBirdy, // 45
   109             gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 51
   109             gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 51
   110             gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 56
   110             gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 56
   111             gtNapalmBomb, gtSnowball, gtFlake, {gtStructure,} gtLandGun, gtTardis, // 61
   111             gtNapalmBomb, gtSnowball, gtFlake, {gtStructure,} gtLandGun, gtTardis, // 61
   112             gtIceGun, gtAddAmmo, gtGenericFaller, gtKnife, gtDuck); // 66
   112             gtIceGun, gtAddAmmo, gtGenericFaller, gtKnife, gtDuck, gtMinigun, gtMinigunBullet); // 68
   113 
   113 
   114     // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.)
   114     // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.)
   115     TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
   115     TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
   116             vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble,
   116             vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble,
   117             vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtShell,
   117             vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtShell,
   149             sndComeonthen, sndParachute, sndBump, sndResurrector, sndPlane, sndTardis, sndFrozenHogImpact,
   149             sndComeonthen, sndParachute, sndBump, sndResurrector, sndPlane, sndTardis, sndFrozenHogImpact,
   150             sndIceBeam, sndHogFreeze, sndAirMineImpact, sndKnifeImpact, sndExtraTime, sndLaserSight,
   150             sndIceBeam, sndHogFreeze, sndAirMineImpact, sndKnifeImpact, sndExtraTime, sndLaserSight,
   151             sndInvulnerable, sndJetpackLaunch, sndJetpackBoost, sndPortalShot, sndPortalSwitch,
   151             sndInvulnerable, sndJetpackLaunch, sndJetpackBoost, sndPortalShot, sndPortalSwitch,
   152             sndPortalOpen, sndBlowTorch, sndCountdown1, sndCountdown2, sndCountdown3, sndCountdown4,
   152             sndPortalOpen, sndBlowTorch, sndCountdown1, sndCountdown2, sndCountdown3, sndCountdown4,
   153             sndDuckDrop, sndDuckWater, sndDuckDie, sndCustom1, sndCustom2, sndCustom3, sndCustom4,
   153             sndDuckDrop, sndDuckWater, sndDuckDie, sndCustom1, sndCustom2, sndCustom3, sndCustom4,
   154             sndCustom5, sndCustom6, sndCustom7, sndCustom8);
   154             sndCustom5, sndCustom6, sndCustom7, sndCustom8, sndMinigun);
   155 
   155 
   156     // Available ammo types to be used by hedgehogs
   156     // Available ammo types to be used by hedgehogs
   157     TAmmoType  = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6
   157     TAmmoType  = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6
   158             amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, // 13
   158             amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, // 13
   159             amBaseballBat, amParachute, amAirAttack, amMineStrike, amBlowTorch, // 18
   159             amBaseballBat, amParachute, amAirAttack, amMineStrike, amBlowTorch, // 18
   161             amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun, // 30
   161             amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun, // 30
   162             amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35
   162             amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35
   163             amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42
   163             amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42
   164             amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48
   164             amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48
   165             amResurrector, amDrillStrike, amSnowball, amTardis, {amStructure,} amLandGun, // 53
   165             amResurrector, amDrillStrike, amSnowball, amTardis, {amStructure,} amLandGun, // 53
   166             amIceGun, amKnife, amRubber, amAirMine, amDuck); // 58
   166             amIceGun, amKnife, amRubber, amAirMine, amDuck, amMinigun); // 59
   167 
   167 
   168     // Different kind of crates that e.g. hedgehogs can pick up
   168     // Different kind of crates that e.g. hedgehogs can pick up
   169     TCrateType = (HealthCrate, AmmoCrate, UtilityCrate);
   169     TCrateType = (HealthCrate, AmmoCrate, UtilityCrate);
   170 
   170 
   171     THWFont = (fnt16, fntBig, fntSmall {$IFNDEF MOBILE}, CJKfnt16, CJKfntBig, CJKfntSmall{$ENDIF});
   171     THWFont = (fnt16, fntBig, fntSmall {$IFNDEF MOBILE}, CJKfnt16, CJKfntBig, CJKfntSmall{$ENDIF});
   227             priority: GLfloat;
   227             priority: GLfloat;
   228             vb, tb: array [0..3] of TVertex2f;
   228             vb, tb: array [0..3] of TVertex2f;
   229             PrevTexture, NextTexture: PTexture;
   229             PrevTexture, NextTexture: PTexture;
   230             end;
   230             end;
   231 
   231 
   232     THogEffect = (heInvulnerable, heResurrectable, hePoisoned, heResurrected, heFrozen);
   232     THogEffect = (heInvulnerable, heResurrectable, hePoisoned, heResurrected, heFrozen, heArtillery);
   233 
   233 
   234     TScreenFade = (sfNone, sfInit, sfToBlack, sfFromBlack, sfToWhite, sfFromWhite);
   234     TScreenFade = (sfNone, sfInit, sfToBlack, sfFromBlack, sfToWhite, sfFromWhite);
   235 
   235 
   236     PGear = ^TGear;
   236     PGear = ^TGear;
   237     PHedgehog = ^THedgehog;
   237     PHedgehog = ^THedgehog;
   347         TeamKills : Longword;
   347         TeamKills : Longword;
   348         TurnSkips : Longword;
   348         TurnSkips : Longword;
   349         TeamDamage : Longword;
   349         TeamDamage : Longword;
   350         end;
   350         end;
   351 
   351 
   352     TBinds = array[0..cKbdMaxIndex] of shortstring;
   352     TBinds = record
       
   353                  indices: array[0..cKbdMaxIndex] of byte;
       
   354                  // zeroth element is reserved, indices[i] == 0 means no binding
       
   355                  binds: array[0..255] of shortstring;
       
   356                  lastIndex: byte;
       
   357              end;
       
   358 
   353     TKeyboardState = array[0..cKeyMaxIndex] of Byte;
   359     TKeyboardState = array[0..cKeyMaxIndex] of Byte;
   354 
   360 
   355     PVoicepack = ^TVoicepack;
   361     PVoicepack = ^TVoicepack;
   356     TVoicepack = record
   362     TVoicepack = record
   357         name: shortstring;
   363         name: shortstring;
   403             CurrHedgehog: LongWord;
   409             CurrHedgehog: LongWord;
   404             NameTagTex,
   410             NameTagTex,
   405             OwnerTex,
   411             OwnerTex,
   406             GraveTex,
   412             GraveTex,
   407             AIKillsTex,
   413             AIKillsTex,
       
   414             LuaTeamValueTex,
   408             FlagTex: PTexture;
   415             FlagTex: PTexture;
   409             Flag: shortstring;
   416             Flag: shortstring;
   410             GraveName: shortstring;
   417             GraveName: shortstring;
   411             FortName: shortstring;
   418             FortName: shortstring;
   412             Owner: shortstring;
   419             Owner: shortstring;
   419             PlayerHash: shortstring;   // md5 hash of player name. For temporary enabling of hats as thank you. Hashed for privacy of players
   426             PlayerHash: shortstring;   // md5 hash of player name. For temporary enabling of hats as thank you. Hashed for privacy of players
   420             stats: TTeamStats;
   427             stats: TTeamStats;
   421             hasGone: boolean;
   428             hasGone: boolean;
   422             skippedTurns: Longword;
   429             skippedTurns: Longword;
   423             isGoneFlagPendingToBeSet, isGoneFlagPendingToBeUnset: boolean;
   430             isGoneFlagPendingToBeSet, isGoneFlagPendingToBeUnset: boolean;
       
   431             luaTeamValue: ansistring;
       
   432             hasLuaTeamValue: boolean;
   424             end;
   433             end;
   425 
   434 
   426     TClan = record
   435     TClan = record
   427             Color: Longword;
   436             Color: Longword;
   428             Teams: array[0..Pred(cMaxTeams)] of PTeam;
   437             Teams: array[0..Pred(cMaxTeams)] of PTeam;
   458             sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack,
   467             sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack,
   459             sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb,
   468             sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb,
   460             sidSineGun, sidFlamethrower,sidSMine, sidHammer, sidResurrector,
   469             sidSineGun, sidFlamethrower,sidSMine, sidHammer, sidResurrector,
   461             sidDrillStrike, sidSnowball, sidNothing, sidTardis,
   470             sidDrillStrike, sidSnowball, sidNothing, sidTardis,
   462             {sidStructure,} sidLandGun, sidIceGun, sidKnife, sidRubber, sidAirMine,
   471             {sidStructure,} sidLandGun, sidIceGun, sidKnife, sidRubber, sidAirMine,
   463             sidDuck);
   472             sidDuck, sidMinigun);
   464 
   473 
   465     TMsgStrId = (sidLoading, sidDraw, sidWinner, sidVolume, sidPaused,
   474     TMsgStrId = (sidLoading, sidDraw, sidWinner, sidVolume, sidPaused,
   466             sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
   475             sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
   467             sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD, sidReady,
   476             sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD, sidReady,
   468             sidBounce1, sidBounce2, sidBounce3, sidBounce4, sidBounce5, sidBounce,
   477             sidBounce1, sidBounce2, sidBounce3, sidBounce4, sidBounce5, sidBounce,
   469             sidMute, sidAFK, sidAutoCameraOff, sidAutoCameraOn, sidPressTarget,
   478             sidMute, sidAFK, sidAutoCameraOff, sidAutoCameraOn, sidPressTarget,
   470             sidNotAvailableInSD, sidHealthGain, sidEmptyCrate);
   479             sidNotAvailableInSD, sidHealthGain, sidEmptyCrate, sidUnknownKey,
       
   480             sidWinner2, sidWinner3, sidWinner4, sidWinner5, sidWinner6,
       
   481             sidWinner7, sidWinnerAll, sidTeamGone, sidTeamBack, sidAutoSkip,
       
   482             sidFPS);
   471 
   483 
   472     // Events that are important for the course of the game or at least interesting for other reasons
   484     // Events that are important for the course of the game or at least interesting for other reasons
   473     TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw,
   485     TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw,
   474             eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped,
   486             eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped,
   475             eidHurtSelf, eidHomerun, eidGone, eidPoisoned, eidResurrected,
   487             eidHurtSelf, eidHomerun, eidGone, eidPoisoned, eidResurrected,