00001 /* $Id$ */ 00002 00003 /* 00004 * This file is part of OpenTTD. 00005 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. 00006 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00007 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. 00008 */ 00009 00012 #ifndef SCRIPT_SCANNER_HPP 00013 #define SCRIPT_SCANNER_HPP 00014 00015 #include "../fileio_type.h" 00016 00018 class ScriptScanner { 00019 public: 00020 ScriptScanner(); 00021 ~ScriptScanner(); 00022 00026 class Squirrel *GetEngine() { return this->engine; } 00027 00031 const char *GetMainScript() { return this->main_script; } 00032 00038 void ScanScriptDir(const char *info_file_name, Subdirectory search_dir); 00039 00040 private: 00044 void ScanDir(const char *dirname, const char *info_file_name); 00045 00046 protected: 00047 class Squirrel *engine; 00048 char main_script[1024]; 00049 }; 00050 00051 #endif /* SCRIPT_SCANNER_HPP */