# HG changeset patch # User sheepluva # Date 1302262945 -7200 # Node ID 715cf3f2b34296264e361c0cc2a7293970fa3d63 # Parent 84267f79879b7ea10e4ada4cd7ac4df0ac5dde05 // diff -r 84267f79879b -r 715cf3f2b342 hedgewars/PascalExports.pas --- a/hedgewars/PascalExports.pas Fri Apr 08 11:40:18 2011 +0200 +++ b/hedgewars/PascalExports.pas Fri Apr 08 13:42:25 2011 +0200 @@ -19,7 +19,14 @@ {$INCLUDE "options.inc"} unit PascalExports; - +(* + * If the engine is compiled as library this unit will export functions + * as C declarations for convenient library usage in your application and + * language of choice. + * + * See also: C declarations on wikipedia + * http://en.wikipedia.org/wiki/X86_calling_conventions#cdecl + *) interface uses uTypes, uConsts, uVariables, GLunit, uKeys, uChat, uSound, uAmmos, uUtils, uCommands, uMobile; diff -r 84267f79879b -r 715cf3f2b342 hedgewars/config.inc.in --- a/hedgewars/config.inc.in Fri Apr 08 11:40:18 2011 +0200 +++ b/hedgewars/config.inc.in Fri Apr 08 13:42:25 2011 +0200 @@ -16,6 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA *) +(* + * config.inc contains constants that are determined and set + * by the build system at compile time, + * based on the contents of config.inc.in + *) const cNetProtoVersion = ${HEDGEWARS_PROTO_VER}; cVersionString = '${HEDGEWARS_VERSION}'; cLuaLibrary = '${LUA_LIBRARY}'; diff -r 84267f79879b -r 715cf3f2b342 hedgewars/uTypes.pas --- a/hedgewars/uTypes.pas Fri Apr 08 11:40:18 2011 +0200 +++ b/hedgewars/uTypes.pas Fri Apr 08 13:42:25 2011 +0200 @@ -19,6 +19,10 @@ {$INCLUDE "options.inc"} unit uTypes; +(* + * This unit defines various types and enumerations for usage in different + * places in the engine code. + *) interface uses SDLh, uFloat, GLunit, uConsts, Math; @@ -31,14 +35,18 @@ r, g, b, a: byte end; + // Possible states of the game TGameState = (gsLandGen, gsStart, gsGame, gsChat, gsConfirm, gsExit, gsSuspend); + // Game types that help determining what the engine is actually supposed to do TGameType = (gmtLocal, gmtDemo, gmtNet, gmtSave, gmtLandPreview, gmtSyntax); + // Different files are stored in different folders, this enumeration is used to tell which folder to use TPathType = (ptNone, ptData, ptGraphics, ptThemes, ptCurrTheme, ptTeams, ptMaps, ptMapCurrent, ptDemos, ptSounds, ptGraves, ptFonts, ptForts, ptLocale, ptAmmoMenu, ptHedgehog, ptVoices, ptHats, ptFlags, ptMissionMaps, ptSuddenDeath); + // Available sprites for displaying stuff TSprite = (sprWater, sprCloud, sprBomb, sprBigDigit, sprFrame, sprLag, sprArrow, sprBazookaShell, sprTargetP, sprBee, sprSmokeTrace, sprRopeHook, sprExplosion50, sprMineOff, @@ -101,8 +109,10 @@ TGearsType = set of TGearType; + // Damage can be caused by different sources TDamageSource = (dsUnknown, dsFall, dsBullet, dsExplosion, dsShove, dsPoison); + // Available sounds TSound = (sndNone, sndGrenadeImpact, sndExplosion, sndThrowPowerUp, sndThrowRelease, sndSplash, sndShotgunReload, sndShotgunFire, sndGraveImpact, @@ -126,6 +136,7 @@ sndSkip, sndSineGun, sndOoff1, sndOoff2, sndOoff3, sndWhack, sndComeonthen, sndParachute, sndBump, sndResurrector, sndPlane); + // Available ammo types to be used by hedgehogs TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6 amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, // 13 amBaseballBat, amParachute, amAirAttack, amMineStrike, amBlowTorch, // 18 @@ -136,6 +147,7 @@ amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48 amResurrector, amDrillStrike, amSnowball, amTardis, amStructure, amLandGun); // 54 + // Different kind of crates that e.g. hedgehogs can pick up TCrateType = (HealthCrate, AmmoCrate, UtilityCrate); THWFont = (fnt16, fntBig, fntSmall {$IFNDEF IPHONEOS}, CJKfnt16, CJKfntBig, CJKfntSmall{$ENDIF}); @@ -147,6 +159,7 @@ siClanHealth, siTeamStats, siPlayerKills, siMaxTeamDamage, siMaxTeamKills, siMaxTurnSkips ); + // Various "emote" animations a hedgehog can do TWave = (waveRollup, waveSad, waveWave, waveHurrah, waveLemonade, waveShrug, waveJuggle); TRenderMode = (rmDefault, rmLeftEye, rmRightEye); @@ -378,6 +391,7 @@ sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync, sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD, sidReady); + // Events that are important for the course of the game or at least interesting for other reasons TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw, eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped, eidHurtSelf, eidHomerun, eidGone);