hedgewars/ArgParsers.pas
changeset 14670 56831f466d1d
parent 14598 62dea281e4d5
child 14677 93429d8f6b3f
equal deleted inserted replaced
14669:fd22b6d474e7 14670:56831f466d1d
   237 const videoarray: array [0..4] of string = ('--fullscreen-width','--fullscreen-height', '--width', '--height', '--depth');
   237 const videoarray: array [0..4] of string = ('--fullscreen-width','--fullscreen-height', '--width', '--height', '--depth');
   238       audioarray: array [0..2] of string = ('--volume','--nomusic','--nosound');
   238       audioarray: array [0..2] of string = ('--volume','--nomusic','--nosound');
   239       otherarray: array [0..2] of string = ('--locale','--fullscreen','--showfps');
   239       otherarray: array [0..2] of string = ('--locale','--fullscreen','--showfps');
   240       mediaarray: array [0..9] of string = ('--fullscreen-width', '--fullscreen-height', '--width', '--height', '--depth', '--volume','--nomusic','--nosound','--locale','--fullscreen');
   240       mediaarray: array [0..9] of string = ('--fullscreen-width', '--fullscreen-height', '--width', '--height', '--depth', '--volume','--nomusic','--nosound','--locale','--fullscreen');
   241       allarray: array [0..18] of string = ('--fullscreen-width','--fullscreen-height', '--width', '--height', '--depth','--volume','--nomusic','--nosound','--nodampen','--locale','--fullscreen','--showfps','--altdmg','--frame-interval','--low-quality','--no-teamtag','--no-hogtag','--no-healthtag','--translucent-tags');
   241       allarray: array [0..18] of string = ('--fullscreen-width','--fullscreen-height', '--width', '--height', '--depth','--volume','--nomusic','--nosound','--nodampen','--locale','--fullscreen','--showfps','--altdmg','--frame-interval','--low-quality','--no-teamtag','--no-hogtag','--no-healthtag','--translucent-tags');
   242       reallyAll: array[0..37] of shortstring = (
   242       reallyAll: array[0..38] of shortstring = (
   243                 '--prefix', '--user-prefix', '--locale', '--fullscreen-width', '--fullscreen-height', '--width',
   243                 '--prefix', '--user-prefix', '--locale', '--fullscreen-width', '--fullscreen-height', '--width',
   244                 '--height', '--frame-interval', '--volume','--nomusic', '--nosound', '--nodampen',
   244                 '--height', '--frame-interval', '--volume','--nomusic', '--nosound', '--nodampen',
   245                 '--fullscreen', '--showfps', '--altdmg', '--low-quality', '--raw-quality', '--stereo', '--nick',
   245                 '--fullscreen', '--showfps', '--altdmg', '--low-quality', '--raw-quality', '--stereo', '--nick',
   246   {deprecated}  '--depth', '--set-video', '--set-audio', '--set-other', '--set-multimedia', '--set-everything',
   246   {deprecated}  '--depth', '--set-video', '--set-audio', '--set-other', '--set-multimedia', '--set-everything',
   247   {internal}    '--internal', '--port', '--recorder', '--landpreview',
   247   {internal}    '--internal', '--port', '--recorder', '--landpreview',
   248   {misc}        '--stats-only', '--gci', '--help','--protocol', '--no-teamtag','--no-hogtag','--no-healthtag','--translucent-tags','--lua-test');
   248   {misc}        '--stats-only', '--gci', '--help','--protocol', '--no-teamtag','--no-hogtag','--no-healthtag','--translucent-tags','--lua-test','--no-holiday-silliness');
   249 var cmdIndex: byte;
   249 var cmdIndex: byte;
   250 begin
   250 begin
   251     parseParameter:= false;
   251     parseParameter:= false;
   252     cmdIndex:= 0;
   252     cmdIndex:= 0;
   253 
   253 
   295         {--no-teamtag}          33 : cTagsMask := cTagsMask and (not htTeamName);
   295         {--no-teamtag}          33 : cTagsMask := cTagsMask and (not htTeamName);
   296         {--no-hogtag}           34 : cTagsMask := cTagsMask and (not htName);
   296         {--no-hogtag}           34 : cTagsMask := cTagsMask and (not htName);
   297         {--no-healthtag}        35 : cTagsMask := cTagsMask and (not htHealth);
   297         {--no-healthtag}        35 : cTagsMask := cTagsMask and (not htHealth);
   298         {--translucent-tags}    36 : cTagsMask := cTagsMask or htTransparent;
   298         {--translucent-tags}    36 : cTagsMask := cTagsMask or htTransparent;
   299         {--lua-test}            37 : begin cTestLua := true; SetSound(false); cScriptName := getstringParameter(arg, paramIndex, parseParameter); WriteLn(stdout, 'Lua test file specified: ' + cScriptName);end;
   299         {--lua-test}            37 : begin cTestLua := true; SetSound(false); cScriptName := getstringParameter(arg, paramIndex, parseParameter); WriteLn(stdout, 'Lua test file specified: ' + cScriptName);end;
       
   300         {--no-holiday-silliness} 38 : cHolidaySilliness:= false;
   300     else
   301     else
   301         begin
   302         begin
   302         //Assume the first "non parameter" is the demo file, anything else is invalid
   303         //Assume the first "non parameter" is the demo file, anything else is invalid
   303         if (recordFileName = '') and (Copy(cmd,1,2) <> '--') then
   304         if (recordFileName = '') and (Copy(cmd,1,2) <> '--') then
   304             recordFileName := cmd
   305             recordFileName := cmd