hedgewars/uConsts.pas
changeset 10015 4feced261c68
parent 9998 736015b847e3
parent 9950 2759212a27de
child 10108 c68cf030eded
equal deleted inserted replaced
10014:56d2f2d5aad8 10015:4feced261c68
    91 // To allow these to layer, going to treat them as masks. The bottom byte is reserved for objects
    91 // To allow these to layer, going to treat them as masks. The bottom byte is reserved for objects
    92 // TODO - set lfBasic for all solid land, ensure all uses of the flags can handle multiple flag bits
    92 // TODO - set lfBasic for all solid land, ensure all uses of the flags can handle multiple flag bits
    93 // lfObject and lfBasic are only to be different *graphically*  in all other ways they should be treated the same
    93 // lfObject and lfBasic are only to be different *graphically*  in all other ways they should be treated the same
    94     lfBasic          = $8000;  // white
    94     lfBasic          = $8000;  // white
    95     lfIndestructible = $4000;  // red
    95     lfIndestructible = $4000;  // red
    96     lfObject         = $2000;  
    96     lfObject         = $2000;
    97     lfDamaged        = $1000;  //
    97     lfDamaged        = $1000;  //
    98     lfIce            = $0800;  // blue
    98     lfIce            = $0800;  // blue
    99     lfBouncy         = $0400;  // green
    99     lfBouncy         = $0400;  // green
   100     lfLandMask       = $FF00;  // upper byte is used for terrain, not objects.
   100     lfLandMask       = $FF00;  // upper byte is used for terrain, not objects.
   101 
   101 
   102     lfCurrentHog     = $0080;  // CurrentHog.  It is also used to flag crates, for convenience of AI.  Since an active hog would instantly collect the crate, this doesn't impact play
   102     lfCurrentHog     = $0080;  // CurrentHog.  It is also used to flag crates, for convenience of AI.  Since an active hog would instantly collect the crate, this does not impact play
   103     lfNotCurrentMask = $FF7F;  // inverse of above. frequently used
   103     lfNotCurrentMask = $FF7F;  // inverse of above. frequently used
   104     lfObjMask        = $007F;  // lower 7 bits used for hogs
   104     lfObjMask        = $007F;  // lower 7 bits used for hogs
   105     lfNotObjMask     = $FF80;  // inverse of above.
   105     lfNotObjMask     = $FF80;  // inverse of above.
   106     // lower byte is for objects. 
   106     // lower byte is for objects.
   107     // consists of 0-127 counted for object checkins and $80 as a bit flag for current hog. 
   107     // consists of 0-127 counted for object checkins and $80 as a bit flag for current hog.
   108     lfAllObjMask     = $00FF;  // lfCurrentHog or lfObjMask
   108     lfAllObjMask     = $00FF;  // lfCurrentHog or lfObjMask
   109 
   109 
   110 
   110 
   111     cMaxPower     = 1500;
   111     cMaxPower     = 1500;
   112     cMaxAngle     = 2048;
   112     cMaxAngle     = 2048;
   113     cPowerDivisor = 1500;
   113     cPowerDivisor = 1500;
   114 
   114 
   115     MAXNAMELEN = 192;
   115     MAXNAMELEN = 192;
   116     MAXROPEPOINTS = 3840;
   116     MAXROPEPOINTS = 3840;
   117 
   117 
       
   118     {$IFNDEF PAS2C}
   118     // some opengl headers do not have these macros
   119     // some opengl headers do not have these macros
   119     GL_BGR              = $80E0;
   120     GL_BGR              = $80E0;
   120     GL_BGRA             = $80E1;
   121     GL_BGRA             = $80E1;
   121     GL_CLAMP_TO_EDGE    = $812F;
   122     GL_CLAMP_TO_EDGE    = $812F;
   122     GL_TEXTURE_PRIORITY = $8066;
   123     GL_TEXTURE_PRIORITY = $8066;
       
   124     {$ENDIF}
   123 
   125 
   124     cVisibleWater       : LongInt = 128;
   126     cVisibleWater       : LongInt = 128;
   125     cTeamHealthWidth    : LongInt = 128;
   127     cTeamHealthWidth    : LongInt = 128;
   126 
   128 
   127     cifRandomize = $00000001;
   129     cifRandomize = $00000001;
   148     cBarrelHealth = 60;
   150     cBarrelHealth = 60;
   149     cShotgunRadius = 22;
   151     cShotgunRadius = 22;
   150     cBlowTorchC    = 6;
   152     cBlowTorchC    = 6;
   151     cakeDmg =   75;
   153     cakeDmg =   75;
   152 
   154 
   153     cKeyMaxIndex = 1023;
   155     cKeyMaxIndex = 1600;
   154     cKbdMaxIndex = 65536;//need more room for the modifier keys
   156     cKbdMaxIndex = 65536;//need more room for the modifier keys
   155 
   157 
   156     cFontBorder = 2;
   158     cFontBorder = 2;
   157 
   159 
   158     // do not change this value
   160     // do not change this value
   237     gmDelete         = $00010000;
   239     gmDelete         = $00010000;
   238     gmAllStoppable = gmLeft or gmRight or gmUp or gmDown or gmAttack or gmPrecise;
   240     gmAllStoppable = gmLeft or gmRight or gmUp or gmDown or gmAttack or gmPrecise;
   239 
   241 
   240     cMaxSlotIndex       = 9;
   242     cMaxSlotIndex       = 9;
   241     cMaxSlotAmmoIndex   = 5;
   243     cMaxSlotAmmoIndex   = 5;
   242     
   244 
   243     // ai hints
   245     // ai hints
   244     aihUsualProcessing    = $00000000;
   246     aihUsualProcessing    = $00000000;
   245     aihDoesntMatter       = $00000001;
   247     aihDoesntMatter       = $00000001;
   246     
   248 
   247     // ammo properties
   249     // ammo properties
   248     ammoprop_Timerable    = $00000001;
   250     ammoprop_Timerable    = $00000001;
   249     ammoprop_Power        = $00000002;
   251     ammoprop_Power        = $00000002;
   250     ammoprop_NeedTarget   = $00000004;
   252     ammoprop_NeedTarget   = $00000004;
   251     ammoprop_ForwMsgs     = $00000008;
   253     ammoprop_ForwMsgs     = $00000008;
   259     ammoprop_AltUse       = $00000400;
   261     ammoprop_AltUse       = $00000400;
   260     ammoprop_NotBorder    = $00000800;
   262     ammoprop_NotBorder    = $00000800;
   261     ammoprop_Utility      = $00001000;
   263     ammoprop_Utility      = $00001000;
   262     ammoprop_Effect       = $00002000;
   264     ammoprop_Effect       = $00002000;
   263     ammoprop_SetBounce    = $00004000;
   265     ammoprop_SetBounce    = $00004000;
   264     ammoprop_NeedUpDown   = $00008000;//Used by TouchInterface to show or hide up/down widgets 
   266     ammoprop_NeedUpDown   = $00008000;//Used by TouchInterface to show or hide up/down widgets
   265     ammoprop_OscAim       = $00010000;
   267     ammoprop_OscAim       = $00010000;
   266     ammoprop_NoMoveAfter  = $00020000;
   268     ammoprop_NoMoveAfter  = $00020000;
   267     ammoprop_Track        = $00040000;
   269     ammoprop_Track        = $00040000;
   268     ammoprop_DoesntStopTimerInMultiShoot
   270     ammoprop_DoesntStopTimerInMultiShoot
   269                           = $00080000;
   271                           = $00080000;
   294     htName        = $02;
   296     htName        = $02;
   295     htHealth      = $04;
   297     htHealth      = $04;
   296     htTransparent = $08;
   298     htTransparent = $08;
   297 
   299 
   298     NoPointX = Low(LongInt);
   300     NoPointX = Low(LongInt);
   299     cTargetPointRef : TPoint = (X: NoPointX; Y: 0);
   301     cTargetPointRef : TPoint = (x: NoPointX; y: 0);
   300 
   302 
   301     kSystemSoundID_Vibrate = $00000FFF;
   303     kSystemSoundID_Vibrate = $00000FFF;
   302 
   304 
   303     rtnTestSuccess = $00000000;
   305     rtnTestSuccess = $00000000;
   304     rtnTestFailed  = $00000001;
   306     rtnTestFailed  = $00000001;