OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
nature.h
1/*
2===========================================================================
3Copyright (C) 2015 the OpenMoHAA team
4
5This file is part of OpenMoHAA source code.
6
7OpenMoHAA source code is free software; you can redistribute it
8and/or modify it under the terms of the GNU General Public License as
9published by the Free Software Foundation; either version 2 of the License,
10or (at your option) any later version.
11
12OpenMoHAA source code is distributed in the hope that it will be
13useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with OpenMoHAA source code; if not, write to the Free Software
19Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20===========================================================================
21*/
22
23// nature.h:
24
25#include "g_local.h"
26#include "trigger.h"
27
28class Emitter : public Entity
29 {
30 private:
31 str emitterName;
32 void setEmitter( str name );
33 void EmitterName( Event *ev );
34 public:
35 CLASS_PROTOTYPE( Emitter );
36 Emitter();
37 void Archive( Archiver &arc ) override;
38 };
39
40inline void Emitter::Archive
41 (
42 Archiver &arc
43 )
44 {
45 Entity::Archive( arc );
46
47 arc.ArchiveString( &emitterName );
48 if ( arc.Loading() )
49 {
50 setEmitter( emitterName );
51 }
52 }
53
54
55class Rain : public Emitter
56 {
57 private:
58 str rainName;
59 void setRainName( str name );
60 public:
61 CLASS_PROTOTYPE( Rain );
62 Rain();
63 void Archive( Archiver &arc ) override;
64 };
65
66inline void Rain::Archive
67 (
68 Archiver &arc
69 )
70 {
71 Entity::Archive( arc );
72
73 arc.ArchiveString( &rainName );
74 if ( arc.Loading() )
75 {
76 setRainName( rainName );
77 }
78 }
79
80
81class PuffDaddy : public Animate
82 {
83 private:
84 void Touch( Event *ev );
85 void Idle( Event *ev );
86
87 public:
88 CLASS_PROTOTYPE( PuffDaddy );
89 PuffDaddy();
90 };
91
Definition archive.h:86
Definition listener.h:246
Definition str.h:77