From 96db75dc5e939f14a3c019d0cb008e313f60d959 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sat, 10 Mar 2012 09:44:17 +0000 Subject: [PATCH] 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 --- polymer/eduke32/build/src/defs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/polymer/eduke32/build/src/defs.c b/polymer/eduke32/build/src/defs.c index f49b3e537..58951b395 100644 --- a/polymer/eduke32/build/src/defs.c +++ b/polymer/eduke32/build/src/defs.c @@ -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; }