hedgewars/uConsts.pas
branchwebgl
changeset 8330 aaefa587e277
parent 8026 4a4f21070479
parent 8325 ecd51650d5d8
child 8444 75db7bb8dce8
equal deleted inserted replaced
8116:d24257910f8d 8330:aaefa587e277
    25 
    25 
    26 {$INCLUDE "config.inc"}
    26 {$INCLUDE "config.inc"}
    27 
    27 
    28 const
    28 const
    29     sfMax = 1000;
    29     sfMax = 1000;
    30     cDefaultParamNum = 17;
       
    31     cVideorecParamNum = cDefaultParamNum + 7;
       
    32 
    30 
    33     // message constants
    31     // message constants
    34     errmsgCreateSurface   = 'Error creating SDL surface';
    32     errmsgCreateSurface   = 'Error creating SDL surface';
    35     errmsgTransparentSet  = 'Error setting transparent color';
    33     errmsgTransparentSet  = 'Error setting transparent color';
    36     errmsgUnknownCommand  = 'Unknown command';
    34     errmsgUnknownCommand  = 'Unknown command';
    90 // To allow these to layer, going to treat them as masks. The bottom byte is reserved for objects
    88 // To allow these to layer, going to treat them as masks. The bottom byte is reserved for objects
    91 // TODO - set lfBasic for all solid land, ensure all uses of the flags can handle multiple flag bits
    89 // TODO - set lfBasic for all solid land, ensure all uses of the flags can handle multiple flag bits
    92 // lfObject and lfBasic are only to be different *graphically*  in all other ways they should be treated the same
    90 // lfObject and lfBasic are only to be different *graphically*  in all other ways they should be treated the same
    93     lfBasic          = $8000;  // white
    91     lfBasic          = $8000;  // white
    94     lfIndestructible = $4000;  // red
    92     lfIndestructible = $4000;  // red
    95     lfObject         = $2000;  
    93     lfObject         = $2000;
    96     lfDamaged        = $1000;  //
    94     lfDamaged        = $1000;  //
    97     lfIce            = $0800;  // blue
    95     lfIce            = $0800;  // blue
    98     lfBouncy         = $0400;  // green
    96     lfBouncy         = $0400;  // green
    99 
    97 
   100     cMaxPower     = 1500;
    98     cMaxPower     = 1500;
   110     GL_BGRA             = $80E1;
   108     GL_BGRA             = $80E1;
   111     GL_CLAMP_TO_EDGE    = $812F;
   109     GL_CLAMP_TO_EDGE    = $812F;
   112     GL_TEXTURE_PRIORITY = $8066;
   110     GL_TEXTURE_PRIORITY = $8066;
   113     {$ENDIF}
   111     {$ENDIF}
   114 
   112 
   115     cSendCursorPosTime  : LongWord = 50;
       
   116     cVisibleWater       : LongInt = 128;
   113     cVisibleWater       : LongInt = 128;
   117     cCursorEdgesDist    : LongInt = 100;
       
   118     cTeamHealthWidth    : LongInt = 128;
   114     cTeamHealthWidth    : LongInt = 128;
   119 
   115 
   120     cifRandomize = $00000001;
   116     cifRandomize = $00000001;
   121     cifTheme     = $00000002;
   117     cifTheme     = $00000002;
   122     cifMap       = $00000002; // either theme or map (or map+theme)
   118     cifMap       = $00000002; // either theme or map (or map+theme)
   123     cifAllInited = cifRandomize or cifTheme or cifMap;
   119     cifAllInited = cifRandomize or cifTheme or cifMap;
   124 
   120 
   125     cTransparentColor: Longword = $00000000;
       
   126 
       
   127     RGB_LUMINANCE_RED    = 0.212671;
   121     RGB_LUMINANCE_RED    = 0.212671;
   128     RGB_LUMINANCE_GREEN  = 0.715160;
   122     RGB_LUMINANCE_GREEN  = 0.715160;
   129     RGB_LUMINANCE_BLUE   = 0.072169;
   123     RGB_LUMINANCE_BLUE   = 0.072169;
   130 
   124 
   131     cMaxTeams        = 8;
   125     cMaxTeams        = 8;
   132     cMaxHHIndex      = 7;
   126     cMaxHHIndex      = 7;
   133     cMaxHHs          = 48;
   127     cMaxHHs          = 48;
   134     cMaxSpawnPoints  = 1024;
       
   135 
   128 
   136     cMaxEdgePoints = 16384;
   129     cMaxEdgePoints = 16384;
   137 
   130 
   138     cHHRadius = 9;
   131     cHHRadius = 9;
   139     cHHStepTicks = 29;
   132     cHHStepTicks = 29;
   140 
   133 
   141     cUsualZ = 500;
       
   142     cSmokeZ = 499;
       
   143     cHHZ = 1000;
   134     cHHZ = 1000;
   144     cCurrHHZ = Succ(cHHZ);
   135     cCurrHHZ = Succ(cHHZ);
   145     cOnHHZ = 2000;
       
   146 
   136 
   147     cBarrelHealth = 60;
   137     cBarrelHealth = 60;
   148     cShotgunRadius = 22;
   138     cShotgunRadius = 22;
   149     cBlowTorchC    = 6;
   139     cBlowTorchC    = 6;
   150     cakeDmg =   75;
   140     cakeDmg =   75;
   151 
   141 
   152     cKeyMaxIndex = 1600;
   142     cKeyMaxIndex = 1600;
   153     cKbdMaxIndex = 65536;//need more room for the modifier keys
   143     cKbdMaxIndex = 65536;//need more room for the modifier keys
   154 
   144 
   155     cHHFileName = 'Hedgehog';
       
   156     cCHFileName = 'Crosshair';
       
   157     cThemeCFGFilename = 'theme.cfg';
       
   158 
       
   159     cFontBorder = 2;
   145     cFontBorder = 2;
   160 
   146 
   161     // do not change this value
   147     // do not change this value
   162     cDefaultZoomLevel = 2.0;
   148     cDefaultZoomLevel = 2.0;
   163 
       
   164     cSendEmptyPacketTime = 1000;
       
   165     trigTurns = $80000001;
       
   166 
   149 
   167     // game flags
   150     // game flags
   168     gfAny                = $FFFFFFFF;
   151     gfAny                = $FFFFFFFF;
   169     gfOneClanMode        = $00000001;           // used in trainings
   152     gfOneClanMode        = $00000001;           // used in trainings
   170     gfMultiWeapon        = $00000002;           // used in trainings
   153     gfMultiWeapon        = $00000002;           // used in trainings
   240     gmDelete         = $00010000;
   223     gmDelete         = $00010000;
   241     gmAllStoppable = gmLeft or gmRight or gmUp or gmDown or gmAttack or gmPrecise;
   224     gmAllStoppable = gmLeft or gmRight or gmUp or gmDown or gmAttack or gmPrecise;
   242 
   225 
   243     cMaxSlotIndex       = 9;
   226     cMaxSlotIndex       = 9;
   244     cMaxSlotAmmoIndex   = 5;
   227     cMaxSlotAmmoIndex   = 5;
   245     
   228 
   246     // ai hints
   229     // ai hints
   247     aihUsualProcessing    = $00000000;
   230     aihUsualProcessing    = $00000000;
   248     aihDoesntMatter       = $00000001;
   231     aihDoesntMatter       = $00000001;
   249     
   232 
   250     // ammo properties
   233     // ammo properties
   251     ammoprop_Timerable    = $00000001;
   234     ammoprop_Timerable    = $00000001;
   252     ammoprop_Power        = $00000002;
   235     ammoprop_Power        = $00000002;
   253     ammoprop_NeedTarget   = $00000004;
   236     ammoprop_NeedTarget   = $00000004;
   254     ammoprop_ForwMsgs     = $00000008;
   237     ammoprop_ForwMsgs     = $00000008;
   260     ammoprop_AltUse       = $00000400;
   243     ammoprop_AltUse       = $00000400;
   261     ammoprop_NotBorder    = $00000800;
   244     ammoprop_NotBorder    = $00000800;
   262     ammoprop_Utility      = $00001000;
   245     ammoprop_Utility      = $00001000;
   263     ammoprop_Effect       = $00002000;
   246     ammoprop_Effect       = $00002000;
   264     ammoprop_SetBounce    = $00004000;
   247     ammoprop_SetBounce    = $00004000;
   265     ammoprop_NeedUpDown   = $00008000;//Used by TouchInterface to show or hide up/down widgets 
   248     ammoprop_NeedUpDown   = $00008000;//Used by TouchInterface to show or hide up/down widgets
   266     ammoprop_OscAim       = $00010000;
   249     ammoprop_OscAim       = $00010000;
   267     ammoprop_NoMoveAfter  = $00020000;
   250     ammoprop_NoMoveAfter  = $00020000;
   268     ammoprop_Track        = $00040000;
   251     ammoprop_Track        = $00040000;
   269     ammoprop_NoRoundEnd   = $10000000;
   252     ammoprop_NoRoundEnd   = $10000000;
   270 
   253 
   288     posCasePoison  = $00000020;
   271     posCasePoison  = $00000020;
   289 
   272 
   290     NoPointX = Low(LongInt);
   273     NoPointX = Low(LongInt);
   291     cTargetPointRef : TPoint = (X: NoPointX; Y: 0);
   274     cTargetPointRef : TPoint = (X: NoPointX; Y: 0);
   292 
   275 
   293     // hog tag mask
   276     kSystemSoundID_Vibrate = $00000FFF;
   294     htNone        = $00;
   277 
   295     htTeamName    = $01;
       
   296     htName        = $02;
       
   297     htHealth      = $04;
       
   298     htTransparent = $08;
       
   299 
       
   300     AMAnimDuration = 200;
       
   301     AMHidden    = 0;//AMState values
       
   302     AMShowingUp = 1;
       
   303     AMShowing   = 2;
       
   304     AMHiding    = 3;
       
   305 
       
   306     AMTypeMaskX     = $00000001;
       
   307     AMTypeMaskY     = $00000002;
       
   308     AMTypeMaskAlpha = $00000004;
       
   309     AMTypeMaskSlide = $00000008;
       
   310 
       
   311 {$IFDEF MOBILE}
       
   312     AMSlotSize = 48;
       
   313     AMTITLE = 30;
       
   314 {$ELSE}
       
   315     AMSlotSize = 32;
       
   316 {$ENDIF}
       
   317     AMSlotPadding = (AMSlotSize - 32) shr 1;
       
   318 
       
   319 {$IFDEF USE_TOUCH_INTERFACE}
       
   320     FADE_ANIM_TIME = 500;
       
   321     MOVE_ANIM_TIME = 500;
       
   322 {$ENDIF}
       
   323 
       
   324     cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13);
       
   325     cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0);
       
   326        
       
   327 implementation
   278 implementation
   328 
   279 
   329 end.
   280 end.