|
1 |
| -// vi: set ts=4 sw=4 : |
2 |
| -// vim: set tw=75 : |
3 |
| - |
4 |
| -// engine_t.h - The engine_t type |
5 |
| - |
6 |
| -/* |
7 |
| - * Copyright (c) 2001-2006 Will Day <[email protected]> |
8 |
| - * |
9 |
| - * This file is part of Metamod. |
10 |
| - * |
11 |
| - * Metamod is free software; you can redistribute it and/or modify it |
12 |
| - * under the terms of the GNU General Public License as published by the |
13 |
| - * Free Software Foundation; either version 2 of the License, or (at |
14 |
| - * your option) any later version. |
15 |
| - * |
16 |
| - * Metamod is distributed in the hope that it will be useful, but |
17 |
| - * WITHOUT ANY WARRANTY; without even the implied warranty of |
18 |
| - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
19 |
| - * General Public License for more details. |
20 |
| - * |
21 |
| - * You should have received a copy of the GNU General Public License |
22 |
| - * along with Metamod; if not, write to the Free Software Foundation, |
23 |
| - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 |
| - * |
25 |
| - * In addition, as a special exception, the author gives permission to |
26 |
| - * link the code of this program with the Half-Life Game Engine ("HL |
27 |
| - * Engine") and Modified Game Libraries ("MODs") developed by Valve, |
28 |
| - * L.L.C ("Valve"). You must obey the GNU General Public License in all |
29 |
| - * respects for all of the code used other than the HL Engine and MODs |
30 |
| - * from Valve. If you modify this file, you may extend this exception |
31 |
| - * to your version of the file, but you are not obligated to do so. If |
32 |
| - * you do not wish to do so, delete this exception statement from your |
33 |
| - * version. |
34 |
| - * |
35 |
| - */ |
36 |
| - |
37 |
| -#ifndef MM_ENGINE_T_H |
38 |
| -#define MM_ENGINE_T_H |
39 |
| - |
40 |
| -#include "eiface.h" // engfuncs_t, globalvars_t |
41 |
| -#include "engineinfo.h" // EngineInfo |
42 |
| - |
43 |
| - |
44 |
| -// Our structure for storing engine references. |
45 |
| -struct engine_t { |
46 |
| - engine_t(); |
47 |
| - engine_t(const engine_t&); |
48 |
| - engine_t& operator=(const engine_t&); |
49 |
| - |
50 |
| - enginefuncs_t *funcs; // engine funcs |
51 |
| - globalvars_t *globals; // engine globals |
52 |
| - enginefuncs_t *pl_funcs; // "modified" eng funcs we give to plugins |
53 |
| - EngineInfo info; // some special info elements |
54 |
| -}; |
55 |
| - |
56 |
| -inline engine_t::engine_t() |
57 |
| - : funcs(NULL), globals(NULL), pl_funcs(NULL), info() |
58 |
| -{ |
59 |
| -} |
60 |
| - |
61 |
| - |
62 |
| -inline engine_t::engine_t(const engine_t& _rhs) |
63 |
| - : funcs(_rhs.funcs), globals(_rhs.globals), pl_funcs(_rhs.pl_funcs), info(_rhs.info) |
64 |
| -{ |
65 |
| -} |
66 |
| - |
67 |
| - |
68 |
| -inline engine_t& engine_t::operator=(const engine_t& _rhs) |
69 |
| -{ |
70 |
| - funcs = _rhs.funcs; |
71 |
| - globals = _rhs.globals; |
72 |
| - pl_funcs = _rhs.pl_funcs; |
73 |
| - info = _rhs.info; |
74 |
| - return *this; |
75 |
| -} |
76 |
| - |
77 |
| - |
78 |
| -extern engine_t Engine; |
79 |
| - |
80 |
| -#endif /* MM_ENGINE_T_H */ |
81 |
| -
|
| 1 | +// vi: set ts=4 sw=4 : |
| 2 | +// vim: set tw=75 : |
| 3 | + |
| 4 | +// engine_t.h - The engine_t type |
| 5 | + |
| 6 | +/* |
| 7 | + * Copyright (c) 2001-2006 Will Day <[email protected]> |
| 8 | + * |
| 9 | + * This file is part of Metamod. |
| 10 | + * |
| 11 | + * Metamod is free software; you can redistribute it and/or modify it |
| 12 | + * under the terms of the GNU General Public License as published by the |
| 13 | + * Free Software Foundation; either version 2 of the License, or (at |
| 14 | + * your option) any later version. |
| 15 | + * |
| 16 | + * Metamod is distributed in the hope that it will be useful, but |
| 17 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 19 | + * General Public License for more details. |
| 20 | + * |
| 21 | + * You should have received a copy of the GNU General Public License |
| 22 | + * along with Metamod; if not, write to the Free Software Foundation, |
| 23 | + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 24 | + * |
| 25 | + * In addition, as a special exception, the author gives permission to |
| 26 | + * link the code of this program with the Half-Life Game Engine ("HL |
| 27 | + * Engine") and Modified Game Libraries ("MODs") developed by Valve, |
| 28 | + * L.L.C ("Valve"). You must obey the GNU General Public License in all |
| 29 | + * respects for all of the code used other than the HL Engine and MODs |
| 30 | + * from Valve. If you modify this file, you may extend this exception |
| 31 | + * to your version of the file, but you are not obligated to do so. If |
| 32 | + * you do not wish to do so, delete this exception statement from your |
| 33 | + * version. |
| 34 | + * |
| 35 | + */ |
| 36 | + |
| 37 | +#ifndef MM_ENGINE_T_H |
| 38 | +#define MM_ENGINE_T_H |
| 39 | + |
| 40 | +#include "eiface.h" // engfuncs_t, globalvars_t |
| 41 | +#include "engineinfo.h" // EngineInfo |
| 42 | + |
| 43 | + |
| 44 | +// Our structure for storing engine references. |
| 45 | +struct engine_t { |
| 46 | + engine_t(); |
| 47 | + engine_t(const engine_t&); |
| 48 | + engine_t& operator=(const engine_t&); |
| 49 | + |
| 50 | + enginefuncs_t *funcs; // engine funcs |
| 51 | + globalvars_t *globals; // engine globals |
| 52 | + enginefuncs_t *pl_funcs; // "modified" eng funcs we give to plugins |
| 53 | + EngineInfo info; // some special info elements |
| 54 | +}; |
| 55 | + |
| 56 | +inline engine_t::engine_t() |
| 57 | + : funcs(NULL), globals(NULL), pl_funcs(NULL), info() |
| 58 | +{ |
| 59 | +} |
| 60 | + |
| 61 | + |
| 62 | +inline engine_t::engine_t(const engine_t& _rhs) |
| 63 | + : funcs(_rhs.funcs), globals(_rhs.globals), pl_funcs(_rhs.pl_funcs), info(_rhs.info) |
| 64 | +{ |
| 65 | +} |
| 66 | + |
| 67 | + |
| 68 | +inline engine_t& engine_t::operator=(const engine_t& _rhs) |
| 69 | +{ |
| 70 | + funcs = _rhs.funcs; |
| 71 | + globals = _rhs.globals; |
| 72 | + pl_funcs = _rhs.pl_funcs; |
| 73 | + info = _rhs.info; |
| 74 | + return *this; |
| 75 | +} |
| 76 | + |
| 77 | + |
| 78 | +extern engine_t Engine; |
| 79 | + |
| 80 | +#endif /* MM_ENGINE_T_H */ |
| 81 | + |
0 commit comments