mirror of
https://github.com/ZDoom/acc.git
synced 2024-11-23 04:12:32 +00:00
Added REOPEN script
This commit is contained in:
parent
2c3a499c67
commit
7d78c58a0a
4 changed files with 9 additions and 0 deletions
6
parse.c
6
parse.c
|
@ -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);
|
||||
|
|
1
pcode.h
1
pcode.h
|
@ -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)
|
||||
|
|
1
token.c
1
token.c
|
@ -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]))
|
||||
|
|
1
token.h
1
token.h
|
@ -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 ----------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue