home *** CD-ROM | disk | FTP | other *** search
- #include "radio.h"
-
- #define TOKEN struct token_type
- #define p_TOKEN TOKEN *
- #define LINE struct line_type
- #define p_LINE LINE far *
- #define ARG struct arg_type
- #define p_ARG ARG far *
- #define TANK struct tank_type
- #define p_TANK TANK *
- #define LINER struct liner_type
- #define p_LINER LINER *
- #define RESOLVE struct resolve_type
- #define p_RESOLVE RESOLVE *
- #define SYMB struct symbol_type
- #define p_SYMB SYMB *
-
- #define MAXPLAYERS 10
- #define BAD -1
- #define MAXTOKENS 20
-
- #define TANKTILE struct tanktile_type
- #define p_TANKTILE TANKTILE *
-
- TANKTILE {
- int image[4];
- };
-
- TOKEN {
- char token[20];
- };
-
- SYMB {
- TOKEN symbol;
- int memloc;
- p_SYMB next_symbol;
- };
-
- RESOLVE {
-
- TOKEN lineref;
- p_RESOLVE next_resolve;
- };
-
- TANK {
-
- TANKTILE pic[8];
- TANKTILE save;
- int var[50];
- int cpoint;
- int cgpoint;
- int px,py;
- char basefilename[20];
- BOOL boom;
- BOOL jiggle;
- BOOL nomove;
- int bwait;
- p_LINE prog;
- p_LINE cline;
- p_LINE gosub[20];
- int depth;
- int team;
- int nhits;
- int cweapon;
- BOOL hit;
- BOOL automove;
- BOOL autolock;
- BOOL jammer;
- int blockage;
- int channel;
- CHANNEL station;
- DWORD time;
- DWORD died;
- int secs;
- };
-
- LINER {
- p_LINE lineref;
- TOKEN lsymbol;
- p_LINER next_liner;
- };
-
- ARG {
- int atype;
- int value;
- p_LINE linedest;
- };
-
- LINE {
- int command;
- ARG arg1, arg2, arg3, arg4;
- int pline;
- p_LINE nextline;
- };
-
- void fill_structure(TOKEN t[], int nt);
- void parse_line(PSTR l);
- void nuke_argument(p_ARG a);
- void nuke_line_contents(p_LINE l);
- BOOL exist(PSTR s);
- void compile_program(p_TANK t);
- int create_new_player(PSTR s);
- void init_structures(void);
- void add_resolve(p_TOKEN t);
- p_LINE find_lineref(p_TOKEN t);
- p_LINE create_newline(void);
- void add_line(p_TANK t, p_LINE l);
- void add_lineref(p_TOKEN t);
- BOOL parse_arg(p_ARG a, p_TOKEN t);
- void fill_s(p_TOKEN t1);
- void fill_a(p_TOKEN t1);
- void fill_aal(p_TOKEN t1, p_TOKEN t2, p_TOKEN t3);
- void fill_sa(p_TOKEN t1,p_TOKEN t2);
- void fill_l(p_TOKEN t1);
- int find_symbol(p_TOKEN t);
- void add_symbol(p_TOKEN t);
- void check_link(p_ARG a, int pl);
- void resolve_references(p_TANK t);
- void list_symbol_table(void);
- int n_compile_player(p_PLAYER p);
- void free_compiler_ram(void);
- void list_program_structure(p_TANK t);
- void explain_arg(p_ARG a);
- void explain_line(p_LINE l);
- p_TANK get_tank_pointer(int n);
- void create_token(p_TOKEN t, PSTR s);
- void fill_aaa(p_TOKEN t1, p_TOKEN t2, p_TOKEN t3);
- void fill_sss(p_TOKEN t1, p_TOKEN t2, p_TOKEN t3);
- void fill_aas(p_TOKEN t1, p_TOKEN t2, p_TOKEN t3);