script_suspend.hpp

Go to the documentation of this file.
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_SUSPEND_HPP
00013 #define SCRIPT_SUSPEND_HPP
00014 
00018 typedef void (Script_SuspendCallbackProc)(class ScriptInstance *instance);
00019 
00023 class Script_Suspend {
00024 public:
00030   Script_Suspend(int time, Script_SuspendCallbackProc *callback) :
00031     time(time),
00032     callback(callback)
00033   {}
00034 
00039   int GetSuspendTime() { return time; }
00040 
00045   Script_SuspendCallbackProc *GetSuspendCallback() { return callback; }
00046 
00047 private:
00048   int time;                             
00049   Script_SuspendCallbackProc *callback; 
00050 };
00051 
00052 #endif /* SCRIPT_SUSPEND_HPP */