From 3bd383baf6a17e734329e1fc677c7e86283db772 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Mon, 26 Oct 2015 22:52:36 +0800 Subject: Added support for relative line numbers. Added instructions for, brk and cont. (They are still untested...) Parser code cleanup. Removed garbage output to stderr. Reorganize the repository structure. Updated BLR2 code move it into archive. Added BLR1 files. --- hgehelp/parser.h | 77 -------------------------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 hgehelp/parser.h (limited to 'hgehelp/parser.h') diff --git a/hgehelp/parser.h b/hgehelp/parser.h deleted file mode 100644 index c33ff11..0000000 --- a/hgehelp/parser.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -** Haaf's Game Engine 1.7 -** Copyright (C) 2003-2007, Relish Games -** hge.relishgames.com -** -** Resource script parser header -*/ - -#ifndef HGEPARSER_H -#define HGEPARSER_H - - -#include "hge.h" -#include -#include - - -enum -{ - TTNONE, TTEND, TTNUMBER, TTSTRING, - - TTBOOL, TTEQUALS, TTBASED, TTSEPARATOR, TTOPENBLOCK, TTCLOSEBLOCK, - - TTRES__FIRST, - TTRES_INCLUDE, TTRES_RESOURCE, TTRES_TEXTURE, TTRES_SOUND, TTRES_MUSIC, - TTRES_STREAM, TTRES_TARGET, TTRES_SPRITE, TTRES_ANIMATION, TTRES_FONT, - TTRES_PARTICLE, TTRES_DISTORT, TTRES_STRTABLE, - TTRES__LAST, - - TTPAR__FIRST, - TTPAR_FILENAME, TTPAR_RESGROUP, TTPAR_MIPMAP, TTPAR_AMPLIFY, TTPAR_SIZE, TTPAR_ZBUFFER, - TTPAR_TEXTURE, TTPAR_RECT, TTPAR_HOTSPOT, TTPAR_BLENDMODE, TTPAR_COLOR, - TTPAR_ZORDER, TTPAR_FLIP, TTPAR_SCALE, TTPAR_PROPORTION, TTPAR_ROTATION, TTPAR_FRAMES, - TTPAR_FPS, TTPAR_MODE, TTPAR_TRACKING, TTPAR_SPACING, TTPAR_SPRITE, TTPAR_MESH, - TTPAR__LAST, - - TTCON__FIRST, - TTCON_COLORMUL, TTCON_COLORADD, TTCON_ALPHABLND, TTCON_ALPHAADD, TTCON_ZWRITE, - TTCON_NOZWRITE, TTCON_FORWARD, TTCON_REVERSE, TTCON_PINGPONG, TTCON_NOPINGPONG, - TTCON_LOOP, TTCON_NOLOOP, TTCON_CIRCLE, TTCON_RECT, TTCON_ALPHA, - TTCON__LAST -}; - - -class RScriptParser -{ -public: - RScriptParser(char *name, char *scr); - ~RScriptParser() { hge->Release(); } - - int get_token(); - void put_back() { script-=strlen(tokenvalue); } - int get_line() { return line;} - char* get_name() { return scriptname;} - - char* tkn_string() { return tokenvalue; } - int tkn_int() { return atoi(tokenvalue); } - float tkn_float() { return (float)atof(tokenvalue); } - bool tkn_bool() { return (tokenvalue[0]=='t' || tokenvalue[0]=='T') ? true : false; } - DWORD tkn_hex(); - - void ScriptPostError(const char *msg1, const char *msg2); - - int tokentype; - char tokenvalue[128]; - char* script; - char* scriptname; - int line; - -private: - bool strtkcmp(const char *str, const char *mem); - - static HGE *hge; -}; - - -#endif -- cgit v1.2.3