Changeset 8879 in orxonox.OLD for branches/single_player_map/src
- Timestamp:
- Jun 28, 2006, 5:55:06 PM (19 years ago)
- Location:
- branches/single_player_map/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/lib/graphics/importer/interactive_model.h
r8878 r8879 37 37 38 38 virtual void setAnimation(int animNum, int playbackMode = 0) = 0; 39 virtual void setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable ) {}39 virtual void setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable, int animPlayback) {} 40 40 virtual int getAnimation() = 0; 41 41 -
branches/single_player_map/src/lib/graphics/importer/md2/md2Model.cc
r8878 r8879 161 161 162 162 /** 163 * sets the animation type 164 * @param firstFrame: index of the first frame 165 * @param lastFrame: index of the last frame 166 * @param fps: frames per second 167 * @param bStoppable: is 1 if so, 0 else 168 */ 169 void MD2Model::setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable, int animPlayback) 170 { 171 this->animationState.startFrame = firstFrame; 172 this->animationState.endFrame = lastFrame; 173 this->animationState.nextFrame = firstFrame + 1; 174 this->animationState.fps = fps; 175 this->animationState.type = 0; 176 this->animationState.numPlays = 0; 177 this->animationState.animPlaybackMode = animPlayback; 178 179 this->animationState.interpolationState = 0.0f; 180 this->animationState.localTime = 0.0f; 181 this->animationState.lastTime = 0.0f; 182 this->animationState.currentFrame = firstFrame; 183 } 184 185 /** 163 186 \brief sets the animation type 164 187 * @param type: animation type -
branches/single_player_map/src/lib/graphics/importer/md2/md2Model.h
r8878 r8879 157 157 158 158 virtual void setAnimation(int type, int animPlayback = MD2_ANIM_LOOP); 159 virtual void setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable );159 virtual void setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable, int animPlayback); 160 160 /** returns the current animation @returns animation type */ 161 161 inline int MD2Model::getAnimation() { return this->animationState.type; } -
branches/single_player_map/src/world_entities/door.cc
r8878 r8879 21 21 #include "util/loading/load_param.h" 22 22 23 24 23 #include "interactive_model.h" 24 #include "md2/md2Model.h" 25 25 26 26 #include "door.h" … … 57 57 this->setClassID(CL_DOOR, "Door"); 58 58 this->toList(OM_COMMON); 59 60 this->bLocked = false; 59 61 } 60 62 … … 70 72 .describe("sets the action radius of the door") 71 73 .defaultValues(1); 72 73 74 } 74 75 … … 77 78 * sets the animatin of this entity 78 79 */ 79 void Door::setAnimation(int animationIndex, int animPlaybackMode)80 void Door::setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable, int animPlayback) 80 81 { 81 82 if( likely(this->getModel(0) != NULL)) 82 ((InteractiveModel*)this->getModel(0))->setAnimation(animationIndex, animPlaybackMode); 83 ((InteractiveModel*)this->getModel(0))->setAnimation(firstFrame, lastFrame, fps, bStoppable, animPlayback); 84 85 83 86 } 84 87 … … 105 108 return; 106 109 107 // this->setAnimation();110 this->setAnimation(0, 1, 5, 0, MD2_ANIM_ONCE); 108 111 109 112 } -
branches/single_player_map/src/world_entities/door.h
r8876 r8879 32 32 private: 33 33 bool checkOpen(); 34 void setAnimation(int animationIndex, int animPlaybackMode);34 void setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable, int animPlayback); 35 35 36 36
Note: See TracChangeset
for help on using the changeset viewer.