2008-01-27 11:25:03 +00:00
|
|
|
/*
|
|
|
|
** m_argv.cpp
|
|
|
|
** Manages command line arguments
|
|
|
|
**
|
|
|
|
**---------------------------------------------------------------------------
|
|
|
|
** Copyright 1998-2006 Randy Heit
|
|
|
|
** All rights reserved.
|
|
|
|
**
|
|
|
|
** Redistribution and use in source and binary forms, with or without
|
|
|
|
** modification, are permitted provided that the following conditions
|
|
|
|
** are met:
|
|
|
|
**
|
|
|
|
** 1. Redistributions of source code must retain the above copyright
|
|
|
|
** notice, this list of conditions and the following disclaimer.
|
|
|
|
** 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
** notice, this list of conditions and the following disclaimer in the
|
|
|
|
** documentation and/or other materials provided with the distribution.
|
|
|
|
** 3. The name of the author may not be used to endorse or promote products
|
|
|
|
** derived from this software without specific prior written permission.
|
|
|
|
**
|
|
|
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
**---------------------------------------------------------------------------
|
|
|
|
**
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include "m_argv.h"
|
|
|
|
#include "cmdlib.h"
|
|
|
|
|
|
|
|
IMPLEMENT_CLASS (DArgs)
|
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs Default Constructor
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
DArgs::DArgs()
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs Copy Constructor
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
DArgs::DArgs(const DArgs &other)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
Argv = other.Argv;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs Argv Constructor
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
DArgs::DArgs(int argc, char **argv)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
SetArgs(argc, argv);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs String Argv Constructor
|
|
|
|
//
|
|
|
|
//===========================================================================
|
2008-01-27 11:25:03 +00:00
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
DArgs::DArgs(int argc, FString *argv)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
AppendArgs(argc, argv);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs Copy Operator
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
DArgs &DArgs::operator=(const DArgs &other)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
Argv = other.Argv;
|
2008-01-27 11:25:03 +00:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: SetArgs
|
|
|
|
//
|
|
|
|
//===========================================================================
|
2008-01-27 11:25:03 +00:00
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
void DArgs::SetArgs(int argc, char **argv)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
Argv.Resize(argc);
|
|
|
|
for (int i = 0; i < argc; ++i)
|
|
|
|
{
|
|
|
|
Argv[i] = argv[i];
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: FlushArgs
|
|
|
|
//
|
|
|
|
//===========================================================================
|
2008-01-27 11:25:03 +00:00
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
void DArgs::FlushArgs()
|
|
|
|
{
|
|
|
|
Argv.Clear();
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: CheckParm
|
2008-01-27 11:25:03 +00:00
|
|
|
//
|
|
|
|
// Checks for the given parameter in the program's command line arguments.
|
|
|
|
// Returns the argument number (1 to argc-1) or 0 if not present
|
|
|
|
//
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
int DArgs::CheckParm(const char *check, int start) const
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
for (unsigned i = start; i < Argv.Size(); ++i)
|
|
|
|
{
|
|
|
|
if (0 == stricmp(check, Argv[i]))
|
|
|
|
{
|
2008-01-27 11:25:03 +00:00
|
|
|
return i;
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
}
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: CheckParmList
|
|
|
|
//
|
|
|
|
// Returns the number of arguments after the parameter (if found) and also
|
|
|
|
// returns a pointer to the first argument.
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
int DArgs::CheckParmList(const char *check, FString **strings, int start) const
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
unsigned int i, parmat = CheckParm(check, start);
|
2008-01-27 11:25:03 +00:00
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
if (parmat == 0)
|
|
|
|
{
|
|
|
|
if (strings != NULL)
|
|
|
|
{
|
|
|
|
*strings = NULL;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
for (i = ++parmat; i < Argv.Size(); ++i)
|
|
|
|
{
|
|
|
|
if (Argv[i][0] == '-' || Argv[i][1] == '+')
|
|
|
|
{
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (strings != NULL)
|
|
|
|
{
|
|
|
|
*strings = &Argv[parmat];
|
|
|
|
}
|
|
|
|
return i - parmat;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: CheckValue
|
|
|
|
//
|
|
|
|
// Like CheckParm, but it also checks that the parameter has a value after
|
|
|
|
// it and returns that or NULL if not present.
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
const char *DArgs::CheckValue(const char *check) const
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
int i = CheckParm(check);
|
|
|
|
|
|
|
|
if (i > 0 && i < (int)Argv.Size() - 1)
|
|
|
|
{
|
|
|
|
i++;
|
|
|
|
return Argv[i][0] != '+' && Argv[i][0] != '-' ? Argv[i].GetChars() : NULL;
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
else
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
{
|
2008-01-27 11:25:03 +00:00
|
|
|
return NULL;
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: TakeValue
|
|
|
|
//
|
|
|
|
// Like CheckValue, except it also removes the parameter and its argument
|
|
|
|
// (if present) from argv.
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
FString DArgs::TakeValue(const char *check)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
int i = CheckParm(check);
|
|
|
|
FString out;
|
|
|
|
|
|
|
|
if (i > 0 && i < (int)Argv.Size())
|
|
|
|
{
|
|
|
|
if (i < (int)Argv.Size() - 1 && Argv[i+1][0] != '+' && Argv[i+1][0] != '-')
|
|
|
|
{
|
|
|
|
out = Argv[i+1];
|
|
|
|
Argv.Delete(i, 2); // Delete the parm and its value.
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Argv.Delete(i); // Just delete the parm, since it has no value.
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return out;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
2010-12-15 16:32:37 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: RemoveArg
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
void DArgs::RemoveArgs(const char *check)
|
|
|
|
{
|
|
|
|
int i = CheckParm(check);
|
|
|
|
|
|
|
|
if (i > 0 && i < (int)Argv.Size() - 1)
|
|
|
|
{
|
|
|
|
do
|
|
|
|
{
|
|
|
|
RemoveArg(i);
|
|
|
|
}
|
|
|
|
while (Argv[i][0] != '+' && Argv[i][0] != '-' && i < (int)Argv.Size() - 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: GetArg
|
|
|
|
//
|
|
|
|
// Gets the argument at a particular position.
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
const char *DArgs::GetArg(int arg) const
|
|
|
|
{
|
|
|
|
return ((unsigned)arg < Argv.Size()) ? Argv[arg].GetChars() : NULL;
|
|
|
|
return Argv[arg];
|
|
|
|
}
|
|
|
|
|
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: GetArgList
|
|
|
|
//
|
|
|
|
// Returns a pointer to the FString at a particular position.
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
FString *DArgs::GetArgList(int arg) const
|
|
|
|
{
|
|
|
|
return ((unsigned)arg < Argv.Size()) ? &Argv[arg] : NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: NumArgs
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
int DArgs::NumArgs() const
|
|
|
|
{
|
|
|
|
return (int)Argv.Size();
|
|
|
|
}
|
|
|
|
|
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: AppendArg
|
|
|
|
//
|
|
|
|
// Adds another argument to argv. Invalidates any previous results from
|
|
|
|
// GetArgList().
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
void DArgs::AppendArg(FString arg)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
Argv.Push(arg);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: AppendArgs
|
|
|
|
//
|
|
|
|
// Adds an array of FStrings to argv.
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
void DArgs::AppendArgs(int argc, const FString *argv)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
if (argv != NULL && argc > 0)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
Argv.Grow(argc);
|
|
|
|
for (int i = 0; i < argc; ++i)
|
|
|
|
{
|
|
|
|
Argv.Push(argv[i]);
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-05-25 07:28:51 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: RemoveArg
|
|
|
|
//
|
|
|
|
// Removes a single argument from argv.
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
void DArgs::RemoveArg(int argindex)
|
|
|
|
{
|
|
|
|
Argv.Delete(argindex);
|
|
|
|
}
|
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: CollectFiles
|
|
|
|
//
|
|
|
|
// Takes all arguments after any instance of -param and any arguments before
|
|
|
|
// all switches that end in .extension and combines them into a single
|
|
|
|
// -switch block at the end of the arguments. If extension is NULL, then
|
|
|
|
// every parameter before the first switch is added after this -param.
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
void DArgs::CollectFiles(const char *param, const char *extension)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
TArray<FString> work;
|
2008-01-27 11:25:03 +00:00
|
|
|
DArgs *out = new DArgs;
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
unsigned int i;
|
|
|
|
size_t extlen = extension == NULL ? 0 : strlen(extension);
|
2008-01-27 11:25:03 +00:00
|
|
|
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
// Step 1: Find suitable arguments before the first switch.
|
|
|
|
i = 1;
|
|
|
|
while (i < Argv.Size() && Argv[i][0] != '-' && Argv[i][0] != '+')
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
bool useit;
|
|
|
|
|
|
|
|
if (extlen > 0)
|
|
|
|
{ // Argument's extension must match.
|
|
|
|
size_t len = Argv[i].Len();
|
|
|
|
useit = (len >= extlen && stricmp(&Argv[i][len - extlen], extension) == 0);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // Anything will do so long as it's before the first switch.
|
|
|
|
useit = true;
|
|
|
|
}
|
|
|
|
if (useit)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
work.Push(Argv[i]);
|
|
|
|
Argv.Delete(i);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
i++;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
|
|
|
|
// Step 2: Find each occurence of -param and add its arguments to work.
|
|
|
|
while ((i = CheckParm(param, i)) > 0)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
Argv.Delete(i);
|
|
|
|
while (i < Argv.Size() && Argv[i][0] != '-' && Argv[i][0] != '+')
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
work.Push(Argv[i]);
|
|
|
|
Argv.Delete(i);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
- Update to ZDoom r2187:
- Yet another piece of essentially broken code that has to go back in because some people had to abuse it:
Reinstated Doom's original code that made projectiles with the MF_NOCLIP flag set continue to exist even
though the movement itself was never properly handled.
Fortunately the game mode check formerly associated with this can be removed because none of the other games have
any projectiles using MF_NOCLIP so at least it's no longer restricted to Doom...
- The console separator bars now get converted to something printable in Unicode for the log.
- Fixed: Only the last line of multi-line log output received Unicode treatment.
- Add the game log to the crash report. I don't know why I didn't think to do this sooner.
Since we're already sending everything to a rich edit control hidden in the background,
we can just grab its contents for the report.
- Use code page 1252 when previewing text files in the crash dialog.
- Everything on the command line before the first switch with an unrecognized switch is
now added to -file. This was previously restricted to only .wad, .zip, .pk3, and .txt.
- You can now pass -file/-deh/-bex more than once on the command line, and they will all
have effect.
- Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.
- Fixed: DrawHudText() needs to verify that the character glyph is valid before accessing
its fields.
- V_GetFont() needs to check the font header.
- Added BMF (ByteMap Font) support. This was complicated somewhat by the fact that BMF can
specify a character advance separately from the glyph width. GetChar and GetCharWidth now
return this value in place of the glyph width. (For non-BMF fonts, these should still
return the same values as before.)
- Added A_CheckSightOrRange, with changes.
- Explicitly setting the charset for the EM_SETCHARFORMAT message seems to do what I want.
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright
notice where the copyright symbol appears as ? (halfwidth katakana small U) with code page 932.
- Change the log window to use DejaVu Sans instead of Bitstream Vera Sans, because
Silverex's X-Chat comes with the former now. Unfortunately, I can't seem to actually
set the font when my system default code page is 932, since it wants to use some Kanji-
compatible font instead. I wonder if I can still use the Unicode RichEdit control with
Windows 9x. (Does it even matter? Windows 9x users make up less than 0.1% of all visitors
to zdoom.org these days.)
- Added -nostartup switch to disable the more graphical startup screens of Heretic, Hexen,
and Strife.
- Pretty sure the minimum FMOD version is 4.22.
- added an option to disable player translations in single player games.
- added a file 'fmod_version.txt' so that the source always comes with the information which FMod version to use.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@743 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-04 10:16:08 +00:00
|
|
|
|
|
|
|
// Step 3: Add work back to Argv, as long as it's non-empty.
|
|
|
|
if (work.Size() > 0)
|
|
|
|
{
|
|
|
|
Argv.Push(param);
|
|
|
|
AppendArgs(work.Size(), &work[0]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//===========================================================================
|
|
|
|
//
|
|
|
|
// DArgs :: GatherFiles
|
|
|
|
//
|
|
|
|
// Returns all the arguments after the first instance of -param. If you want
|
|
|
|
// to combine more than one or get switchless stuff included, you need to
|
|
|
|
// call CollectFiles first.
|
|
|
|
//
|
|
|
|
//===========================================================================
|
|
|
|
|
|
|
|
DArgs *DArgs::GatherFiles(const char *param) const
|
|
|
|
{
|
|
|
|
FString *files;
|
|
|
|
int filecount;
|
|
|
|
|
|
|
|
filecount = CheckParmList(param, &files);
|
|
|
|
return new DArgs(filecount, files);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|