NapalmParams.h

Go to the documentation of this file.
00001 ////////////////////////////////////////////////////////////////////////////////
00002 //    Scorched3D (c) 2000-2009
00003 //
00004 //    This file is part of Scorched3D.
00005 //
00006 //    Scorched3D is free software; you can redistribute it and/or modify
00007 //    it under the terms of the GNU General Public License as published by
00008 //    the Free Software Foundation; either version 2 of the License, or
00009 //    (at your option) any later version.
00010 //
00011 //    Scorched3D is distributed in the hope that it will be useful,
00012 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //    GNU General Public License for more details.
00015 //
00016 //    You should have received a copy of the GNU General Public License
00017 //    along with Scorched3D; if not, write to the Free Software
00018 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 ////////////////////////////////////////////////////////////////////////////////
00020 
00021 #if !defined(__INCLUDE_NapalmParamsh_INCLUDE__)
00022 #define __INCLUDE_NapalmParamsh_INCLUDE__
00023 
00024 #include <string>
00025 #include <common/fixed.h>
00026 
00027 struct lua_State;
00028 class XMLNode;
00029 class NapalmParams 
00030 {
00031 public:
00032         NapalmParams();
00033         ~NapalmParams();
00034 
00035         bool parseXML(XMLNode *accessoryNode);
00036         void parseLUA(lua_State *L, int position);
00037 
00038         void setNapalmTime(fixed value) { napalmTime_ = value; }
00039         void setNapalmHeight(fixed value) { napalmHeight_ = value; }
00040         void setStepTime(fixed value) { stepTime_ = value; }
00041         void setHurtStepTime(fixed value) { hurtStepTime_ = value; }
00042         void setHurtPerSecond(fixed value) { hurtPerSecond_ = value; }
00043 
00044         fixed getNapalmTime() { return napalmTime_; }
00045         fixed getNapalmHeight() { return napalmHeight_; }
00046         fixed getStepTime() { return stepTime_; }
00047         fixed getHurtStepTime() { return hurtStepTime_; }
00048         fixed getHurtPerSecond() { return hurtPerSecond_; }
00049         fixed getGroundScorchPer() { return groundScorchPer_; }
00050         int getEffectRadius() { return effectRadius_; }
00051         int getNumberParticles() { return numberParticles_; }
00052         bool getNoSmoke() { return noSmoke_; }
00053         bool getNoObjectDamage() { return noObjectDamage_; }
00054         bool getAllowUnderWater() { return allowUnderWater_; }
00055         bool getLuminance() { return luminance_; }
00056         bool getSingleFlow() { return singleFlow_; }
00057         const char *getNapalmTexture() { return napalmTexture_.c_str(); }
00058         const char *getDeformTexture() { return deformTexture_.c_str(); }
00059 
00060 protected:
00061         fixed napalmTime_;   // The time to generate napalm
00062         fixed napalmHeight_; // The height of a napalm point
00063         fixed stepTime_;     // Add/rm napalm every StepTime secs
00064         fixed hurtStepTime_; // Calculate damage every HurtStepTime secs
00065         fixed hurtPerSecond_;// Damage per second
00066         fixed groundScorchPer_; // The percentage chance the ground will be scorched
00067         int effectRadius_;   // How close do tanks take damage
00068         int numberParticles_;// How many napalm particles can be created
00069         bool noSmoke_;       // Turns off smoke emitted by napalm
00070         bool noObjectDamage_;// Turns off burning damage to landscape objects
00071         bool allowUnderWater_;// Turns on/off napalm working under water
00072         bool singleFlow_;    // Use a single flow of napalm or cover the whole downward area
00073         bool luminance_;     // The texutre luminance
00074         std::string napalmTexture_;
00075         std::string deformTexture_;
00076 
00077 };
00078 
00079 #endif

Generated on Mon Feb 16 15:14:48 2009 for Scorched3D by  doxygen 1.5.3