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:
Jordon Moss 2016-07-23 05:16:49 -03:00 committed by Christoph Oelckers
parent 95888b3cb9
commit afbec00f36
5 changed files with 10 additions and 0 deletions

1
.gitignore vendored
View file

@ -12,3 +12,4 @@
/log
/t
/zdefs.acs.orig
/*.o

View file

@ -341,6 +341,7 @@ static struct ScriptTypes ScriptCounts[] =
{ "unloading", UNLOADING_SCRIPTS_BASE, 0 },
{ "return", RETURN_SCRIPTS_BASE, 0 },
{ "event", EVENT_SCRIPTS_BASE, 0 },
{ "kill", KILL_SCRIPTS_BASE, 0 },
{ NULL, -1, 0 }
};
@ -670,6 +671,7 @@ static void OuterScript(void)
case TK_LIGHTNING:
case TK_UNLOADING:
case TK_RETURN:
case TK_KILL:
ERR_Error(ERR_UNCLOSED_WITH_ARGS, YES);
break;
@ -743,6 +745,10 @@ static void OuterScript(void)
scriptType = EVENT_SCRIPTS_BASE;
ERR_Error (ERR_EVENT_NEEDS_3_ARG, YES);
break;
case TK_KILL: // [JM]
scriptType = KILL_SCRIPTS_BASE;
break;
default:
ERR_Error(ERR_BAD_SCRIPT_DECL, YES);

View file

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

View file

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

View file

@ -134,6 +134,7 @@ typedef enum
TK_STRCPY, // 'strcpy'
TK_REGION, // 'region' [mxd]
TK_ENDREGION, // 'endregion' [mxd]
TK_KILL, // 'kill' [JM]
} tokenType_t;
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------