OpenTTD: src/game/game_scanner.hpp Source File

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

game_scanner.hpp
Go to the documentation of this file.
1 /* $Id: game_scanner.hpp 26487 2014-04-23 21:16:58Z rubidium $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
8 */
9
12 #ifndef GAME_SCANNER_HPP
13 #define GAME_SCANNER_HPP
14
15 #include "../script/script_scanner.hpp"
16
17 class GameScannerInfo : public ScriptScanner {
18 public:
19 /* virtual */ void Initialize();
20
28 class GameInfo *FindInfo(const char *nameParam, int versionParam, bool force_exact_match);
29
30 protected:
31 /* virtual */ void GetScriptName(ScriptInfo *info, char *name, const char *last);
32 /* virtual */ const char *GetFileName() const { return PATHSEP "info.nut"; }
33 /* virtual */ Subdirectory GetDirectory() const { return GAME_DIR; }
34 /* virtual */ const char *GetScannerName() const { return "Game Scripts"; }
35 /* virtual */ void RegisterAPI(class Squirrel *engine);
36 };
37
38
39 class GameScannerLibrary : public ScriptScanner {
40 public:
41 /* virtual */ void Initialize();
42
49 class GameLibrary *FindLibrary(const char *library, int version);
50
51 protected:
52 /* virtual */ void GetScriptName(ScriptInfo *info, char *name, const char *last);
53 /* virtual */ const char *GetFileName() const { return PATHSEP "library.nut"; }
54 /* virtual */ Subdirectory GetDirectory() const { return GAME_LIBRARY_DIR; }
55 /* virtual */ const char *GetScannerName() const { return "GS Libraries"; }
56 /* virtual */ void RegisterAPI(class Squirrel *engine);
57 };
58
59 #endif /* GAME_SCANNER_HPP */