--- a/hedgewars/uConsts.pas Wed Nov 17 16:31:30 2010 +0300
+++ b/hedgewars/uConsts.pas Wed Nov 17 17:22:36 2010 +0300
@@ -21,7 +21,7 @@
unit uConsts;
interface
-uses SDLh, uFloat, uLocale, GLunit;
+uses SDLh, uFloat, uLocale, GLunit, uTypes;
{$INCLUDE "config.inc"}
@@ -29,170 +29,6 @@
// typed const is a variable despite const qualifier
// in freepascal you may actually use var for the same purpose
-type
- HwColor4f = record
- r, g, b, a: byte
- end;
-
- TGameState = (gsLandGen, gsStart, gsGame, gsChat, gsConfirm, gsExit);
-
- TGameType = (gmtLocal, gmtDemo, gmtNet, gmtSave, gmtLandPreview, gmtSyntax);
-
- TPathType = (ptNone, ptData, ptGraphics, ptThemes, ptCurrTheme, ptTeams, ptMaps,
- ptMapCurrent, ptDemos, ptSounds, ptGraves, ptFonts, ptForts,
- ptLocale, ptAmmoMenu, ptHedgehog, ptVoices, ptHats, ptFlags, ptMissionMaps);
-
- TSprite = (sprWater, sprCloud, sprBomb, sprBigDigit, sprFrame,
- sprLag, sprArrow, sprBazookaShell, sprTargetP, sprBee,
- sprSmokeTrace, sprRopeHook, sprExplosion50, sprMineOff,
- sprMineOn, sprMineDead, sprCase, sprFAid, sprDynamite, sprPower,
- sprClusterBomb, sprClusterParticle, sprFlame, sprHorizont,
- sprHorizontL, sprHorizontR, sprSky, sprSkyL,
- sprSkyR, sprAMBorderHorizontal, sprAMBorderVertical, sprAMSlot, sprAMAmmos,
- sprAMSlotKeys, sprAMCorners, sprFinger, sprAirBomb,
- sprAirplane, sprAmAirplane, sprAmGirder, sprHHTelepMask,
- sprSwitch, sprParachute, sprTarget, sprRopeNode,
- sprQuestion, sprPowerBar, sprWindBar, sprWindL, sprWindR,
- sprFlake, sprHandRope, sprHandBazooka, sprHandShotgun,
- sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer,
- sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath,
- sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft,
- sprKamikaze, sprWhip, sprKowtow, sprSad, sprWave,
- sprHurrah, sprLemonade, sprShrug, sprJuggle, sprExplPart, sprExplPart2,
- sprCakeWalk, sprCakeDown, sprAMAmmosBW, sprWatermelon,
- sprEvilTrace, sprHellishBomb, sprSeduction, sprDress,
- sprCensored, sprDrill, sprHandDrill, sprHandBallgun, sprBalls,
- sprPlane, sprHandPlane, sprUtility, sprInvulnerable, sprVampiric, sprGirder,
- sprSpeechCorner, sprSpeechEdge, sprSpeechTail,
- sprThoughtCorner, sprThoughtEdge, sprThoughtTail,
- sprShoutCorner, sprShoutEdge, sprShoutTail,
- sprSniperRifle, sprBubbles, sprJetpack, sprHealth, sprHandMolotov, sprMolotov,
- sprSmoke, sprSmokeWhite, sprShell, sprDust, sprExplosives, sprExplosivesRoll,
- sprAmTeleport, sprSplash, sprDroplet, sprBirdy, sprHandCake, sprHandConstruction,
- sprHandGrenade, sprHandMelon, sprHandMortar, sprHandSkip, sprHandCluster,
- sprHandDynamite, sprHandHellish, sprHandMine, sprHandSeduction, sprHandVamp,
- sprBigExplosion, sprSmokeRing, sprBeeTrace, sprEgg, sprTargetBee, sprHandBee,
- sprFeather, sprPiano, sprHandSineGun, sprPortalGun, sprPortal,
- sprCheese, sprHandCheese, sprHandFlamethrower, sprChunk, sprNote,
- sprSMineOff, sprSMineOn, sprHandSMine, sprHammer,
- sprHandResurrector, sprCross, sprAirDrill, sprNapalmBomb,
- sprBulletHit
- );
-
- // Gears that interact with other Gears and/or Land
- TGearType = (gtBomb, gtHedgehog, gtShell, gtGrave, gtBee, // 4
- gtShotgunShot, gtPickHammer, gtRope, gtMine, gtCase, // 9
- gtDEagleShot, gtDynamite, gtClusterBomb, gtCluster, gtShover, // 14
- gtFlame, gtFirePunch, gtATStartGame, gtATSmoothWindCh, // 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, gtExplosives, gtBirdy, // 45
- gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 51
- gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 56
- gtNapalmBomb); // 57
-
- // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.)
- TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
- vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble,
- vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtHealth, vgtShell,
- vgtDust, vgtSplash, vgtDroplet, vgtSmokeRing, vgtBeeTrace, vgtEgg,
- vgtFeather, vgtHealthTag, vgtSmokeTrace, vgtEvilTrace, vgtExplosion,
- vgtBigExplosion, vgtChunk, vgtNote, vgtLineTrail,
- vgtBulletHit);
-
- TGearsType = set of TGearType;
-
- TDamageSource = (dsUnknown, dsFall, dsBullet, dsExplosion, dsShove, dsPoison);
-
- TSound = (sndNone,
- sndGrenadeImpact, sndExplosion, sndThrowPowerUp, sndThrowRelease,
- sndSplash, sndShotgunReload, sndShotgunFire, sndGraveImpact,
- sndMineTick, sndPickhammer, sndGun, sndBee, sndJump1, sndJump2,
- sndJump3, sndYesSir, sndLaugh, sndIllGetYou, sndIncoming,
- sndMissed, sndStupid, sndFirstBlood, sndBoring, sndByeBye,
- sndSameTeam, sndNutter, sndReinforce, sndTraitor, sndRegret,
- sndEnemyDown, sndCoward, sndHurry, sndWatchIt, sndKamikaze,
- sndCake, sndOw1, sndOw2, sndOw3, sndOw4, sndFirePunch1, sndFirePunch2,
- sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6,
- sndMelon, sndHellish, sndYoohoo, sndRCPlane, sndWhipCrack,
- sndRideOfTheValkyries, sndDenied, sndPlaced, sndBaseballBat,
- sndVaporize, sndWarp, sndSuddenDeath, sndMortar, sndShutter,
- sndHomerun, sndMolotov, sndCover, sndUhOh, sndOops,
- sndNooo, sndHello, sndRopeShot, sndRopeAttach, sndRopeRelease,
- sndSwitchHog, sndVictory, sndSniperReload, sndSteps, sndLowGravity,
- sndHellishImpact1, sndHellishImpact2, sndHellishImpact3, sndHellishImpact4,
- sndMelonImpact, sndDroplet1, sndDroplet2, sndDroplet3, sndEggBreak, sndDrillRocket,
- sndPoisonCough, sndPoisonMoan, sndBirdyLay, sndWhistle, sndBeeWater,
- sndPiano0, sndPiano1, sndPiano2, sndPiano3, sndPiano4, sndPiano5, sndPiano6, sndPiano7, sndPiano8,
- sndSkip, sndSineGun, sndOoff1, sndOoff2, sndOoff3, sndWhack,
- sndComeonthen, sndParachute, sndBump, sndResurrector);
-
- TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6
- amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, // 13
- amBaseballBat, amParachute, amAirAttack, amMineStrike, amBlowTorch, // 18
- amGirder, amTeleport, amSwitch, amMortar, amKamikaze, amCake, // 24
- amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun, // 30
- amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35
- amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42
- amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48
- amResurrector, amDrillStrike);
-
- TCrateType = (HealthCrate, AmmoCrate, UtilityCrate);
-
- THWFont = (fnt16, fntBig, fntSmall {$IFNDEF IPHONEOS}, CJKfnt16, CJKfntBig, CJKfntSmall{$ENDIF});
-
- TCapGroup = (capgrpGameState, capgrpAmmoinfo, capgrpVolume,
- capgrpMessage, capgrpAmmostate);
-
- TStatInfoType = (siGameResult, siMaxStepDamage, siMaxStepKills, siKilledHHs,
- siClanHealth, siTeamStats, siPlayerKills, siMaxTeamDamage,
- siMaxTeamKills, siMaxTurnSkips );
-
- TWave = (waveRollup, waveSad, waveWave, waveHurrah, waveLemonade, waveShrug, waveJuggle);
-
- THHFont = record
- Handle: PTTF_Font;
- Height: LongInt;
- style: LongInt;
- Name: string[21];
- end;
-
- PAmmo = ^TAmmo;
- TAmmo = record
- Propz: LongWord;
- Count: LongWord;
-(* Using for place hedgehogs mode, but for any other situation where the initial count would be needed I guess.
-For example, say, a mode where the weaponset is reset each turn, or on sudden death *)
- NumPerTurn: LongWord;
- Timer: LongWord;
- Pos: LongWord;
- AmmoType: TAmmoType;
- AttackVoice: TSound;
- end;
-
- TVertex2f = record
- X, Y: GLfloat;
- end;
-
- TVertex2i = record
- X, Y: GLint;
- end;
-
- PTexture = ^TTexture;
- TTexture = record
- id: GLuint;
- w, h, scale: LongInt;
- rx, ry: GLfloat;
- priority: GLfloat;
- vb, tb: array [0..3] of TVertex2f;
- PrevTexture, NextTexture: PTexture;
- end;
-
- THogEffect = (heInvulnerable, heResurrectable, hePoisoned, heResurrected);
-
- TScreenFade = (sfNone, sfInit, sfToBlack, sfFromBlack, sfToWhite, sfFromWhite);
const
sfMax = 1000;
cDefaultParamNum = 16;