- Unlimited the monster pain sounds in Hexen after playing as the Cleric a

while and killing centaurs with the flechette.
- Fixed: Moving to an old level in a hub caused the old player's inventory to
  spawn owned by the current player (but still hanging off the old player), so
  the game would hang when trying to delete it.
- Modified re2c so that it doesn't add a date to the file it generates. Thus,
  if it regenerates a file during a full rebuild, SVN won't see it as a change.
  Also updated it to 0.10.5.
- Fixed: SC_GetString() did not properly terminate sc_String when the last
  token in the file had no white space after it. Since I could not actually
  find the problem (it works fine in debug mode and I saw no logic errors),
  I decided to take this opportunity to reimplement it using an re2c-generated
  scanner. Now it's 1.6x faster than before and correctness is easier to
  verify.
- Fixed: FMODSoundRenderer::Shutdown() also needs to reset NumChannels.
- Added back the Manifest to zdoom.rc for non-VC8 Windows compilers.
- Fixed MinGW compilation again. Now it uses the same method as Makefile.linux
  to find all the source files so that it doesn't need to be manually updated
  each time source files are added or removed.
- Added the SVN revision number to the version string. A new tool is used to
  obtain this information from the svnversion command and write it into a
  header file. If you don't have the svn command line tools installed or didn't
  check it out from the repository, you can still build. I added some rules for
  this to Makefile.linux, and I assume they work because they do for
  Makefile.mingw.
- Fixed: MIDISong2 did not delete MusHeader in its destructor.


SVN r200 (trunk)
This commit is contained in:
Randy Heit 2006-06-20 20:30:39 +00:00
commit c54f2f66fc
32 changed files with 3116 additions and 2537 deletions

View file

@ -20,6 +20,7 @@
#include "w_wad.h"
#include "cmdlib.h"
#include "m_misc.h"
#include "templates.h"
// MACROS ------------------------------------------------------------------
@ -263,8 +264,7 @@ void SC_SetEscape (bool esc)
BOOL SC_GetString ()
{
char *text;
BOOL foundToken;
char *marker, *tok;
CheckOpen();
if (AlreadyGot)
@ -272,154 +272,16 @@ BOOL SC_GetString ()
AlreadyGot = false;
return true;
}
foundToken = false;
sc_Crossed = false;
if (ScriptPtr >= ScriptEndPtr)
{
sc_End = true;
return false;
}
while (foundToken == false)
{
while (ScriptPtr < ScriptEndPtr && *ScriptPtr <= ' ')
{
if (*ScriptPtr++ == '\n')
{
sc_Line++;
sc_Crossed = true;
}
}
if (ScriptPtr >= ScriptEndPtr)
{
sc_End = true;
return false;
}
if ((CMode || *ScriptPtr != ASCII_COMMENT) &&
!(ScriptPtr[0] == CPP_COMMENT && ScriptPtr < ScriptEndPtr - 1 &&
(ScriptPtr[1] == CPP_COMMENT || ScriptPtr[1] == C_COMMENT)))
{ // Found a token
foundToken = true;
}
else
{ // Skip comment
if (ScriptPtr[0] == CPP_COMMENT && ScriptPtr[1] == C_COMMENT)
{ // C comment
while (ScriptPtr[0] != C_COMMENT || ScriptPtr[1] != CPP_COMMENT)
{
if (ScriptPtr[0] == '\n')
{
sc_Line++;
sc_Crossed = true;
}
ScriptPtr++;
if (ScriptPtr >= ScriptEndPtr - 1)
{
sc_End = true;
return false;
}
}
ScriptPtr += 2;
}
else
{ // C++ comment
while (*ScriptPtr++ != '\n')
{
if (ScriptPtr >= ScriptEndPtr)
{
sc_End = true;
return false;
}
}
sc_Line++;
sc_Crossed = true;
}
}
}
text = sc_String;
if (*ScriptPtr == ASCII_QUOTE)
{ // Quoted string
ScriptPtr++;
while (*ScriptPtr != ASCII_QUOTE)
{
// Hack alert: Do not allow escaped quotation marks when parsing DECORATE!
if (*ScriptPtr=='\\' && ScriptPtr[1]=='"' && Escape)
{
*text++ = '"';
ScriptPtr+=2;
}
else
{
*text++ = *ScriptPtr++;
}
if (ScriptPtr == ScriptEndPtr
|| text == &sc_String[MAX_STRING_SIZE-1])
{
break;
}
}
ScriptPtr++;
}
else
{ // Normal string
static const char *stopchars;
if (CMode)
{
stopchars = CMODE_STOPCHARS;
// '-' can be its own token, or it can be part of a negative number
if (*ScriptPtr == '-')
{
*text++ = '-';
ScriptPtr++;
if (ScriptPtr < ScriptEndPtr && *ScriptPtr >= '0' && *ScriptPtr <= '9')
{
stopchars = CMODE_STOPCHARS_NODECIMAL;
goto grabtoken;
}
goto gottoken;
}
else if (*ScriptPtr >= '0' && *ScriptPtr <= '9')
{
stopchars = CMODE_STOPCHARS_NODECIMAL;
}
else if (*ScriptPtr == '.' && ScriptPtr[1] >= '0' && ScriptPtr[1] <= '9')
{
stopchars = CMODE_STOPCHARS_NODECIMAL;
}
}
else
{
stopchars = NORMAL_STOPCHARS;
}
if (strchr (stopchars, *ScriptPtr))
{
*text++ = *ScriptPtr++;
// [GRB] Allow 2-char operators
if (CMode && strchr ("&=|<>", *ScriptPtr))
*text++ = *ScriptPtr++;
}
else
{
grabtoken:
while ((*ScriptPtr > ' ') && (strchr (stopchars, *ScriptPtr) == NULL)
&& (CMode || *ScriptPtr != ASCII_COMMENT)
&& !(ScriptPtr[0] == CPP_COMMENT && (ScriptPtr < ScriptEndPtr - 1) &&
(ScriptPtr[1] == CPP_COMMENT || ScriptPtr[1] == C_COMMENT)))
{
*text++ = *ScriptPtr++;
if (ScriptPtr == ScriptEndPtr
|| text == &sc_String[MAX_STRING_SIZE-1])
{
break;
}
}
}
}
gottoken:
*text = 0;
sc_StringLen = text - sc_String;
return true;
// In case the generated scanner does not use marker, avoid compiler warnings.
marker;
#include "sc_man_scanner.h"
}
//==========================================================================