- Timestamp:
- Jul 16, 2005, 10:38:04 PM (19 years ago)
- Location:
- orxonox/branches/weaponSystem
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/weaponSystem/orxonox.kdevelop
r4662 r4877 1 <?xml version = '1.0'?>1 <?xml version="1.0"?> 2 2 <kdevelop> 3 <general> 4 <author>orxonox-crew:</author> 5 <email>orxonox-dev@mail.datacore.ch</email> 6 <version>$VERSION$</version> 7 <projectmanagement>KDevCustomProject</projectmanagement> 8 <primarylanguage>C++</primarylanguage> 9 <ignoreparts> 10 </ignoreparts> 11 </general> 12 <kdevcustomproject> 13 <run> 14 <mainprogram>orxonox</mainprogram> 15 </run> 16 </kdevcustomproject> 17 <kdevdebugger> 3 18 <general> 4 <author>orxonox-crew:</author> 5 <email>orxonox-dev@mail.datacore.ch</email> 6 <version>$VERSION$</version> 7 <projectmanagement>KDevAutoProject</projectmanagement> 8 <primarylanguage>C++</primarylanguage> 9 <ignoreparts/> 10 <projectdirectory>.</projectdirectory> 11 <absoluteprojectpath>false</absoluteprojectpath> 12 <description/> 13 <secondaryLanguages/> 14 <versioncontrol/> 19 <dbgshell></dbgshell> 15 20 </general> 16 <kdevautoproject> 17 <general> 18 <activetarget>src/subprojects/particles/particles</activetarget> 19 <useconfiguration>default</useconfiguration> 20 </general> 21 <run> 22 <mainprogram>src/orxonox</mainprogram> 23 <directoryradio>executable</directoryradio> 24 <customdirectory>/</customdirectory> 25 <programargs/> 26 <terminal>false</terminal> 27 <autocompile>true</autocompile> 28 <envvars/> 29 <runarguments> 30 <orxonox/> 31 </runarguments> 32 </run> 33 <configurations> 34 <optimized> 35 <builddir>optimized</builddir> 36 <ccompiler>GccOptions</ccompiler> 37 <cxxcompiler>GppOptions</cxxcompiler> 38 <f77compiler>G77Options</f77compiler> 39 <cxxflags>-O2 -g0</cxxflags> 40 </optimized> 41 <debug> 42 <configargs>--enable-debug=full</configargs> 43 <builddir>debug</builddir> 44 <ccompiler>GccOptions</ccompiler> 45 <cxxcompiler>GppOptions</cxxcompiler> 46 <f77compiler>G77Options</f77compiler> 47 <cxxflags>-O0 -g3</cxxflags> 48 <envvars/> 49 </debug> 50 <default> 51 <envvars/> 52 </default> 53 </configurations> 54 <make> 55 <envvars> 56 <envvar value="1" name="WANT_AUTOCONF_2_5" /> 57 <envvar value="1" name="WANT_AUTOMAKE_1_6" /> 58 </envvars> 59 <abortonerror>false</abortonerror> 60 <numberofjobs>3</numberofjobs> 61 <dontact>false</dontact> 62 <makebin>make</makebin> 63 <prio>0</prio> 64 </make> 65 </kdevautoproject> 66 <kdevdebugger> 67 <general> 68 <dbgshell>libtool</dbgshell> 69 <programargs/> 70 <gdbpath/> 71 <configGdbScript/> 72 <runShellScript/> 73 <runGdbScript/> 74 <breakonloadinglibs>true</breakonloadinglibs> 75 <separatetty>false</separatetty> 76 <floatingtoolbar>false</floatingtoolbar> 77 </general> 78 <display> 79 <staticmembers>false</staticmembers> 80 <demanglenames>true</demanglenames> 81 <outputradix>10</outputradix> 82 </display> 83 </kdevdebugger> 84 <kdevdoctreeview> 21 </kdevdebugger> 22 <kdevdoctreeview> 85 23 <ignoretocs> 86 24 <toc>ada</toc> … … 127 65 <toc>KDE Libraries (Doxygen)</toc> 128 66 </ignoredoxygen> 129 67 </kdevdoctreeview> 130 68 <kdevfilecreate> 131 69 <filetypes/> … … 136 74 </useglobaltypes> 137 75 </kdevfilecreate> 138 <kdevcppsupport>139 <references/>140 <codecompletion>141 <includeGlobalFunctions>true</includeGlobalFunctions>142 <includeTypes>true</includeTypes>143 <includeEnums>true</includeEnums>144 <includeTypedefs>true</includeTypedefs>145 <automaticCodeCompletion>true</automaticCodeCompletion>146 <automaticArgumentsHint>true</automaticArgumentsHint>147 <automaticHeaderCompletion>true</automaticHeaderCompletion>148 <codeCompletionDelay>250</codeCompletionDelay>149 <argumentsHintDelay>400</argumentsHintDelay>150 <headerCompletionDelay>250</headerCompletionDelay>151 </codecompletion>152 <creategettersetter>153 <prefixGet/>154 <prefixSet>set</prefixSet>155 <prefixVariable>m_,_</prefixVariable>156 <parameterName>theValue</parameterName>157 <inlineGet>true</inlineGet>158 <inlineSet>true</inlineSet>159 </creategettersetter>160 </kdevcppsupport>161 <kdevfileview>162 <groups>163 <hidenonprojectfiles>false</hidenonprojectfiles>164 <hidenonlocation>false</hidenonlocation>165 </groups>166 <tree>167 <hidepatterns>*.o,*~</hidepatterns>168 <hidenonprojectfiles>false</hidenonprojectfiles>169 </tree>170 </kdevfileview>171 <cppsupportpart>172 <filetemplates>173 <interfacesuffix>.h</interfacesuffix>174 <implementationsuffix>.cc</implementationsuffix>175 </filetemplates>176 </cppsupportpart>177 <kdevdocumentation>178 <projectdoc>179 <docsystem/>180 <docurl/>181 <usermanualurl/>182 </projectdoc>183 </kdevdocumentation>184 <ctagspart>185 <customArguments/>186 <customTagfilePath/>187 </ctagspart>188 76 </kdevelop> -
orxonox/branches/weaponSystem/src/story_entities/world.cc
r4872 r4877 841 841 while( entity != NULL ) 842 842 { 843 if( entity-> bDraw) entity->draw();843 if( entity->isVisible() ) entity->draw(); 844 844 //entity = this->entities->nextElement(); 845 845 entity = iterator->nextElement(); -
orxonox/branches/weaponSystem/src/util/loading/game_loader.cc
r4838 r4877 19 19 #include "campaign.h" 20 20 #include "world.h" 21 #include "player.h"22 21 #include "orxonox.h" 23 22 #include "camera.h" -
orxonox/branches/weaponSystem/src/util/loading/game_loader.h
r4836 r4877 1 1 /*! 2 \file game_loader.h3 2 * @file game_loader.h 3 * loads campaigns, worlds and all other story_entities 4 4 */ 5 5 … … 18 18 class Campaign; 19 19 class World; 20 class Camera;21 class CammandNode;22 20 class Factory; 23 21 class TiXmlElement; -
orxonox/branches/weaponSystem/src/world_entities/player.cc
r4836 r4877 23 23 24 24 #include "weapon_manager.h" 25 #include "weapon.h"26 25 #include "test_gun.h" 27 26 #include "world.h" 28 27 29 28 #include "list.h" 30 #include "stdincl.h"31 29 32 30 #include "event_handler.h" 33 31 34 #include "projectile.h"35 32 #include "event.h" 36 33 … … 41 38 42 39 /** 43 * 40 * creates a new Player 44 41 * @param isFree if the player is free 45 42 */ 46 43 Player::Player() 47 44 { 48 /*49 this is the debug player - actualy we would have to make a new50 class derivated from Player for each player. for now, we just use51 the player.cc for debug also52 */53 45 this->init(); 54 46 … … 75 67 delete this->weaponMan; 76 68 } 77 78 69 79 70 /** … … 119 110 120 111 /** 121 * 112 * loads the Settings of a Player from an XML-element. 122 113 * @param root the XML-element to load the Player's properties from 123 114 */ … … 132 123 133 124 /** 134 * 125 * adds a weapon to the weapon list of player 135 126 * @param weapon to add 136 127 */ … … 219 210 void Player::tick (float time) 220 211 { 221 //printf("%p\n", this);222 //this->getRelCoor().debug();223 224 /* link tick to weapon */225 //this->activeWeapon->tick(time);226 //this->activeWeaponL->tick(time); //FIX FIX DELETE REMOVE227 this->weaponMan->tick(time);228 212 // player controlled movement 229 213 this->move(time); 214 215 this->weaponMan->tick(time); 230 216 // weapon system manipulation 231 this->weapon ();217 this->weaponAction(); 232 218 } 233 219 … … 266 252 * weapon manipulation by the player 267 253 */ 268 void Player::weapon ()254 void Player::weaponAction() 269 255 { 270 256 if( this->bFire) … … 277 263 this->bWeaponChange = false; 278 264 } 279 }280 281 282 /**283 * The connection to the command node284 * @param cmd the Command unit from witch to map285 286 here the commands are mapped to the players movement/weaponary287 */288 void Player::command (Command* cmd)289 {290 PRINTF(3)("recieved command [%s]\n", cmd->cmd);291 if( !strcmp( cmd->cmd, CONFIG_NAME_PLAYER_UP)) this->bUp = !cmd->bUp;292 if( !strcmp( cmd->cmd, CONFIG_NAME_PLAYER_DOWN)) this->bDown = !cmd->bUp;293 if( !strcmp( cmd->cmd, CONFIG_NAME_PLAYER_LEFT)) this->bLeft = !cmd->bUp;294 if( !strcmp( cmd->cmd, CONFIG_NAME_PLAYER_RIGHT)) this->bRight = !cmd->bUp;295 if( !strcmp( cmd->cmd, CONFIG_NAME_PLAYER_FIRE)) this->bFire = !cmd->bUp;296 if( !strcmp( cmd->cmd, CONFIG_NAME_PLAYER_NEXT_WEAPON)) if(cmd->bUp) this->bWeaponChange = !this->bWeaponChange;297 265 } 298 266 -
orxonox/branches/weaponSystem/src/world_entities/player.h
r4836 r4877 1 1 /*! 2 \file player.h3 *Implements a basic controllable WorldEntity2 * @file player.h 3 * Implements a basic controllable WorldEntity 4 4 */ 5 5 … … 15 15 class WeaponManager; 16 16 class Vector; 17 class World;18 17 class Event; 19 class Crosshair;20 18 21 19 //! Basic controllable WorldEntity 20 /** 21 * this is the debug player - actualy we would have to make a new 22 class derivated from Player for each player. for now, we just use 23 the player.cc for debug also 24 */ 22 25 class Player : public WorldEntity, public PhysicsInterface, public EventListener 23 26 { … … 43 46 virtual void draw(); 44 47 45 virtual void command(Command* cmd);46 47 48 virtual void process(const Event &event); 48 49 … … 50 51 private: 51 52 void move(float time); 52 void weapon ();53 void weaponAction(); 53 54 54 55 55 56 private: 56 bool bUp;//!< up button pressed.57 bool bDown;//!< down button pressed.58 bool bLeft;//!< left button pressed.59 bool bRight;//!< right button pressed.60 bool bAscend;//!< ascend button pressed.61 bool bDescend;//!< descend button presses.62 bool bFire;//!< fire button pressed.63 bool bWeaponChange;//!< weapon change button pressed57 bool bUp; //!< up button pressed. 58 bool bDown; //!< down button pressed. 59 bool bLeft; //!< left button pressed. 60 bool bRight; //!< right button pressed. 61 bool bAscend; //!< ascend button pressed. 62 bool bDescend; //!< descend button presses. 63 bool bFire; //!< fire button pressed. 64 bool bWeaponChange; //!< weapon change button pressed 64 65 65 tList<Weapon>* weapons;//!< a list of weapon 66 Weapon* activeWeapon; //!< the weapon that is currenty activated 67 Weapon* activeWeaponL; //temporary -- FIX THIS 68 WeaponManager* weaponMan; //!< the weapon manager: managing a list of weapon to wepaon-slot mapping 66 WeaponManager* weaponMan; //!< the weapon manager: managing a list of weapon to wepaon-slot mapping 69 67 70 World* myWorld; //!< reference to the world object 71 72 Vector* velocity; //!< the velocity of the player. 73 float travelSpeed; //!< the current speed of the player (to make soft movement) 74 float acceleration; //!< the acceleration of the player. 75 76 Crosshair* crosshair; //!< the crosshair of the player 68 Vector* velocity; //!< the velocity of the player. 69 float travelSpeed; //!< the current speed of the player (to make soft movement) 70 float acceleration; //!< the acceleration of the player. 77 71 }; 78 72 -
orxonox/branches/weaponSystem/src/world_entities/world_entity.cc
r4836 r4877 38 38 this->loadParams(root); 39 39 40 this-> bDraw = true;40 this->setVisibiliy(true); 41 41 } 42 42 … … 111 111 */ 112 112 113 114 /**115 * process draw function116 */117 void WorldEntity::processDraw ()118 {119 120 }121 122 /**123 * sets the drawable state of this entity.124 * @param bDraw TRUE if draweable, FALSE otherwise125 */126 void WorldEntity::setDrawable (bool bDraw)127 {128 this->bDraw = bDraw;129 }130 131 132 113 /** 133 114 * this function is called, when two entities collide … … 183 164 { 184 165 } 185 186 166 187 167 /** … … 228 208 glPopMatrix(); 229 209 } 230 231 /**232 * this handles incoming command messages233 * @param cmd: a pointer to the incoming Command structure234 235 Put all code that handles Command messages here, this will mainly be called by the assigned CommandNode but can also be used236 to send commands from one WorldEntity to another.237 */238 void WorldEntity::command (Command* cmd)239 {240 } -
orxonox/branches/weaponSystem/src/world_entities/world_entity.h
r4836 r4877 26 26 class WorldEntity : public PNode 27 27 { 28 friend class World;29 30 28 public: 31 29 WorldEntity(const TiXmlElement* root = NULL); … … 35 33 void loadModel(const char* fileName); 36 34 37 //void setCollision (CollisionCluster* newhull);38 35 39 36 //void addAbility(Ability* ability); 40 37 //void removeAbility(Ability* ability); 41 void setDrawable (bool bDraw); 38 39 /** @param visibility if the Entity should be visible (been draw) */ 40 void setVisibiliy (bool visibility) { this->bVisible = visibility; }; 41 /** @returns true if the entity is visible, false otherwise */ 42 bool isVisible() const { return this->bVisible; }; 42 43 void setCharacterAttributes(CharacterAttributes* charAttr); 43 44 CharacterAttributes* getCharacterAttributes(); … … 48 49 virtual void hit (WorldEntity* weapon, Vector* loc); 49 50 virtual void collideWith (WorldEntity* entity); 50 virtual void command (Command* cmd);51 51 52 52 /** @returns the Count of Faces on this WorldEntity */ 53 53 virtual unsigned int getFaceCount () const { if (this->model) return this->model->getFaceCount(); else return 0; }; 54 54 55 void processDraw ();56 55 virtual void draw (); 57 56 void drawBVTree(int depth, int drawMode); … … 59 58 60 59 protected: 61 Model* model;//!< The model that should be loaded for this entity.62 CharacterAttributes* charAttr;//!< the character attributes of a world_entity63 BVTree* obbTree;//!< this is the obb tree reference needed for collision detection60 Model* model; //!< The model that should be loaded for this entity. 61 CharacterAttributes* charAttr; //!< the character attributes of a world_entity 62 BVTree* obbTree; //!< this is the obb tree reference needed for collision detection 64 63 65 64 private: 66 bool bCollide; //!< If it should be considered for the collisiontest. 67 bool bDraw; //!< If it should be visible. 68 69 70 71 //CollisionCluster* collisioncluster; //!< The collision-Cluster of this entity. 65 bool bCollide; //!< If it should be considered for the collisiontest. 66 bool bVisible; //!< If it should be visible. 72 67 }; 73 68
Note: See TracChangeset
for help on using the changeset viewer.