mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
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:
parent
7bcb4a1faf
commit
96db75dc5e
1 changed files with 10 additions and 0 deletions
|
@ -83,6 +83,7 @@ enum scripttoken_t
|
||||||
T_TILEFROMTEXTURE, T_XOFFSET, T_YOFFSET,
|
T_TILEFROMTEXTURE, T_XOFFSET, T_YOFFSET,
|
||||||
T_INCLUDEDEFAULT,
|
T_INCLUDEDEFAULT,
|
||||||
T_ANIMSOUNDS,
|
T_ANIMSOUNDS,
|
||||||
|
T_ECHO,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct { const char *text; int32_t tokenid; } tokenlist;
|
typedef struct { const char *text; int32_t tokenid; } tokenlist;
|
||||||
|
@ -197,6 +198,7 @@ static int32_t defsparser(scriptfile *script)
|
||||||
{ "cachesize", T_CACHESIZE },
|
{ "cachesize", T_CACHESIZE },
|
||||||
{ "dummytilefrompic",T_IMPORTTILE },
|
{ "dummytilefrompic",T_IMPORTTILE },
|
||||||
{ "tilefromtexture", T_TILEFROMTEXTURE },
|
{ "tilefromtexture", T_TILEFROMTEXTURE },
|
||||||
|
{ "echo", T_ECHO },
|
||||||
};
|
};
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
|
@ -2017,6 +2019,14 @@ static int32_t defsparser(scriptfile *script)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case T_ECHO:
|
||||||
|
{
|
||||||
|
char *string = NULL;
|
||||||
|
scriptfile_getstring(script,&string);
|
||||||
|
initprintf("%s\n",string);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
initprintf("Unknown token.\n"); break;
|
initprintf("Unknown token.\n"); break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue