demo stuff, script contexts

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1909 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-05-10 10:17:31 +00:00
parent 5cd58a52f8
commit 87c7755754
8 changed files with 71 additions and 26 deletions
+3 -1
View File
@@ -26,8 +26,10 @@ struct ident
int narg; // ID_VAR, ID_COMMAND
char *action, *executing; // ID_ALIAS
bool persist;
int context;
ident() {}
// ID_VAR
@@ -72,7 +74,7 @@ enum // function signatures for script functions, see command.cpp
ARG_VARI, ARG_VARIW
};
enum { IEXC_CORE = 0, IEXC_FOREIGN, IEXC_NUM }; // script execution context
enum { IEXC_CORE = 0, IEXC_CFG, IEXC_PROMPT, IEXC_MAPCFG, IEXC_NUM }; // script execution context
// nasty macros for registering script functions, abuses globals to avoid excessive infrastructure
#define COMMANDN(name, fun, nargs) static bool __dummy_##fun = addcommand(#name, (void (*)())fun, nargs)