Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10342 in orxonox.OLD for branches


Ignore:
Timestamp:
Jan 24, 2007, 5:48:00 PM (18 years ago)
Author:
gfilip
Message:

BlackScreen

Location:
branches/camera/src/world_entities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/camera/src/world_entities/blackscreen.cc

    r10341 r10342  
    2525#include "class_id_DEPRECATED.h"
    2626
    27 ObjectListDefinition(blackscreen);
    28 CREATE_FACTORY(blackscreen);
     27ObjectListDefinition(BlackScreen);
     28CREATE_FACTORY(BlackScreen);
    2929
    3030
     
    3333 *
    3434 */
    35 blackscreen::blackscreen()
     35BlackScreen::BlackScreen()
    3636{
    3737  this->init();
     
    4444 *
    4545 */
    46 blackscreen::blackscreen(const TiXmlElement* root)
     46BlackScreen::BlackScreen(const TiXmlElement* root)
    4747{
    4848  this->init();
     
    5757 *
    5858 */
    59 blackscreen::~blackscreen()
     59BlackScreen::~BlackScreen()
    6060{}
    6161
     
    6464 *
    6565 */
    66 void blackscreen::init()
     66void BlackScreen::init()
    6767{
    68   this->registerObject(this, blackscreen::_objectList);
     68  this->registerObject(this, BlackScreen::_objectList);
    6969  this->toList(OM_GROUP_00);
    7070
     
    7373  this->material->setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    7474
    75   i=1;
     75  i=0;
    7676  state=0;
    7777  fadeSpeed=1;
     
    8484 * @param root the XML-element to load the MD2Creature's properties from
    8585 */
    86 void blackscreen::loadParams(const TiXmlElement* root)
     86void BlackScreen::loadParams(const TiXmlElement* root)
    8787{
    8888  WorldEntity::loadParams(root);
    8989}
    9090
    91 void blackscreen::draw() const
     91void BlackScreen::draw() const
    9292{
    9393  glPushAttrib(GL_ENABLE_BIT);
    9494  glDisable(GL_LIGHTING);
    9595  glPushMatrix();
    96   glEnable(GL_BLEND);   // Turn Blending On
     96  glEnable(GL_BLEND);   // Turn Blending On
    9797
    9898this->material->setTransparency(i);
     
    118118 *
    119119 */
    120 void blackscreen::tick (float time)
     120void BlackScreen::tick (float time)
    121121{
    122122if (state == true)
     
    126126}
    127127
    128 void blackscreen::fadeIn()
     128void BlackScreen::fadeIn()
    129129{
    130130  if (i>0)
     
    132132}
    133133
    134 void blackscreen::fadeOut()
     134void BlackScreen::fadeOut()
    135135{
    136136  if (i<=1)
     
    138138}
    139139
    140 void  blackscreen::toggleFade ()
     140void  BlackScreen::toggleFade ()
    141141{
    142142
     
    144144}
    145145
    146 void blackscreen::changeFadeSpeed(float newSpeed)
     146void BlackScreen::changeFadeSpeed(float newSpeed)
    147147{
    148148  fadeSpeed=newSpeed;
    149149}
    150150
    151 bool blackscreen::isBlack()
     151bool BlackScreen::isBlack()
    152152{
    153153if (i==1)
     
    157157}
    158158
    159 bool blackscreen::isTrans()
     159bool BlackScreen::isTrans()
    160160{
    161161  if (i==0)
  • branches/camera/src/world_entities/blackscreen.h

    r10338 r10342  
    88class Material;
    99
    10 class blackscreen : public WorldEntity
     10class BlackScreen : public WorldEntity
    1111{
    12     ObjectListDeclaration(blackscreen);
     12    ObjectListDeclaration(BlackScreen);
    1313
    1414  private:
     
    2121
    2222  public:
    23     blackscreen();
    24     blackscreen(const TiXmlElement* root);
    25     virtual ~blackscreen();
     23    BlackScreen();
     24    BlackScreen(const TiXmlElement* root);
     25    virtual ~BlackScreen();
    2626
    2727    void init();
  • branches/camera/src/world_entities/cameraman.cc

    r10338 r10342  
    3535  this->cameras.push_back(currentCam);
    3636  State::setCamera(currentCam, currentCam->getTarget());
    37   this->fadeToBlack=new blackscreen();
     37  this->fadeToBlack=new BlackScreen();
    3838}
    3939
  • branches/camera/src/world_entities/cameraman.h

    r10338 r10342  
    1515    float nearClip;
    1616    float farClip;
    17     blackscreen* fadeToBlack;
     17    BlackScreen* fadeToBlack;
    1818
    1919  public:
Note: See TracChangeset for help on using the changeset viewer.