- some speed optimizations in areas mentioned by perf tool
This commit is contained in:
parent
4e195e10af
commit
5e57921fef
|
@ -66,13 +66,13 @@ public:
|
||||||
TilesetModelType* loadModel(const string &path, std::map<string,vector<pair<string, string> > > *loadedFileList=NULL,
|
TilesetModelType* loadModel(const string &path, std::map<string,vector<pair<string, string> > > *loadedFileList=NULL,
|
||||||
string parentLoader="");
|
string parentLoader="");
|
||||||
|
|
||||||
TilesetModelType *getTilesetModelType(int i) {return modeltypes[i];}
|
inline TilesetModelType *getTilesetModelType(int i) {return modeltypes[i];}
|
||||||
int getModelCount() const {return modeltypes.size();}
|
inline int getModelCount() const {return modeltypes.size();}
|
||||||
const Vec3f &getColor() const {return color;}
|
inline const Vec3f &getColor() const {return color;}
|
||||||
int getClass() const {return objectClass;}
|
inline int getClass() const {return objectClass;}
|
||||||
bool getWalkable() const {return walkable;}
|
inline bool getWalkable() const {return walkable;}
|
||||||
int getHeight() const {return height;}
|
inline int getHeight() const {return height;}
|
||||||
bool isATree() const {return objectClass==tree1 || objectClass==tree2;}
|
inline bool isATree() const {return objectClass==tree1 || objectClass==tree2;}
|
||||||
void deletePixels();
|
void deletePixels();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -247,25 +247,25 @@ public:
|
||||||
virtual string toString() const;
|
virtual string toString() const;
|
||||||
|
|
||||||
//get
|
//get
|
||||||
int getAttackStrength() const {return attackStrength;}
|
inline int getAttackStrength() const {return attackStrength;}
|
||||||
int getAttackVar() const {return attackVar;}
|
inline int getAttackVar() const {return attackVar;}
|
||||||
int getAttackRange() const {return attackRange;}
|
inline int getAttackRange() const {return attackRange;}
|
||||||
const AttackType *getAttackType() const {return attackType;}
|
inline const AttackType *getAttackType() const {return attackType;}
|
||||||
bool getAttackField(Field field) const {return attackFields[field];}
|
inline bool getAttackField(Field field) const {return attackFields[field];}
|
||||||
float getAttackStartTime() const {return attackStartTime;}
|
inline float getAttackStartTime() const {return attackStartTime;}
|
||||||
string getSpawnUnit() const {return spawnUnit;}
|
inline string getSpawnUnit() const {return spawnUnit;}
|
||||||
int getSpawnUnitCount() const {return spawnUnitcount;}
|
inline int getSpawnUnitCount() const {return spawnUnitcount;}
|
||||||
|
|
||||||
//get proj
|
//get proj
|
||||||
bool getProjectile() const {return projectile;}
|
inline bool getProjectile() const {return projectile;}
|
||||||
ParticleSystemTypeProjectile * getProjParticleType() const {return projectileParticleSystemType;}
|
inline ParticleSystemTypeProjectile * getProjParticleType() const {return projectileParticleSystemType;}
|
||||||
StaticSound *getProjSound() const {return projSounds.getRandSound();}
|
inline StaticSound *getProjSound() const {return projSounds.getRandSound();}
|
||||||
|
|
||||||
//get splash
|
//get splash
|
||||||
bool getSplash() const {return splash;}
|
inline bool getSplash() const {return splash;}
|
||||||
int getSplashRadius() const {return splashRadius;}
|
inline int getSplashRadius() const {return splashRadius;}
|
||||||
bool getSplashDamageAll() const {return splashDamageAll;}
|
inline bool getSplashDamageAll() const {return splashDamageAll;}
|
||||||
ParticleSystemTypeSplash * getSplashParticleType() const {return splashParticleSystemType;}
|
inline ParticleSystemTypeSplash * getSplashParticleType() const {return splashParticleSystemType;}
|
||||||
|
|
||||||
//misc
|
//misc
|
||||||
int getTotalAttackStrength(const TotalUpgrade *totalUpgrade) const;
|
int getTotalAttackStrength(const TotalUpgrade *totalUpgrade) const;
|
||||||
|
|
|
@ -51,21 +51,21 @@ public:
|
||||||
~TilesetModelType();
|
~TilesetModelType();
|
||||||
|
|
||||||
void addParticleSystem(ObjectParticleSystemType *particleSystem);
|
void addParticleSystem(ObjectParticleSystemType *particleSystem);
|
||||||
bool hasParticles() const {return particleTypes.empty() == false;}
|
inline bool hasParticles() const {return particleTypes.empty() == false;}
|
||||||
ModelParticleSystemTypes* getParticleTypes() { return &particleTypes ;}
|
inline ModelParticleSystemTypes* getParticleTypes() { return &particleTypes ;}
|
||||||
|
|
||||||
|
|
||||||
Model * getModel() const {return model;}
|
inline Model * getModel() const {return model;}
|
||||||
void setModel(Model *model) {this->model=model;}
|
inline void setModel(Model *model) {this->model=model;}
|
||||||
|
|
||||||
int getHeight() const {return height;}
|
inline int getHeight() const {return height;}
|
||||||
void setHeight(int height) {this->height=height;}
|
inline void setHeight(int height) {this->height=height;}
|
||||||
|
|
||||||
bool getRotationAllowed() const {return rotationAllowed;}
|
inline bool getRotationAllowed() const {return rotationAllowed;}
|
||||||
void setRotationAllowed(bool rotationAllowed) {this->rotationAllowed=rotationAllowed;}
|
inline void setRotationAllowed(bool rotationAllowed) {this->rotationAllowed=rotationAllowed;}
|
||||||
|
|
||||||
int getAnimSpeed() const {return animSpeed;}
|
inline int getAnimSpeed() const {return animSpeed;}
|
||||||
void setAnimSpeed(int value) {animSpeed = value;}
|
inline void setAnimSpeed(int value) {animSpeed = value;}
|
||||||
};
|
};
|
||||||
|
|
||||||
}}//end namespace
|
}}//end namespace
|
||||||
|
|
Loading…
Reference in New Issue