1 | /* |
---|
2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
3 | * > www.orxonox.net < |
---|
4 | * |
---|
5 | * |
---|
6 | * License notice: |
---|
7 | * |
---|
8 | * This program is free software; you can redistribute it and/or |
---|
9 | * modify it under the terms of the GNU General Public License |
---|
10 | * as published by the Free Software Foundation; either version 2 |
---|
11 | * of the License, or (at your option) any later version. |
---|
12 | * |
---|
13 | * This program is distributed in the hope that it will be useful, |
---|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | * GNU General Public License for more details. |
---|
17 | * |
---|
18 | * You should have received a copy of the GNU General Public License |
---|
19 | * along with this program; if not, write to the Free Software |
---|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
21 | * |
---|
22 | * Author: |
---|
23 | * Dumeni Manatschal, (C) 2007 |
---|
24 | * Oliver Scheuss, (C) 2007 |
---|
25 | * Co-authors: |
---|
26 | * ... |
---|
27 | * |
---|
28 | */ |
---|
29 | |
---|
30 | |
---|
31 | |
---|
32 | // ================ template spezialisation |
---|
33 | |
---|
34 | |
---|
35 | namespace orxonox{ |
---|
36 | |
---|
37 | template <> void Synchronisable::registerVariable( const ColourValue& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional) |
---|
38 | { |
---|
39 | registerVariable(variable.r, mode, 0, bidirectional); |
---|
40 | registerVariable(variable.g, mode, 0, bidirectional); |
---|
41 | registerVariable(variable.b, mode, 0, bidirectional); |
---|
42 | registerVariable(variable.a, mode, cb, bidirectional); |
---|
43 | } |
---|
44 | template <> void Synchronisable::registerVariable( ColourValue& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional) |
---|
45 | { |
---|
46 | return Synchronisable::registerVariable( (const ColourValue&)variable, mode, cb, bidirectional); |
---|
47 | } |
---|
48 | |
---|
49 | template <> void Synchronisable::registerVariable( const Vector2& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional) |
---|
50 | { |
---|
51 | registerVariable(variable.x, mode, 0, bidirectional); |
---|
52 | registerVariable(variable.y, mode, cb, bidirectional); |
---|
53 | } |
---|
54 | template <> void Synchronisable::registerVariable( Vector2& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional) |
---|
55 | { |
---|
56 | registerVariable( (const ColourValue&)variable, mode, cb, bidirectional); |
---|
57 | } |
---|
58 | |
---|
59 | template <> void Synchronisable::registerVariable( const Vector3& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional) |
---|
60 | { |
---|
61 | registerVariable(variable.x, mode, 0, bidirectional); |
---|
62 | registerVariable(variable.y, mode, 0, bidirectional); |
---|
63 | registerVariable(variable.z, mode, cb, bidirectional); |
---|
64 | } |
---|
65 | template <> void Synchronisable::registerVariable( Vector3& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional) |
---|
66 | { |
---|
67 | registerVariable( (const Vector3&)variable, mode, cb, bidirectional); |
---|
68 | } |
---|
69 | |
---|
70 | template <> void Synchronisable::registerVariable( const Vector4& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional) |
---|
71 | { |
---|
72 | registerVariable(variable.x, mode, 0, bidirectional); |
---|
73 | registerVariable(variable.y, mode, 0, bidirectional); |
---|
74 | registerVariable(variable.z, mode, 0, bidirectional); |
---|
75 | registerVariable(variable.w, mode, cb, bidirectional); |
---|
76 | } |
---|
77 | template <> void Synchronisable::registerVariable( Vector4& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional) |
---|
78 | { |
---|
79 | registerVariable( (const Vector4&)variable, mode, cb, bidirectional); |
---|
80 | } |
---|
81 | |
---|
82 | template <> void Synchronisable::registerVariable( mbool& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional) |
---|
83 | { |
---|
84 | registerVariable(variable.getMemory(), mode, cb, bidirectional); |
---|
85 | } |
---|
86 | |
---|
87 | template <> void Synchronisable::registerVariable( const Quaternion& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional) |
---|
88 | { |
---|
89 | registerVariable(variable.w, mode, 0, bidirectional); |
---|
90 | registerVariable(variable.x, mode, 0, bidirectional); |
---|
91 | registerVariable(variable.y, mode, 0, bidirectional); |
---|
92 | registerVariable(variable.z, mode, cb, bidirectional); |
---|
93 | } |
---|
94 | template <> void Synchronisable::registerVariable( Quaternion& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional) |
---|
95 | { |
---|
96 | registerVariable( (const Quaternion&)variable, mode, cb, bidirectional); |
---|
97 | } |
---|
98 | |
---|
99 | |
---|
100 | |
---|
101 | } //namespace |
---|