OpenMoHAA 0.82.1
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{
30private:
31 str emitterName;
32 void setEmitter(str name);
33 void EmitterName(Event *ev);
34
35public:
36 CLASS_PROTOTYPE(Emitter);
37 Emitter();
38 void Archive(Archiver& arc) override;
39};
40
41inline void Emitter::Archive(Archiver& arc)
42{
43 Entity::Archive(arc);
44
45 arc.ArchiveString(&emitterName);
46 if (arc.Loading()) {
47 setEmitter(emitterName);
48 }
49}
50
51class Rain : public Emitter
52{
53private:
54 str rainName;
55 void setRainName(str name);
56
57public:
58 CLASS_PROTOTYPE(Rain);
59 Rain();
60 void Archive(Archiver& arc) override;
61};
62
63inline void Rain::Archive(Archiver& arc)
64{
65 Entity::Archive(arc);
66
67 arc.ArchiveString(&rainName);
68 if (arc.Loading()) {
69 setRainName(rainName);
70 }
71}
72
73class PuffDaddy : public Animate
74{
75private:
76 void Touch(Event *ev);
77 void Idle(Event *ev);
78
79public:
80 CLASS_PROTOTYPE(PuffDaddy);
81 PuffDaddy();
82};
Definition archive.h:86
Definition listener.h:246
Definition str.h:77