Add "echo" def parameter which prints a string to the console and log file.

Syntax: echo "Your text here."

git-svn-id: https://svn.eduke32.com/eduke32@2435 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2012-03-10 09:44:17 +00:00
parent 7bcb4a1faf
commit 96db75dc5e

View file

@ -83,6 +83,7 @@ enum scripttoken_t
T_TILEFROMTEXTURE, T_XOFFSET, T_YOFFSET,
T_INCLUDEDEFAULT,
T_ANIMSOUNDS,
T_ECHO,
};
typedef struct { const char *text; int32_t tokenid; } tokenlist;
@ -197,6 +198,7 @@ static int32_t defsparser(scriptfile *script)
{ "cachesize", T_CACHESIZE },
{ "dummytilefrompic",T_IMPORTTILE },
{ "tilefromtexture", T_TILEFROMTEXTURE },
{ "echo", T_ECHO },
};
while (1)
@ -2017,6 +2019,14 @@ static int32_t defsparser(scriptfile *script)
}
break;
case T_ECHO:
{
char *string = NULL;
scriptfile_getstring(script,&string);
initprintf("%s\n",string);
}
break;
default:
initprintf("Unknown token.\n"); break;
}