moved almost all hardcoded constants to "define.dat"
[k8-i-v-a-n.git] / src / game / rain.h
blob6f666dd9dc12de6f8b609c89273933b8c24799b4
1 /*
3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
6 * Public License
8 * See LICENSING which should be included
9 * along with this file for more details
13 #ifndef __RAIN_H__
14 #define __RAIN_H__
16 #include "lsquare.h"
17 #include "entity.h"
19 class rain : public entity
21 public:
22 /* Come To The Dark Side */
23 rain* Next;
25 public:
26 rain() : entity(HAS_BE), Next(0), Drop(0), Drops(0), OwnLiquid(0) { }
27 rain(liquid*, lsquare*, v2, int, truth);
28 virtual ~rain();
30 virtual void Be();
31 void Save(outputfile&) const;
32 void Load(inputfile&);
33 void Draw(blitdata&) const;
34 truth HasOwnLiquid() const { return OwnLiquid; }
35 void RandomizeDropPos(int) const;
36 liquid* GetLiquid() const { return Liquid; }
37 virtual square* GetSquareUnderEntity(int = 0) const { return LSquareUnder; }
38 square* GetSquareUnder() const { return LSquareUnder; }
39 void SetLSquareUnder(lsquare* What) { LSquareUnder = What; }
40 lsquare* GetLSquareUnder() const { return LSquareUnder; }
41 virtual truth IsOnGround() const { return true; }
42 int GetTeam() const { return Team; }
43 protected:
44 mutable struct drop
46 packv2 StartPos;
47 uShort StartTick;
48 uShort MaxAge;
49 }* Drop;
50 liquid* Liquid;
51 lsquare* LSquareUnder;
52 v2 Speed;
53 sLong SpeedAbs;
54 mutable int Drops : 8;
55 int BeCounter : 7;
56 truth OwnLiquid : 1;
57 int Team : 8;
60 outputfile& operator<<(outputfile&, const rain*);
61 inputfile& operator>>(inputfile&, rain*&);
63 #endif