Advanced Strategic Command
explosivemines.h
Go to the documentation of this file.
1 
2 /***************************************************************************
3  gamemap.h - description
4  -------------------
5  begin : Tue Feb 17 2001
6  copyright : (C) 2001 by Martin Bickel
7  email : bickel@asc-hq.org
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 
19 
20 #ifndef explosiveminesH
21  #define explosiveminesH
22 
23 
24  #include "objects.h"
25  #include "basestreaminterface.h"
26 
27 
28 
29 
30 class Mine : public AgeableItem {
31  Mine();
32  public:
33  Mine( MineTypes type, int strength, int player, GameMap* gamemap );
34 
35  Mine( MineTypes type, int strength, int player, GameMap* gamemap, int identifier );
36 
37  static Mine newFromStream ( tnstream& stream );
38 
41 
43 
45  int strength;
46 
48  int player;
49 
51  bool attacksunit ( const Vehicle* veh ) const;
52 
54  void paint( Surface& surf, SPoint pos ) const;
55 
56  void read ( tnstream& stream );
57  void write ( tnstream& stream ) const;
58 
59 };
60 
61 
62 
63 #endif
64 
int identifier
a unique identifier that allows the identification of a single mine
bool attacksunit(const Vehicle *veh) const
can the mine attack this unit
void write(tnstream &stream) const
The interface for all kinds of IO stream.
void paint(Surface &surf, SPoint pos) const
display the mine
MineTypes
Definition: objects.h:70
MineTypes type
int player
the player who placed the mine; range 0 .. 7
int strength
the effective punch of the mine
SDLmm::SPoint SPoint
Definition: surface.h:27
void read(tnstream &stream)
Mine and Objects which can be placed on a map field.
The standard interface for ASC streams. This is the parent class for all kinds of streams: normal fil...
static Mine newFromStream(tnstream &stream)
The map. THE central structure of ASC, which holds everything not globally available together...
Definition: gamemap.h:182