- Timestamp:
- Jan 24, 2007, 5:48:00 PM (18 years ago)
- Location:
- branches/camera/src/world_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camera/src/world_entities/blackscreen.cc
r10341 r10342 25 25 #include "class_id_DEPRECATED.h" 26 26 27 ObjectListDefinition( blackscreen);28 CREATE_FACTORY( blackscreen);27 ObjectListDefinition(BlackScreen); 28 CREATE_FACTORY(BlackScreen); 29 29 30 30 … … 33 33 * 34 34 */ 35 blackscreen::blackscreen()35 BlackScreen::BlackScreen() 36 36 { 37 37 this->init(); … … 44 44 * 45 45 */ 46 blackscreen::blackscreen(const TiXmlElement* root)46 BlackScreen::BlackScreen(const TiXmlElement* root) 47 47 { 48 48 this->init(); … … 57 57 * 58 58 */ 59 blackscreen::~blackscreen()59 BlackScreen::~BlackScreen() 60 60 {} 61 61 … … 64 64 * 65 65 */ 66 void blackscreen::init()66 void BlackScreen::init() 67 67 { 68 this->registerObject(this, blackscreen::_objectList);68 this->registerObject(this, BlackScreen::_objectList); 69 69 this->toList(OM_GROUP_00); 70 70 … … 73 73 this->material->setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 74 74 75 i= 1;75 i=0; 76 76 state=0; 77 77 fadeSpeed=1; … … 84 84 * @param root the XML-element to load the MD2Creature's properties from 85 85 */ 86 void blackscreen::loadParams(const TiXmlElement* root)86 void BlackScreen::loadParams(const TiXmlElement* root) 87 87 { 88 88 WorldEntity::loadParams(root); 89 89 } 90 90 91 void blackscreen::draw() const91 void BlackScreen::draw() const 92 92 { 93 93 glPushAttrib(GL_ENABLE_BIT); 94 94 glDisable(GL_LIGHTING); 95 95 glPushMatrix(); 96 glEnable(GL_BLEND); 96 glEnable(GL_BLEND); // Turn Blending On 97 97 98 98 this->material->setTransparency(i); … … 118 118 * 119 119 */ 120 void blackscreen::tick (float time)120 void BlackScreen::tick (float time) 121 121 { 122 122 if (state == true) … … 126 126 } 127 127 128 void blackscreen::fadeIn()128 void BlackScreen::fadeIn() 129 129 { 130 130 if (i>0) … … 132 132 } 133 133 134 void blackscreen::fadeOut()134 void BlackScreen::fadeOut() 135 135 { 136 136 if (i<=1) … … 138 138 } 139 139 140 void blackscreen::toggleFade ()140 void BlackScreen::toggleFade () 141 141 { 142 142 … … 144 144 } 145 145 146 void blackscreen::changeFadeSpeed(float newSpeed)146 void BlackScreen::changeFadeSpeed(float newSpeed) 147 147 { 148 148 fadeSpeed=newSpeed; 149 149 } 150 150 151 bool blackscreen::isBlack()151 bool BlackScreen::isBlack() 152 152 { 153 153 if (i==1) … … 157 157 } 158 158 159 bool blackscreen::isTrans()159 bool BlackScreen::isTrans() 160 160 { 161 161 if (i==0) -
branches/camera/src/world_entities/blackscreen.h
r10338 r10342 8 8 class Material; 9 9 10 class blackscreen : public WorldEntity10 class BlackScreen : public WorldEntity 11 11 { 12 ObjectListDeclaration( blackscreen);12 ObjectListDeclaration(BlackScreen); 13 13 14 14 private: … … 21 21 22 22 public: 23 blackscreen();24 blackscreen(const TiXmlElement* root);25 virtual ~ blackscreen();23 BlackScreen(); 24 BlackScreen(const TiXmlElement* root); 25 virtual ~BlackScreen(); 26 26 27 27 void init(); -
branches/camera/src/world_entities/cameraman.cc
r10338 r10342 35 35 this->cameras.push_back(currentCam); 36 36 State::setCamera(currentCam, currentCam->getTarget()); 37 this->fadeToBlack=new blackscreen();37 this->fadeToBlack=new BlackScreen(); 38 38 } 39 39 -
branches/camera/src/world_entities/cameraman.h
r10338 r10342 15 15 float nearClip; 16 16 float farClip; 17 blackscreen* fadeToBlack;17 BlackScreen* fadeToBlack; 18 18 19 19 public:
Note: See TracChangeset
for help on using the changeset viewer.