#include "shared.h"
#include "scriplib.h"
Go to the source code of this file.
Data Structures | |
struct | script_t |
Defines | |
#define | MAX_INCLUDES 2 |
Functions | |
int | GetScriptLine (void) |
static void | AddScriptToStack (const char *filename) |
void | LoadScriptFile (const char *filename) |
void | ParseFromMemory (char *buffer, int size) |
Parses e.g. the entity string that is already stored in memory. | |
static qboolean | EndOfScript (qboolean crossline) |
qboolean | GetToken (qboolean crossline) |
Parses the next token from the current script on the stack and store the result in parsedToken. | |
qboolean | TokenAvailable (void) |
Returns true if there is another token on the line. | |
Variables | |
static script_t | scriptstack [MAX_INCLUDES] |
static script_t * | script |
char | parsedToken [MAX_TOKEN_CHARS] |
Definition in file scriplib.c.
#define MAX_INCLUDES 2 |
Definition at line 44 of file scriplib.c.
Referenced by AddScriptToStack(), and ParseFromMemory().
static void AddScriptToStack | ( | const char * | filename | ) | [static] |
Definition at line 59 of file scriplib.c.
References script_t::buffer, byte, script_t::end_p, script_t::filename, FS_LoadFile(), script_t::line, MAX_INCLUDES, script_t::script_p, Sys_Error(), VERB_LESS, and Verb_Printf().
Referenced by LoadScriptFile().
Definition at line 105 of file scriplib.c.
References script_t::buffer, Com_Printf(), script_t::filename, GetToken(), script_t::line, Mem_Free, qfalse, and Sys_Error().
Referenced by GetToken().
int GetScriptLine | ( | void | ) |
Parses the next token from the current script on the stack and store the result in parsedToken.
[in] | crossline | The next token may not be seperated by comment or newline if this is true - everything must be on the same line |
Definition at line 131 of file scriplib.c.
References script_t::end_p, EndOfScript(), script_t::line, MAX_TOKEN_CHARS, parsedToken, qtrue, script_t::script_p, and Sys_Error().
Referenced by EndOfScript(), ParseBrush(), ParseEntity(), ParseEpair(), and ParseMapEntity().
void LoadScriptFile | ( | const char * | filename | ) |
Definition at line 82 of file scriplib.c.
References AddScriptToStack().
Referenced by LoadMapFile().
void ParseFromMemory | ( | char * | buffer, | |
int | size | |||
) |
Parses e.g. the entity string that is already stored in memory.
Definition at line 91 of file scriplib.c.
References script_t::buffer, script_t::end_p, script_t::filename, script_t::line, MAX_INCLUDES, Q_strncpyz(), script_t::script_p, and Sys_Error().
Referenced by ParseEntities().
qboolean TokenAvailable | ( | void | ) |
Returns true if there is another token on the line.
Definition at line 198 of file scriplib.c.
References script_t::end_p, qfalse, qtrue, and script_t::script_p.
Referenced by ParseBrush().
char parsedToken[MAX_TOKEN_CHARS] |
Definition at line 48 of file scriplib.c.
Referenced by ED_ParseEntities(), GetToken(), ParseBrush(), ParseEntity(), ParseEpair(), and ParseMapEntity().
Definition at line 46 of file scriplib.c.
script_t scriptstack[MAX_INCLUDES] [static] |
Definition at line 45 of file scriplib.c.