- Add proper support for line specials that don't fit in a byte.

SVN r3408 (trunk)
This commit is contained in:
Randy Heit 2012-03-08 22:24:00 +00:00
parent caa7fbc0c4
commit 3386968b3d
3 changed files with 7 additions and 1 deletions

View file

@ -180,6 +180,7 @@ static struct
{ ERR_SCRIPT_NAMED_NONE, "Scripts may not be named \"None\"." },
{ ERR_HEXEN_COMPAT, "Attempt to use feature not supported by Hexen." },
{ ERR_NOT_HEXEN, "Cannot save; new features are not compatible with Hexen." },
{ ERR_SPECIAL_RANGE, "Line specials with values higher than 255 require #nocompact." },
{ ERR_NONE, NULL }
};

View file

@ -148,6 +148,7 @@ typedef enum
ERR_SCRIPT_NAMED_NONE,
ERR_HEXEN_COMPAT,
ERR_NOT_HEXEN,
ERR_SPECIAL_RANGE,
} error_t;
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------

View file

@ -1545,7 +1545,7 @@ static void LeadingLineSpecial(boolean executewait)
int argCountMin;
int argCountMax;
int argSave[8];
U_BYTE specialValue;
U_INT specialValue;
boolean direct;
MS_Message(MSG_DEBUG, "---- LeadingLineSpecial ----\n");
@ -1620,6 +1620,10 @@ static void LeadingLineSpecial(boolean executewait)
}
else
{
if (specialValue > 255)
{
ERR_Error(ERR_SPECIAL_RANGE, YES);
}
PC_AppendByte(specialValue);
}
if(executewait)