hedgewars/uConsts.pas
changeset 1033 622c5de38d72
parent 1022 f6a3fcb329ca
child 1034 05f003ad3caa
equal deleted inserted replaced
1032:bf6f5122baf7 1033:622c5de38d72
    43                    sprQuestion, sprPowerBar, sprWindBar, sprWindL, sprWindR,
    43                    sprQuestion, sprPowerBar, sprWindBar, sprWindL, sprWindR,
    44                    sprFlake, sprHandRope, sprHandBazooka, sprHandShotgun,
    44                    sprFlake, sprHandRope, sprHandBazooka, sprHandShotgun,
    45                    sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer,
    45                    sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer,
    46                    sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath,
    46                    sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath,
    47                    sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft,
    47                    sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft,
    48                    sprHat, sprKamikaze, sprWhip);
    48                    sprHat, sprKamikaze, sprWhip, sprKowtow);
    49 
    49 
    50      TGearType  = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag,
    50      TGearType  = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag,
    51                    gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope,
    51                    gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope,
    52                    gtSmokeTrace, gtExplosion, gtMine, gtCase, gtDEagleShot, gtDynamite,
    52                    gtSmokeTrace, gtExplosion, gtMine, gtCase, gtDEagleShot, gtDynamite,
    53                    gtTeamHealthSorter, gtClusterBomb, gtCluster, gtShover, gtFlame,
    53                    gtTeamHealthSorter, gtClusterBomb, gtCluster, gtShover, gtFlame,
   115       msgOK                = 'ok';
   115       msgOK                = 'ok';
   116       msgFailed            = 'failed';
   116       msgFailed            = 'failed';
   117       msgGettingConfig     = 'Getting game config...';
   117       msgGettingConfig     = 'Getting game config...';
   118 
   118 
   119 const
   119 const
   120       cMaxPower     = 1500;
   120 	cMaxPower     = 1500;
   121       cMaxAngle     = 2048;
   121 	cMaxAngle     = 2048;
   122       cPowerDivisor = 1500;
   122 	cPowerDivisor = 1500;
   123 
   123 
   124       MAXNAMELEN = 32;
   124 	MAXNAMELEN = 32;
   125 
   125 
   126       COLOR_LAND = $00FFFFFF;
   126 	COLOR_LAND = $00FFFFFF;
   127 
   127 
   128       cifRandomize = $00000001;
   128 	cifRandomize = $00000001;
   129       cifTheme     = $00000002;
   129 	cifTheme     = $00000002;
   130       cifMap       = $00000002; // either theme or map (or map+theme)
   130 	cifMap       = $00000002; // either theme or map (or map+theme)
   131       cifAllInited = cifRandomize or
   131 	cifAllInited = cifRandomize or
   132                      cifTheme or
   132 					cifTheme or
   133                      cifMap;
   133 					cifMap;
   134 
   134 
   135       cTransparentColor: Longword = $000000;
   135 	cTransparentColor: Longword = $000000;
   136 
   136 
   137       cMaxTeams        = 6;
   137 	cMaxTeams        = 6;
   138       cMaxHHIndex      = 7;
   138 	cMaxHHIndex      = 7;
   139       cMaxHHs          = 30;
   139 	cMaxHHs          = 30;
   140       cMaxSpawnPoints  = 1024;
   140 	cMaxSpawnPoints  = 1024;
   141 
   141 
   142       cMaxEdgePoints = 16384;
   142 	cMaxEdgePoints = 16384;
   143 
   143 
   144       cHHRadius = 9;
   144 	cHHRadius = 9;
   145       cHHStepTicks = 38;
   145 	cHHStepTicks = 38;
   146 
   146 
   147       cHHZ = 1000;
   147 	cHHZ = 1000;
   148       cCurrHHZ = Succ(cHHZ);
   148 	cCurrHHZ = Succ(cHHZ);
   149 
   149 
   150       cShotgunRadius = 22;
   150 	cShotgunRadius = 22;
   151       cBlowTorchC    = 6;
   151 	cBlowTorchC    = 6;
   152 
   152 
   153       cKeyMaxIndex = 1023;
   153 	cKeyMaxIndex = 1023;
   154 
   154 
   155       cMaxCaptions = 4;
   155 	cMaxCaptions = 4;
   156 
   156 
   157       gfForts       = $00000001;
   157 	gfForts       = $00000001;
   158       gfMultiWeapon = $00000002;
   158 	gfMultiWeapon = $00000002;
   159       gfSolidLand   = $00000004;
   159 	gfSolidLand   = $00000004;
   160       gfOneClanMode = $10000000;
   160 	gfOneClanMode = $10000000;
   161 
   161 
   162       gstDrowning       = $00000001;
   162 	gstDrowning       = $00000001;
   163       gstHHDriven       = $00000002;
   163 	gstHHDriven       = $00000002;
   164       gstMoving         = $00000004;
   164 	gstMoving         = $00000004;
   165       gstAttacked       = $00000008;
   165 	gstAttacked       = $00000008;
   166       gstAttacking      = $00000010;
   166 	gstAttacking      = $00000010;
   167       gstCollision      = $00000020;
   167 	gstCollision      = $00000020;
   168       gstHHChooseTarget = $00000040;
   168 	gstHHChooseTarget = $00000040;
   169       gstHHJumping      = $00000100;
   169 	gstHHJumping      = $00000100;
   170       gsttmpFlag        = $00000200;
   170 	gsttmpFlag        = $00000200;
   171       gstHHThinking     = $00000800;
   171 	gstHHThinking     = $00000800;
   172       gstNoDamage       = $00001000;
   172 	gstNoDamage       = $00001000;
   173       gstHHHJump        = $00002000;
   173 	gstHHHJump        = $00002000;
   174       gstAnimation      = $00004000;
   174 	gstAnimation      = $00004000;
   175       gstHHDeath        = $00008000;
   175 	gstHHDeath        = $00008000;
   176       gstWinner         = $00010000;
   176 	gstWinner         = $00010000;
   177 
   177 	gstWait           = $00020000;
   178       gm_Left   = $00000001;
   178 
   179       gm_Right  = $00000002;
   179 	gm_Left   = $00000001;
   180       gm_Up     = $00000004;
   180 	gm_Right  = $00000002;
   181       gm_Down   = $00000008;
   181 	gm_Up     = $00000004;
   182       gm_Switch = $00000010;
   182 	gm_Down   = $00000008;
   183       gm_Attack = $00000020;
   183 	gm_Switch = $00000010;
   184       gm_LJump  = $00000040;
   184 	gm_Attack = $00000020;
   185       gm_HJump  = $00000080;
   185 	gm_LJump  = $00000040;
   186       gm_Destroy= $00000100;
   186 	gm_HJump  = $00000080;
   187       gm_Slot   = $00000200; // with param
   187 	gm_Destroy= $00000100;
   188       gm_Weapon = $00000400; // with param
   188 	gm_Slot   = $00000200; // with param
   189       gm_Timer  = $00000800; // with param
   189 	gm_Weapon = $00000400; // with param
   190       gmAllStoppable = gm_Left or gm_Right or gm_Up or gm_Down or gm_Attack;
   190 	gm_Timer  = $00000800; // with param
   191 
   191 	gm_Animate= $00001000; // with param
   192       cMaxSlotIndex       = 8;
   192 	gmAllStoppable = gm_Left or gm_Right or gm_Up or gm_Down or gm_Attack;
   193       cMaxSlotAmmoIndex   = 3;
   193 
   194 
   194 	cMaxSlotIndex       = 8;
   195       ammoprop_Timerable    = $00000001;
   195 	cMaxSlotAmmoIndex   = 3;
   196       ammoprop_Power        = $00000002;
   196 
   197       ammoprop_NeedTarget   = $00000004;
   197 	ammoprop_Timerable    = $00000001;
   198       ammoprop_ForwMsgs     = $00000008;
   198 	ammoprop_Power        = $00000002;
   199       ammoprop_AttackInMove = $00000010;
   199 	ammoprop_NeedTarget   = $00000004;
   200       ammoprop_NoCrosshair  = $00000040;
   200 	ammoprop_ForwMsgs     = $00000008;
   201       ammoprop_AttackingPut = $00000080;
   201 	ammoprop_AttackInMove = $00000010;
   202       ammoprop_DontHold     = $00000100;
   202 	ammoprop_NoCrosshair  = $00000040;
   203       ammoprop_AltAttack    = $00000200;
   203 	ammoprop_AttackingPut = $00000080;
   204       ammoprop_AltUse       = $00000400;
   204 	ammoprop_DontHold     = $00000100;
   205 
   205 	ammoprop_AltAttack    = $00000200;
   206       AMMO_INFINITE = 9;
   206 	ammoprop_AltUse       = $00000400;
   207 
   207 
   208       EXPLAllDamageInRadius = $00000001;
   208 	AMMO_INFINITE = 9;
   209       EXPLAutoSound         = $00000002;
   209 
   210       EXPLNoDamage          = $00000004;
   210 	EXPLAllDamageInRadius = $00000001;
   211       EXPLDoNotTouchHH      = $00000008;
   211 	EXPLAutoSound         = $00000002;
   212       EXPLDontDraw          = $00000010;
   212 	EXPLNoDamage          = $00000004;
   213 
   213 	EXPLDoNotTouchHH      = $00000008;
   214       posCaseAmmo    = $00000001;
   214 	EXPLDontDraw          = $00000010;
   215       posCaseHealth  = $00000002;
   215 
   216 
   216 	posCaseAmmo    = $00000001;
   217       NoPointX = Low(LongInt);
   217 	posCaseHealth  = $00000002;
   218 
   218 
   219       cHHFileName   = 'Hedgehog';
   219 	NoPointX = Low(LongInt);
   220       cCHFileName   = 'Crosshair';
   220 
   221       cThemeCFGFilename = 'theme.cfg';
   221 	cHHFileName   = 'Hedgehog';
   222 
   222 	cCHFileName   = 'Crosshair';
   223       Fontz: array[THWFont] of THHFont = (
   223 	cThemeCFGFilename = 'theme.cfg';
   224                                          (Handle: nil;
   224 
   225                                           Height: 12;
   225 	Fontz: array[THWFont] of THHFont = (
   226                                           style: TTF_STYLE_NORMAL;
   226 			(Handle: nil;
   227                                           Name: 'DejaVuSans.ttf'),
   227 			Height: 12;
   228                                          (Handle: nil;
   228 			style: TTF_STYLE_NORMAL;
   229                                           Height: 24;
   229 			Name: 'DejaVuSans.ttf'),
   230                                           style: TTF_STYLE_NORMAL;
   230 			(Handle: nil;
   231                                           Name: 'DejaVuSans.ttf'),
   231 			Height: 24;
   232                                          (Handle: nil;
   232 			style: TTF_STYLE_NORMAL;
   233                                           Height: 10;
   233 			Name: 'DejaVuSans.ttf'),
   234                                           style: TTF_STYLE_NORMAL;
   234 			(Handle: nil;
   235                                           Name: 'DejaVuSans.ttf')
   235 			Height: 10;
   236                                          );
   236 			style: TTF_STYLE_NORMAL;
   237 
   237 			Name: 'DejaVuSans.ttf')
   238       FontBorder = 2;
   238 			);
   239 
   239 
   240       PathPrefix: string = './';
   240 	FontBorder = 2;
   241       Pathz: array[TPathType] of string      = (
   241 
   242                                                '',                              // ptNone
   242 	PathPrefix: string = './';
   243                                                '',                              // ptData
   243 	Pathz: array[TPathType] of String = (
   244                                                'Graphics',                      // ptGraphics
   244 			'',                              // ptNone
   245                                                'Themes',                        // ptThemes
   245 			'',                              // ptData
   246                                                'Themes/avematan',               // ptCurrTheme
   246 			'Graphics',                      // ptGraphics
   247                                                'Teams',                         // ptTeams
   247 			'Themes',                        // ptThemes
   248                                                'Maps',                          // ptMaps
   248 			'Themes/avematan',               // ptCurrTheme
   249                                                '',                              // ptMapCurrent
   249 			'Teams',                         // ptTeams
   250                                                'Demos',                         // ptDemos
   250 			'Maps',                          // ptMaps
   251                                                'Sounds',                        // ptSounds
   251 			'',                              // ptMapCurrent
   252                                                'Graphics/Graves',               // ptGraves
   252 			'Demos',                         // ptDemos
   253                                                'Fonts',                         // ptFonts
   253 			'Sounds',                        // ptSounds
   254                                                'Forts',                         // ptForts
   254 			'Graphics/Graves',               // ptGraves
   255                                                'Locale',                        // ptLocale
   255 			'Fonts',                         // ptFonts
   256                                                'Graphics/AmmoMenu',             // ptAmmoMenu
   256 			'Forts',                         // ptForts
   257                                                'Graphics/Hedgehog',             // ptHedgehog
   257 			'Locale',                        // ptLocale
   258                                                'Sounds/voices',                 // ptVoices
   258 			'Graphics/AmmoMenu',             // ptAmmoMenu
   259                                                'Graphics/Hats'                  // ptHats
   259 			'Graphics/Hedgehog',             // ptHedgehog
   260                                                );
   260 			'Sounds/voices',                 // ptVoices
       
   261 			'Graphics/Hats'                  // ptHats
       
   262 			);
   261 
   263 
   262       SpritesData: array[TSprite] of record
   264       SpritesData: array[TSprite] of record
   263                      FileName: String[31];
   265                      FileName: String[12];
   264                      Path, AltPath: TPathType;
   266                      Path, AltPath: TPathType;
   265                      Texture: PTexture;
   267                      Texture: PTexture;
   266                      Surface: PSDL_Surface;
   268                      Surface: PSDL_Surface;
   267                      Width, Height: LongInt;
   269                      Width, Height: LongInt;
   268                      saveSurf: boolean;
   270                      saveSurf: boolean;
   269                      end = (
   271                      end = (
   270                      (FileName:  'BlueWater'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   272                      (FileName:  'BlueWater'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   271                       Width: 256; Height: 32; saveSurf: false),// sprWater
   273                       Width: 256; Height: 32; saveSurf: false),// sprWater
   272                      (FileName: 'Clouds'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
   274                      (FileName:     'Clouds'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
   273                       Width: 256; Height:128; saveSurf: false),// sprCloud
   275                       Width: 256; Height:128; saveSurf: false),// sprCloud
   274                      (FileName:       'Bomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   276                      (FileName:       'Bomb'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   275                       Width:   8; Height:  8; saveSurf: false),// sprBomb
   277                       Width:   8; Height:  8; saveSurf: false),// sprBomb
   276                      (FileName:  'BigDigits'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   278                      (FileName:  'BigDigits'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
   277                       Width:  32; Height: 32; saveSurf: false),// sprBigDigit
   279                       Width:  32; Height: 32; saveSurf: false),// sprBigDigit
   394                      (FileName:    'Samurai'; Path: ptHats    ; AltPath: ptNone; Texture: nil; Surface: nil;
   396                      (FileName:    'Samurai'; Path: ptHats    ; AltPath: ptNone; Texture: nil; Surface: nil;
   395                       Width:  32; Height: 32; saveSurf: false),// sprHat
   397                       Width:  32; Height: 32; saveSurf: false),// sprHat
   396                      (FileName: 'amKamikaze'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
   398                      (FileName: 'amKamikaze'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
   397                       Width: 256; Height: 32; saveSurf: false),// sprKamikaze
   399                       Width: 256; Height: 32; saveSurf: false),// sprKamikaze
   398                      (FileName:     'amWhip'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
   400                      (FileName:     'amWhip'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
   399                       Width: 128; Height: 32; saveSurf: false) // sprWhip
   401                       Width: 128; Height: 32; saveSurf: false),// sprWhip
       
   402                      (FileName:     'Kowtow'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
       
   403                       Width:  32; Height: 32; saveSurf: false) // sprWhip
   400                      );
   404                      );
   401 
   405 
   402       Soundz: array[TSound] of record
   406       Soundz: array[TSound] of record
   403                 FileName: String[31];
   407                 FileName: String[19];
   404                 Path    : TPathType;
   408                 Path    : TPathType;
   405                 id      : PMixChunk;
   409                 id      : PMixChunk;
   406                 lastChan: LongInt;
   410                 lastChan: LongInt;
   407                 end = (
   411                 end = (
   408                 (FileName: 'grenadeimpact.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndGrenadeImpact
   412                 (FileName: 'grenadeimpact.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndGrenadeImpact