src/tron/gSparks.h

Go to the documentation of this file.
00001 /*
00002 
00003 *************************************************************************
00004 
00005 ArmageTron -- Just another Tron Lightcycle Game in 3D.
00006 Copyright (C) 2000  Manuel Moos (manuel@moosnet.de)
00007 
00008 **************************************************************************
00009 
00010 This program is free software; you can redistribute it and/or
00011 modify it under the terms of the GNU General Public License
00012 as published by the Free Software Foundation; either version 2
00013 of the License, or (at your option) any later version.
00014 
00015 This program is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with this program; if not, write to the Free Software
00022 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00023 
00024 ***************************************************************************
00025 
00026 */
00027 
00028 #ifndef ArmageTron_gSparks_H
00029 #define ArmageTron_gSparks_H
00030 
00031 #include "aa_config.h"
00032 
00033 #include "eSoundMixer.h"
00034 #include "eGameObject.h"
00035 #include "rModel.h"
00036 
00037 class gSpark: public eReferencableGameObject{ // When the player nearly hits a eWall
00038     REAL createTime;
00039 
00040 #ifndef USEPARTICLES
00041 #define SPARKS 10
00042 
00043     Vec3 x         [SPARKS];
00044     Vec3 lastX     [SPARKS];
00045     Vec3 preLastX  [SPARKS];
00046     Vec3 xDot      [SPARKS];
00047     REAL heat      [SPARKS];
00048     REAL lastBreak [SPARKS];
00049     REAL sparkowncolor_r;
00050     REAL sparkowncolor_g;
00051     REAL sparkowncolor_b;
00052     REAL sparkenemycolor_r;
00053     REAL sparkenemycolor_g;
00054     REAL sparkenemycolor_b;
00055 #endif
00056 
00057 private:
00058 #ifdef USEPARTICLES
00059     int particle_handle;
00060 #define SPARKS 100
00061 #endif
00062 
00063 public:
00064     gSpark(eGrid *grid, const eCoord &pos,const eCoord &dir,REAL time,REAL ocolor_r,REAL ocolor_g,REAL ocolor_b,REAL ecolor_r,REAL ecolor_g,REAL ecolor_b);
00065     virtual ~gSpark();
00066 
00067     virtual bool Timestep(REAL currentTime);
00068 
00069     virtual void InteractWith(eGameObject *target,REAL time,int recursion=1);
00070 
00071     virtual void PassEdge(const eWall *e,REAL time,REAL a,int recursion=1);
00072 
00073     virtual void Kill();
00074 
00075 #ifndef DEDICATED
00076     virtual void Render(const eCamera *cam);
00077 
00078     //virtual void SoundMix(Uint8 *dest,unsigned int len,
00079     //                      int viewer,REAL rvol,REAL lvol);
00080 #endif
00081 };
00082 
00083 #endif

Generated on Sat Mar 15 22:56:09 2008 for Armagetron Advanced by  doxygen 1.5.4