Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 12, 2006, 8:54:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/std:: compile and run again, with many more std::strings….

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/std/src/world_entities/weapons/weapon.h

    r7207 r7216  
    111111    inline long getCapability() const { return this->capability; };
    112112    void setProjectileType(ClassID projectile);
    113     void setProjectileTypeC(const char* projectile);
     113    void setProjectileTypeC(const std::string& projectile);
    114114    /** @returns The projectile's classID */
    115115    inline ClassID getProjectileType() { return this->projectile; };
     
    132132    // STATE CHANGES //
    133133    /** @param state the State to time @param duration the duration of the State */
    134     inline void setStateDuration(const char* state, float duration) { setStateDuration(charToState(state), duration); };
     134    inline void setStateDuration(const std::string& state, float duration) { setStateDuration(charToState(state), duration); };
    135135    /** @param state the State to time @param duration the duration of the State */
    136136    inline void setStateDuration(WeaponState state, float duration) { /*(state < WS_STATE_COUNT)?*/this->times[state] = duration; };
     
    149149
    150150    void setActionSound(WeaponAction action, const std::string& soundFile);
    151     /** @see void setActionSound(WeaponAction action, const char* soundFile); */
    152     void setActionSound(const char* action, const char* soundFile) { this->setActionSound(charToAction(action), soundFile); };
     151    /** @see void setActionSound(WeaponAction action, const std::string& soundFile); */
     152    void setActionSound(const std::string& action, const std::string& soundFile) { this->setActionSound(charToAction(action), soundFile); };
    153153
    154154    Animation3D* getAnimation(WeaponState state, PNode* node = NULL);
     
    176176
    177177    // utility:
    178     static WeaponAction  charToAction(const char* action);
     178    static WeaponAction  charToAction(const std::string& action);
    179179    static const char*   actionToChar(WeaponAction action);
    180     static WeaponState   charToState(const char* state);
     180    static WeaponState   charToState(const std::string& state);
    181181    static const char*   stateToChar(WeaponState state);
    182182
Note: See TracChangeset for help on using the changeset viewer.