- Timestamp:
- Apr 4, 2007, 12:13:53 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 69 deleted
- 104 edited
- 57 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 16 16 OrxonoxPlayability.kdevses 17 17 OrxonoxPlayability.kdevelop.pcs 18 orxonox.backtrace 19 orxonox.kdevses 20 orxonox.kdevelop.pcs
-
- Property svn:ignore
-
trunk/src/Makefile.am
r10376 r10618 41 41 util/singleplayer_shootemup.cc \ 42 42 \ 43 util/kill_target.cc \ 44 \ 45 subprojects/benchmark.cc 43 util/kill_target.cc 46 44 47 45 noinst_HEADERS = \ 48 46 $(StoryEntities_HEADERS_) \ 49 47 orxonox.h \ 50 ability.h \51 defs/message_structures.h \52 defs/stdincl.h \53 48 defs/stdlibincl.h \ 54 49 defs/sdlincl.h \ 55 defs/glincl.h \56 defs/alincl.h \57 defs/comincl.h \58 50 defs/confincl.h \ 59 51 defs/error.h \ 60 defs/globals.h \ 61 defs/compiler.h \ 62 subprojects/benchmark.h 52 defs/orxonox_globals.h \ 53 defs/compiler.h 63 54 64 55 ## orxonox.conf will be used from home-dir instead. -
trunk/src/ai
-
Property
svn:ignore
set to
Makefile.in
Makefile
.deps
*.a
-
Property
svn:ignore
set to
-
trunk/src/ai/swarm_attack.cc
r10376 r10618 30 30 void SwarmAttack::process(float dt) 31 31 { 32 std::map<WorldEntity*,AIModule*>::iterator it; 32 WorldEntity* taskRelObject = NULL; 33 if ( taskRelObjectName != "" ) 34 { 35 taskRelObject = dynamic_cast<WorldEntity*>(WorldEntity::objectList().getBaseObject( taskRelObjectName )); 36 37 38 std::map<WorldEntity*,AIModule*>::iterator it; 39 Vector sideL=taskRelPos.cross(Vector(0,1,0)).getNormalized(); 40 Vector sideR=sideL*-1; 41 Vector posL=Vector(0,0,0); 42 Vector posR=Vector(0,0,0); 43 33 44 34 Vector sideL=taskRelPos.cross(Vector(0,1,0)).getNormalized(); 35 Vector sideR=sideL*-1; 36 Vector posL=Vector(0,0,0);37 Vector posR=Vector(0,0,0);45 46 //tell positions to swarm-members... 47 float radius; 48 Vector objectPos=taskRelObject->getAbsCoor(); 38 49 39 //tell positions to swarm-members... 40 float radius; 41 Vector objectPos=taskRelObject->getAbsCoor(); 50 for (it=members.begin(); it!= members.end(); it++ ){ 51 radius=it->second->getNPCRadius(); 52 posR=posR+sideR*radius*1.5; 53 it->second->setDestination(objectPos+taskRelPos+posR); 54 it->second->setDestinationMovement(Vector(0,0,0)); 55 it->second->setTarget(taskRelObject); 56 it->second->process(dt); 57 posR=posR+sideR*radius*1.5; 42 58 43 for (it=members.begin(); it!= members.end(); it++ ){ 44 radius=it->second->getNPCRadius(); 45 posR=posR+sideR*radius*1.5; 46 it->second->setDestination(objectPos+taskRelPos+posR); 47 it->second->setDestinationMovement(Vector(0,0,0)); 48 it->second->setTarget(taskRelObject); 49 it->second->process(dt); 50 posR=posR+sideR*radius*1.5; 59 it++; 60 if(it==members.end())break; 61 radius=it->second->getNPCRadius(); 62 posL=posL+sideL*radius*1.5; 63 it->second->setDestination(objectPos+taskRelPos+posL); 64 it->second->setDestinationMovement(Vector(0,0,0)); 65 it->second->setTarget(taskRelObject); 66 it->second->process(dt); 67 posL=posL+sideL*radius*1.5; 68 } 51 69 52 it++; 53 if(it==members.end())break; 54 radius=it->second->getNPCRadius(); 55 posL=posL+sideL*radius*1.5; 56 it->second->setDestination(objectPos+taskRelPos+posL); 57 it->second->setDestinationMovement(Vector(0,0,0)); 58 it->second->setTarget(taskRelObject); 59 it->second->process(dt); 60 posL=posL+sideL*radius*1.5; 61 } 62 63 //check time.. 64 taskMaxTime-=dt; 65 if(taskMaxTime<0)taskComplete=true; 70 //check time.. 71 taskMaxTime-=dt; 72 if(taskMaxTime<0)taskComplete=true; 73 } 66 74 } -
trunk/src/ai/swarm_gorel.cc
r10376 r10618 48 48 Vector correction=Vector(0,0,0); 49 49 Vector destination; 50 51 WorldEntity* taskRelObject = NULL; 52 if ( taskRelObjectName != "" ) 53 taskRelObject = dynamic_cast<WorldEntity*>(WorldEntity::objectList().getBaseObject( taskRelObjectName )); 50 54 51 55 if(taskRelObject!=NULL && taskMaxTime>0){ -
trunk/src/ai/swarm_module.h
r10376 r10618 24 24 inline void orderView(Vector taskView){this->taskView=taskView;} 25 25 inline void orderSpeed(float taskSpeed){this->taskSpeed=taskSpeed;} 26 inline void orderRelObject(WorldEntity* taskRelObject){ this->taskRelObject=taskRelObject;}26 inline void orderRelObject(WorldEntity* taskRelObject){if (taskRelObject) this->taskRelObjectName=taskRelObject->getName(); else taskRelObjectName = ""; } 27 27 inline void orderMaxTime(float taskMaxTime){this->taskMaxTime=taskMaxTime;} 28 28 … … 44 44 Vector taskView; 45 45 float taskSpeed; 46 WorldEntity* taskRelObject;46 std::string taskRelObjectName; 47 47 bool taskComplete; 48 48 float taskMaxTime; -
trunk/src/ai/swarm_wait.cc
r10555 r10618 19 19 void SwarmWait::process(float dt) 20 20 { 21 if(taskRelObject!=NULL){ 22 Vector distVect=taskRelObject->getAbsCoor()-getSwarmPosition(); 23 float distance=distVect.len(); 24 if(distance<attackDistance+100)taskComplete=true; //### change wakeup distance here 21 if(taskRelObjectName!=""){ 22 WorldEntity* taskRelObject = dynamic_cast<WorldEntity*>(WorldEntity::objectList().getBaseObject( taskRelObjectName )); 23 Vector distVect=taskRelObject->getAbsCoor()-getSwarmPosition(); 24 float distance=distVect.len(); 25 if(distance<attackDistance+100)taskComplete=true; //### change wakeup distance here 25 26 } 26 27 -
trunk/src/lib/collision_detection/cd_engine.cc
r10033 r10618 22 22 #include "model.h" 23 23 #include "world_entity.h" 24 #include " terrain.h"24 #include "environments/terrain.h" 25 25 // #include "player.h" 26 26 … … 30 30 31 31 #include "bsp/bsp_manager.h" 32 #include " bsp_entity.h"32 #include "environments/bsp_entity.h" 33 33 34 34 -
trunk/src/lib/collision_detection/obb_tree_node.cc
r10033 r10618 629 629 PRINTF(5)("s = %f, rA+rB = %f\n", fabs(t.dot(l)), rA+rB); 630 630 631 //TODO valgrind complains about uninitialised value here 631 632 if( (rA + rB) < fabs(t.dot(l))) 632 633 { -
trunk/src/lib/collision_reaction
-
Property
svn:ignore
set to
.deps
*.a
Makefile.in
Makefile
-
Property
svn:ignore
set to
-
trunk/src/lib/collision_reaction/cr_engine.h
r10013 r10618 62 62 CR_COLLISION_TYPE_AXIS_Z, //!< collision on z axis 63 63 CR_COLLISION_TYPE_AXIS_Z_NEG, //!< collision on negative z axis 64 CR_COLLISION_TYPE_WAY, //!< collision on the way from last to current position 64 65 CR_COLLISION_TYPE_OBB, //!< object aligned bounding box collide 65 66 -
trunk/src/lib/collision_reaction/cr_physics_full_walk.cc
r10013 r10618 163 163 164 164 165 case CoRe::CREngine::CR_COLLISION_TYPE_WAY: 166 // calulate the height above ground 167 height = collPos.len() - box->halfLength[1]; 168 169 170 // object is beneath the plane (ground) 171 // if(height >= 0.0f && height <= 0.0001f) break ;// Do nothing 172 if( height < 0.0f ) 173 { 174 entity->shiftCoor(Vector(0.0f, -height + 0.5f, 0.0f)); 175 entity->setOnGround(true); 176 } 177 // object is already in the wall 178 else if( ce->isInWall()) 179 { 180 entity->setAbsCoor(entity->getLastAbsCoor()); 181 PRINTF(0)("ground collision: reset pos\n"); 182 } 183 else 184 { 185 // entity is not on ground 186 entity->setOnGround(false); 187 } 188 break; 189 190 165 191 /* collision in the Z-AXIS */ 166 192 case CoRe::CREngine::CR_COLLISION_TYPE_AXIS_Z: -
trunk/src/lib/event/key_mapper.cc
r9880 r10618 23 23 #include "event_def.h" 24 24 25 #include " globals.h"25 #include "orxonox_globals.h" 26 26 #include "parser/ini_parser/ini_parser.h" 27 27 #include "parser/preferences/preferences.h" -
trunk/src/lib/graphics/Makefile.am
r9869 r10618 25 25 26 26 noinst_HEADERS =\ 27 glincl.h \ 27 28 graphics_engine.h \ 28 29 graphics_effect.h \ … … 46 47 47 48 49 48 50 SUBDIRS = importer \ 49 51 spatial_separation -
trunk/src/lib/graphics/graphics_engine.cc
r10320 r10618 31 31 #include "text.h" 32 32 33 #include " globals.h"33 #include "orxonox_globals.h" 34 34 #include "texture.h" 35 35 -
trunk/src/lib/graphics/importer/bsp/bsp_manager.cc
r10519 r10618 30 30 #include "debug.h" 31 31 #include "material.h" 32 #include " camera.h"32 #include "tools/camera.h" 33 33 #include "vertex_array_model.h" 34 34 #include "world_entities/player.h" … … 982 982 float endDistance = end->dot(node->plane) - node->d; 983 983 float startDistance = start->dot(node->plane) - node->d; 984 985 984 986 985 if( node->isLeaf) { 987 986 leaf& curLeaf = this->bspFile->leaves[node->leafIndex]; … … 999 998 } 1000 999 1001 1000 //TODO valgrind complains about uninitialised value here 1002 1001 if (startDistance >= 0 && endDistance >= 0) // A 1003 1002 { // both points are in front of the plane … … 1102 1101 this->outputFraction = 1.0f; 1103 1102 1104 1105 1103 this->checkCollisionX(worldEntity); 1106 this->checkCollisionY(worldEntity);1107 1104 this->checkCollisionZ(worldEntity); 1105 1106 if(!(this->checkCollisionY(worldEntity))) 1107 this->checkCollisionWay(worldEntity); 1108 1108 1109 1109 … … 1288 1288 * check the collision in the x direction (forward, backward) 1289 1289 */ 1290 voidBspManager::checkCollisionX(WorldEntity* entity)1290 bool BspManager::checkCollisionX(WorldEntity* entity) 1291 1291 { 1292 1292 // Retrieve Bounding box … … 1398 1398 SolidFlag); 1399 1399 } 1400 1401 return (xCollisionBackward || xCollisionForward); 1400 1402 } 1401 1403 … … 1404 1406 * check the collision in the z direction (up, down) 1405 1407 */ 1406 voidBspManager::checkCollisionY(WorldEntity* entity)1408 bool BspManager::checkCollisionY(WorldEntity* entity) 1407 1409 { 1408 1410 … … 1546 1548 collPos, SolidFlag); 1547 1549 } 1550 1551 return (yCollisionUp || yCollisionDown); 1548 1552 } 1549 1553 … … 1554 1558 * check the collision in the z direction (left, right) 1555 1559 */ 1556 voidBspManager::checkCollisionZ(WorldEntity* entity)1560 bool BspManager::checkCollisionZ(WorldEntity* entity) 1557 1561 { 1558 1562 // Retrieve Bounding box … … 1664 1668 collPos , SolidFlag); 1665 1669 } 1670 1671 return (zCollisionLeft || zCollisionRight); 1672 1673 } 1674 1675 1676 1677 1678 /** 1679 * check wether a collision occured on the way from the last position to the current position 1680 */ 1681 bool BspManager::checkCollisionWay(WorldEntity* entity) 1682 { 1683 1684 1685 1686 plane* testPlane = NULL; //!< the collision test plane 1687 Vector to; 1688 Vector collPos; //!< the collision position 1689 1690 bool yCollisionUp = false; //!< flag true if right collision 1691 bool SolidFlag = false; //!< flag set true if solid 1692 1693 Vector from; //!< current position of the entity 1694 Vector dirY; //!< direction x 1695 1696 from = entity->getLastAbsCoor(); 1697 to = entity->getAbsCoor(); 1698 collPos = from; 1699 dirY = Vector(0.0, 1.0, 0.0); 1700 1701 1702 1703 1704 /* Y Ray up */ 1705 // init some member variables before collision check 1706 this->inputStart = from; 1707 this->inputEnd = to; 1708 this->checkCollisionRayN(this->root,0.0f,1.0f, &from, &to ); 1709 1710 if( !this->outputStartsOut ) 1711 { 1712 this->collPlane = new plane; 1713 this->collPlane->x = 0.0f; 1714 this->collPlane->y = 0.0f; 1715 this->collPlane->z = 0.0f; 1716 yCollisionUp = true; 1717 } 1718 else 1719 { 1720 if( this->outputFraction == 1.0f) 1721 { 1722 if( this->outputAllSolid ) 1723 { 1724 this->collPlane = new plane; 1725 this->collPlane->x = 0.0f; 1726 this->collPlane->y = 0.0f; 1727 this->collPlane->z = 0.0f; 1728 yCollisionUp = true; 1729 SolidFlag = true; 1730 } 1731 else 1732 { 1733 yCollisionUp = false; 1734 collPos = to; 1735 } 1736 } 1737 else 1738 { 1739 yCollisionUp = true; 1740 collPos = from + (to - from) * this->outputFraction; 1741 this->out = collPos; // why this???? 1742 } 1743 } 1744 testPlane = this->collPlane; 1745 1746 // collision registration 1747 if( yCollisionUp) 1748 { 1749 CoRe::CollisionTube::getInstance()->registerCollisionEvent( CoRe::CREngine::CR_COLLISION_TYPE_WAY, 1750 entity, this->parent, 1751 Vector(testPlane->x, testPlane->y, testPlane->z), 1752 collPos, SolidFlag); 1753 } 1754 1755 return yCollisionUp; 1666 1756 1667 1757 } -
trunk/src/lib/graphics/importer/bsp/bsp_manager.h
r10519 r10618 88 88 void checkCollisionRayN(BspTreeNode * node,float startFraction, float endFraction, Vector* start, Vector* end); 89 89 90 void checkCollisionX(WorldEntity* entity); 91 void checkCollisionY(WorldEntity* entity); 92 void checkCollisionZ(WorldEntity* entity); 90 bool checkCollisionX(WorldEntity* entity); 91 bool checkCollisionY(WorldEntity* entity); 92 bool checkCollisionZ(WorldEntity* entity); 93 bool checkCollisionWay(WorldEntity* entity); 93 94 94 95 void checkCollisionBox(void); -
trunk/src/lib/graphics/light.h
r9869 r10618 102 102 void setAmbientColor(GLfloat r, GLfloat g, GLfloat b); 103 103 // HACK: Assuming r = g = b values 104 inline GLfloat getAmbientColor() { return this->ambientColor[0]; } 104 // SOLVED: nobody uses it anyway 105 // inline GLfloat getAmbientColor() { return this->ambientColor[0]; } 105 106 106 107 Light* getLight(int lightNumber) const; -
trunk/src/lib/graphics/render2D/element_2d.cc
r9869 r10618 24 24 #include "state.h" 25 25 #include "p_node.h" 26 #include " camera.h"26 #include "tools/camera.h" 27 27 /////////////////////////// 28 28 -
trunk/src/lib/gui/qt/gui_audio.cc
r8145 r10618 30 30 #include <QtGui/QLCDNumber> 31 31 #include "debug.h" 32 #include " globals.h"32 #include "orxonox_globals.h" 33 33 34 34 #include "qt_gui_elements.h" -
trunk/src/lib/gui/qt/gui_control.cc
r8495 r10618 35 35 #include "lib/event/key_names.h" 36 36 37 #include " globals.h"37 #include "orxonox_globals.h" 38 38 #include "debug.h" 39 39 #include "qt_gui_elements.h" -
trunk/src/lib/gui/qt/gui_general.cc
r8145 r10618 31 31 32 32 #include "debug.h" 33 #include " globals.h"33 #include "orxonox_globals.h" 34 34 35 35 #include "qt_gui_elements.h" -
trunk/src/lib/gui/qt/gui_video.cc
r9406 r10618 28 28 29 29 #include <QtGui/QLayout> 30 #include " globals.h"30 #include "orxonox_globals.h" 31 31 #include "debug.h" 32 32 -
trunk/src/lib/lang
-
Property
svn:ignore
set to
*.a
.deps
Makefile.in
Makefile
-
Property
svn:ignore
set to
-
trunk/src/lib/math/curve.h
r10368 r10618 10 10 #define _CURVE_H 11 11 12 #include <list> 12 13 #include "vector.h" 13 14 #include "quaternion.h" 14 15 template<class T> class tList;16 template<class T> class tIterator;17 15 18 16 //! An Enumerator that defines what sort of Curves are availible … … 73 71 Curve* dirCurve; //!< The derivation-curve of this Curve. 74 72 75 tList<PathNode>* nodeList; //!< A list of all the Nodes of a Curve. 76 tIterator<PathNode>* nodeIterator; //!< An iterator that should point to the current Node 73 std::list<PathNode> nodeList; //!< A list of all the Nodes of a Curve. 77 74 PathNode* firstNode; //!< First node of the curve. 78 75 PathNode* currentNode; //!< The node we are working with (the Last node). … … 105 102 106 103 107 //! B-Spline108 /**109 class to handle b-spline in 3d space110 */111 class BSplieCurve : public Curve112 {113 114 115 };116 117 104 #endif /* _CURVE_H */ -
trunk/src/lib/parser/cmdline_parser
- Property svn:ignore
-
old new 2 2 Makefile.in 3 3 .deps 4 libORX* 4 *.a
-
- Property svn:ignore
-
trunk/src/lib/physics/physics_interface.cc
r9869 r10618 27 27 28 28 #include "string.h" 29 #include "stdincl.h"30 29 31 30 -
trunk/src/lib/script_engine
-
Property
svn:ignore
set to
*.a
Makefile.in
Makefile
.deps
-
Property
svn:ignore
set to
-
trunk/src/lib/script_engine/Makefile.am
r9916 r10618 28 28 script_method.h \ 29 29 executor_lua_state.h 30 31 32 33 34 check_PROGRAMS = example35 example_DEPENDENCIES = \36 $(MAINSRCDIR)/world_entities/libORXwe.a \37 $(libORXlibs_a_LIBRARIES_) \38 $(MAINSRCDIR)/util/libORXutils.a39 example_LDADD = \40 $(MAINSRCDIR)/util/libORXutils.a \41 $(libORXlibs_a_LIBRARIES_) \42 libORXscript.a -L../../../extern_libs @LUA_LIBS@ \43 $(MAINSRCDIR)/world_entities/libORXwe.a \44 $(libORXlibs_a_LIBRARIES_) \45 $(MAINSRCDIR)/util/libORXutils.a46 47 example_SOURCES= \48 example.cc \49 \50 ../util/executor/executor_lua.cc -
trunk/src/lib/script_engine/script_manager.cc
r9869 r10618 25 25 26 26 #include "script.h" 27 #include " script_trigger.h"27 #include "tools/script_trigger.h" 28 28 #include "luaincl.h" 29 29 #include "loading/load_param_xml.h" -
trunk/src/lib/shell/shell_input.cc
r9916 r10618 24 24 #include "compiler.h" 25 25 #include "key_names.h" 26 27 #include "game_world.h" 28 #include "state.h" 26 29 27 30 … … 284 287 { 285 288 if (this->delayed > 0.0) 286 this->delayed -= dt; 289 { 290 StoryEntity* storyEntity = State::getCurrentStoryEntity(); 291 float speed = 1; 292 if ( storyEntity && storyEntity->isA( GameWorld::staticClassID() ) ) 293 { 294 speed = ((GameWorld*)storyEntity)->getSpeed(); 295 } 296 this->delayed -= dt / speed; 297 } 287 298 else if (this->pressedKey != SDLK_FIRST ) 288 299 { -
trunk/src/lib/sound/Makefile.am
r9869 r10618 11 11 ogg_player.cc 12 12 13 noinst_HEADERS = sound_engine.h \ 14 sound_source.h \ 15 sound_buffer.h \ 16 sound_buffer_data.h \ 17 resource_sound_buffer.h \ 18 ogg_player.h 13 noinst_HEADERS = \ 14 alincl.h \ 15 sound_engine.h \ 16 sound_source.h \ 17 sound_buffer.h \ 18 sound_buffer_data.h \ 19 resource_sound_buffer.h \ 20 ogg_player.h -
trunk/src/lib/sound/ogg_player.cc
r9869 r10618 79 79 bool OggPlayer::open(const std::string& fileName) 80 80 { 81 OrxThread::MutexLock musicLock(&this->musicMutex);81 OrxThread::MutexLocker musicLock(&this->musicMutex); 82 82 // release old Ogg-File (if loaded) 83 83 if (this->state & OggPlayer::FileOpened) … … 212 212 if (this->state & OggPlayer::FileOpened) 213 213 { 214 OrxThread::MutexLock musicLock(&this->musicMutex);214 OrxThread::MutexLocker musicLock(&this->musicMutex); 215 215 ov_time_seek(&this->oggStream, timeCode); 216 216 } … … 263 263 { 264 264 { 265 OrxThread::MutexLock musicLock(&ogg->musicMutex);265 OrxThread::MutexLocker musicLock(&ogg->musicMutex); 266 266 ogg->update(); 267 267 } … … 286 286 this->state |= OggPlayer::Playing; 287 287 288 OrxThread::MutexLock musicLock(&this->musicMutex);288 OrxThread::MutexLocker musicLock(&this->musicMutex); 289 289 if(!this->stream(this->buffers[0]) || !this->stream(this->buffers[1])) 290 290 { -
trunk/src/lib/sound/ogg_player.h
r9869 r10618 13 13 #include <ogg/ogg.h> 14 14 #include <vorbis/vorbisfile.h> 15 #include "util/thread ing.h"15 #include "util/threads/mutex_locker.h" 16 16 17 17 struct File; -
trunk/src/lib/sound/sound_engine.cc
r9869 r10618 24 24 #include "debug.h" 25 25 #include "parser/preferences/preferences.h" 26 #include " globals.h"26 #include "orxonox_globals.h" 27 27 #include "resource_sound_buffer.h" 28 28 -
trunk/src/lib/sound/sound_engine.h
r9869 r10618 15 15 #include <list> 16 16 #include <stack> 17 #include "thread ing.h"17 #include "threads/mutex.h" 18 18 19 19 #define SOUND_DOPPLER_FACTOR 0.001 //!< A factor for the audible doppler effect -
trunk/src/lib/util
-
Property
svn:ignore
set to
.deps
Makefile
Makefile.in
*.a
-
Property
svn:ignore
set to
-
trunk/src/lib/util/Makefile.am
r9869 r10618 29 29 filesys/net_link.cc \ 30 30 \ 31 thread ing.cc \31 threads/thread.cc \ 32 32 timer.cc 33 33 … … 63 63 filesys/net_link.h \ 64 64 \ 65 threading.h \ 65 threads/threading.h \ 66 threads/thread.h \ 67 threads/mutex.h \ 68 threads/mutex_locker.h \ 69 \ 66 70 timer.h \ 67 71 \ … … 77 81 loading/dynamic_loader.h \ 78 82 \ 79 count_pointer.h \ 80 list.h 83 count_pointer.h -
trunk/src/lib/util/debug_buffer.cc
r9869 r10618 20 20 #include "debug.h" 21 21 #include "compiler.h" 22 #include "thread ing.h"22 #include "threads/mutex_locker.h" 23 23 24 24 /** … … 64 64 static OrxThread::Mutex DebugBuffer__bufferMutex; 65 65 66 OrxThread::MutexLock bufferLock(&DebugBuffer__bufferMutex);66 OrxThread::MutexLocker bufferLock(&DebugBuffer__bufferMutex); 67 67 68 68 va_list arguments; -
trunk/src/lib/util/filesys/net_link.cc
r9406 r10618 17 17 #include "debug.h" 18 18 19 #include "threads/mutex_locker.h" 19 20 20 21 #ifdef __OSX__ … … 45 46 int NetLink::openupInBrowser(void* url) 46 47 { 47 OrxThread::MutexLock lock(&NetLink::_mutex);48 OrxThread::MutexLocker lock(&NetLink::_mutex); 48 49 49 50 std::string URL = *(std::string*)url; … … 69 70 void NetLink::setDefaultBrowser(const std::string& browserName) 70 71 { 71 OrxThread::MutexLock lock(&NetLink::_mutex);72 OrxThread::MutexLocker lock(&NetLink::_mutex); 72 73 NetLink::_defaultBrowser = browserName; 73 74 } -
trunk/src/lib/util/filesys/net_link.h
r9406 r10618 19 19 #include <list> 20 20 21 #include "thread ing.h"21 #include "threads/mutex.h" 22 22 23 23 //! NetLink is a File and Link executer for Internet Links -
trunk/src/lib/util/loading/game_loader.cc
r9869 r10618 23 23 #include "debug.h" 24 24 #include "campaign.h" 25 #include "compiler.h" 25 26 26 27 #include "key_mapper.h" -
trunk/src/lib/util/loading/game_loader.h
r9869 r10618 9 9 //#include "stdincl.h" 10 10 #include "story_def.h" 11 #include "comincl.h"12 11 #include "event_listener.h" 13 12 -
trunk/src/orxonox.cc
r10317 r10618 28 28 #include "orxonox.h" 29 29 30 #include " globals.h"30 #include "orxonox_globals.h" 31 31 32 32 #include "gui/qt/qt_gui.h" … … 46 46 47 47 #include "loading/fast_factory.h" 48 49 #include "subprojects/benchmark.h"50 48 51 49 #include "shell_command_class.h" -
trunk/src/story_entities/game_world.cc
r10523 r10618 27 27 28 28 #include "player.h" 29 #include "camera.h" 30 #include "environment.h" 31 #include "terrain.h" 32 #include "test_entity.h" 33 #include "terrain.h" 29 #include "tools/camera.h" 30 #include "tools/cameraman.h" 31 #include "environments/environment.h" 32 #include "environments/terrain.h" 34 33 #include "playable.h" 35 34 #include "environments/mapped_water.h" … … 193 192 this->dataXML = (TiXmlElement*)root->Clone(); 194 193 195 //remove this after finished testing !!!!196 //Object* obj= new Object();197 //obj->setName("Obj");198 //Account* a = new Account();199 //a->setName("a");200 //Account *b = new Account(30);201 //b->setName("b");202 203 204 194 LoadParamXML(root, "ScriptManager", &this->scriptManager, ScriptManager, loadParams); 205 195 … … 454 444 455 445 // tick camera first 456 CameraMan* man = State::getCameraman(); 457 (man->getCurrentCam())->tick(this->dtS); 446 (State::getCamera())->tick(this->dtS); 458 447 // TICK everything 459 448 for (i = 0; i < this->dataTank->tickLists.size(); ++i) … … 590 579 void GameWorld::applyCameraSettings() 591 580 { 592 Camera Man* man = State::getCameraman();593 Camera* c = man->getCurrentCam(); 581 Camera* c = State::getCamera(); 582 594 583 if( c != NULL) 595 584 { -
trunk/src/story_entities/game_world.h
r10428 r10618 56 56 inline double getGameTime() { return this->gameTime; } 57 57 /** sets the game speed @param speed speed of the Game */ 58 inline void setSpeed(float speed) { this->speed = speed; }; 58 inline void setSpeed(float speed) { this->speed = speed; } 59 inline float getSpeed(){ return this->speed; } 59 60 /** returns the track path of this world @returns the track path */ 60 61 -
trunk/src/story_entities/game_world_data.cc
r10513 r10618 29 29 #include "world_entity.h" 30 30 #include "player.h" 31 #include " camera.h"32 #include " cameraman.h"33 #include " terrain.h"34 #include " skybox.h"31 #include "tools/camera.h" 32 #include "tools/cameraman.h" 33 #include "environments/terrain.h" 34 #include "environments/skybox.h" 35 35 #include "md2/md2Model.h" 36 36 #include "world_entities/projectiles/projectile.h" … … 101 101 PNode::getNullParent(); 102 102 Camera* localCamera = new Camera(); 103 localCamera->setName ("GameWorld -Camera");103 localCamera->setName ("GameWorldCamera"); 104 104 State::setCamera(localCamera, localCamera->getTarget()); 105 105 //CameraMan* camMan = new CameraMan(); … … 205 205 206 206 glmis->setBackgroundImage("textures/load_screens/default.jpg"); 207 glmis->setPosScale(0.0,0.0,1.0,1.0); 208 glmis->setBarImage("textures/load_screens/default_bar.png"); 209 glmis->setBarPosScale(0.65,0.87,0.3,0.05); 210 207 211 this->glmis->setMaximum(8); 208 212 // this->glmis->draw(); -
trunk/src/story_entities/menu/game_menu.cc
r10403 r10618 27 27 28 28 #include "graphics_engine.h" 29 #include " camera.h"29 #include "tools/camera.h" 30 30 #include "sound_engine.h" 31 31 -
trunk/src/story_entities/multi_player_world_data.cc
r10114 r10618 27 27 #include "world_entity.h" 28 28 #include "player.h" 29 #include "camera.h" 30 #include "environment.h" 31 #include "terrain.h" 32 #include "test_entity.h" 33 #include "terrain.h" 34 #include "md2/md2Model.h" 29 #include "tools/camera.h" 30 #include "environments/environment.h" 31 #include "environments/terrain.h" 35 32 #include "world_entities/projectiles/projectile.h" 36 33 #include "npcs/npc_test1.h" -
trunk/src/subprojects/collision_detection/collision_detection.cc
r8490 r10618 28 28 #include "model.h" 29 29 #include "collision_test_entity.h" 30 #include "list.h"31 30 32 31 #include "graphics_engine.h" -
trunk/src/subprojects/particles/Makefile.am
r6302 r10618 5 5 bin_PROGRAMS = particles 6 6 7 particles_LDADD = $(MAINSRCDIR)/lib/physics/libORXphysics.a \ 8 $(MAINSRCDIR)/lib/event/libORXevent.a \ 9 $(MAINSRCDIR)/lib/particles/libORXparticles.a \ 10 $(MAINSRCDIR)/lib/shell/libORXshell.a \ 11 $(MAINSRCDIR)/lib/sound/libORXsound.a \ 12 $(MAINSRCDIR)/lib/graphics/libORXgraphics.a \ 13 $(MAINSRCDIR)/lib/graphics/importer/libORXimporter.a \ 14 $(MAINSRCDIR)/lib/physics/libORXphysics.a \ 15 $(MAINSRCDIR)/lib/tinyxml/libtinyxml.a \ 16 $(MAINSRCDIR)/lib/collision_detection/libORXcd.a \ 17 $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS) 18 7 particles_LDADD = 19 8 particles_CPPFLAGS = -DGUI_MODULE \ 20 9 $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) 21 10 22 11 particles_SOURCES= ../framework.cc \ 23 particle_fun.cc \ 24 $(MAINSRCDIR)/lib/graphics/light.cc \ 25 $(MAINSRCDIR)/util/state.cc \ 26 $(MAINSRCDIR)/world_entities/camera.cc \ 27 $(MAINSRCDIR)/world_entities/world_entity.cc \ 28 $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \ 29 $(MAINSRCDIR)/lib/lang/base_object.cc \ 30 $(MAINSRCDIR)/lib/lang/class_list.cc \ 31 $(MAINSRCDIR)/lib/math/vector.cc \ 32 $(MAINSRCDIR)/util/loading/resource_manager.cc \ 33 $(MAINSRCDIR)/lib/coord/p_node.cc \ 34 $(MAINSRCDIR)/lib/gui/gtk_gui/gui_gtk.cc \ 35 $(MAINSRCDIR)/lib/util/substring.cc \ 36 $(MAINSRCDIR)/util/loading/load_param.cc \ 37 $(MAINSRCDIR)/util/loading/load_param_description.cc \ 38 $(MAINSRCDIR)/lib/util/helper_functions.cc \ 39 $(MAINSRCDIR)/util/loading/factory.cc \ 40 $(MAINSRCDIR)/lib/util/color.cc \ 41 $(MAINSRCDIR)/lib/parser/ini_parser/ini_parser.cc 42 12 particle_fun.cc -
trunk/src/util/Makefile.am
r10368 r10618 26 26 animation/animation_player.cc \ 27 27 \ 28 track/pilot_node.cc \ 29 track/track.cc \ 30 track/track_manager.cc \ 31 track/track_node.cc 28 track/track.cc 32 29 33 30 noinst_HEADERS = \ … … 52 49 animation/t_animation.h \ 53 50 \ 54 track/pilot_node.h \ 55 track/track.h \ 56 track/track_manager.h \ 57 track/track_node.h 58 51 track/track.h -
trunk/src/util/animation/animation.h
r9869 r10618 10 10 #include "debug.h" 11 11 12 #include "list.h"12 #include <list> 13 13 // FORWARD DECLARATION 14 14 -
trunk/src/util/animation/animation3d.cc
r9406 r10618 35 35 36 36 // create a new List 37 this->keyFrameList = new tList<KeyFrame3D>(); 38 KeyFrame3D* tmpKeyFrame = new KeyFrame3D; 39 tmpKeyFrame->position = Vector(); 40 tmpKeyFrame->direction = Quaternion(); 41 keyFrameList->add(tmpKeyFrame); 42 43 this->currentKeyFrame = tmpKeyFrame; 44 this->nextKeyFrame = tmpKeyFrame; 37 KeyFrame3D tmpKeyFrame; 38 keyFrameList.push_back(tmpKeyFrame); 39 40 this->currentKeyFrame = keyFrameList.begin(); 41 this->nextKeyFrame = keyFrameList.begin(); 45 42 46 43 this->animFuncMov = NULL;//&Animation3D::mLinear; 47 44 this->animFuncRot = NULL;//&Animation3D::rLinear; 48 49 45 } 50 46 … … 56 52 Animation3D::~Animation3D() 57 53 { 58 // delete all the KeyFrames59 tIterator<KeyFrame3D>* itKF = keyFrameList->getIterator();60 KeyFrame3D* enumKF = itKF->firstElement();61 while (enumKF)62 {63 delete enumKF;64 enumKF = itKF->nextElement();65 }66 delete itKF;67 delete this->keyFrameList;68 54 } 69 55 … … 73 59 void Animation3D::rewind() 74 60 { 75 this->currentKeyFrame = keyFrameList ->firstElement();76 this->nextKeyFrame = keyFrameList ->nextElement(keyFrameList->firstElement());61 this->currentKeyFrame = keyFrameList.begin(); 62 this->nextKeyFrame = keyFrameList.begin()++; 77 63 this->localTime = 0.0; 78 this->setAnimFuncMov( this->currentKeyFrame->animFuncMov);79 this->setAnimFuncRot( this->currentKeyFrame->animFuncRot);64 this->setAnimFuncMov((*this->currentKeyFrame).animFuncMov); 65 this->setAnimFuncRot((*this->currentKeyFrame).animFuncRot); 80 66 } 81 67 … … 100 86 // animFuncRot = animFuncMov; 101 87 102 KeyFrame3D * tmpKeyFrame;88 KeyFrame3D& tmpKeyFrame = keyFrameList.front(); 103 89 104 90 // when adding the first frame 105 91 if (this->keyFrameCount == 0) 106 92 { 107 tmpKeyFrame = this->keyFrameList->firstElement();108 93 //this->setAnimFuncMov(animFuncMov); 109 94 //this->setAnimFuncRot(animFuncRot); … … 111 96 else 112 97 { 113 tmpKeyFrame = new KeyFrame3D;114 98 // when adding the second frame 99 this->keyFrameList.push_back(KeyFrame3D()); 115 100 if (this->currentKeyFrame == this->nextKeyFrame) 116 this->nextKeyFrame = tmpKeyFrame; 117 this->keyFrameList->add(tmpKeyFrame); 101 this->nextKeyFrame = --keyFrameList.end(); 118 102 } 119 103 120 tmpKeyFrame ->position = position;104 tmpKeyFrame.position = position; 121 105 //tmpKeyFrame->lastPosition = position; 122 tmpKeyFrame ->direction = direction;123 tmpKeyFrame ->duration = duration;124 tmpKeyFrame ->animFuncMov = animFuncMov;125 tmpKeyFrame ->animFuncRot = animFuncRot;106 tmpKeyFrame.direction = direction; 107 tmpKeyFrame.duration = duration; 108 tmpKeyFrame.animFuncMov = animFuncMov; 109 tmpKeyFrame.animFuncRot = animFuncRot; 126 110 this->keyFrameCount++; 127 111 } … … 146 130 this->currentKeyFrame = this->nextKeyFrame; 147 131 // checking, if we should still Play the animation 148 if (this->currentKeyFrame == this->keyFrameList->lastElement())132 if (this->currentKeyFrame == --this->keyFrameList.end()) 149 133 this->handleInfinity(); 150 this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame); 134 this->nextKeyFrame = this->currentKeyFrame; 135 this->nextKeyFrame++; 151 136 this->setAnimFuncMov(this->currentKeyFrame->animFuncMov); 152 137 this->setAnimFuncRot(this->currentKeyFrame->animFuncRot); -
trunk/src/util/animation/animation3d.h
r6616 r10618 16 16 This represents one point with direction of the animation 17 17 */ 18 typedef struct KeyFrame3D { 18 typedef struct KeyFrame3D 19 { 19 20 float duration; //!< The duration of this KeyFrame 20 21 Vector position; //!< The position of this KeyFrame … … 31 32 class Animation3D : public Animation 32 33 { 33 34 public: 34 35 Animation3D(PNode* object); 35 36 virtual ~Animation3D(); … … 44 45 virtual void tick(float dt); 45 46 46 47 private: 47 48 // animation functions 48 49 void setAnimFuncMov(ANIM_FUNCTION animFunc); … … 69 70 70 71 71 private: 72 KeyFrame3D* currentKeyFrame; //!< The current KeyFrame 73 KeyFrame3D* nextKeyFrame; //!< The KeyFrame we iterate to 74 tList<KeyFrame3D>* keyFrameList; //!< The KeyFrameList 72 private: 73 typedef std::list<KeyFrame3D> KeyFrameList; //!< A Type definition for th KeyFrame List 74 typedef KeyFrameList::iterator KeyFrameIterator; //!< A Type definition for th KeyFrame List 75 76 KeyFrameIterator currentKeyFrame; //!< The current KeyFrame 77 KeyFrameIterator nextKeyFrame; //!< The KeyFrame we iterate to 78 KeyFrameList keyFrameList; //!< The KeyFrameList 75 79 76 80 -
trunk/src/util/animation/t_animation.h
r8315 r10618 1 1 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 4 4 Copyright (C) 2004 orx 5 5 6 6 This program is free software; you can redistribute it and/or modify 7 7 it under the terms of the GNU General Public License as published by 8 8 the Free Software Foundation; either version 2, or (at your option) 9 9 any later version. 10 10 11 11 ### File Specific: 12 12 main-programmer: Benjamin Grauer … … 37 37 template<class T> class tAnimation : public Animation 38 38 { 39 39 public: 40 40 tAnimation(T* object = NULL, void (T::*funcToAnim)(float) = NULL); 41 virtual ~tAnimation();42 41 43 42 void setFuncToAnim(T* object, void (T::*funcToAnim)(float)); … … 48 47 virtual void tick(float dt); 49 48 50 49 private: 51 50 // animation functions 52 51 void setAnimFunc(ANIM_FUNCTION animFunc); … … 61 60 62 61 62 private: 63 typedef std::list<KeyFrameF> KeyFrameList; 64 typedef typename KeyFrameList::iterator KeyFrameIterator; 65 63 66 // ANIM_FUNCTION animFunc 64 67 float (tAnimation<T>::*animFunc)(float) const; //!< A Function for the AnimationType 65 68 66 KeyFrame F*currentKeyFrame; //!< The current KeyFrame67 KeyFrame F*nextKeyFrame; //!< The KeyFrame we iterate to68 tList<KeyFrameF>*keyFrameList; //!< The KeyFrameList69 KeyFrameIterator currentKeyFrame; //!< The current KeyFrame 70 KeyFrameIterator nextKeyFrame; //!< The KeyFrame we iterate to 71 KeyFrameList keyFrameList; //!< The KeyFrameList 69 72 70 73 T* object; //!< The Object from which to Animate something … … 83 86 { 84 87 // create a new List 85 this->keyFrameList = new tList<KeyFrameF>(); 86 KeyFrameF* tmpKeyFrame = new KeyFrameF; 87 tmpKeyFrame->value = 0.0; 88 tmpKeyFrame->duration = 1.0; 89 keyFrameList->add(tmpKeyFrame); 90 91 this->currentKeyFrame = tmpKeyFrame; 92 this->nextKeyFrame = tmpKeyFrame; 88 KeyFrameF tmpKeyFrame; 89 tmpKeyFrame.value = 0.0; 90 tmpKeyFrame.duration = 1.0; 91 keyFrameList.push_back(tmpKeyFrame); 92 93 this->currentKeyFrame = keyFrameList.begin(); 94 this->nextKeyFrame = keyFrameList.begin(); 93 95 94 96 this->animFunc = &tAnimation<T>::linear; … … 99 101 100 102 /** 101 * standard deconstructor102 103 deletes all the Keyframes104 */105 template<class T>106 tAnimation<T>::~tAnimation ()107 {108 // delete all the KeyFrames109 tIterator<KeyFrameF>* itKF = keyFrameList->getIterator();110 KeyFrameF* enumKF = itKF->firstElement();111 while (enumKF)112 {113 delete enumKF;114 enumKF = itKF->nextElement();115 }116 delete itKF;117 delete this->keyFrameList;118 }119 120 /**121 103 * rewinds the Animation to the beginning (first KeyFrame and time == 0) 122 104 */ … … 124 106 void tAnimation<T>::rewind() 125 107 { 126 this->currentKeyFrame = keyFrameList ->firstElement();127 this->nextKeyFrame = keyFrameList->nextElement(keyFrameList->firstElement());108 this->currentKeyFrame = keyFrameList.begin(); 109 this->nextKeyFrame = ++keyFrameList.begin(); 128 110 this->localTime = 0.0; 129 this->setAnimFunc( this->currentKeyFrame->animFunc);111 this->setAnimFunc((*this->currentKeyFrame).animFunc); 130 112 } 131 113 … … 157 139 animFunc = ANIM_DEFAULT_FUNCTION; 158 140 159 KeyFrameF * tmpKeyFrame;141 KeyFrameF& tmpKeyFrame = keyFrameList.front(); 160 142 161 143 // when adding the first frame 162 144 if (this->keyFrameCount == 0) 163 { 164 tmpKeyFrame = this->keyFrameList->firstElement(); 165 this->setAnimFunc(animFunc); 166 } 145 { 146 this->setAnimFunc(animFunc); 147 } 167 148 else 168 169 tmpKeyFrame = new KeyFrameF;170 // when adding the second frame171 if (this->currentKeyFrame == this->nextKeyFrame)172 this->nextKeyFrame = tmpKeyFrame;173 this-> keyFrameList->add(tmpKeyFrame);174 175 176 tmpKeyFrame ->value = value;177 tmpKeyFrame ->duration = duration;178 tmpKeyFrame ->animFunc = animFunc;149 { 150 this->keyFrameList.push_back(KeyFrameF()); 151 tmpKeyFrame = keyFrameList.back(); 152 // when adding the second frame 153 if (this->currentKeyFrame == this->nextKeyFrame) 154 this->nextKeyFrame = --keyFrameList.end(); 155 } 156 157 tmpKeyFrame.value = value; 158 tmpKeyFrame.duration = duration; 159 tmpKeyFrame.animFunc = animFunc; 179 160 this->keyFrameCount++; 180 161 } … … 188 169 { 189 170 if (this->bRunning) 171 { 172 this->localTime += dt; 173 if (localTime >= this->currentKeyFrame->duration) 190 174 { 191 this->localTime += dt; 192 if (localTime >= this->currentKeyFrame->duration) 193 { 194 if (likely(this->keyFramesToPlay != 0)) 195 { 196 if (unlikely(this->keyFramesToPlay > 0)) 197 --this->keyFramesToPlay; 198 // switching to the next Key-Frame 199 this->localTime -= this->currentKeyFrame->duration; 200 201 this->currentKeyFrame = this->nextKeyFrame; 202 // checking, if we should still Play the animation 203 if (this->currentKeyFrame == this->keyFrameList->lastElement()) 204 this->handleInfinity(); 205 this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame); 206 207 //printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value); 208 this->setAnimFunc(this->currentKeyFrame->animFunc); 209 } 210 else 211 this->pause(); 212 } 213 214 (this->object->*(funcToAnim))((this->*animFunc)(this->localTime)); 175 if (likely(this->keyFramesToPlay != 0)) 176 { 177 if (unlikely(this->keyFramesToPlay > 0)) 178 --this->keyFramesToPlay; 179 // switching to the next Key-Frame 180 this->localTime -= this->currentKeyFrame->duration; 181 182 this->currentKeyFrame = this->nextKeyFrame; 183 // checking, if we should still Play the animation 184 if (this->currentKeyFrame == --this->keyFrameList.end()) 185 this->handleInfinity(); 186 this->nextKeyFrame = this->currentKeyFrame; 187 this->nextKeyFrame++; 188 189 //printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value); 190 this->setAnimFunc(this->currentKeyFrame->animFunc); 191 } 192 else 193 this->pause(); 215 194 } 195 196 (this->object->*(funcToAnim))((this->*animFunc)(this->localTime)); 197 } 216 198 } 217 199 … … 224 206 { 225 207 switch (animFunc) 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 208 { 209 default: 210 case ANIM_CONSTANT: 211 this->animFunc = &tAnimation<T>::constant; 212 break; 213 case ANIM_LINEAR: 214 this->animFunc = &tAnimation<T>::linear; 215 break; 216 case ANIM_SINE: 217 this->animFunc = &tAnimation<T>::sine; 218 break; 219 case ANIM_COSINE: 220 this->animFunc = &tAnimation<T>::cosine; 221 break; 222 case ANIM_EXP: 223 this->animFunc = &tAnimation<T>::exp; 224 break; 225 case ANIM_NEG_EXP: 226 this->animFunc = &tAnimation<T>::negExp; 227 expFactor = - 1.0 / this->currentKeyFrame->duration * logf(DELTA_X); 228 break; 229 case ANIM_QUADRATIC: 230 this->animFunc = &tAnimation<T>::quadratic; 231 break; 232 case ANIM_RANDOM: 233 this->animFunc = &tAnimation<T>::random; 234 break; 235 } 254 236 } 255 237 … … 274 256 { 275 257 return this->currentKeyFrame->value + (this->nextKeyFrame->value - this->currentKeyFrame->value) 276 * (timePassed / this->currentKeyFrame->duration);258 * (timePassed / this->currentKeyFrame->duration); 277 259 } 278 260 … … 286 268 if (timePassed * 2.0 < this->currentKeyFrame->duration) 287 269 return this->currentKeyFrame->value + (this->nextKeyFrame->value - this->currentKeyFrame->value) 288 * sin( M_PI * timePassed / this->currentKeyFrame->duration)/2;270 * sin( M_PI * timePassed / this->currentKeyFrame->duration)/2; 289 271 else 290 272 return this->nextKeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value) 291 * sin( M_PI * (1.0 - timePassed / this->currentKeyFrame->duration))/2;273 * sin( M_PI * (1.0 - timePassed / this->currentKeyFrame->duration))/2; 292 274 /* 293 275 printf("::%f::::%f::\n",timePassed/this->currentKeyFrame->duration,retVal); … … 304 286 { 305 287 return ((this->nextKeyFrame->value + this->currentKeyFrame->value) + 306 (this->currentKeyFrame->value - this->nextKeyFrame->value) *307 cos( M_PI * timePassed / this->currentKeyFrame->duration))/2;288 (this->currentKeyFrame->value - this->nextKeyFrame->value) * 289 cos( M_PI * timePassed / this->currentKeyFrame->duration))/2; 308 290 } 309 291 … … 348 330 { 349 331 return this->currentKeyFrame->value + 350 (this->nextKeyFrame->value - this->currentKeyFrame->value) *351 (float)rand()/(float)RAND_MAX;332 (this->nextKeyFrame->value - this->currentKeyFrame->value) * 333 (float)rand()/(float)RAND_MAX; 352 334 } 353 335 -
trunk/src/util/multiplayer_team_deathmatch.cc
r10114 r10618 31 31 32 32 #include "shared_network_data.h" 33 #include " terrain.h"33 #include "environments/terrain.h" 34 34 #include "space_ships/space_ship.h" 35 35 … … 44 44 #include "shell_command.h" 45 45 46 #include " spawning_point.h"46 #include "tools/spawning_point.h" 47 47 48 48 #include "creatures/fps_player.h" -
trunk/src/util/state.cc
r10379 r10618 19 19 20 20 21 #include " camera.h"22 #include " cameraman.h"21 #include "tools/camera.h" 22 #include "tools/cameraman.h" 23 23 24 24 #ifndef NULL -
trunk/src/util/track/track.cc
r10512 r10618 25 25 #include "util/loading/load_param.h" 26 26 #include "track/track.h" 27 27 #include "glincl.h" 28 28 #include "p_node.h" 29 30 #include "stdincl.h"31 29 32 30 #include "debug.h" -
trunk/src/world_entities/Makefile.am
r10437 r10618 7 7 ## THESE ARE THE BASE CLASSES OF ALL WORLD_ENTITIES 8 8 libORXwe_a_SOURCES = world_entity.cc \ 9 cameraman.cc \9 tools/cameraman.cc \ 10 10 playable.cc\ 11 11 player.cc \ … … 18 18 projectiles/projectile.cc \ 19 19 extendable.cc\ 20 power_ups/power_up.cc \21 power_ups/param_power_up.cc \22 power_ups/weapon_power_up.cc\23 spawning_point.cc\20 items/power_ups/power_up.cc \ 21 items/power_ups/param_power_up.cc \ 22 items/power_ups/weapon_power_up.cc\ 23 tools/spawning_point.cc\ 24 24 effects/explosion.cc\ 25 25 effects/billboard.cc\ … … 31 31 32 32 noinst_HEADERS = world_entity.h\ 33 cameraman.h\33 tools/cameraman.h\ 34 34 extendable.h\ 35 35 playable.h \ … … 42 42 weapons/ammo_container.h\ 43 43 projectiles/projectile.h \ 44 power_ups/power_up.h\45 power_ups/param_power_up.h\46 power_ups/weapon_power_up.h \47 spawning_point.h\44 items/power_ups/power_up.h\ 45 items/power_ups/param_power_up.h\ 46 items/power_ups/weapon_power_up.h \ 47 tools/spawning_point.h\ 48 48 effects/explosion.h\ 49 49 effects/billboard.h\ -
trunk/src/world_entities/WorldEntities.am
r10516 r10618 14 14 world_entities/npcs/mover.cc \ 15 15 \ 16 world_entities/environment.cc \17 world_entities/skysphere.cc \18 world_entities/skybox.cc \19 world_entities/skydome.cc \20 world_entities/terrain.cc \21 world_entities/satellite.cc \22 world_entities/movie_entity.cc \23 world_entities/recorder.cc \24 world_entities/character_attributes.cc \25 world_entities/test_entity.cc \26 world_entities/test_entity2.cc \27 world_entities/blackscreen.cc \28 world_entities/scrolling_screen.cc \29 world_entities/planet.cc \30 world_entities/bsp_entity.cc \31 world_entities/mount_point.cc \32 world_entities/sound_entity.cc \33 world_entities/camera.cc \34 \35 world_entities/questGUI/quest_gui.cc \36 world_entities/questGUI/quest.cc \37 16 \ 38 17 world_entities/weapons/weapon_slot.cc \ … … 52 31 world_entities/weapons/heavy_blaster.cc \ 53 32 world_entities/weapons/swarm_launcher.cc \ 54 world_entities/weapons/spike_launcher.cc \55 33 world_entities/weapons/spike_thrower.cc \ 56 34 world_entities/weapons/acid_launcher.cc \ … … 74 52 world_entities/projectiles/spike_ball.cc \ 75 53 \ 76 world_entities/ power_ups/turret_power_up.cc \77 world_entities/ power_ups/laser_power_up.cc \54 world_entities/items/power_ups/turret_power_up.cc \ 55 world_entities/items/power_ups/laser_power_up.cc \ 78 56 \ 79 57 world_entities/space_ships/space_ship.cc \ … … 92 70 world_entities/environments/model_entity.cc \ 93 71 world_entities/environments/building.cc \ 94 72 world_entities/environments/rotor.cc \ 95 73 world_entities/environments/mapped_water.cc \ 96 \ 97 world_entities/elements/image_entity.cc \ 98 world_entities/elements/text_element.cc \ 99 world_entities/elements/glgui_radar.cc \ 100 \ 101 world_entities/effects/lightning_bolt.cc \ 102 world_entities/effects/blink.cc \ 103 \ 104 world_entities/script_trigger.cc \ 105 \ 106 \ 107 world_entities/particles/particle_emitter.cc \ 108 world_entities/particles/dot_emitter.cc \ 109 world_entities/particles/box_emitter.cc \ 110 world_entities/particles/plane_emitter.cc \ 111 world_entities/particles/emitter_node.cc \ 112 \ 113 world_entities/particles/particle_system.cc \ 114 world_entities/particles/sprite_particles.cc \ 115 world_entities/particles/spark_particles.cc \ 116 world_entities/particles/model_particles.cc \ 117 world_entities/particles/dot_particles.cc \ 118 \ 119 world_entities/particles/quick_animation.cc \ 74 world_entities/environments/environment.cc \ 75 world_entities/environments/skysphere.cc \ 76 world_entities/environments/skybox.cc \ 77 world_entities/environments/skydome.cc \ 78 world_entities/environments/terrain.cc \ 79 world_entities/environments/planet.cc \ 80 world_entities/environments/bsp_entity.cc \ 120 81 \ 121 82 \ … … 129 90 world_entities/weather_effects/snow_effect.cc \ 130 91 world_entities/weather_effects/lightning_effect.cc \ 131 world_entities/weather_effects/lense_flare.cc 92 world_entities/weather_effects/lense_flare.cc \ 93 world_entities/elements/image_entity.cc \ 94 \ 95 world_entities/elements/text_element.cc \ 96 world_entities/elements/glgui_radar.cc \ 97 \ 98 world_entities/effects/lightning_bolt.cc \ 99 world_entities/effects/blink.cc \ 100 \ 101 world_entities/tools/movie_entity.cc \ 102 world_entities/tools/recorder.cc \ 103 world_entities/tools/blackscreen.cc \ 104 world_entities/tools/scrolling_screen.cc \ 105 world_entities/tools/mount_point.cc \ 106 world_entities/tools/sound_entity.cc \ 107 world_entities/tools/camera.cc \ 108 world_entities/tools/script_trigger.cc \ 109 \ 110 \ 111 world_entities/particles/particle_emitter.cc \ 112 world_entities/particles/dot_emitter.cc \ 113 world_entities/particles/box_emitter.cc \ 114 world_entities/particles/plane_emitter.cc \ 115 world_entities/particles/emitter_node.cc \ 116 world_entities/particles/particle_system.cc \ 117 world_entities/particles/sprite_particles.cc \ 118 world_entities/particles/spark_particles.cc \ 119 world_entities/particles/model_particles.cc \ 120 world_entities/particles/dot_particles.cc \ 121 world_entities/particles/quick_animation.cc \ 122 \ 123 \ 124 \ 125 world_entities/questGUI/quest_gui.cc \ 126 world_entities/questGUI/quest.cc 127 132 128 133 129 … … 147 143 npcs/mover.h \ 148 144 \ 149 environment.h \ 150 skysphere.h \ 151 skybox.h \ 152 skydome.h \ 153 terrain.h \ 154 satellite.h \ 155 movie_entity.h \ 156 recorder.h \ 145 environments/environment.h \ 146 environments/skysphere.h \ 147 environments/skybox.h \ 148 environments/skydome.h \ 149 environments/terrain.h \ 150 tools/movie_entity.h \ 151 tools/recorder.h \ 157 152 character_attributes.h \ 158 test_entity.h \ 159 test_entity2.h \ 160 blackscreen.h \ 161 scrolling_screen.h \ 162 planet.h \ 163 bsp_entity.h \ 164 mount_point.h \ 165 sound_entity.h \ 166 camera.h \ 153 tools/blackscreen.h \ 154 tools/scrolling_screen.h \ 155 environments/planet.h \ 156 environments/bsp_entity.h \ 157 tools/mount_point.h \ 158 tools/sound_entity.h \ 159 tools/camera.h \ 167 160 \ 168 161 questGUI/quest_gui.h \ … … 185 178 weapons/heavy_blaster.h \ 186 179 weapons/swarm_launcher.h \ 187 weapons/spike_launcher.h \188 180 weapons/spike_thrower.h \ 189 181 weapons/acid_launcher.h \ … … 208 200 projectiles/spike_ball.h \ 209 201 \ 210 power_ups/turret_power_up.h \211 power_ups/laser_power_up.h \202 items/power_ups/turret_power_up.h \ 203 items/power_ups/laser_power_up.h \ 212 204 \ 213 205 space_ships/space_ship.h \ -
trunk/src/world_entities/creatures/fps_player.cc
r10567 r10618 32 32 33 33 #include "aabb.h" 34 #include " bsp_entity.h"34 #include "environments/bsp_entity.h" 35 35 36 36 #include "key_mapper.h" … … 381 381 if( !this->isOnGround()) 382 382 { 383 this->fallVelocity += 300.0f * time;383 if(this->fallVelocity + 300.0F*time < 10000.0f)this->fallVelocity += 300.0f * time; 384 384 velocity -= Vector(0.0, 1.0, 0.0) * this->fallVelocity; 385 385 … … 390 390 this->fallVelocity = 0.0f; 391 391 } 392 393 this->shiftCoor( velocity*time ); 394 395 392 if((velocity *time).len() < 10.0f) this->shiftCoor( velocity*time ); 393 else{ 394 velocity.normalize(); 395 velocity *= 10.0f; 396 this->shiftCoor( velocity ); 397 } 396 398 397 399 -
trunk/src/world_entities/effects/billboard.cc
r10501 r10618 22 22 #include "glincl.h" 23 23 #include "state.h" 24 #include " cameraman.h"25 #include " camera.h"24 #include "tools/cameraman.h" 25 #include "tools/camera.h" 26 26 27 27 #include "debug.h" … … 134 134 this->material->select(); 135 135 136 const CameraMan* man = State::getCameraman(); 137 const Camera* camera = man->getCurrentCam(); //!< @todo MUST be different 136 const Camera* camera = State::getCamera(); 138 137 Vector cameraPos = camera->getAbsCoor(); 139 138 Vector cameraTargetPos = camera->getTarget()->getAbsCoor(); -
trunk/src/world_entities/effects/blink.cc
r10530 r10618 1 1 /* 2 orxonox - the future of 3D-vertical-scrollers 2 3 3 4 Copyright (C) 2006 orx -
trunk/src/world_entities/effects/trail.cc
r10511 r10618 21 21 #include "util/loading/load_param.h" 22 22 #include "util/loading/factory.h" 23 24 #include "quaternion.h"25 #include "vector.h"26 23 27 24 #include "graphics_engine.h" -
trunk/src/world_entities/effects/wobblegrid.cc
r10557 r10618 24 24 #include "grid.h" 25 25 26 #include " cameraman.h"27 #include " camera.h"28 29 #include < assert.h>26 #include "tools/cameraman.h" 27 #include "tools/camera.h" 28 29 #include <cassert> 30 30 #include "debug.h" 31 31 … … 93 93 this->angularSpeed = M_PI; //180; 94 94 this->setModel(this->grid); 95 96 this->angle = 0; 95 97 96 98 this->setUpdateFunction((*sinf)); … … 201 203 void Wobblegrid::orient() 202 204 { 203 204 CameraMan* cman = State::getCameraman(); 205 Camera* c = cman->getCurrentCam(); 205 206 Camera* c = State::getCamera(); 206 207 207 208 Vector view = this->getAbsCoor() - c->getAbsCoor(); -
trunk/src/world_entities/elements/glgui_energywidgetvertical.cc
r10516 r10618 66 66 this->_image->setBackgroundTexture(Texture()); 67 67 this->_image->setBackgroundColor(Color(1,1,1,0)); 68 this->_image->loadImageFromFile("textures/evil-flower.png");68 // this->_image->loadImageFromFile("textures/evil-flower.png"); 69 69 //this->_image.setRelCoor2D(borderLeft(), borderTop() + this->_bar.getSizeX2D()); 70 70 this->_image->setRelCoor2D(0,0); -
trunk/src/world_entities/extendable.h
r9869 r10618 13 13 14 14 15 #include " power_ups/power_up.h"15 #include "items/power_ups/power_up.h" 16 16 //! A class for Extendable Entities 17 17 class Extendable : virtual public BaseObject { -
trunk/src/world_entities/npcs/generic_npc.cc
r10511 r10618 31 31 #include "sound/resource_sound_buffer.h" 32 32 33 #include " bsp_entity.h"33 #include "environments/bsp_entity.h" 34 34 35 35 -
trunk/src/world_entities/npcs/mover.cc
r10519 r10618 21 21 #include "mover.h" 22 22 #include "state.h" 23 #include " camera.h"23 #include "tools/camera.h" 24 24 25 25 -
trunk/src/world_entities/npcs/npc.cc
r10552 r10618 46 46 #include "weapons/heavy_blaster.h" 47 47 #include "weapons/swarm_launcher.h" 48 #include "weapons/spike_launcher.h"49 48 #include "weapons/spike_thrower.h" 50 49 #include "weapons/acid_launcher.h" … … 53 52 #include "weapons/cannon.h" 54 53 55 #include " mount_point.h"54 #include "tools/mount_point.h" 56 55 #include "weapons/weapon_slot.h" 57 56 -
trunk/src/world_entities/npcs/npc_test1.cc
r9869 r10618 22 22 23 23 #include "state.h" 24 #include " power_ups/turret_power_up.h"25 #include " power_ups/laser_power_up.h"24 #include "items/power_ups/turret_power_up.h" 25 #include "items/power_ups/laser_power_up.h" 26 26 27 27 ObjectListDefinition(NPCTest1); -
trunk/src/world_entities/particles/sprite_particles.cc
r10532 r10618 23 23 #include "state.h" 24 24 #include "shell_command.h" 25 #include " camera.h"26 #include " cameraman.h"25 #include "tools/camera.h" 26 #include "tools/cameraman.h" 27 27 28 28 … … 141 141 // Vector view = cameraTargetPos - cameraPos; 142 142 143 const CameraMan* man = State::getCameraman(); 144 const Camera* camera = man->getCurrentCam(); //!< @todo MUST be different 143 Camera* camera = State::getCamera(); 145 144 Vector cameraPos = camera->getAbsCoor(); 146 145 Vector cameraTargetPos = camera->getTarget()->getAbsCoor(); -
trunk/src/world_entities/playable.cc
r10368 r10618 21 21 #include "player.h" 22 22 #include "state.h" 23 #include " camera.h"23 #include "tools/camera.h" 24 24 25 25 #include "util/loading/load_param.h" 26 26 27 #include " power_ups/weapon_power_up.h"28 #include " power_ups/param_power_up.h"27 #include "items/power_ups/weapon_power_up.h" 28 #include "items/power_ups/param_power_up.h" 29 29 30 30 #include "game_rules.h" -
trunk/src/world_entities/projectiles/hbolt.cc
r10545 r10618 49 49 50 50 this->angle = 0; 51 this->rotationSpeed = 600;51 // this->rotationSpeed = 600; 52 52 53 53 this->emitter = new DotEmitter(100, 5, M_2_PI); … … 146 146 this->deactivate(); 147 147 148 this->angle += this->rotationSpeed * dt;148 this->angle += HBolt::rotationSpeed * dt; 149 149 150 150 for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++) … … 177 177 glPushAttrib(GL_ENABLE_BIT); 178 178 glDisable(GL_LIGHTING); 179 glDisable(GL_FOG);179 // glDisable(GL_FOG); 180 180 181 181 glMatrixMode(GL_MODELVIEW); 182 182 glPushMatrix(); 183 183 184 185 glTranslatef (this->getAbsCoor ().x, 186 this->getAbsCoor ().y, 187 this->getAbsCoor ().z); 188 189 this->halo->draw(); 190 191 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 192 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 193 glRotatef(this->angle, 0.0, 0.0, 1.0); 194 195 this->getModel()->draw(); 184 // float matrix[4][4]; 185 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 186 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 187 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 188 glRotatef(this->angle, 0.0, 0.0, 1.0); 189 // glMultMatrixf((float*)matrix); 190 this->getModel()->draw(); 191 this->halo->draw(); 196 192 197 193 glPopMatrix(); -
trunk/src/world_entities/projectiles/hbolt.h
r10368 r10618 42 42 43 43 float angle; 44 float rotationSpeed;44 static const float rotationSpeed = 600; 45 45 46 46 Billboard* halo; -
trunk/src/world_entities/projectiles/lbolt.cc
r10545 r10618 59 59 60 60 this->angle = 0; 61 this->rotationSpeed = 130;62 61 63 62 this->halo = new Billboard(); … … 148 147 this->deactivate(); 149 148 150 angle += rotationSpeed * dt;149 angle += LBolt::rotationSpeed * dt; 151 150 152 151 for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++) … … 182 181 glPushMatrix(); 183 182 184 float matrix[4][4]; 185 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 183 float matrix[4][4]; 184 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 185 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 186 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 187 glRotatef(this->angle, 1.0, 0.0, 0.0); 188 this->getAbsDir().matrix (matrix); 189 glMultMatrixf((float*)matrix); 190 this->getModel()->draw(); 186 191 187 glRotatef(angle, 1.0, 0.0, 0.0); 188 this->getAbsDir().matrix (matrix); 189 glMultMatrixf((float*)matrix); 190 this->getModel()->draw(); 191 192 this->halo->draw(); 192 this->halo->draw(); 193 193 194 194 glPopMatrix(); 195 196 195 glPopAttrib(); 197 196 } -
trunk/src/world_entities/projectiles/lbolt.h
r10368 r10618 43 43 44 44 float angle; 45 float rotationSpeed;45 static const float rotationSpeed = 1080; 46 46 47 47 Billboard* halo; -
trunk/src/world_entities/projectiles/mbolt.cc
r10545 r10618 82 82 //this->trail->setParent( this); 83 83 this->trail->setTexture( "textures/laser.png"); 84 this->trail->setAbsCoor(this->getAbsCoor() - Vector(.7,0,0)); 84 // this->trail->setAbsCoor(this->getAbsCoor() - Vector(.7,0,0)); 85 this->trail->setAbsCoor(this->getAbsCoor() - this->getVelocity().getNormalized() * .7); 85 86 86 87 } -
trunk/src/world_entities/projectiles/projectile_weapon.h
r10368 r10618 1 1 /*! 2 2 * @file projectile_weapon.h 3 * a projectile_weapon , that is been shooted by a weapon3 * a projectile_weapon is a projetile fireing projectile. 4 4 * 5 * You can use this class to make some ProjectileWeapons/Bullets/Lasers/Rockets/etc. 5 * You can use this class to make some Multi-Stage Projectiles. 6 * See Spike_Ball for an implemeted example. 6 7 * 7 8 */ -
trunk/src/world_entities/projectiles/swarm_projectile.cc
r10547 r10618 39 39 SwarmProjectile::SwarmProjectile () : Projectile() 40 40 { 41 42 /* this->loadModel("models/projectiles/orx-rocket.obj", 0.5);*/ 43 this->loadModel("models/projectiles/swarm_projectile.obj", .25); // no double rescale (see draw()) 41 this->loadModel("models/projectiles/swarm_projectile.obj", .333); // no double rescale (see draw()) 44 42 this->loadExplosionSound("sounds/explosions/explosion_4.wav"); 45 43 … … 59 57 this->elecDamage = 0; 60 58 61 this->trail = new Trail(2.5,4,.2, this); 62 //this->trail->setParent( this); 59 this->trail = new Trail(2.5, 4, .2, this); 63 60 this->trail->setTexture( "textures/laser.png"); 61 62 // this->maxVelocity = 300; 63 64 this->smoke = new Trail(20, 10, .3, this); 65 this->smoke->setTexture ("textures/engine.png"); 66 67 this->angle = 0; 68 64 69 65 70 … … 83 88 // delete this->emitter; 84 89 delete this->trail; 90 delete this->smoke; 85 91 } 86 92 … … 113 119 this->setHealth(10.0* (float)rand()/(float)RAND_MAX); 114 120 115 this->maxVelocity = 300;116 117 this->rotationSpeed = 360;121 // this->maxVelocity = 300; 122 123 // this->rotationSpeed = 360; 118 124 this->angle = 0; 119 125 … … 216 222 217 223 this->trail->tick(time); 224 this->smoke->tick(time); 218 225 219 226 this->angle += this->rotationSpeed * time; 227 220 228 while (this->angle > 360) 229 { 221 230 this->angle -= 360; 231 } 222 232 223 233 this->lastDir = this->curDir; … … 272 282 glTranslatef(-.9,0,0); 273 283 this->trail->draw(); 284 glTranslatef( -1.1, 0, 0); 285 this->smoke->draw(); 274 286 glPopMatrix(); 275 287 } -
trunk/src/world_entities/projectiles/swarm_projectile.h
r10368 r10618 1 1 /*! 2 2 * @file swarm_projectile.h 3 * @brief a Swarm Projectile Projectile3 * @brief a Swarm_Missile Projectile 4 4 */ 5 5 … … 40 40 41 41 Trail* trail; 42 Trail* smoke; 42 43 43 44 ParticleEmitter* emitter; 44 45 float agility; 45 float maxVelocity;46 const static float maxVelocity = 100; 46 47 float speed; 47 48 Vector diffVector ; … … 57 58 58 59 // spinning missle 59 float rotationSpeed;60 const static float rotationSpeed = 360; 60 61 float angle; 61 62 }; -
trunk/src/world_entities/questGUI/quest.cc
r10374 r10618 22 22 #include "quest.h" 23 23 24 #include "event_handler.h"25 26 #include "state.h"27 28 24 #include "util/loading/load_param.h" 29 25 #include "util/loading/factory.h" 30 26 31 #include "graphics_engine.h" 32 #include "camera.h" 33 #include "sound_engine.h" 27 #include "glgui.h" 34 28 35 #include "sound_source.h"36 37 #include "glgui.h"38 #include "menu/glgui_imagebutton.h"39 #include "glgui_multiline_text.h"40 #include <glgui_image.h>41 42 43 #include "shell_command.h"44 29 45 30 … … 52 37 this->registerObject(this, Quest::_objectList); 53 38 54 this-> Status = false;39 this->status = false; 55 40 56 41 if( root != NULL) … … 96 81 void Quest::setQuestActive() 97 82 { 98 this-> Status = true;83 this->status = true; 99 84 } 100 85 101 86 void Quest::setQuestInactive() 102 87 { 103 this-> Status = false;88 this->status = false; 104 89 } 105 106 const bool Quest::getQuestStatus()107 {108 return this->Status;109 } -
trunk/src/world_entities/questGUI/quest.h
r10374 r10618 20 20 virtual void loadParams(const TiXmlElement* root = NULL); 21 21 22 inline void setQuestName(const std::string& questName) { this->questName = questName; } 23 inline const std::string& getQuestName() { return this->questName; } 24 inline void setQuestDescription(const std::string& questDescription) { this->questDescription = questDescription; } 25 inline const std::string& getQuestDescription() { return this->questDescription; } 26 inline void setQuestPicture(const std::string& questPicture) { this->questPicture = questPicture; } 27 inline const std::string& getQuestPicture() { return this->questPicture; } 28 inline void setQuestDifficulty(const std::string& questDifficulty) { this->questDifficulty = questDifficulty; } 29 inline const std::string& getQuestDifficulty() { return this->questDifficulty; } 22 inline void setQuestName(const std::string& questName) { this->questName = questName; } 23 inline const std::string& getQuestName() const { return this->questName; } 30 24 31 inline void setQuest Persons(const std::string& questPersons) { this->questPersons = questPersons; }32 inline const std::string& getQuest Persons() { return this->questPersons; }25 inline void setQuestDescription(const std::string& questDescription) { this->questDescription = questDescription; } 26 inline const std::string& getQuestDescription() const { return this->questDescription; } 33 27 34 inline void setRewardDescription(const std::string& rewardDescription){ this->rewardDescription = rewardDescription; } 35 inline const std::string& getRewardDescription() { return this->rewardDescription; } 36 inline void setRewardPicture(const std::string& rewardPicture) { this->rewardPicture = rewardPicture; } 37 inline const std::string& getRewardPicture() { return this->rewardPicture; } 28 inline void setQuestPicture(const std::string& questPicture) { this->questPicture = questPicture; } 29 inline const std::string& getQuestPicture() const { return this->questPicture; } 30 31 inline void setQuestDifficulty(const std::string& questDifficulty) { this->questDifficulty = questDifficulty; } 32 inline const std::string& getQuestDifficulty() const { return this->questDifficulty; } 33 34 inline void setQuestPersons(const std::string& questPersons) { this->questPersons = questPersons; } 35 inline const std::string& getQuestPersons() const { return this->questPersons; } 36 37 inline void setRewardDescription(const std::string& rewardDescription) { this->rewardDescription = rewardDescription; } 38 inline const std::string& getRewardDescription() const { return this->rewardDescription; } 39 40 inline void setRewardPicture(const std::string& rewardPicture) { this->rewardPicture = rewardPicture; } 41 inline const std::string& getRewardPicture() const { return this->rewardPicture; } 42 38 43 void setQuestActive(); 39 44 void setQuestInactive(); 40 const bool getQuestStatus() ;45 const bool getQuestStatus() const { return status; }; 41 46 42 47 43 48 44 49 private: 45 bool Status;50 bool status; 46 51 std::string questName; 47 52 std::string questDescription; -
trunk/src/world_entities/questGUI/quest_gui.cc
r10507 r10618 3 3 /* 4 4 orxonox - the future of 3D-vertical-scrollers 5 5 6 6 Copyright (C) 1004 orx 7 7 8 8 This program is free software; you can redistribute it and/or modify 9 9 it under the terms of the GNU General Public License as published by 10 10 the Free Software Foundation; either version 2, or (at your option) 11 11 any later version. 12 12 13 13 ### File Specific: 14 14 main-programmer std::string questName; … … 18 18 std::string rewardDescription; 19 19 std::string rewardPicture;: Andreas Hejj 20 20 21 21 */ 22 22 … … 27 27 #include "quest_gui.h" 28 28 29 #include "event_handler.h"30 31 #include "state.h"32 33 29 #include "util/loading/load_param.h" 34 30 #include "util/loading/factory.h" 35 31 36 #include "graphics_engine.h"37 #include "camera.h"38 32 #include "sound_engine.h" 39 33 40 #include "sound_source.h" 41 42 #include "glgui_widget.h" 34 43 35 #include "glgui.h" 44 36 #include "menu/glgui_imagebutton.h" 45 37 #include "glgui_multiline_text.h" 46 #include <glgui_image.h>47 38 48 39 #include "event_handler.h" … … 50 41 #include "quest.h" 51 42 52 #include "shell_command.h"53 54 43 ObjectListDefinition(QuestGUI); 55 56 44 CREATE_FACTORY(QuestGUI); 57 58 59 45 60 46 #include "script_class.h" 61 47 CREATE_SCRIPTABLE_CLASS(QuestGUI, 62 48 addMethod("startGUI", Executor0<QuestGUI, lua_State*>(&QuestGUI::startGUI)) 63 ->addMethod("stopGUI", Executor0<QuestGUI, lua_State*>(&QuestGUI::stopGUI))64 ->addMethod("isActive", Executor0ret<QuestGUI, lua_State*,bool>(&QuestGUI::isActive))49 ->addMethod("stopGUI", Executor0<QuestGUI, lua_State*>(&QuestGUI::stopGUI)) 50 ->addMethod("isActive", Executor0ret<QuestGUI, lua_State*,bool>(&QuestGUI::isActive)) 65 51 ); 66 52 … … 69 55 QuestGUI::QuestGUI(const TiXmlElement* root) 70 56 { 57 this->questBox = NULL; 58 this->bKillGui = false; 59 this->bActive = false; 60 71 61 if (root != NULL) 72 62 { 73 this->registerObject(this, QuestGUI::_objectList); 74 75 this->toList(OM_GROUP_00); 76 77 this->questBox = NULL; 78 79 this->bKillGui = false; 80 81 this->bActive = false; 82 83 this->myQuest = new Quest(root); 84 85 if(root) 86 this->loadParams( root); 63 this->registerObject(this, QuestGUI::_objectList); 64 this->toList(OM_GROUP_00); 65 this->myQuest = new Quest(root); 66 67 if(root) 68 this->loadParams( root); 87 69 } 88 70 } … … 115 97 { 116 98 this->bKillGui = false; 117 118 99 119 100 if (questBox == NULL) … … 254 235 void QuestGUI::stopGUI() 255 236 { 256 237 this->bKillGui = true; 257 238 } 258 239 -
trunk/src/world_entities/questGUI/quest_gui.h
r10492 r10618 4 4 5 5 #include "world_entity.h" 6 #include "glgui.h"7 #include <glgui_image.h>8 #include <vector>9 6 10 7 class Quest; 8 namespace OrxGui { class GLGuiBox; } 11 9 12 10 class QuestGUI : public WorldEntity … … 28 26 29 27 private: 30 Quest* 31 bool 32 bool 28 Quest* myQuest; 29 bool bKillGui; 30 bool bActive; 33 31 34 OrxGui::GLGuiBox* headerBox;35 OrxGui::GLGuiBox* outlineBox;36 OrxGui::GLGuiBox* labelBox;37 OrxGui::GLGuiImage* placeImage;38 32 OrxGui::GLGuiBox* questBox; 39 OrxGui::GLGuiImage* questImage; 40 OrxGui::GLGuiBox* rewardBox; 41 OrxGui::GLGuiImage* rewardImage; 42 OrxGui::GLGuiBox* answerBox; 43 OrxGui::GLGuiImage* placeImage2; 44 OrxGui::GLGuiBox* acceptBox; 45 OrxGui::GLGuiBox* refuseBox; 46 47 48 OrxSound::SoundSource* selectorSource; 33 34 49 35 50 36 void accept(); -
trunk/src/world_entities/space_ships/space_ship.cc
r10552 r10618 27 27 #include "weapons/heavy_blaster.h" 28 28 #include "weapons/swarm_launcher.h" 29 #include "weapons/spike_launcher.h"30 29 #include "weapons/spike_thrower.h" 31 30 #include "weapons/acid_launcher.h" … … 50 49 #include "shared_network_data.h" 51 50 52 #include " power_ups/weapon_power_up.h"53 #include " power_ups/param_power_up.h"51 #include "items/power_ups/weapon_power_up.h" 52 #include "items/power_ups/param_power_up.h" 54 53 55 54 #include "graphics_engine.h" … … 59 58 #include "state.h" 60 59 #include "player.h" 61 #include " camera.h"62 #include " cameraman.h"60 #include "tools/camera.h" 61 #include "tools/cameraman.h" 63 62 64 63 … … 67 66 68 67 #include "track/track.h" 69 #include "math.h"70 68 71 69 … … 616 614 { 617 615 this->bRight = event.bPressed; 618 printf("ShipCoors: %f , %f, %f \n", this->getAbsCoor().x, this->getAbsCoor().y, this->getAbsCoor().z);616 // printf("ShipCoors: %f , %f, %f \n", this->getAbsCoor().x, this->getAbsCoor().y, this->getAbsCoor().z); 619 617 } 620 618 else if( event.type == KeyMapper::PEV_FORWARD) … … 1143 1141 void SpaceShip::setCameraDistance(float dist) 1144 1142 { 1145 1146 CameraMan* cm = State::getCameraman(); 1147 Camera* c = cm->getCurrentCam(); 1143 Camera* c = State::getCamera(); 1148 1144 c->setViewTopDistance(dist); 1149 1145 … … 1155 1151 { 1156 1152 1157 CameraMan* cm = State::getCameraman(); 1158 Camera* c = cm->getCurrentCam(); 1153 Camera* c = State::getCamera(); 1159 1154 c->setViewTopFovy(fovy); 1160 1155 … … 1165 1160 void SpaceShip::updateTravelDistance() 1166 1161 { 1167 CameraMan* cm = State::getCameraman(); 1168 Camera* c = cm->getCurrentCam(); 1169 1162 1163 Camera* c = State::getCamera(); 1170 1164 1171 1165 float x = 1.25 * this->actionWidthPercentage * fabsf(c->getAbsCoor().y) * tan(c->getFovy()*M_PI /360.0); -
trunk/src/world_entities/spectator.cc
r10401 r10618 25 25 #include "src/world_entities/npcs/generic_npc.h" 26 26 27 #include "src/lib/util/loading/load_param.h" 28 29 #include "player.h" 30 27 31 28 32 ObjectListDefinition(Spectator); 29 33 CREATE_FACTORY(Spectator); 30 34 31 35 Spectator* Spectator::ghost = NULL; 36 Playable* Spectator::regularPlayable = NULL; 32 37 33 38 #include "state.h" 39 #include "shell_command.h" 40 41 SHELL_COMMAND( enableGhost, Spectator, enableGhost ) 42 ->describe("fly around") 43 ->setAlias("ghost"); 34 44 35 45 … … 109 119 /** 110 120 * loads the Settings of a Spectator from an XML-element. 111 * @param root the XML-element to load the Sp aceship's properties from121 * @param root the XML-element to load the Spectator's properties from 112 122 */ 113 123 void Spectator::loadParams(const TiXmlElement* root) 114 124 { 115 125 Playable::loadParams(root); 126 127 LoadParam(root, "allowGhost", this, Spectator, allowGhost) 128 .describe("Allows the Player to fly around"); 129 } 130 131 132 133 void Spectator::allowGhost( bool flag ) 134 { 135 PRINTF(0)( "SPECTATOR ALLOWGHOST: %d\n", flag ); 136 if ( flag ) 137 { 138 assert( ghost == NULL && "only one flySpectator allowed" ); 139 140 ghost = this; 141 } 142 else 143 { 144 ghost = NULL; 145 } 146 } 147 148 149 void Spectator::enableGhost( ) 150 { 151 if ( !ghost ) 152 { 153 Spectator* spec = new Spectator(); 154 spec->allowGhost( true ); 155 } 156 157 if ( !regularPlayable ) 158 { 159 if ( !State::getPlayer() || !State::getPlayer()->getPlayable() ) 160 return; 161 162 regularPlayable = State::getPlayer()->getPlayable(); 163 164 ghost->setAbsCoor( regularPlayable->getAbsCoor() ); 165 ghost->setAbsDir( regularPlayable->getAbsDir() ); 166 167 State::getPlayer()->setPlayable( ghost ); 168 } 169 else 170 { 171 if ( !State::getPlayer() || !State::getPlayer()->getPlayable() ) 172 return; 173 174 State::getPlayer()->setPlayable( regularPlayable ); 175 regularPlayable = NULL; 176 } 116 177 } 117 178 … … 242 303 this->yMouse += event.yRel; 243 304 } 244 else if( event.type == KeyMapper::PEV_JUMP) 245 { 305 else if( event.type == KeyMapper::PEV_FIRE1 ) 306 { 307 PRINTF(0)( "CURRENT POS: (%f, %f, %f) ROT (%f, (%f, %f, %f))\n", this->getAbsCoorX(), this->getAbsCoorY(), this->getAbsCoorZ(), this->getAbsDir().w, this->getAbsDir().v.x, this->getAbsDir().v.y, this->getAbsDir().v.z ); 246 308 // FPSPlayer * fps = new FPSPlayer(); 247 309 // //GenericNPC* fps = new GenericNPC(); … … 263 325 264 326 327 -
trunk/src/world_entities/spectator.h
r9869 r10618 30 30 31 31 virtual void process(const Event &event); 32 33 void allowGhost( bool flag ); 34 35 static void enableGhost(); 32 36 33 37 private: … … 45 49 float angleX; 46 50 float angleY; 51 52 static Spectator* ghost; 53 static Playable* regularPlayable; 47 54 48 55 }; -
trunk/src/world_entities/weapons/acid_launcher.cc
r10539 r10618 29 29 #include "util/state.h" 30 30 31 #include "math/quaternion.h"32 33 31 #include "util/loading/factory.h" 34 32 … … 39 37 using namespace std; 40 38 41 ObjectListDefinition (AcidLauncher);42 CREATE_FACTORY (AcidLauncher);39 ObjectListDefinition ( AcidLauncher ); 40 CREATE_FACTORY ( AcidLauncher ); 43 41 44 42 /** … … 48 46 */ 49 47 AcidLauncher::AcidLauncher() 50 : Weapon()48 : Weapon() 51 49 { 52 50 this->init(); … … 56 54 * creates a new AcidLauncher from a TiXmlElement 57 55 */ 58 AcidLauncher::AcidLauncher (const TiXmlElement* root)56 AcidLauncher::AcidLauncher ( const TiXmlElement* root ) 59 57 { 60 58 this->init(); 61 if ( root != NULL)62 this->loadParams (root);59 if ( root != NULL ) 60 this->loadParams ( root ); 63 61 } 64 62 … … 73 71 void AcidLauncher::init() 74 72 { 75 this->registerObject (this, AcidLauncher::_objectList);76 /*77 Animation3D* animation1 = this->getAnimation(WS_ACTIVATING, this);78 Animation3D* animation2 = this->getAnimation(WS_DEACTIVATING, this);73 this->registerObject ( this, AcidLauncher::_objectList ); 74 /* 75 Animation3D* animation1 = this->getAnimation(WS_ACTIVATING, this); 76 Animation3D* animation2 = this->getAnimation(WS_DEACTIVATING, this); 79 77 80 animation1->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);81 animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);82 animation2->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);83 animation2->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);78 animation1->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT); 79 animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT); 80 animation2->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT); 81 animation2->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT); 84 82 85 animation1->setInfinity(ANIM_INF_CONSTANT);86 animation2->setInfinity(ANIM_INF_CONSTANT);87 */88 this->setStateDuration (WS_SHOOTING, 1.0f);83 animation1->setInfinity(ANIM_INF_CONSTANT); 84 animation2->setInfinity(ANIM_INF_CONSTANT); 85 */ 86 this->setStateDuration ( WS_SHOOTING, 1.0f ); 89 87 90 this->setStateDuration (WS_RELOADING, 1.0f);91 this->setStateDuration (WS_ACTIVATING, .4);92 this->setStateDuration (WS_DEACTIVATING, .4);88 this->setStateDuration ( WS_RELOADING, 1.0f ); 89 this->setStateDuration ( WS_ACTIVATING, .4 ); 90 this->setStateDuration ( WS_DEACTIVATING, .4 ); 93 91 94 this->setEnergyMax (100);95 this->increaseEnergy (100);92 this->setEnergyMax ( 100 ); 93 this->increaseEnergy ( 100 ); 96 94 //this->minCharge = 2; 97 95 98 this->setCapability (WTYPE_ALLDIRS | WTYPE_TURRET | WTYPE_DIRECTIONAL | WTYPE_LIGHT);99 this->setProjectileTypeC ("AcidSplash");96 this->setCapability ( WTYPE_ALLDIRS | WTYPE_TURRET | WTYPE_DIRECTIONAL | WTYPE_LIGHT ); 97 this->setProjectileTypeC ( "AcidSplash" ); 100 98 // this->loadModel("models/guns/turret1.obj", 1.0); 101 99 102 this->setEmissionPoint (2.0, 0, 0);103 this->getProjectileFactory()->prepare (10);100 this->setEmissionPoint ( 2.0, 0, 0 ); 101 this->getProjectileFactory()->prepare ( 10 ); 104 102 105 this->setActionSound (WA_SHOOT, "sounds/explosions/explosion_1.wav");106 this->setActionSound (WA_ACTIVATE, "sounds/voices/rockets.wav");107 this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");103 this->setActionSound ( WA_SHOOT, "sounds/explosions/explosion_1.wav" ); 104 this->setActionSound ( WA_ACTIVATE, "sounds/voices/rockets.wav" ); 105 // this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav"); 108 106 109 107 } 110 108 111 void AcidLauncher::loadParams (const TiXmlElement* root)109 void AcidLauncher::loadParams ( const TiXmlElement* root ) 112 110 { 113 Weapon::loadParams (root);111 Weapon::loadParams ( root ); 114 112 } 115 113 116 114 void AcidLauncher::activate() 117 { 118 } 115 {} 119 116 120 117 void AcidLauncher::deactivate() 118 {} 119 120 void AcidLauncher::tick ( float dt ) 121 121 { 122 } 123 124 void AcidLauncher::tick(float dt) 125 { 126 if (!Weapon::tickW(dt)) 122 if ( !Weapon::tickW ( dt ) ) 127 123 return; 128 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 129 { 130 this->energyWidget->setDisplayedImage("textures/gui/gui_acid.png"); 124 if ( this->energyWidget != NULL && !this->isEnergyWidgetInitialized ) { 125 this->energyWidget->setDisplayedImage ( "textures/gui/gui_acid.png" ); 131 126 this->isEnergyWidgetInitialized = true; 132 127 } … … 157 152 158 153 Projectile* pj = NULL; 159 for( int i=0; i < 1; i++) 160 { 161 pj = this->getProjectile(); 162 if (pj == NULL) 163 return; 154 for ( int i=0; i < 1; i++ ) { 155 pj = this->getProjectile(); 156 if ( pj == NULL ) 157 return; 164 158 165 166 pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*165.0 + VECTOR_RAND(10)));159 fired = true; 160 pj->setVelocity ( this->getVelocity() + ( this->getAbsDir().apply ( Vector ( 1,0,0 ) ) *165.0 + VECTOR_RAND ( 10 ) ) ); 167 161 168 pj->setParent(PNode::getNullParent());169 pj->setAbsCoor(this->getEmissionPoint() + VECTOR_RAND(.1));170 pj->setAbsDir(this->getAbsDir()+Quaternion(0,VECTOR_RAND(5)));171 162 pj->setParent ( PNode::getNullParent() ); 163 pj->setAbsCoor ( this->getEmissionPoint() + VECTOR_RAND ( .1 ) ); 164 pj->setAbsDir ( this->getAbsDir() +Quaternion ( 0,VECTOR_RAND ( 5 ) ) ); 165 pj->activate(); 172 166 } 173 167 } -
trunk/src/world_entities/weapons/acid_launcher.h
r10368 r10618 12 12 13 13 class AcidLauncher : public Weapon 14 15 ObjectListDeclaration(AcidLauncher);14 { 15 ObjectListDeclaration ( AcidLauncher ); 16 16 public: 17 17 AcidLauncher (); 18 AcidLauncher (const TiXmlElement* root);18 AcidLauncher ( const TiXmlElement* root ); 19 19 virtual ~AcidLauncher (); 20 20 21 21 void init(); 22 virtual void loadParams (const TiXmlElement* root);22 virtual void loadParams ( const TiXmlElement* root ); 23 23 24 24 virtual void activate(); 25 25 virtual void deactivate(); 26 26 27 virtual void tick (float dt);27 virtual void tick ( float dt ); 28 28 virtual void fire(); 29 29 30 30 31 31 private: 32 32 }; 33 33 34 34 #endif /* _ACID_LAUNCHER_H */ -
trunk/src/world_entities/weapons/aiming_turret.cc
r10419 r10618 100 100 this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_3.wav"); 101 101 this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav"); 102 this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");102 // this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav"); 103 103 104 104 } -
trunk/src/world_entities/weapons/boomerang_gun.cc
r10419 r10618 96 96 this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_3.wav"); 97 97 this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav"); 98 this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");98 // this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav"); 99 99 100 100 } -
trunk/src/world_entities/weapons/heavy_blaster.cc
r10548 r10618 1 /* 2 orxonox - the future of 3D-vertical-scrollers 3 4 Copyright (C) 2004-2006 orx 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 ### File Specific 12 main-programmer: Marc Schaerrer, Nicolas Schlumberger 13 co-programmer: 14 15 */ 16 1 17 #include "heavy_blaster.h" 2 18 #include "world_entities/projectiles/projectile.h" -
trunk/src/world_entities/weapons/light_blaster.cc
r10539 r10618 1 /* 2 orxonox - the future of 3D-vertical-scrollers 3 4 Copyright (C) 2004-2006 orx 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 ### File Specific 12 main-programmer: Marc Schaerrer, Nicolas Schlumberger 13 co-programmer: 14 15 */ 16 1 17 #include "light_blaster.h" 2 18 #include "world_entities/projectiles/projectile.h" … … 39 55 for (int i = 0; i < this->getBarrels(); i++) 40 56 { 41 delete [] this->shootAnim[i];57 //delete [] this->shootAnim[i]; 42 58 delete [] this->objComp[i]; 43 59 } 44 60 delete [] this->emissionPoint; 45 delete [] this->shootAnim;61 //delete [] this->shootAnim; 46 62 delete [] this->objComp; 47 63 … … 82 98 this->objComp = new PNode**[this->getBarrels()]; 83 99 this->emissionPoint = new PNode*[this->getBarrels()]; 84 this->shootAnim = new Animation3D**[this->getBarrels()];100 // this->shootAnim = new Animation3D**[this->getBarrels()]; 85 101 for (int i = 0; i < this->getBarrels(); i++) 86 102 { 87 103 this->objComp[i] = new PNode* [this->getSegs()]; 88 104 this->emissionPoint[i] = new PNode; 89 this->emissionPoint[i]->setParent(this); //< One EmissionPoint, that is a PNode connected to the weapon. You can set this to the exitting point of the Projectiles105 this->emissionPoint[i]->setParent(this); 90 106 this->emissionPoint[i]->setName("EmissionPoint"); 91 107 this->emissionPoint[i]->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT); 92 this->shootAnim[i] = new Animation3D* [this->getSegs()];108 // this->shootAnim[i] = new Animation3D* [this->getSegs()]; 93 109 for(int j = 0; j < this->getSegs(); j++) 94 110 { 95 111 this->objComp[i][j] = new PNode; 96 this->shootAnim[i][j] = new Animation3D(this->objComp[i][j]);97 this->shootAnim[i][j]->setInfinity(ANIM_INF_CONSTANT);112 // this->shootAnim[i][j] = new Animation3D(this->objComp[i][j]); 113 // this->shootAnim[i][j]->setInfinity(ANIM_INF_CONSTANT); 98 114 } 99 115 } 100 101 for (int i = 0; i < this->getBarrels(); i++ ) 102 this->emissionPoint[i]->setRelCoor(Vector(1.19, 0.0, 0.1)); 116 /* 117 this->emissionPoint[0]->setRelCoor(Vector(1.19, 0.0, 0.1)); 118 this->emissionPoint[1]->setRelCoor(Vector(1.19, -0.07, -0.05)); 119 this->emissionPoint[2]->setRelCoor(Vector(1.19, 0.07, -0.05));*/ 120 121 this->emissionPoint[0]->setRelCoor(Vector(2.2, 0.0, 0.1)); 122 this->emissionPoint[1]->setRelCoor(Vector(2.2, -0.07, -0.05)); 123 this->emissionPoint[2]->setRelCoor(Vector(2.2, 0.07, -0.05)); 103 124 104 125 // Animation3D* animation1 = this->getAnimation(WS_SHOOTING, this); … … 112 133 // this->setEmissionPoint(3.8, 1.2, 0); 113 134 114 for (int i = 0; i < this->getBarrels(); i++){115 this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion(i * 120, Vector(1.0, 0.0, 0.0)), 0.049, ANIM_NULL, ANIM_LINEAR);116 this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion((i+1)*120, Vector(1.0, 0.0, 0.0)), 0.001, ANIM_NULL, ANIM_LINEAR);117 }135 // for (int i = 0; i < this->getBarrels(); i++){ 136 // this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion(i * 120, Vector(1.0, 0.0, 0.0)), 0.049, ANIM_NULL, ANIM_LINEAR); 137 // this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion((i+1)*120, Vector(1.0, 0.0, 0.0)), 0.001, ANIM_NULL, ANIM_LINEAR); 138 // } 118 139 119 140 … … 144 165 pj->activate(); 145 166 146 for (int i = 0; i < this->getSegs(); i++)147 this->shootAnim[this->activeBarrel][i]->replay();167 // for (int i = 0; i < this->getSegs(); i++) 168 // this->shootAnim[this->activeBarrel][i]->replay(); 148 169 149 170 // switch barrel -
trunk/src/world_entities/weapons/medium_blaster.cc
r10548 r10618 1 /* 2 orxonox - the future of 3D-vertical-scrollers 3 4 Copyright (C) 2004-2006 orx 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 ### File Specific 12 main-programmer: Marc Schaerrer, Nicolas Schlumberger 13 co-programmer: 14 15 */ 16 1 17 #include "medium_blaster.h" 2 18 #include "world_entities/projectiles/projectile.h" -
trunk/src/world_entities/weapons/spike_thrower.cc
r10516 r10618 10 10 11 11 ### File Specific 12 main-programmer: Marc Schaerrer 12 main-programmer: Marc Schaerrer, Nicolas Schlumberger 13 13 co-programmer: 14 14 */ … … 28 28 29 29 #include <list> 30 #include <iterator>31 30 #include "util/state.h" 32 33 #include "math/quaternion.h"34 31 35 32 #include "util/loading/factory.h" … … 108 105 this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_1.wav"); 109 106 this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav"); 110 this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");107 // this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav"); 111 108 112 109 } -
trunk/src/world_entities/weapons/swarm_launcher.cc
r10545 r10618 30 30 #include <iterator> 31 31 #include "util/state.h" 32 33 #include "math/quaternion.h"34 32 35 33 #include "util/loading/factory.h" … … 100 98 this->setProjectileTypeC("SwarmProjectile"); 101 99 102 this->loadModel("models/guns/turret1.obj", 1.0);100 // this->loadModel("models/guns/turret1.obj", 1.0); 103 101 104 102 this->setEmissionPoint(1.684, 0.472, 0); 105 this->getProjectileFactory()->prepare( 50);103 this->getProjectileFactory()->prepare(10); 106 104 107 105 this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_1.wav"); 108 this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");109 this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");106 // this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav"); 107 // this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav"); 110 108 111 109 } -
trunk/src/world_entities/weapons/targeting_turret.cc
r10419 r10618 94 94 this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_3.wav"); 95 95 this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav"); 96 this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");96 // this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav"); 97 97 } 98 98 -
trunk/src/world_entities/weapons/turret.cc
r10419 r10618 95 95 this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_3.wav"); 96 96 this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav"); 97 this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");97 // this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav"); 98 98 99 99 } -
trunk/src/world_entities/weather_effects/cloud_effect.h
r9869 r10618 12 12 #include "sound_source.h" 13 13 14 #include " skydome.h"14 #include "environments/skydome.h" 15 15 #include "material.h" 16 16 #include "shader.h" -
trunk/src/world_entities/weather_effects/lense_flare.cc
r10114 r10618 32 32 33 33 #include "light.h" 34 #include " camera.h"34 #include "tools/camera.h" 35 35 36 36 -
trunk/src/world_entities/weather_effects/lightning_effect.cc
r10511 r10618 263 263 264 264 if (this->thunderTextureA) { 265 this->thunderBolt[0]->setTexture("textures/ thunderbA1.png");266 this->thunderBolt[1]->setTexture("textures/ thunderbA2.png");267 this->thunderBolt[2]->setTexture("textures/ thunderbA3.png");268 this->thunderBolt[3]->setTexture("textures/ thunderbA4.png");265 this->thunderBolt[0]->setTexture("textures/effects/thunderbA1.png"); 266 this->thunderBolt[1]->setTexture("textures/effects/thunderbA2.png"); 267 this->thunderBolt[2]->setTexture("textures/effects/thunderbA3.png"); 268 this->thunderBolt[3]->setTexture("textures/effects/thunderbA4.png"); 269 269 } 270 270 else { 271 this->thunderBolt[0]->setTexture("textures/ thunderbB1.png");272 this->thunderBolt[1]->setTexture("textures/ thunderbB2.png");273 this->thunderBolt[2]->setTexture("textures/ thunderbB3.png");274 this->thunderBolt[3]->setTexture("textures/ thunderbB4.png");271 this->thunderBolt[0]->setTexture("textures/effects/thunderbB1.png"); 272 this->thunderBolt[1]->setTexture("textures/effects/thunderbB2.png"); 273 this->thunderBolt[2]->setTexture("textures/effects/thunderbB3.png"); 274 this->thunderBolt[3]->setTexture("textures/effects/thunderbB4.png"); 275 275 } 276 276 -
trunk/src/world_entities/world_entity.cc
r10546 r10618 27 27 28 28 #include "oif/object_information_file.h" 29 #include " mount_point.h"29 #include "tools/mount_point.h" 30 30 31 31 #include "aabb_tree_node.h" … … 41 41 42 42 #include "state.h" 43 #include " camera.h"43 #include "tools/camera.h" 44 44 45 45 #include "collision_filter.h"
Note: See TracChangeset
for help on using the changeset viewer.