OpenTTD
squirrel_std.hpp
Go to the documentation of this file.
1 /* $Id: squirrel_std.hpp 24900 2013-01-08 22:46:42Z planetmaker $ */
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 SQUIRREL_STD_HPP
13 #define SQUIRREL_STD_HPP
14 
15 #include "squirrel.hpp"
16 
17 #if defined(__APPLE__)
18 /* Which idiotic system makes 'require' a macro? :s Oh well.... */
19 #undef require
20 #endif /* __APPLE__ */
21 
28 class SquirrelStd {
29 public:
30 
34  static SQInteger min(HSQUIRRELVM vm);
35 
39  static SQInteger max(HSQUIRRELVM vm);
40 
46  static SQInteger require(HSQUIRRELVM vm);
47 
51  static SQInteger notifyallexceptions(HSQUIRRELVM vm);
52 };
53 
57 void squirrel_register_std(Squirrel *engine);
58 
64 
65 #endif /* SQUIRREL_STD_HPP */