mirror of
https://github.com/ZDoom/acc.git
synced 2024-11-15 00:41:30 +00:00
Added KILL script type
Added /*.o to .gitignore as well. We don't want people accidentally committing object files from their compiles, now do we?
This commit is contained in:
parent
95888b3cb9
commit
afbec00f36
5 changed files with 10 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -12,3 +12,4 @@
|
||||||
/log
|
/log
|
||||||
/t
|
/t
|
||||||
/zdefs.acs.orig
|
/zdefs.acs.orig
|
||||||
|
/*.o
|
||||||
|
|
6
parse.c
6
parse.c
|
@ -341,6 +341,7 @@ static struct ScriptTypes ScriptCounts[] =
|
||||||
{ "unloading", UNLOADING_SCRIPTS_BASE, 0 },
|
{ "unloading", UNLOADING_SCRIPTS_BASE, 0 },
|
||||||
{ "return", RETURN_SCRIPTS_BASE, 0 },
|
{ "return", RETURN_SCRIPTS_BASE, 0 },
|
||||||
{ "event", EVENT_SCRIPTS_BASE, 0 },
|
{ "event", EVENT_SCRIPTS_BASE, 0 },
|
||||||
|
{ "kill", KILL_SCRIPTS_BASE, 0 },
|
||||||
{ NULL, -1, 0 }
|
{ NULL, -1, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -670,6 +671,7 @@ static void OuterScript(void)
|
||||||
case TK_LIGHTNING:
|
case TK_LIGHTNING:
|
||||||
case TK_UNLOADING:
|
case TK_UNLOADING:
|
||||||
case TK_RETURN:
|
case TK_RETURN:
|
||||||
|
case TK_KILL:
|
||||||
ERR_Error(ERR_UNCLOSED_WITH_ARGS, YES);
|
ERR_Error(ERR_UNCLOSED_WITH_ARGS, YES);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -744,6 +746,10 @@ static void OuterScript(void)
|
||||||
ERR_Error (ERR_EVENT_NEEDS_3_ARG, YES);
|
ERR_Error (ERR_EVENT_NEEDS_3_ARG, YES);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case TK_KILL: // [JM]
|
||||||
|
scriptType = KILL_SCRIPTS_BASE;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ERR_Error(ERR_BAD_SCRIPT_DECL, YES);
|
ERR_Error(ERR_BAD_SCRIPT_DECL, YES);
|
||||||
SkipBraceBlock(0);
|
SkipBraceBlock(0);
|
||||||
|
|
1
pcode.h
1
pcode.h
|
@ -31,6 +31,7 @@ enum
|
||||||
DISCONNECT_SCRIPTS_BASE = 14,
|
DISCONNECT_SCRIPTS_BASE = 14,
|
||||||
RETURN_SCRIPTS_BASE = 15,
|
RETURN_SCRIPTS_BASE = 15,
|
||||||
EVENT_SCRIPTS_BASE = 16, // [BB]
|
EVENT_SCRIPTS_BASE = 16, // [BB]
|
||||||
|
KILL_SCRIPTS_BASE = 17, // [JM]
|
||||||
};
|
};
|
||||||
|
|
||||||
// Values to indicate script flags (requires new-style .o)
|
// Values to indicate script flags (requires new-style .o)
|
||||||
|
|
1
token.c
1
token.c
|
@ -199,6 +199,7 @@ static struct keyword_s
|
||||||
{ "strcpy", TK_STRCPY }, // [FDARI]
|
{ "strcpy", TK_STRCPY }, // [FDARI]
|
||||||
{ "region", TK_REGION }, // [mxd]
|
{ "region", TK_REGION }, // [mxd]
|
||||||
{ "endregion", TK_ENDREGION }, // [mxd]
|
{ "endregion", TK_ENDREGION }, // [mxd]
|
||||||
|
{ "kill", TK_KILL }, // [JM]
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NUM_KEYWORDS (sizeof(Keywords)/sizeof(Keywords[0]))
|
#define NUM_KEYWORDS (sizeof(Keywords)/sizeof(Keywords[0]))
|
||||||
|
|
1
token.h
1
token.h
|
@ -134,6 +134,7 @@ typedef enum
|
||||||
TK_STRCPY, // 'strcpy'
|
TK_STRCPY, // 'strcpy'
|
||||||
TK_REGION, // 'region' [mxd]
|
TK_REGION, // 'region' [mxd]
|
||||||
TK_ENDREGION, // 'endregion' [mxd]
|
TK_ENDREGION, // 'endregion' [mxd]
|
||||||
|
TK_KILL, // 'kill' [JM]
|
||||||
} tokenType_t;
|
} tokenType_t;
|
||||||
|
|
||||||
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
|
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue