Added REOPEN script

This commit is contained in:
nashmuhandes 2016-08-29 23:07:26 +08:00
parent 2c3a499c67
commit 7d78c58a0a
4 changed files with 9 additions and 0 deletions

View file

@ -342,6 +342,7 @@ static struct ScriptTypes ScriptCounts[] =
{ "return", RETURN_SCRIPTS_BASE, 0 },
{ "event", EVENT_SCRIPTS_BASE, 0 },
{ "kill", KILL_SCRIPTS_BASE, 0 },
{ "reopen", REOPEN_SCRIPTS_BASE, 0 },
{ NULL, -1, 0 }
};
@ -672,6 +673,7 @@ static void OuterScript(void)
case TK_UNLOADING:
case TK_RETURN:
case TK_KILL:
case TK_REOPEN:
ERR_Error(ERR_UNCLOSED_WITH_ARGS, YES);
break;
@ -750,6 +752,10 @@ static void OuterScript(void)
scriptType = KILL_SCRIPTS_BASE;
break;
case TK_REOPEN: // [Nash]
scriptType = REOPEN_SCRIPTS_BASE;
break;
default:
ERR_Error(ERR_BAD_SCRIPT_DECL, YES);
SkipBraceBlock(0);

View file

@ -32,6 +32,7 @@ enum
RETURN_SCRIPTS_BASE = 15,
EVENT_SCRIPTS_BASE = 16, // [BB]
KILL_SCRIPTS_BASE = 17, // [JM]
REOPEN_SCRIPTS_BASE = 18, // [Nash]
};
// Values to indicate script flags (requires new-style .o)

View file

@ -200,6 +200,7 @@ static struct keyword_s
{ "region", TK_REGION }, // [mxd]
{ "endregion", TK_ENDREGION }, // [mxd]
{ "kill", TK_KILL }, // [JM]
{ "reopen", TK_REOPEN }, // [Nash]
};
#define NUM_KEYWORDS (sizeof(Keywords)/sizeof(Keywords[0]))

View file

@ -135,6 +135,7 @@ typedef enum
TK_REGION, // 'region' [mxd]
TK_ENDREGION, // 'endregion' [mxd]
TK_KILL, // 'kill' [JM]
TK_REOPEN, // 'reopen' [Nash]
} tokenType_t;
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------