|
1 {$INCLUDE "options.inc"} |
|
2 |
|
3 unit uTypes; |
|
4 interface |
|
5 |
|
6 uses SDLh, uFloat, GLunit; |
|
7 |
|
8 type |
|
9 HwColor4f = record |
|
10 r, g, b, a: byte |
|
11 end; |
|
12 |
|
13 TGameState = (gsLandGen, gsStart, gsGame, gsChat, gsConfirm, gsExit); |
|
14 |
|
15 TGameType = (gmtLocal, gmtDemo, gmtNet, gmtSave, gmtLandPreview, gmtSyntax); |
|
16 |
|
17 TPathType = (ptNone, ptData, ptGraphics, ptThemes, ptCurrTheme, ptTeams, ptMaps, |
|
18 ptMapCurrent, ptDemos, ptSounds, ptGraves, ptFonts, ptForts, |
|
19 ptLocale, ptAmmoMenu, ptHedgehog, ptVoices, ptHats, ptFlags, ptMissionMaps); |
|
20 |
|
21 TSprite = (sprWater, sprCloud, sprBomb, sprBigDigit, sprFrame, |
|
22 sprLag, sprArrow, sprBazookaShell, sprTargetP, sprBee, |
|
23 sprSmokeTrace, sprRopeHook, sprExplosion50, sprMineOff, |
|
24 sprMineOn, sprMineDead, sprCase, sprFAid, sprDynamite, sprPower, |
|
25 sprClusterBomb, sprClusterParticle, sprFlame, sprHorizont, |
|
26 sprHorizontL, sprHorizontR, sprSky, sprSkyL, |
|
27 sprSkyR, sprAMBorderHorizontal, sprAMBorderVertical, sprAMSlot, sprAMAmmos, |
|
28 sprAMSlotKeys, sprAMCorners, sprFinger, sprAirBomb, |
|
29 sprAirplane, sprAmAirplane, sprAmGirder, sprHHTelepMask, |
|
30 sprSwitch, sprParachute, sprTarget, sprRopeNode, |
|
31 sprQuestion, sprPowerBar, sprWindBar, sprWindL, sprWindR, |
|
32 sprFlake, sprHandRope, sprHandBazooka, sprHandShotgun, |
|
33 sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer, |
|
34 sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath, |
|
35 sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft, |
|
36 sprKamikaze, sprWhip, sprKowtow, sprSad, sprWave, |
|
37 sprHurrah, sprLemonade, sprShrug, sprJuggle, sprExplPart, sprExplPart2, |
|
38 sprCakeWalk, sprCakeDown, sprAMAmmosBW, sprWatermelon, |
|
39 sprEvilTrace, sprHellishBomb, sprSeduction, sprDress, |
|
40 sprCensored, sprDrill, sprHandDrill, sprHandBallgun, sprBalls, |
|
41 sprPlane, sprHandPlane, sprUtility, sprInvulnerable, sprVampiric, sprGirder, |
|
42 sprSpeechCorner, sprSpeechEdge, sprSpeechTail, |
|
43 sprThoughtCorner, sprThoughtEdge, sprThoughtTail, |
|
44 sprShoutCorner, sprShoutEdge, sprShoutTail, |
|
45 sprSniperRifle, sprBubbles, sprJetpack, sprHealth, sprHandMolotov, sprMolotov, |
|
46 sprSmoke, sprSmokeWhite, sprShell, sprDust, sprExplosives, sprExplosivesRoll, |
|
47 sprAmTeleport, sprSplash, sprDroplet, sprBirdy, sprHandCake, sprHandConstruction, |
|
48 sprHandGrenade, sprHandMelon, sprHandMortar, sprHandSkip, sprHandCluster, |
|
49 sprHandDynamite, sprHandHellish, sprHandMine, sprHandSeduction, sprHandVamp, |
|
50 sprBigExplosion, sprSmokeRing, sprBeeTrace, sprEgg, sprTargetBee, sprHandBee, |
|
51 sprFeather, sprPiano, sprHandSineGun, sprPortalGun, sprPortal, |
|
52 sprCheese, sprHandCheese, sprHandFlamethrower, sprChunk, sprNote, |
|
53 sprSMineOff, sprSMineOn, sprHandSMine, sprHammer, |
|
54 sprHandResurrector, sprCross, sprAirDrill, sprNapalmBomb, |
|
55 sprBulletHit |
|
56 ); |
|
57 |
|
58 // Gears that interact with other Gears and/or Land |
|
59 TGearType = (gtBomb, gtHedgehog, gtShell, gtGrave, gtBee, // 4 |
|
60 gtShotgunShot, gtPickHammer, gtRope, gtMine, gtCase, // 9 |
|
61 gtDEagleShot, gtDynamite, gtClusterBomb, gtCluster, gtShover, // 14 |
|
62 gtFlame, gtFirePunch, gtATStartGame, gtATSmoothWindCh, // 18 |
|
63 gtATFinishGame, gtParachute, gtAirAttack, gtAirBomb, gtBlowTorch, // 23 |
|
64 gtGirder, gtTeleport, gtSwitcher, gtTarget, gtMortar, // 28 |
|
65 gtWhip, gtKamikaze, gtCake, gtSeduction, gtWatermelon, gtMelonPiece, // 34 |
|
66 gtHellishBomb, gtWaterUp, gtDrill, gtBallGun, gtBall, gtRCPlane, // 40 |
|
67 gtSniperRifleShot, gtJetpack, gtMolotov, gtExplosives, gtBirdy, // 45 |
|
68 gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 51 |
|
69 gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector, // 56 |
|
70 gtNapalmBomb); // 57 |
|
71 |
|
72 // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.) |
|
73 TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire, |
|
74 vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble, |
|
75 vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtHealth, vgtShell, |
|
76 vgtDust, vgtSplash, vgtDroplet, vgtSmokeRing, vgtBeeTrace, vgtEgg, |
|
77 vgtFeather, vgtHealthTag, vgtSmokeTrace, vgtEvilTrace, vgtExplosion, |
|
78 vgtBigExplosion, vgtChunk, vgtNote, vgtLineTrail, |
|
79 vgtBulletHit); |
|
80 |
|
81 TGearsType = set of TGearType; |
|
82 |
|
83 TDamageSource = (dsUnknown, dsFall, dsBullet, dsExplosion, dsShove, dsPoison); |
|
84 |
|
85 TSound = (sndNone, |
|
86 sndGrenadeImpact, sndExplosion, sndThrowPowerUp, sndThrowRelease, |
|
87 sndSplash, sndShotgunReload, sndShotgunFire, sndGraveImpact, |
|
88 sndMineTick, sndPickhammer, sndGun, sndBee, sndJump1, sndJump2, |
|
89 sndJump3, sndYesSir, sndLaugh, sndIllGetYou, sndIncoming, |
|
90 sndMissed, sndStupid, sndFirstBlood, sndBoring, sndByeBye, |
|
91 sndSameTeam, sndNutter, sndReinforce, sndTraitor, sndRegret, |
|
92 sndEnemyDown, sndCoward, sndHurry, sndWatchIt, sndKamikaze, |
|
93 sndCake, sndOw1, sndOw2, sndOw3, sndOw4, sndFirePunch1, sndFirePunch2, |
|
94 sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6, |
|
95 sndMelon, sndHellish, sndYoohoo, sndRCPlane, sndWhipCrack, |
|
96 sndRideOfTheValkyries, sndDenied, sndPlaced, sndBaseballBat, |
|
97 sndVaporize, sndWarp, sndSuddenDeath, sndMortar, sndShutter, |
|
98 sndHomerun, sndMolotov, sndCover, sndUhOh, sndOops, |
|
99 sndNooo, sndHello, sndRopeShot, sndRopeAttach, sndRopeRelease, |
|
100 sndSwitchHog, sndVictory, sndSniperReload, sndSteps, sndLowGravity, |
|
101 sndHellishImpact1, sndHellishImpact2, sndHellishImpact3, sndHellishImpact4, |
|
102 sndMelonImpact, sndDroplet1, sndDroplet2, sndDroplet3, sndEggBreak, sndDrillRocket, |
|
103 sndPoisonCough, sndPoisonMoan, sndBirdyLay, sndWhistle, sndBeeWater, |
|
104 sndPiano0, sndPiano1, sndPiano2, sndPiano3, sndPiano4, sndPiano5, sndPiano6, sndPiano7, sndPiano8, |
|
105 sndSkip, sndSineGun, sndOoff1, sndOoff2, sndOoff3, sndWhack, |
|
106 sndComeonthen, sndParachute, sndBump, sndResurrector); |
|
107 |
|
108 TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6 |
|
109 amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, // 13 |
|
110 amBaseballBat, amParachute, amAirAttack, amMineStrike, amBlowTorch, // 18 |
|
111 amGirder, amTeleport, amSwitch, amMortar, amKamikaze, amCake, // 24 |
|
112 amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun, // 30 |
|
113 amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35 |
|
114 amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42 |
|
115 amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48 |
|
116 amResurrector, amDrillStrike); |
|
117 |
|
118 TCrateType = (HealthCrate, AmmoCrate, UtilityCrate); |
|
119 |
|
120 THWFont = (fnt16, fntBig, fntSmall {$IFNDEF IPHONEOS}, CJKfnt16, CJKfntBig, CJKfntSmall{$ENDIF}); |
|
121 |
|
122 TCapGroup = (capgrpGameState, capgrpAmmoinfo, capgrpVolume, |
|
123 capgrpMessage, capgrpAmmostate); |
|
124 |
|
125 TStatInfoType = (siGameResult, siMaxStepDamage, siMaxStepKills, siKilledHHs, |
|
126 siClanHealth, siTeamStats, siPlayerKills, siMaxTeamDamage, |
|
127 siMaxTeamKills, siMaxTurnSkips ); |
|
128 |
|
129 TWave = (waveRollup, waveSad, waveWave, waveHurrah, waveLemonade, waveShrug, waveJuggle); |
|
130 |
|
131 THHFont = record |
|
132 Handle: PTTF_Font; |
|
133 Height: LongInt; |
|
134 style: LongInt; |
|
135 Name: string[21]; |
|
136 end; |
|
137 |
|
138 PAmmo = ^TAmmo; |
|
139 TAmmo = record |
|
140 Propz: LongWord; |
|
141 Count: LongWord; |
|
142 (* Using for place hedgehogs mode, but for any other situation where the initial count would be needed I guess. |
|
143 For example, say, a mode where the weaponset is reset each turn, or on sudden death *) |
|
144 NumPerTurn: LongWord; |
|
145 Timer: LongWord; |
|
146 Pos: LongWord; |
|
147 AmmoType: TAmmoType; |
|
148 AttackVoice: TSound; |
|
149 end; |
|
150 |
|
151 TVertex2f = record |
|
152 X, Y: GLfloat; |
|
153 end; |
|
154 |
|
155 TVertex2i = record |
|
156 X, Y: GLint; |
|
157 end; |
|
158 |
|
159 PTexture = ^TTexture; |
|
160 TTexture = record |
|
161 id: GLuint; |
|
162 w, h, scale: LongInt; |
|
163 rx, ry: GLfloat; |
|
164 priority: GLfloat; |
|
165 vb, tb: array [0..3] of TVertex2f; |
|
166 PrevTexture, NextTexture: PTexture; |
|
167 end; |
|
168 |
|
169 THogEffect = (heInvulnerable, heResurrectable, hePoisoned, heResurrected); |
|
170 |
|
171 TScreenFade = (sfNone, sfInit, sfToBlack, sfFromBlack, sfToWhite, sfFromWhite); |
|
172 |
|
173 PGear = ^TGear; |
|
174 TGearStepProcedure = procedure (Gear: PGear); |
|
175 TGear = record |
|
176 NextGear, PrevGear: PGear; |
|
177 Active: Boolean; |
|
178 AdvBounce: Longword; |
|
179 Invulnerable: Boolean; |
|
180 RenderTimer: Boolean; |
|
181 AmmoType : TAmmoType; |
|
182 State : Longword; |
|
183 X : hwFloat; |
|
184 Y : hwFloat; |
|
185 dX: hwFloat; |
|
186 dY: hwFloat; |
|
187 Kind: TGearType; |
|
188 Pos: Longword; |
|
189 doStep: TGearStepProcedure; |
|
190 Radius: LongInt; |
|
191 Angle, Power : Longword; |
|
192 DirAngle: real; |
|
193 Timer : LongWord; |
|
194 Elasticity: hwFloat; |
|
195 Friction : hwFloat; |
|
196 Message, MsgParam : Longword; |
|
197 Hedgehog: pointer; |
|
198 Health, Damage, Karma: LongInt; |
|
199 CollisionIndex: LongInt; |
|
200 Tag: LongInt; |
|
201 Tex: PTexture; |
|
202 Z: Longword; |
|
203 IntersectGear: PGear; |
|
204 FlightTime: Longword; |
|
205 uid: Longword; |
|
206 ImpactSound: TSound; // first sound, others have to be after it in the sounds def. |
|
207 nImpactSounds: Word; // count of ImpactSounds |
|
208 SoundChannel: LongInt; |
|
209 PortalCounter: LongWord // Hopefully temporary, but avoids infinite portal loops in a guaranteed fashion. |
|
210 end; |
|
211 TPGearArray = Array of PGear; |
|
212 |
|
213 implementation |
|
214 |
|
215 end. |