hedgewars/uConsts.pas
changeset 74 42257fee61ae
parent 72 aeb2ac1878dc
child 75 d2b737858ff7
equal deleted inserted replaced
73:fe1c62875a19 74:42257fee61ae
    42      TPathType  = (ptData, ptGraphics, ptThemes, ptThemeCurrent, ptTeams, ptMaps,
    42      TPathType  = (ptData, ptGraphics, ptThemes, ptThemeCurrent, ptTeams, ptMaps,
    43                    ptMapCurrent, ptDemos, ptSounds, ptGraves, ptFonts, ptForts);
    43                    ptMapCurrent, ptDemos, ptSounds, ptGraves, ptFonts, ptForts);
    44      TSprite    = (sprWater, sprCloud, sprBomb, sprBigDigit, sprFrame,
    44      TSprite    = (sprWater, sprCloud, sprBomb, sprBigDigit, sprFrame,
    45                    sprLag, sprArrow, sprGrenade, sprTargetP, sprUFO,
    45                    sprLag, sprArrow, sprGrenade, sprTargetP, sprUFO,
    46                    sprSmokeTrace, sprRopeHook, sprExplosion50, sprMineOff,
    46                    sprSmokeTrace, sprRopeHook, sprExplosion50, sprMineOff,
    47                    sprMineOn, sprCase, sprFAid, sprDynamite);
    47                    sprMineOn, sprCase, sprFAid, sprDynamite, sprPower);
    48      TGearType  = (gtCloud, gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag,
    48      TGearType  = (gtCloud, gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag,
    49                    gtGrave, gtUFO, gtShotgunShot, gtActionTimer, gtPickHammer, gtRope,
    49                    gtGrave, gtUFO, gtShotgunShot, gtActionTimer, gtPickHammer, gtRope,
    50                    gtSmokeTrace, gtExplosion, gtMine, gtCase, gtDEagleShot, gtDynamite,
    50                    gtSmokeTrace, gtExplosion, gtMine, gtCase, gtDEagleShot, gtDynamite,
    51                    gtTeamHealthSorter);
    51                    gtTeamHealthSorter);
    52      TGearsType = set of TGearType;
    52      TGearsType = set of TGearType;
    85 const
    85 const
    86       cNetProtoVersion = 1;
    86       cNetProtoVersion = 1;
    87 
    87 
    88       rndfillstr = 'hw';
    88       rndfillstr = 'hw';
    89 
    89 
       
    90       MAXNAMELEN = 32;
       
    91 
    90       COLOR_LAND = $00FFFFFF;
    92       COLOR_LAND = $00FFFFFF;
    91 
    93 
    92       cifRandomize = $00000001;
    94       cifRandomize = $00000001;
    93       cifTheme     = $00000002;
    95       cifTheme     = $00000002;
    94       cifMap       = $00000002; // either theme or map (or map+theme)
    96       cifMap       = $00000002; // either theme or map (or map+theme)
   166       posCaseAmmo    = $00000001;
   168       posCaseAmmo    = $00000001;
   167       posCaseHealth  = $00000002;
   169       posCaseHealth  = $00000002;
   168 
   170 
   169       NoPointX = Low(Integer); // константа для TargetPoint, показывает, что цель не указана
   171       NoPointX = Low(Integer); // константа для TargetPoint, показывает, что цель не указана
   170 
   172 
   171       cHHFileName   = 'Hedgehog.png';
   173       cHHFileName   = 'Hedgehog';
   172       cCHFileName   = 'Crosshair.png';
   174       cCHFileName   = 'Crosshair';
   173       cThemeCFGFilename = 'theme.cfg';
   175       cThemeCFGFilename = 'theme.cfg';
   174 
   176 
   175       Fontz: array[THWFont] of THHFont = (
   177       Fontz: array[THWFont] of THHFont = (
   176                                          (Height: 12;
   178                                          (Height: 12;
   177                                           Name: 'UN1251N.TTF'),
   179                                           Name: 'DejaVuSans.ttf'),
   178                                          (Height: 24;
   180                                          (Height: 24;
   179                                           Name: 'UN1251N.TTF')
   181                                           Name: 'DejaVuSans.ttf')
   180                                          );
   182                                          );
   181 
   183 
   182       Pathz: array[TPathType] of string[ 64] = (
   184       Pathz: array[TPathType] of string[ 64] = (
   183                                                'Data',                          // ptData
   185                                                'Data',                          // ptData
   184                                                'Data/Graphics',                 // ptGraphics
   186                                                'Data/Graphics',                 // ptGraphics
   196 
   198 
   197       StuffLoadData: array[TStuff] of record
   199       StuffLoadData: array[TStuff] of record
   198                                      FileName: String[31];
   200                                      FileName: String[31];
   199                                      Path    : TPathType;
   201                                      Path    : TPathType;
   200                                      end = (
   202                                      end = (
   201                                      (FileName: 'horizont.png'; Path: ptThemeCurrent ),    // sHorizont
   203                                      (FileName: 'horizont'; Path: ptThemeCurrent ),    // sHorizont
   202                                      (FileName:      'Sky.png'; Path: ptThemeCurrent ),    // sSky
   204                                      (FileName:      'Sky'; Path: ptThemeCurrent ),    // sSky
   203                                      (FileName:  'Console.png'; Path: ptGraphics     ),    // sConsoleBG
   205                                      (FileName:  'Console'; Path: ptGraphics     ),    // sConsoleBG
   204                                      (FileName: 'PowerBar.png'; Path: ptGraphics     ),    // sPowerBar
   206                                      (FileName: 'PowerBar'; Path: ptGraphics     ),    // sPowerBar
   205                                      (FileName: 'thinking.png'; Path: ptGraphics     ),    // sQuestion
   207                                      (FileName: 'thinking'; Path: ptGraphics     ),    // sQuestion
   206                                      (FileName:  'WindBar.png'; Path: ptGraphics     ),    // sWindBar
   208                                      (FileName:  'WindBar'; Path: ptGraphics     ),    // sWindBar
   207                                      (FileName:    'WindL.png'; Path: ptGraphics     ),    // sWindL
   209                                      (FileName:    'WindL'; Path: ptGraphics     ),    // sWindL
   208                                      (FileName:    'WindR.png'; Path: ptGraphics     ),    // sWindR
   210                                      (FileName:    'WindR'; Path: ptGraphics     ),    // sWindR
   209                                      (FileName: 'RopeNode.png'; Path: ptGraphics     )     // sRopeNode
   211                                      (FileName: 'RopeNode'; Path: ptGraphics     )     // sRopeNode
   210                                      );
   212                                      );
   211       StuffPoz: array[TStuff] of TSDL_Rect = (
   213       StuffPoz: array[TStuff] of TSDL_Rect = (
   212                                       (x:   0; y:   0; w: 512; h: 256), // sHorizont
   214                                       (x:   0; y:   0; w: 512; h: 256), // sHorizont
   213                                       (x: 512; y:   0; w:  64; h:1024), // sSky
   215                                       (x: 512; y:   0; w:  64; h:1024), // sSky
   214                                       (x: 256; y: 256; w: 256; h: 256), // sConsoleBG
   216                                       (x: 256; y: 256; w: 256; h: 256), // sConsoleBG
   224                      Path    : TPathType;
   226                      Path    : TPathType;
   225                      Surface : PSDL_Surface;
   227                      Surface : PSDL_Surface;
   226                      Width, Height: integer;
   228                      Width, Height: integer;
   227                      hasAlpha: boolean;
   229                      hasAlpha: boolean;
   228                      end = (
   230                      end = (
   229                      (FileName: 'BlueWater.png'; Path: ptGraphics; Width: 256; Height: 48; hasAlpha: false),// sprWater
   231                      (FileName: 'BlueWater'; Path: ptGraphics; Width: 256; Height: 48; hasAlpha: false),// sprWater
   230                      (FileName:    'Clouds.png'; Path: ptGraphics; Width: 256; Height:128; hasAlpha: false),// sprCloud
   232                      (FileName:    'Clouds'; Path: ptGraphics; Width: 256; Height:128; hasAlpha: false),// sprCloud
   231                      (FileName:      'Bomb.png'; Path: ptGraphics; Width:  16; Height: 16; hasAlpha: false),// sprBomb
   233                      (FileName:      'Bomb'; Path: ptGraphics; Width:  16; Height: 16; hasAlpha: false),// sprBomb
   232                      (FileName: 'BigDigits.png'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha:  true),// sprBigDigit
   234                      (FileName: 'BigDigits'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha:  true),// sprBigDigit
   233                      (FileName:     'Frame.png'; Path: ptGraphics; Width:   4; Height: 32; hasAlpha:  true),// sprFrame
   235                      (FileName:     'Frame'; Path: ptGraphics; Width:   4; Height: 32; hasAlpha:  true),// sprFrame
   234                      (FileName:       'Lag.png'; Path: ptGraphics; Width:  64; Height: 64; hasAlpha: false),// sprLag
   236                      (FileName:       'Lag'; Path: ptGraphics; Width:  64; Height: 64; hasAlpha: false),// sprLag
   235                      (FileName:     'Arrow.png'; Path: ptGraphics; Width:  16; Height: 16; hasAlpha: false),// sprCursor
   237                      (FileName:     'Arrow'; Path: ptGraphics; Width:  16; Height: 16; hasAlpha: false),// sprCursor
   236                      (FileName:   'Grenade.png'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha: false),// sprGrenade
   238                      (FileName:   'Grenade'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha: false),// sprGrenade
   237                      (FileName:   'Targetp.png'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha: false),// sprTargetP
   239                      (FileName:   'Targetp'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha: false),// sprTargetP
   238                      (FileName:       'UFO.png'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha: false),// sprUFO
   240                      (FileName:       'UFO'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha: false),// sprUFO
   239                      (FileName:'SmokeTrace.png'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha:  true),// sprSmokeTrace
   241                      (FileName:'SmokeTrace'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha:  true),// sprSmokeTrace
   240                      (FileName:  'RopeHook.png'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha: false),// sprRopeHook
   242                      (FileName:  'RopeHook'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha: false),// sprRopeHook
   241                      (FileName:    'Expl50.png'; Path: ptGraphics; Width:  64; Height: 64; hasAlpha: false),// sprExplosion50
   243                      (FileName:    'Expl50'; Path: ptGraphics; Width:  64; Height: 64; hasAlpha: false),// sprExplosion50
   242                      (FileName:   'MineOff.png'; Path: ptGraphics; Width:  16; Height: 16; hasAlpha: false),// sprMineOff
   244                      (FileName:   'MineOff'; Path: ptGraphics; Width:  16; Height: 16; hasAlpha: false),// sprMineOff
   243                      (FileName:    'MineOn.png'; Path: ptGraphics; Width:  16; Height: 16; hasAlpha: false),// sprMineOn
   245                      (FileName:    'MineOn'; Path: ptGraphics; Width:  16; Height: 16; hasAlpha: false),// sprMineOn
   244                      (FileName:      'Case.png'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha: false),// sprCase
   246                      (FileName:      'Case'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha: false),// sprCase
   245                      (FileName:  'FirstAid.png'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha: false),// sprFAid
   247                      (FileName:  'FirstAid'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha: false),// sprFAid
   246                      (FileName:  'dynamite.png'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha: false) // sprDynamite
   248                      (FileName:  'dynamite'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha: false),// sprDynamite
       
   249                      (FileName:     'Power'; Path: ptGraphics; Width:  32; Height: 32; hasAlpha:  true) // sprPower
   247                      );
   250                      );
   248       Soundz: array[TSound] of record
   251       Soundz: array[TSound] of record
   249                                        FileName: String[31];
   252                                        FileName: String[31];
   250                                        Path    : TPathType;
   253                                        Path    : TPathType;
   251                                        id      : PMixChunk;
   254                                        id      : PMixChunk;