home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2011 November
/
CHIP_2011_11.iso
/
Programy
/
Inne
/
Gry
/
Atomic_Tanks
/
Atomic-Tanks-5.1.exe
/
src
/
explosion.h
< prev
next >
Wrap
C/C++ Source or Header
|
2009-07-20
|
2KB
|
69 lines
#ifndef EXPLOSION_DEFINE
#define EXPLOSION_DEFINE
/*
* atanks - obliterate each other with oversize weapons
* Copyright (C) 2003 Thomas Hudson
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* */
#include "main.h"
#include "physobj.h"
#define DIRT_CEILING 50
class EXPLOSION: public PHYSICAL_OBJECT
{
public:
int etime;
int damage;
int eframes;
int radius;
int sound;
int exclock;
int type, a;
int peaked;
int dispersing;
WEAPON *weap;
/* to allow synchronous tank explosions, explosions need to know what they are */
bool bIsWeaponExplosion;
virtual ~EXPLOSION ();
EXPLOSION (GLOBALDATA *global, ENVIRONMENT *env, double xpos, double ypos, int weaponType);
EXPLOSION (GLOBALDATA *global, ENVIRONMENT *env, double xpos, double ypos, double xvel, double yvel, int weaponType);
void draw (BITMAP *dest);
void initialise ();
int applyPhysics ();
void explode ();
int isSubClass (int classNum);
inline virtual int getClass ()
{
return (EXPLOSION_CLASS);
}
inline virtual void setEnvironment(ENVIRONMENT *env)
{
if (!_env || (_env != env))
{
_env = env;
_index = _env->addObject (this);
}
}
};
#endif