hedgewars/uConsts.pas
changeset 13618 edffc9b7ad58
parent 13604 73b096e1d895
child 13641 007813b81f1b
equal deleted inserted replaced
13617:a6abc2c1fc1a 13618:edffc9b7ad58
    27 
    27 
    28 const
    28 const
    29     HDPIScaleFactor     =  1;
    29     HDPIScaleFactor     =  1;
    30 
    30 
    31     // application return codes
    31     // application return codes
    32     HaltNoError         =  0;
    32     HaltNoError         =  0; // Hedgewars quits normally
    33 
    33 
    34     // error codes are placed in range 50-99 because that way then don't overlap with run-time errors of pascal
    34     // error codes are placed in range 50-99 because that way then don't overlap with run-time errors of pascal
    35     // see https://www.freepascal.org/docs-html/user/userap4.html
    35     // see https://www.freepascal.org/docs-html/user/userap4.html
    36     HaltUsageError      =  51;
    36     HaltUsageError      =  51; // Hedgewars was invoked incorrectly (e.g. bad command-line parameter)
    37     HaltFatalError      =  52;
    37     HaltFatalError      =  52; // Fatal internal error. See logs for more. Also reports error to frontend
    38     HaltStartupError    =  53;
    38     HaltStartupError    =  53; // Failure loading critical resources
    39     HaltFatalErrorNoIPC =  54;
    39     HaltFatalErrorNoIPC =  54; // Fatal internal error, IPC socket is not available
    40     HaltVideoRec        =  55;
    40     HaltVideoRec        =  55; // Failure while video recording
    41 
    41 
    42     // for automatic tests
    42     // for automatic tests
    43     HaltTestSuccess     =  0;
    43     HaltTestSuccess     =  0;  // Test result: success
    44     HaltTestFailed      =  60;
    44     HaltTestFailed      =  60; // Test result: failed
    45     HaltTestLuaError    =  61;
    45     HaltTestLuaError    =  61; // Lua runtime error
    46     HaltTestUnexpected  =  62;
    46     HaltTestUnexpected  =  62; // Unexpected error
    47 
    47 
    48 
    48 
       
    49     // maximum ScreenFadeValue
    49     sfMax = 1000;
    50     sfMax = 1000;
    50 
    51 
    51     // message constants
    52     // log message constants
    52     errmsgCreateSurface   = 'Error creating SDL surface';
    53     errmsgCreateSurface   = 'Error creating SDL surface';
    53     errmsgTransparentSet  = 'Error setting transparent color';
    54     errmsgTransparentSet  = 'Error setting transparent color';
    54     errmsgUnknownCommand  = 'Unknown command';
    55     errmsgUnknownCommand  = 'Unknown command';
    55     errmsgUnknownVariable = 'Unknown variable';
    56     errmsgUnknownVariable = 'Unknown variable';
    56     errmsgIncorrectUse    = 'Incorrect use';
    57     errmsgIncorrectUse    = 'Incorrect use';
    69 
    70 
    70     // color constants
    71     // color constants
    71     cWhiteColorChannels : TSDL_Color = (r:$FF; g:$FF; b:$FF; a:$FF);
    72     cWhiteColorChannels : TSDL_Color = (r:$FF; g:$FF; b:$FF; a:$FF);
    72     cNearBlackColorChannels : TSDL_Color = (r:$00; g:$00; b:$10; a:$FF);
    73     cNearBlackColorChannels : TSDL_Color = (r:$00; g:$00; b:$10; a:$FF);
    73 
    74 
    74     cWhiteColor           : Longword = $FFFFFFFF;
    75     cWhiteColor           : Longword = $FFFFFFFF; // white
    75     cYellowColor          : Longword = $FFFFFF00;
    76     cYellowColor          : Longword = $FFFFFF00; // yellow
    76     cNearBlackColor       : Longword = $FF000010;
    77     cNearBlackColor       : Longword = $FF000010; // nearly black
    77 
    78 
    78 {$WARNINGS OFF}
    79 {$WARNINGS OFF}
    79     cAirPlaneSpeed: hwFloat = (isNegative: false; QWordValue:   3006477107); // 1.4
    80     cAirPlaneSpeed: hwFloat = (isNegative: false; QWordValue:   3006477107); // 1.4
    80     cBombsSpeed   : hwFloat = (isNegative: false; QWordValue:    429496729);
    81     cBombsSpeed   : hwFloat = (isNegative: false; QWordValue:    429496729);
    81 {$WARNINGS ON}
    82 {$WARNINGS ON}
   111     tpHighest     = 1.00;
   112     tpHighest     = 1.00;
   112 
   113 
   113 // To allow these to layer, going to treat them as masks. The bottom byte is reserved for objects
   114 // To allow these to layer, going to treat them as masks. The bottom byte is reserved for objects
   114 // TODO - set lfBasic for all solid land, ensure all uses of the flags can handle multiple flag bits
   115 // TODO - set lfBasic for all solid land, ensure all uses of the flags can handle multiple flag bits
   115 // lfObject and lfBasic are only to be different *graphically*  in all other ways they should be treated the same
   116 // lfObject and lfBasic are only to be different *graphically*  in all other ways they should be treated the same
   116     lfBasic          = $8000;  // black
   117     lfBasic          = $8000;  // normal destructible terrain (mask.png: black)
   117     lfIndestructible = $4000;  // red
   118     lfIndestructible = $4000;  // indestructible terrain (mask.png: red)
   118     lfObject         = $2000;  // white
   119     lfObject         = $2000;  // destructible terrain, land object (mask.png: white)
   119     lfDamaged        = $1000;  //
   120     lfDamaged        = $1000;  //
   120     lfIce            = $0800;  // blue
   121     lfIce            = $0800;  // icy terrain (mask.png: blue)
   121     lfBouncy         = $0400;  // green
   122     lfBouncy         = $0400;  // bouncy terrain (mask.png: green)
   122     lfLandMask       = $FF00;  // upper byte is used for terrain, not objects.
   123     lfLandMask       = $FF00;  // upper byte is used for terrain, not objects.
   123 
   124 
   124     lfCurHogCrate    = $0080;  // CurrentHedgehog, and crates, for convenience of AI.  Since an active hog would instantly collect the crate, this does not impact playj
   125     lfCurHogCrate    = $0080;  // CurrentHedgehog, and crates, for convenience of AI.  Since an active hog would instantly collect the crate, this does not impact playj
   125     lfNotCurHogCrate = $FF7F;  // inverse of above. frequently used
   126     lfNotCurHogCrate = $FF7F;  // inverse of above. frequently used
   126     lfObjMask        = $007F;  // lower 7 bits used for hogs and explosives and mines 
   127     lfObjMask        = $007F;  // lower 7 bits used for hogs and explosives and mines 
   141 
   142 
   142     lfAll            = $FFFF;  // everything
   143     lfAll            = $FFFF;  // everything
   143 
   144 
   144 
   145 
   145 
   146 
   146     cMaxPower     = 1500;
   147     cMaxPower     = 1500; // maximum power value for ammo that powers up
   147     cMaxAngle     = 2048;
   148     cMaxAngle     = 2048; // maximum positive value for Gear angle
   148     cPowerDivisor = 1500;
   149     cPowerDivisor = 1500;
   149 
   150 
   150     MAXNAMELEN = 192;
   151     MAXNAMELEN = 192;
   151     MAXROPEPOINTS = 3840;
   152     MAXROPEPOINTS = 3840;
   152 
   153 
   168 
   169 
   169     RGB_LUMINANCE_RED    = 0.212671;
   170     RGB_LUMINANCE_RED    = 0.212671;
   170     RGB_LUMINANCE_GREEN  = 0.715160;
   171     RGB_LUMINANCE_GREEN  = 0.715160;
   171     RGB_LUMINANCE_BLUE   = 0.072169;
   172     RGB_LUMINANCE_BLUE   = 0.072169;
   172 
   173 
   173     cMaxTeams        = 8;
   174     // hedgehog info
   174     cMaxHHIndex      = 7;
   175     cMaxTeams        = 8; // maximum number of teams
   175     cMaxHHs          = cMaxTeams * (cMaxHHIndex+1);
   176     cMaxHHIndex      = 7; // maximum hedgehog index (counting starts at 0)
   176 
   177     cMaxHHs          = cMaxTeams * (cMaxHHIndex+1); // maximum number of hogs
   177     cClanColors      = 9;
   178 
       
   179     cClanColors      = 9; // number of possible clan colors
   178 
   180 
   179     cMaxEdgePoints = 32768;
   181     cMaxEdgePoints = 32768;
   180 
   182 
   181     cHHRadius = 9;
   183     cHHRadius = 9; // hedgehog radius
   182     cHHStepTicks = 29;
   184     cHHStepTicks = 29;
   183 
   185 
   184     cMaxHogHealth : LongInt = High(LongInt) div (cMaxHHIndex+1);
   186     cMaxHogHealth : LongInt = High(LongInt) div (cMaxHHIndex+1); // maximum hedgehog health
   185 
   187 
       
   188     // Z levels
   186     cHHZ = 1000;
   189     cHHZ = 1000;
   187     cCurrHHZ = Succ(cHHZ);
   190     cCurrHHZ = Succ(cHHZ);
   188 
   191 
   189     cBarrelHealth = 60;
   192     // some gear constants
   190     cShotgunRadius = 22;
   193     cBarrelHealth = 60;  // initial barrel health
   191     cBlowTorchC    = 6;
   194     cShotgunRadius = 22; // radius of land a shotgun shot destroys
   192     cakeDmg =   75;
   195     cBlowTorchC    = 6;  // blow torch gear radius component (added to cHHRadius to get the full radius)
   193 
   196     cakeDmg =   75;      // default cake damage
       
   197 
       
   198     // key stuff
   194     cKeyMaxIndex = 1600;
   199     cKeyMaxIndex = 1600;
   195     cKbdMaxIndex = 65536;//need more room for the modifier keys
   200     cKbdMaxIndex = 65536;//need more room for the modifier keys
   196 
   201 
       
   202     // font stuff
   197     cFontBorder = 2 * HDPIScaleFactor;
   203     cFontBorder = 2 * HDPIScaleFactor;
   198     cFontPadding = 2 * HDPIScaleFactor;
   204     cFontPadding = 2 * HDPIScaleFactor;
   199 
   205 
   200     cDefaultBuildMaxDist = 256;
   206     cDefaultBuildMaxDist = 256; // default max. building distance with girder/rubber
   201 
   207 
   202     // do not change this value
   208     // do not change this value
   203     cDefaultZoomLevel = 2.0;
   209     cDefaultZoomLevel = 2.0;
   204 
   210 
   205     // game flags
   211     // game flags
   206     gfAny                = $FFFFFFFF;
   212     gfAny                = $FFFFFFFF; // mask for all possible gameflags
   207     gfOneClanMode        = $00000001;           // used in trainings
   213     gfOneClanMode        = $00000001; // Game does not end if there's only one clan in play. For missions
   208     gfMultiWeapon        = $00000002;           // used in trainings
   214     gfMultiWeapon        = $00000002; // Enter multishoot mode after attack with infinite shots. For target practice
   209     gfSolidLand          = $00000004;
   215     gfSolidLand          = $00000004; // (almost) indestrutible land
   210     gfBorder             = $00000008;
   216     gfBorder             = $00000008; // border at top, left and right
   211     gfDivideTeams        = $00000010;
   217     gfDivideTeams        = $00000010; // each clan spawns their hogs on own side of terrain
   212     gfLowGravity         = $00000020;
   218     gfLowGravity         = $00000020; // low gravity
   213     gfLaserSight         = $00000040;
   219     gfLaserSight         = $00000040; // laser sight for all
   214     gfInvulnerable       = $00000080;
   220     gfInvulnerable       = $00000080; // invulerable for all
   215     gfResetHealth        = $00000100;
   221     gfResetHealth        = $00000100; // heal hogs health up to InitialHealth each turn
   216     gfVampiric           = $00000200;
   222     gfVampiric           = $00000200; // vampirism for all
   217     gfKarma              = $00000400;
   223     gfKarma              = $00000400; // receive damage you deal
   218     gfArtillery          = $00000800;
   224     gfArtillery          = $00000800; // hogs can't walk
   219     gfSwitchHog          = $00001000;
   225     gfSwitchHog          = $00001000; // free switch hog at turn start
   220     gfRandomOrder        = $00002000;
   226     gfRandomOrder        = $00002000; // hogs play in random order
   221     gfKing               = $00004000;
   227     gfKing               = $00004000; // King Mode
   222     gfPlaceHog           = $00008000;
   228     gfPlaceHog           = $00008000; // place all hogs at game start
   223     gfSharedAmmo         = $00010000;
   229     gfSharedAmmo         = $00010000; // ammo is shared per-clan
   224     gfDisableGirders     = $00020000;
   230     gfDisableGirders     = $00020000; // disable land girders
   225     gfDisableLandObjects = $00040000;
   231     gfDisableLandObjects = $00040000; // disable land objects
   226     gfAISurvival         = $00080000;
   232     gfAISurvival         = $00080000; // AI is revived
   227     gfInfAttack          = $00100000;
   233     gfInfAttack          = $00100000; // infinite attack
   228     gfResetWeps          = $00200000;
   234     gfResetWeps          = $00200000; // reset weapons each turn
   229     gfPerHogAmmo         = $00400000;
   235     gfPerHogAmmo         = $00400000; // each hog has its own ammo
   230     gfDisableWind        = $00800000;
   236     gfDisableWind        = $00800000; // don't automatically change wind
   231     gfMoreWind           = $01000000;
   237     gfMoreWind           = $01000000; // wind influences most gears
   232     gfTagTeam            = $02000000;
   238     gfTagTeam            = $02000000; // hogs of same clan share their turn time
   233     gfBottomBorder       = $04000000;
   239     gfBottomBorder       = $04000000; // border at bottom
   234     gfShoppaBorder       = $08000000;
   240     gfShoppaBorder       = $08000000; // Surround terrain with fancy "security border". Pure eye candy
   235     // NOTE: When adding new game flags, ask yourself
   241     // NOTE: When adding new game flags, ask yourself
   236     // if a "game start notice" would be useful. If so,
   242     // if a "game start notice" would be useful. If so,
   237     // add one in uWorld.pas - look for "AddGoal".
   243     // add one in uWorld.pas - look for "AddGoal".
   238 
   244 
   239     // gear states
   245     // gear states
   240     gstDrowning       = $00000001;
   246     gstDrowning       = $00000001; // drowning
   241     gstHHDriven       = $00000002;
   247     gstHHDriven       = $00000002; // hog is controlled by current player
   242     gstMoving         = $00000004;
   248     gstMoving         = $00000004; // moving
   243     gstAttacked       = $00000008;
   249     gstAttacked       = $00000008; // after attack
   244     gstAttacking      = $00000010;
   250     gstAttacking      = $00000010; // while attacking
   245     gstCollision      = $00000020;
   251     gstCollision      = $00000020; // it has *just* collided
   246     gstChooseTarget   = $00000040;
   252     gstChooseTarget   = $00000040; // choosing target
   247     gstHHJumping      = $00000100;
   253     gstHHJumping      = $00000100; // hog is doing long jump
   248     gsttmpFlag        = $00000200;
   254     gsttmpFlag        = $00000200; // temporary wildcard flag, use it for anything you want
   249     gstHHThinking     = $00000800;
   255     gstHHThinking     = $00000800; // AI hog is thinking
   250     gstNoDamage       = $00001000;
   256     gstNoDamage       = $00001000; // gear is immune to damage
   251     gstHHHJump        = $00002000;
   257     gstHHHJump        = $00002000; // hog is doing high jump
   252     gstAnimation      = $00004000;
   258     gstAnimation      = $00004000; // hog is playing an animation
   253     gstHHDeath        = $00008000;
   259     gstHHDeath        = $00008000; // hog is dying
   254     gstWinner         = $00010000;  // this, along with gstLoser, is good for indicating hedgies know they screwed up
   260     gstWinner         = $00010000; // indicates if hog did well
   255     gstWait           = $00020000;
   261     gstWait           = $00020000;
   256     gstNotKickable    = $00040000;
   262     gstNotKickable    = $00040000; // gear cannot be pushed by forces
   257     gstLoser          = $00080000;
   263     gstLoser          = $00080000; // indicates if hog screwed up
   258     gstHHGone         = $00100000;
   264     gstHHGone         = $00100000; // hog is gone (teamgone event)
   259     gstInvisible      = $00200000;
   265     gstInvisible      = $00200000; // invisible
   260     gstSubmersible    = $00400000;
   266     gstSubmersible    = $00400000; // can survive in water
   261     gstFrozen         = $00800000;
   267     gstFrozen         = $00800000; // frozen
   262     gstNoGravity      = $01000000;
   268     gstNoGravity      = $01000000; // ignores gravity
   263 
   269 
   264     // gear messages
   270     // gear messages
   265     gmLeft           = $00000001;
   271     gmLeft           = $00000001; // left
   266     gmRight          = $00000002;
   272     gmRight          = $00000002; // right
   267     gmUp             = $00000004;
   273     gmUp             = $00000004; // up
   268     gmDown           = $00000008;
   274     gmDown           = $00000008; // down
   269     gmSwitch         = $00000010;
   275     gmSwitch         = $00000010; // switch hedgehog
   270     gmAttack         = $00000020;
   276     gmAttack         = $00000020; // attack
   271     gmLJump          = $00000040;
   277     gmLJump          = $00000040; // long jump
   272     gmHJump          = $00000080;
   278     gmHJump          = $00000080; // high jump
   273     gmDestroy        = $00000100;
   279     gmDestroy        = $00000100; // request to self-destruct
   274     gmSlot           = $00000200; // with param
   280     gmSlot           = $00000200; // slot key; with param
   275     gmWeapon         = $00000400; // with param
   281     gmWeapon         = $00000400; // direct weapon selection (SetWeapon); with param
   276     gmTimer          = $00000800; // with param
   282     gmTimer          = $00000800; // set timer; with param
   277     gmAnimate        = $00001000; // with param
   283     gmAnimate        = $00001000; // start animation; with param
   278     gmPrecise        = $00002000;
   284     gmPrecise        = $00002000; // precise aim
   279 
   285 
   280     gmRemoveFromList = $00004000;
   286     // gmAddToList and gmRemoveFromList are used when changing order of gears in the gear list. They are used together when changing a gear's Z (drawing order)
   281     gmAddToList      = $00008000;
   287     gmRemoveFromList = $00004000; // remove gear from gear list
   282     gmDelete         = $00010000;
   288     gmAddToList      = $00008000; // add gear to gear list
       
   289 
       
   290     gmDelete         = $00010000; // delete gear
   283     gmAllStoppable = gmLeft or gmRight or gmUp or gmDown or gmAttack or gmPrecise;
   291     gmAllStoppable = gmLeft or gmRight or gmUp or gmDown or gmAttack or gmPrecise;
   284 
   292 
   285     cMaxSlotIndex       = 10;
   293     // ammo slots
       
   294     cMaxSlotIndex       = 10; // maximum slot index (including hidden slot) (row in ammo menu)
   286     cHiddenSlotIndex    = cMaxSlotIndex; // slot for hidden ammo types, not visible and has no key
   295     cHiddenSlotIndex    = cMaxSlotIndex; // slot for hidden ammo types, not visible and has no key
   287     cMaxSlotAmmoIndex   = 6;
   296     cMaxSlotAmmoIndex   = 6; // maximum index for ammos per slot (column in ammo menu)
   288 
   297 
   289     // ai hints
   298     // AI hints to be set for any gear
   290     aihUsualProcessing    = $00000000;
   299     aihUsualProcessing    = $00000000; // treat gear as usual
   291     aihDoesntMatter       = $00000001;
   300     aihDoesntMatter       = $00000001; // ignore gear in attack calculations and don't intentionally attack it
   292 
   301 
   293     // ammo properties
   302     // ammo properties
   294     ammoprop_Timerable    = $00000001;
   303     ammoprop_Timerable    = $00000001; // can set timer
   295     ammoprop_Power        = $00000002;
   304     ammoprop_Power        = $00000002; // can power up fire strength
   296     ammoprop_NeedTarget   = $00000004;
   305     ammoprop_NeedTarget   = $00000004; // must select target
   297     ammoprop_ForwMsgs     = $00000008;
   306     ammoprop_ForwMsgs     = $00000008; // received gear messages are forwarded to the spawned gear
   298     ammoprop_AttackInMove = $00000010;
   307     ammoprop_AttackInMove = $00000010; // can attack while moving / in mid-air
   299     ammoprop_DoesntStopTimerWhileAttacking
   308     ammoprop_DoesntStopTimerWhileAttacking
   300                           = $00000020;
   309                           = $00000020; // doesn't stop timer while attacker is attacking
   301     ammoprop_NoCrosshair  = $00000040;
   310     ammoprop_NoCrosshair  = $00000040; // no crosshair rendered
   302     ammoprop_AttackingPut = $00000080;
   311     ammoprop_AttackingPut = $00000080; // selecting a target is considered an attack
   303     ammoprop_DontHold     = $00000100;
   312     ammoprop_DontHold     = $00000100; // don't keep ammo selected in next turn
   304     ammoprop_AltAttack    = $00000200;
   313     ammoprop_AltAttack    = $00000200; // ammo can equip alternate ammo (ammoprop_AltUse)
   305     ammoprop_AltUse       = $00000400;
   314     ammoprop_AltUse       = $00000400; // ammo can be equipped by an ammo with ammoprop_AltAttack
   306     ammoprop_NotBorder    = $00000800;
   315     ammoprop_NotBorder    = $00000800; // ammo is not available if map has border
   307     ammoprop_Utility      = $00001000;
   316     ammoprop_Utility      = $00001000; // ammo is considered an utility instead of a weapon
   308     ammoprop_Effect       = $00002000;
   317     ammoprop_Effect       = $00002000; // ammo is considered an effect like extra time or vampirism
   309     ammoprop_SetBounce    = $00004000;
   318     ammoprop_SetBounce    = $00004000; // can set bounciness
   310     ammoprop_NeedUpDown   = $00008000;//Used by TouchInterface to show or hide up/down widgets
   319     ammoprop_NeedUpDown   = $00008000; // used by TouchInterface to show or hide up/down widgets
   311     ammoprop_OscAim       = $00010000;
   320     ammoprop_OscAim       = $00010000; // oscillating aim
   312     ammoprop_NoMoveAfter  = $00020000;
   321     ammoprop_NoMoveAfter  = $00020000; // can't move after attacking
   313     ammoprop_Track        = $00040000;
   322     ammoprop_Track        = $00040000; // ammo follows the landscape, used by AI
   314     ammoprop_DoesntStopTimerInMultiShoot
   323     ammoprop_DoesntStopTimerInMultiShoot
   315                           = $00080000;
   324                           = $00080000; // doesn't stop timer after entering multi-shoot mode
   316     ammoprop_DoesntStopTimerWhileAttackingInInfAttackMode
   325     ammoprop_DoesntStopTimerWhileAttackingInInfAttackMode
   317                           = $00100000;
   326                           = $00100000; // doesn't stop timer while Attacking gear msg is set and inf. attack mode is on
   318     ammoprop_ForceTurnEnd = $00200000;
   327     ammoprop_ForceTurnEnd = $00200000; // always ends turn after usage, ignoring inf. attack
   319     ammoprop_NoTargetAfter= $00400000;
   328     ammoprop_NoTargetAfter= $00400000; // disable target selection after attack
   320     ammoprop_NoRoundEnd   = $10000000;
   329     ammoprop_NoRoundEnd   = $10000000; // ammo doesn't end turn
   321 
   330 
   322     AMMO_INFINITE = 100;
   331     AMMO_INFINITE = 100;               // internal representation of infinite ammo count
   323     AMMO_FINITE_MAX = 99;
   332     AMMO_FINITE_MAX = 99;              // maximum possible finite ammo count
   324 
   333 
   325     JETPACK_FUEL_INFINITE : LongInt = Low(LongInt);
   334     JETPACK_FUEL_INFINITE : LongInt = Low(LongInt); // internal representation of infinite jetpack fuel
   326     BIRDY_ENERGY_INFINITE : LongInt = Low(LongInt);
   335     BIRDY_ENERGY_INFINITE : LongInt = Low(LongInt); // as above, but for Birdy
   327 
   336 
   328     // Special msgParam value used internally for invalid/non-existing value
   337     // Special msgParam value used internally for invalid/non-existing value
   329     // Must not be sent over the network!
   338     // Must not be sent over the network!
   330     MSGPARAM_INVALID = High(LongWord);
   339     MSGPARAM_INVALID = High(LongWord);
   331 
   340 
       
   341     // raw probability values for crate drops
   332     probabilityLevels: array [0..8] of LongWord = (0,20,30,60,100,200,400,600,800);
   342     probabilityLevels: array [0..8] of LongWord = (0,20,30,60,100,200,400,600,800);
   333 
   343 
       
   344     // raw bounciness values for each of the player-selectable bounciness levels
   334     defaultBounciness = 1000;
   345     defaultBounciness = 1000;
   335     bouncinessLevels: array [0..4] of LongWord = (350, 700, defaultBounciness, 2000, 4000);
   346     bouncinessLevels: array [0..4] of LongWord = (350, 700, defaultBounciness, 2000, 4000);
   336 
   347 
   337     // explosion flags
   348     // explosion flags
       
   349     // By default, an explosion removes land, damages and pushes gears,
       
   350     // spawns an explosion animation and plays no sound.
   338     //EXPLAllDamageInRadius = $00000001;  Completely unused for ages
   351     //EXPLAllDamageInRadius = $00000001;  Completely unused for ages
   339     EXPLAutoSound         = $00000002;
   352     EXPLAutoSound         = $00000002; // enable sound (if appropriate)
   340     EXPLNoDamage          = $00000004;
   353     EXPLNoDamage          = $00000004; // don't damage gears
   341     EXPLDoNotTouchHH      = $00000008;
   354     EXPLDoNotTouchHH      = $00000008; // don't push hogs
   342     EXPLDontDraw          = $00000010;
   355     EXPLDontDraw          = $00000010; // don't remove land
   343     EXPLNoGfx             = $00000020;
   356     EXPLNoGfx             = $00000020; // don't spawn visual effects
   344     EXPLPoisoned          = $00000040;
   357     EXPLPoisoned          = $00000040; // poison hogs in effect radius
   345     EXPLDoNotTouchAny     = $00000080;
   358     EXPLDoNotTouchAny     = $00000080; // don't push anything
   346     EXPLForceDraw         = $00000100;
   359     EXPLForceDraw         = $00000100; // remove land even with gfSolidLand
   347 
   360 
   348     posCaseAmmo    = $00000001;
   361     // Pos flags for gtCase
   349     posCaseHealth  = $00000002;
   362     posCaseAmmo    = $00000001; // ammo crate
   350     posCaseUtility = $00000004;
   363     posCaseHealth  = $00000002; // health crate
   351     posCaseDummy   = $00000008;
   364     posCaseUtility = $00000004; // utility crate
   352     posCaseExplode = $00000010;
   365     posCaseDummy   = $00000008; // dummy crate
   353     posCasePoison  = $00000020;
   366     posCaseExplode = $00000010; // crate explodes when touched
       
   367     posCasePoison  = $00000020; // crate poisons hog when touched
   354 
   368 
   355     cCaseHealthRadius = 14;
   369     cCaseHealthRadius = 14;
   356 
   370 
   357     // hog tag mask
   371     // hog tag mask
   358     //htNone        = $00;
   372     //htNone        = $00;
   359     htTeamName    = $01;
   373     htTeamName    = $01;
   360     htName        = $02;
   374     htName        = $02;
   361     htHealth      = $04;
   375     htHealth      = $04;
   362     htTransparent = $08;
   376     htTransparent = $08;
   363 
   377 
   364     NoPointX = Low(LongInt);
   378     NoPointX = Low(LongInt); // special value for CursorX/CursorY if cursor's disabled
   365     cTargetPointRef : TPoint = (x: NoPointX; y: 0);
   379     cTargetPointRef : TPoint = (x: NoPointX; y: 0);
   366 
   380 
   367     kSystemSoundID_Vibrate = $00000FFF;
   381     kSystemSoundID_Vibrate = $00000FFF;
   368 
   382 
   369     cMinPlayWidth = 200;
   383     cMinPlayWidth = 200;
   370     cWorldEdgeDist = 200;
   384     cWorldEdgeDist = 200;
   371 
   385 
   372     cMaxLaserSightWraps = 1;
   386     cMaxLaserSightWraps = 1; // maximum number of world wraps of laser sight
   373 
   387 
   374 implementation
   388 implementation
   375 
   389 
   376 end.
   390 end.