#ifndef SCRIPT_H #define SCRIPT_H #include #include #include #define filllines(lines) commands.insert(commands.end(), lines, lines + SDL_arraysize(lines)) struct Script { std::string name; std::vector contents; }; #define NUM_SCRIPT_ARGS 40 class scriptclass { public: scriptclass(void); void load(const std::string& name); void loadother(const char* t); void loadcustom(const std::string& t); void inline add(const std::string& t) { commands.push_back(t); } void clearcustom(void); void tokenize(const std::string& t); void run(void); void resetgametomenu(void); void startgamemode(int t); void teleport(void); void hardreset(void); //Script contents std::vector commands; std::string words[NUM_SCRIPT_ARGS]; std::vector txt; std::string scriptname; int position; int looppoint, loopcount; int scriptdelay; bool running; //Textbox stuff int textx; int texty; int r,g,b; bool textflipme; //Misc int i, j, k; //Custom level stuff std::vector