~mc-return/compiz/compiz.merge-src-header-files-cleanup

« back to all changes in this revision

Viewing changes to plugins/cube/src/cube.cpp

  • Committer: MC Return
  • Date: 2013-05-19 11:50:08 UTC
  • mto: This revision was merged to the branch mainline in revision 3720.
  • Revision ID: mc.return@gmx.net-20130519115008-v34k5qnkesqou7hm
Fixed indentation
Replaced 0xffff with GLfloat MaxUShortFloat = static_cast <GLfloat>
(std::numeric_limits <unsigned short>::max ());
Declaration and assignment of float chunk in one line

Show diffs side-by-side

added added

removed removed

Lines of Context:
403
403
    if (optionGetSkydomeImage ().empty () ||
404
404
        (mSky = GLTexture::readImageToTexture (imgName, pname, mSkySize)).empty ())
405
405
    {
 
406
        GLfloat MaxUShortFloat = static_cast <GLfloat>
 
407
                                 (std::numeric_limits <unsigned short>::max ());
406
408
        GLfloat aaafTextureData[128][128][3];
407
409
 
408
 
        GLfloat fRStart = optionGetSkydomeGradientStartColorRed () / 0xffff;
409
 
        GLfloat fGStart = optionGetSkydomeGradientStartColorGreen () / 0xffff;
410
 
        GLfloat fBStart = optionGetSkydomeGradientStartColorBlue () / 0xffff;
 
410
        GLfloat fRStart = optionGetSkydomeGradientStartColorRed () / MaxUShortFloat;
 
411
        GLfloat fGStart = optionGetSkydomeGradientStartColorGreen () / MaxUShortFloat;
 
412
        GLfloat fBStart = optionGetSkydomeGradientStartColorBlue () / MaxUShortFloat;
411
413
 
412
 
        GLfloat fREnd   = optionGetSkydomeGradientEndColorRed () / 0xffff;
413
 
        GLfloat fGEnd   = optionGetSkydomeGradientEndColorGreen () / 0xffff;
414
 
        GLfloat fBEnd   = optionGetSkydomeGradientEndColorBlue () / 0xffff;
 
414
        GLfloat fREnd   = optionGetSkydomeGradientEndColorRed () / MaxUShortFloat;
 
415
        GLfloat fGEnd   = optionGetSkydomeGradientEndColorGreen () / MaxUShortFloat;
 
416
        GLfloat fBEnd   = optionGetSkydomeGradientEndColorBlue () / MaxUShortFloat;
415
417
 
416
418
        GLfloat fRStep  = (fREnd - fRStart) / 128.0f;
417
419
        GLfloat fGStep  = (fGEnd - fGStart) / 128.0f;
701
703
 
702
704
    if (mGrabIndex)
703
705
    {
704
 
        float chunk;
705
706
        float amount = msSinceLastPaint * 0.2f * optionGetSpeed ();
706
707
        int   steps  = amount / (0.5f * optionGetTimestep ());
707
708
 
708
 
        if (!steps) steps = 1;
709
 
            chunk  = amount / (float) steps;
 
709
        if (!steps)
 
710
            steps = 1;
 
711
 
 
712
        float chunk  = amount / (float) steps;
710
713
 
711
714
        while (steps--)
712
715
        {
802
805
        mask |= PAINT_SCREEN_TRANSFORMED_MASK;
803
806
    }
804
807
 
805
 
    mSrcOutput = ((unsigned int) output->id () != (unsigned int) ~0)
806
 
                 ? output->id () : 0;
 
808
    mSrcOutput = ((unsigned int) output->id () != (unsigned int) ~0) ?
 
809
                     output->id () : 0;
807
810
    /* Always use BTF painting on non-transformed screen */
808
811
    mPaintOrder = BTF;
809
812
 
896
899
                                              paintOrder))
897
900
        return;
898
901
 
899
 
    int output = ((unsigned int) outputPtr->id () != (unsigned int) ~0)
900
 
                 ? outputPtr->id () : 0;
 
902
    int output = ((unsigned int) outputPtr->id () != (unsigned int) ~0) ?
 
903
                     outputPtr->id () : 0;
901
904
 
902
905
    mPaintOrder = paintOrder;
903
906
 
1286
1289
                                             CompOutput                *outputPtr, 
1287
1290
                                             unsigned int              mask)
1288
1291
{
1289
 
    int output = ((unsigned int) outputPtr->id () != (unsigned int) ~0)
1290
 
                 ? outputPtr->id () : 0;
 
1292
    int output = ((unsigned int) outputPtr->id () != (unsigned int) ~0) ?
 
1293
                     outputPtr->id () : 0;
1291
1294
 
1292
1295
    mReversedWindowList = cScreen->getWindowPaintList ();
1293
1296
    mReversedWindowList.reverse ();