Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 31, 2015, 11:29:45 PM (10 years ago)
Author:
landauf
Message:

fixed build and warnings with MSVC

Location:
code/trunk/src/modules/jump
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/jump/Jump.cc

    r10215 r10218  
    595595
    596596        newPlatform = new JumpPlatformStatic(center_->getContext());
    597         addPlatform(newPlatform, center_->getPlatformStaticTemplate(), 0.0, -0.05*sectionLength);
     597        addPlatform(newPlatform, center_->getPlatformStaticTemplate(), 0.0, -0.05f*sectionLength);
    598598
    599599        platformWidth_ = newPlatform->getWidth();
     
    603603        {
    604604            newPlatform = new JumpPlatformStatic(center_->getContext());
    605             addPlatform(newPlatform, center_->getPlatformStaticTemplate(), xPosition, -0.05*sectionLength);
     605            addPlatform(newPlatform, center_->getPlatformStaticTemplate(), xPosition, -0.05f*sectionLength);
    606606            newPlatform = new JumpPlatformStatic(center_->getContext());
    607             addPlatform(newPlatform, center_->getPlatformStaticTemplate(), -xPosition, -0.05*sectionLength);
     607            addPlatform(newPlatform, center_->getPlatformStaticTemplate(), -xPosition, -0.05f*sectionLength);
    608608        }
    609609    }
     
    616616        float sectionEnd = (1 + sectionNumber_) * sectionLength;
    617617
    618         int numI = 6;
    619         int numJ = 4;
     618        const int numI = 6;
     619        const int numJ = 4;
    620620
    621621        enum PlatformType
     
    12631263    {
    12641264        float platformSpeed = center_->getPlatformSpeed();
    1265         return randomPosition(0.5*platformSpeed, 1.5*platformSpeed);
     1265        return randomPosition(0.5f*platformSpeed, 1.5f*platformSpeed);
    12661266    }
    12671267
  • code/trunk/src/modules/jump/JumpFigure.cc

    r10215 r10218  
    184184        // Move through the left and right screen boundaries
    185185        Vector3 position = getPosition();
    186         if (position.x < -fieldWidth_*1.1)
    187         {
    188             position.x = fieldWidth_*1.1;
    189         }
    190         else if (position.x > fieldWidth_*1.1)
    191         {
    192             position.x = -fieldWidth_*1.1;
     186        if (position.x < -fieldWidth_*1.1f)
     187        {
     188            position.x = fieldWidth_*1.1f;
     189        }
     190        else if (position.x > fieldWidth_*1.1f)
     191        {
     192            position.x = -fieldWidth_*1.1f;
    193193        }
    194194        setPosition(position);
     
    207207        {
    208208            Vector3 velocity = getVelocity();
    209             velocity.z = (bootsActive_ ? 1.2*jumpSpeed_ : jumpSpeed_);
     209            velocity.z = (bootsActive_ ? 1.2f*jumpSpeed_ : jumpSpeed_);
    210210            setVelocity(velocity);
    211211
     
    221221        {
    222222            Vector3 velocity = getVelocity();
    223             velocity.z = 1.2*jumpSpeed_;
     223            velocity.z = 1.2f*jumpSpeed_;
    224224            setVelocity(velocity);
    225225        }
  • code/trunk/src/modules/jump/JumpPrereqs.h

    r10078 r10218  
    4343//-----------------------------------------------------------------------
    4444
    45 #if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(PONG_STATIC_BUILD)
    46 #  ifdef PONG_SHARED_BUILD
     45#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(JUMP_STATIC_BUILD)
     46#  ifdef JUMP_SHARED_BUILD
    4747#    define _JumpExport __declspec(dllexport)
    4848#  else
Note: See TracChangeset for help on using the changeset viewer.