From bc3cc07aba28173296e2dfe719d24267f5239aca Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 24 Mar 2012 18:30:49 +0000 Subject: [PATCH] - corrected multiple model processing based on hp - fixed cmake scripts (thanks Andrew Clarke) - fixed streflop files to ignore softfloats if not used during build --- source/configurator/CMakeLists.txt | 44 +++--- source/g3d_viewer/CMakeLists.txt | 80 +++++------ source/glest_game/CMakeLists.txt | 134 +++++++++--------- source/glest_game/type_instances/unit.cpp | 53 +++++++ source/glest_game/type_instances/unit.h | 1 + source/glest_game/types/skill_type.cpp | 10 +- source/glest_game/types/skill_type.h | 3 + source/glest_map_editor/CMakeLists.txt | 79 ++++++----- .../streflop/softfloat/softfloat-macros | 2 + .../streflop/softfloat/softfloat-specialize | 3 + .../include/streflop/softfloat/softfloat.h | 3 + 11 files changed, 243 insertions(+), 169 deletions(-) diff --git a/source/configurator/CMakeLists.txt b/source/configurator/CMakeLists.txt index 31fc59db4..ad6430bfe 100644 --- a/source/configurator/CMakeLists.txt +++ b/source/configurator/CMakeLists.txt @@ -137,26 +137,26 @@ IF(BUILD_MEGAGLEST_CONFIGURATOR) TARGET_LINK_LIBRARIES(${TARGET_NAME} ${EXTERNAL_LIBS}) #MESSAGE(STATUS "EXTERNAL_LIBS = [${EXTERNAL_LIBS}]") -ENDIF() - -# Requires an install prefix for the items below to work -IF(NOT CMAKE_INSTALL_PREFIX STREQUAL "") - # Installation of the program - INSTALL(TARGETS - ${TARGET_NAME} - DESTINATION ${MEGAGLEST_BIN_INSTALL_PATH}) - - # Installation of the program config and image files - #INSTALL(FILES - # "${PROJECT_SOURCE_DIR}/mk/linux/glest.ini" - # "${PROJECT_SOURCE_DIR}/mk/linux/glestkeys.ini" - # "${PROJECT_SOURCE_DIR}/mk/linux/configuration.xml" - # "${PROJECT_SOURCE_DIR}/mk/linux/glest.ico" - # DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}) - - # Installation of the program desktop icon file - #INSTALL(FILES - # "${PROJECT_SOURCE_DIR}/mk/linux/glest.ico" - # DESTINATION ${MEGAGLEST_ICON_INSTALL_PATH}) - + + # Requires an install prefix for the items below to work + IF(NOT CMAKE_INSTALL_PREFIX STREQUAL "") + # Installation of the program + INSTALL(TARGETS + ${TARGET_NAME} + DESTINATION ${MEGAGLEST_BIN_INSTALL_PATH}) + + # Installation of the program config and image files + #INSTALL(FILES + # "${PROJECT_SOURCE_DIR}/mk/linux/glest.ini" + # "${PROJECT_SOURCE_DIR}/mk/linux/glestkeys.ini" + # "${PROJECT_SOURCE_DIR}/mk/linux/configuration.xml" + # "${PROJECT_SOURCE_DIR}/mk/linux/glest.ico" + # DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}) + + # Installation of the program desktop icon file + #INSTALL(FILES + # "${PROJECT_SOURCE_DIR}/mk/linux/glest.ico" + # DESTINATION ${MEGAGLEST_ICON_INSTALL_PATH}) + + ENDIF() ENDIF() diff --git a/source/g3d_viewer/CMakeLists.txt b/source/g3d_viewer/CMakeLists.txt index b26742da6..db9a78206 100644 --- a/source/g3d_viewer/CMakeLists.txt +++ b/source/g3d_viewer/CMakeLists.txt @@ -165,44 +165,44 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER) DEPENDS ${TARGET_NAME}) ENDIF() ENDIF() -ENDIF() - -# Requires an install prefix for the items below to work -IF(NOT CMAKE_INSTALL_PREFIX STREQUAL "") - # Installation of the program - INSTALL(TARGETS - ${TARGET_NAME} - DESTINATION ${MEGAGLEST_BIN_INSTALL_PATH}) - - IF(EXISTS ${HELP2MAN}) - MESSAGE(STATUS "**NOTE: Will Install manpage [${TARGET_NAME_MANPAGE}] to [${MEGAGLEST_MANPAGE_INSTALL_PATH}]") - - # Installation of the program manpage file - INSTALL(FILES - "${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME_MANPAGE}" - DESTINATION ${MEGAGLEST_MANPAGE_INSTALL_PATH}) - ENDIF() - - # Installation of the program config and image files - INSTALL(FILES - "${PROJECT_SOURCE_DIR}/g3dviewer.ico" - DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}) - - # Installation of the program desktop file - INSTALL(FILES - "${PROJECT_SOURCE_DIR}/megaglest_g3dviewer.desktop" - DESTINATION ${MEGAGLEST_DESKTOP_INSTALL_PATH}) - - # Installation of the program config and image files - #INSTALL(FILES - # "${PROJECT_SOURCE_DIR}/mk/linux/glest.ini" - # "${PROJECT_SOURCE_DIR}/mk/linux/glestkeys.ini" - # "${PROJECT_SOURCE_DIR}/data/glest_game/g3dviewer.ico" - # DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}) - - # Installation of the program desktop icon file - #INSTALL(FILES - # "${PROJECT_SOURCE_DIR}/data/glest_game/g3dviewer.ico" - # DESTINATION ${MEGAGLEST_ICON_INSTALL_PATH}) - + + # Requires an install prefix for the items below to work + IF(NOT CMAKE_INSTALL_PREFIX STREQUAL "") + # Installation of the program + INSTALL(TARGETS + ${TARGET_NAME} + DESTINATION ${MEGAGLEST_BIN_INSTALL_PATH}) + + IF(EXISTS ${HELP2MAN}) + MESSAGE(STATUS "**NOTE: Will Install manpage [${TARGET_NAME_MANPAGE}] to [${MEGAGLEST_MANPAGE_INSTALL_PATH}]") + + # Installation of the program manpage file + INSTALL(FILES + "${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME_MANPAGE}" + DESTINATION ${MEGAGLEST_MANPAGE_INSTALL_PATH}) + ENDIF() + + # Installation of the program config and image files + INSTALL(FILES + "${PROJECT_SOURCE_DIR}/g3dviewer.ico" + DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}) + + # Installation of the program desktop file + INSTALL(FILES + "${PROJECT_SOURCE_DIR}/megaglest_g3dviewer.desktop" + DESTINATION ${MEGAGLEST_DESKTOP_INSTALL_PATH}) + + # Installation of the program config and image files + #INSTALL(FILES + # "${PROJECT_SOURCE_DIR}/mk/linux/glest.ini" + # "${PROJECT_SOURCE_DIR}/mk/linux/glestkeys.ini" + # "${PROJECT_SOURCE_DIR}/data/glest_game/g3dviewer.ico" + # DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}) + + # Installation of the program desktop icon file + #INSTALL(FILES + # "${PROJECT_SOURCE_DIR}/data/glest_game/g3dviewer.ico" + # DESTINATION ${MEGAGLEST_ICON_INSTALL_PATH}) + + ENDIF() ENDIF() diff --git a/source/glest_game/CMakeLists.txt b/source/glest_game/CMakeLists.txt index a88da244e..aa1b71589 100644 --- a/source/glest_game/CMakeLists.txt +++ b/source/glest_game/CMakeLists.txt @@ -234,71 +234,71 @@ IF(BUILD_MEGAGLEST) DEPENDS ${TARGET_NAME}) ENDIF() ENDIF() -ENDIF() - -# Requires an install prefix for the items below to work -IF(NOT CMAKE_INSTALL_PREFIX STREQUAL "") - #IF(NOT WIN32) - #set_target_properties(megaglest.bin PROPERTIES OUTPUT_NAME "megaglest") - # rename the binary for installation - # MESSAGE(STATUS "Copying [${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}] to [${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_BIN_INSTALL_PATH}/megaglest]") - # install(CODE - # "EXECUTE_PROCESS(COMMAND \"cmake\" \"-E\" \"copy\" \"${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}\" \"${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_BIN_INSTALL_PATH}/megaglest\")") - - # install(CODE - # "EXECUTE_PROCESS(COMMAND \"chmod\" \"+x\" \"${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_BIN_INSTALL_PATH}/megaglest\")") - - #ELSE() - - MESSAGE(STATUS "**Source package [${PROJECT_SOURCE_DIR}]") - - # Installation of the program - INSTALL(TARGETS - ${TARGET_NAME} - DESTINATION ${MEGAGLEST_BIN_INSTALL_PATH}) - - IF(EXISTS ${HELP2MAN}) - MESSAGE(STATUS "**NOTE: Will Install manpage [${TARGET_NAME_MANPAGE}] to [${MEGAGLEST_MANPAGE_INSTALL_PATH}]") - - # Installation of the program manpage file - INSTALL(FILES - "${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME_MANPAGE}" - DESTINATION ${MEGAGLEST_MANPAGE_INSTALL_PATH}) - ENDIF() - - # Check if we are running from an SVN folder structure or tarballs - IF(EXISTS "${PROJECT_SOURCE_DIR}/mk/linux/megaglest.desktop") - MESSAGE(STATUS "**Source package detected svn folder structure.") - - # Installation of the program desktop file - INSTALL(FILES - "${PROJECT_SOURCE_DIR}/mk/linux/megaglest.desktop" - DESTINATION ${MEGAGLEST_DESKTOP_INSTALL_PATH}) - - # Installation of the program desktop icon file - INSTALL(FILES - "${PROJECT_SOURCE_DIR}/mk/linux/megaglest.png" - "${PROJECT_SOURCE_DIR}/mk/linux/megaglest.xpm" - "${PROJECT_SOURCE_DIR}/mk/linux/megaglest.bmp" - "${PROJECT_SOURCE_DIR}/data/glest_game/editor.ico" - "${PROJECT_SOURCE_DIR}/mk/linux/glest.ico" - "${PROJECT_SOURCE_DIR}/data/glest_game/g3dviewer.ico" - DESTINATION ${MEGAGLEST_ICON_INSTALL_PATH}) - ELSE() - - # Installation of the program desktop file - INSTALL(FILES - "${PROJECT_SOURCE_DIR}/megaglest.desktop" - DESTINATION ${MEGAGLEST_DESKTOP_INSTALL_PATH}) - - # Installation of the program desktop icon file - INSTALL(FILES - "${PROJECT_SOURCE_DIR}/megaglest.png" - "${PROJECT_SOURCE_DIR}/megaglest.xpm" - "${PROJECT_SOURCE_DIR}/megaglest.bmp" - "${PROJECT_SOURCE_DIR}/editor.ico" - "${PROJECT_SOURCE_DIR}/glest.ico" - "${PROJECT_SOURCE_DIR}/g3dviewer.ico" - DESTINATION ${MEGAGLEST_ICON_INSTALL_PATH}) - ENDIF() + + # Requires an install prefix for the items below to work + IF(NOT CMAKE_INSTALL_PREFIX STREQUAL "") + #IF(NOT WIN32) + #set_target_properties(megaglest.bin PROPERTIES OUTPUT_NAME "megaglest") + # rename the binary for installation + # MESSAGE(STATUS "Copying [${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}] to [${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_BIN_INSTALL_PATH}/megaglest]") + # install(CODE + # "EXECUTE_PROCESS(COMMAND \"cmake\" \"-E\" \"copy\" \"${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}\" \"${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_BIN_INSTALL_PATH}/megaglest\")") + + # install(CODE + # "EXECUTE_PROCESS(COMMAND \"chmod\" \"+x\" \"${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_BIN_INSTALL_PATH}/megaglest\")") + + #ELSE() + + MESSAGE(STATUS "**Source package [${PROJECT_SOURCE_DIR}]") + + # Installation of the program + INSTALL(TARGETS + ${TARGET_NAME} + DESTINATION ${MEGAGLEST_BIN_INSTALL_PATH}) + + IF(EXISTS ${HELP2MAN}) + MESSAGE(STATUS "**NOTE: Will Install manpage [${TARGET_NAME_MANPAGE}] to [${MEGAGLEST_MANPAGE_INSTALL_PATH}]") + + # Installation of the program manpage file + INSTALL(FILES + "${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME_MANPAGE}" + DESTINATION ${MEGAGLEST_MANPAGE_INSTALL_PATH}) + ENDIF() + + # Check if we are running from an SVN folder structure or tarballs + IF(EXISTS "${PROJECT_SOURCE_DIR}/mk/linux/megaglest.desktop") + MESSAGE(STATUS "**Source package detected svn folder structure.") + + # Installation of the program desktop file + INSTALL(FILES + "${PROJECT_SOURCE_DIR}/mk/linux/megaglest.desktop" + DESTINATION ${MEGAGLEST_DESKTOP_INSTALL_PATH}) + + # Installation of the program desktop icon file + INSTALL(FILES + "${PROJECT_SOURCE_DIR}/mk/linux/megaglest.png" + "${PROJECT_SOURCE_DIR}/mk/linux/megaglest.xpm" + "${PROJECT_SOURCE_DIR}/mk/linux/megaglest.bmp" + "${PROJECT_SOURCE_DIR}/data/glest_game/editor.ico" + "${PROJECT_SOURCE_DIR}/mk/linux/glest.ico" + "${PROJECT_SOURCE_DIR}/data/glest_game/g3dviewer.ico" + DESTINATION ${MEGAGLEST_ICON_INSTALL_PATH}) + ELSE() + + # Installation of the program desktop file + INSTALL(FILES + "${PROJECT_SOURCE_DIR}/megaglest.desktop" + DESTINATION ${MEGAGLEST_DESKTOP_INSTALL_PATH}) + + # Installation of the program desktop icon file + INSTALL(FILES + "${PROJECT_SOURCE_DIR}/megaglest.png" + "${PROJECT_SOURCE_DIR}/megaglest.xpm" + "${PROJECT_SOURCE_DIR}/megaglest.bmp" + "${PROJECT_SOURCE_DIR}/editor.ico" + "${PROJECT_SOURCE_DIR}/glest.ico" + "${PROJECT_SOURCE_DIR}/g3dviewer.ico" + DESTINATION ${MEGAGLEST_ICON_INSTALL_PATH}) + ENDIF() + ENDIF() ENDIF() diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index 9b9696a8e..79e0a4ed7 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -1112,6 +1112,9 @@ Model *Unit::getCurrentModelPtr() { Model *result = currSkill->getAnimation(animProgress,this,&lastModelIndexForCurrSkillType, &animationRandomCycleCount); if(currentModelIndexForCurrSkillType != lastModelIndexForCurrSkillType) { animationRandomCycleCount++; + if(currSkill != NULL && animationRandomCycleCount >= currSkill->getAnimationCount()) { + animationRandomCycleCount = 0; + } } return result; } @@ -1127,10 +1130,38 @@ const Model *Unit::getCurrentModel() { const Model *result = currSkill->getAnimation(animProgress,this,&lastModelIndexForCurrSkillType, &animationRandomCycleCount); if(currentModelIndexForCurrSkillType != lastModelIndexForCurrSkillType) { animationRandomCycleCount++; + if(currSkill != NULL && animationRandomCycleCount >= currSkill->getAnimationCount()) { + animationRandomCycleCount = 0; + } } return result; } +bool Unit::checkModelStateInfoForNewHpValue() { + bool result = false; + if(currSkill != NULL && currSkill->getAnimationCount() > 1) { + if(lastModelIndexForCurrSkillType >= 0) { + const AnimationAttributes attributes = currSkill->getAnimationAttribute(lastModelIndexForCurrSkillType); + if(attributes.fromHp != 0 || attributes.toHp != 0) { + //printf("Check for RESET model state for [%d - %s] HP = %d [%d to %d]\n",this->id,this->getType()->getName().c_str(),this->getHp(),attributes.fromHp,attributes.toHp); + //if(this->getHp() >= attributes.fromHp && this->getHp() <= attributes.toHp) { + if(this->getHp() < attributes.fromHp || this->getHp() > attributes.toHp) { + //printf("RESET model state for [%d - %s] HP = %d [%d to %d]\n",this->id,this->getType()->getName().c_str(),this->getHp(),attributes.fromHp,attributes.toHp); + + lastModelIndexForCurrSkillType = -1; + animationRandomCycleCount = 0; + bool result = true; + } + } + else { + //printf("Check for RESET #2 model state for [%d - %s] HP = %d [%d to %d] for skill [%s]\n",this->id,this->getType()->getName().c_str(),this->getHp(),attributes.fromHp,attributes.toHp,currSkill->getName().c_str()); + } + } + } + + return result; +} + Vec3f Unit::getCurrVector() const{ if(type == NULL) { char szBuf[4096]=""; @@ -2075,6 +2106,8 @@ bool Unit::applyAttackBoost(const AttackBoost *boost, const Unit *source) { //printf("AFTER Apply Hp Regen max = %d, prev = %d, hp = %d\n",totalUpgrade.getMaxHpRegeneration(),prevMaxHpRegen,hp); } + checkModelStateInfoForNewHpValue(); + if(originalHp < hp) { this->setLastAttackerUnitId(source->getId()); } @@ -2106,6 +2139,7 @@ bool Unit::applyAttackBoost(const AttackBoost *boost, const Unit *source) { alive= false; hp=0; addItemToVault(&this->hp,this->hp); + checkModelStateInfoForNewHpValue(); stopDamageParticles(true); @@ -2183,6 +2217,8 @@ void Unit::deapplyAttackBoost(const AttackBoost *boost, const Unit *source) { hp=0; addItemToVault(&this->hp,this->hp); + checkModelStateInfoForNewHpValue(); + stopDamageParticles(true); this->setLastAttackerUnitId(source->getId()); @@ -2204,6 +2240,8 @@ void Unit::deapplyAttackBoost(const AttackBoost *boost, const Unit *source) { } } + checkModelStateInfoForNewHpValue(); + //printf("DE-APPLYING ATTACK BOOST BEFORE END to unit [%s - %d] from unit [%s - %d]\n",this->getType()->getName().c_str(),this->getId(),source->getType()->getName().c_str(),source->getId()); for(unsigned int i = 0; i < currentAttackBoostEffects.size(); ++i) { @@ -2241,6 +2279,7 @@ void Unit::tick() { } addItemToVault(&this->hp,this->hp); + checkModelStateInfoForNewHpValue(); //if(this->getType()->getName() == "spearman") printf("tick hp#2 [type->getTotalMaxHpRegeneration(&totalUpgrade)] = %d type->getTotalMaxHp(&totalUpgrade) [%d] newhp = %d\n",type->getTotalMaxHpRegeneration(&totalUpgrade),type->getTotalMaxHp(&totalUpgrade),hp); } // If we have negative regeneration then check if the unit should die @@ -2272,6 +2311,8 @@ void Unit::tick() { hp = type->getTotalMaxHp(&totalUpgrade); } addItemToVault(&this->hp,this->hp); + + checkModelStateInfoForNewHpValue(); //if(this->getType()->getName() == "spearman") printf("tick hp#1 [type->getHpRegeneration()] = %d type->getTotalMaxHp(&totalUpgrade) [%d] newhp = %d\n",type->getHpRegeneration(),type->getTotalMaxHp(&totalUpgrade),hp); } } @@ -2407,6 +2448,8 @@ bool Unit::repair(){ } addItemToVault(&this->hp,this->hp); + checkModelStateInfoForNewHpValue(); + //stop DamageParticles stopDamageParticles(false); @@ -2423,6 +2466,8 @@ bool Unit::decHp(int i) { hp -= i; addItemToVault(&this->hp,this->hp); + checkModelStateInfoForNewHpValue(); + if(type == NULL) { char szBuf[4096]=""; sprintf(szBuf,"In [%s::%s Line: %d] ERROR: type == NULL, Unit = [%s]\n",__FILE__,__FUNCTION__,__LINE__,this->toString().c_str()); @@ -2438,6 +2483,8 @@ bool Unit::decHp(int i) { hp=0; addItemToVault(&this->hp,this->hp); + checkModelStateInfoForNewHpValue(); + stopDamageParticles(true); return true; } @@ -2574,6 +2621,8 @@ void Unit::applyUpgrade(const UpgradeType *upgradeType){ hp += upgradeType->getMaxHp(); hp = max(0,hp); addItemToVault(&this->hp,this->hp); + + checkModelStateInfoForNewHpValue(); } } @@ -2596,6 +2645,8 @@ void Unit::incKills(int team) { checkItemInVault(&this->hp,this->hp); hp += totalUpgrade.getMaxHp() - maxHp; addItemToVault(&this->hp,this->hp); + + checkModelStateInfoForNewHpValue(); } } @@ -2626,6 +2677,8 @@ bool Unit::morph(const MorphCommandType *mct){ hp += morphUnitType->getMaxHp() - type->getMaxHp(); addItemToVault(&this->hp,this->hp); + checkModelStateInfoForNewHpValue(); + type= morphUnitType; level= NULL; currField=morphUnitField; diff --git a/source/glest_game/type_instances/unit.h b/source/glest_game/type_instances/unit.h index 9c12c630f..a184bc7cd 100644 --- a/source/glest_game/type_instances/unit.h +++ b/source/glest_game/type_instances/unit.h @@ -658,6 +658,7 @@ private: int getFrameCount() const; void checkCustomizedParticleTriggers(bool force); + bool checkModelStateInfoForNewHpValue(); }; }}// end namespace diff --git a/source/glest_game/types/skill_type.cpp b/source/glest_game/types/skill_type.cpp index 04113440c..2d63c03d4 100644 --- a/source/glest_game/types/skill_type.cpp +++ b/source/glest_game/types/skill_type.cpp @@ -486,11 +486,16 @@ bool SkillType::CanCycleNextRandomAnimation(const int *animationRandomCycleCount return result; } +const AnimationAttributes SkillType::getAnimationAttribute(int index) const { + return animationAttributes[index]; +} + Model *SkillType::getAnimation(float animProgress, const Unit *unit, int *lastAnimationIndex, int *animationRandomCycleCount) const { int modelIndex = 0; + //printf("Count [%d] animProgress = [%f] for skill [%s] animationRandomCycleCount = %d\n",animations.size(),animProgress,name.c_str(),*animationRandomCycleCount); if(animations.size() > 1) { - //printf("animProgress = [%f] for skill [%s]\n",animProgress,name.c_str()); + //printf("animProgress = [%f] for skill [%s] animationRandomCycleCount = %d\n",animProgress,name.c_str(),*animationRandomCycleCount); if(lastAnimationIndex) { modelIndex = *lastAnimationIndex; @@ -546,6 +551,9 @@ Model *SkillType::getAnimation(float animProgress, const Unit *unit, } } if(lastAnimationIndex) { + if(*lastAnimationIndex != modelIndex) { + //printf("Switching model from [%s] to [%s]\n",(*lastAnimationIndex >= 0 ? animations[*lastAnimationIndex]->getFileName().c_str() : "none"),animations[modelIndex]->getFileName().c_str()); + } *lastAnimationIndex = modelIndex; } diff --git a/source/glest_game/types/skill_type.h b/source/glest_game/types/skill_type.h index e06cf2be8..4cd509ef6 100644 --- a/source/glest_game/types/skill_type.h +++ b/source/glest_game/types/skill_type.h @@ -159,6 +159,9 @@ public: static void resetNextAttackBoostId() { nextAttackBoostId=0; } + const AnimationAttributes getAnimationAttribute(int index) const; + int getAnimationCount() const { return animations.size(); } + //get const string &getName() const {return name;} SkillClass getClass() const {return skillClass;} diff --git a/source/glest_map_editor/CMakeLists.txt b/source/glest_map_editor/CMakeLists.txt index 125c25717..7b4c0af74 100644 --- a/source/glest_map_editor/CMakeLists.txt +++ b/source/glest_map_editor/CMakeLists.txt @@ -159,43 +159,44 @@ IF(BUILD_MEGAGLEST_MAP_EDITOR) DEPENDS ${TARGET_NAME}) ENDIF() ENDIF() -ENDIF() - -# Requires an install prefix for the items below to work -IF(NOT CMAKE_INSTALL_PREFIX STREQUAL "") - # Installation of the program - INSTALL(TARGETS - ${TARGET_NAME} - DESTINATION ${MEGAGLEST_BIN_INSTALL_PATH}) - - IF(EXISTS ${HELP2MAN}) - MESSAGE(STATUS "**NOTE: Will Install manpage [${TARGET_NAME_MANPAGE}] to [${MEGAGLEST_MANPAGE_INSTALL_PATH}]") - - # Installation of the program manpage file - INSTALL(FILES - "${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME_MANPAGE}" - DESTINATION ${MEGAGLEST_MANPAGE_INSTALL_PATH}) - ENDIF() - - # Installation of the program config and image files - INSTALL(FILES - "${PROJECT_SOURCE_DIR}/editor.ico" - DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}) - - # Installation of the program desktop file - NSTALL(FILES - "${PROJECT_SOURCE_DIR}/megaglest_editor.desktop" - DESTINATION ${MEGAGLEST_DESKTOP_INSTALL_PATH}) - - #INSTALL(FILES - # "${PROJECT_SOURCE_DIR}/mk/linux/glest.ini" - # "${PROJECT_SOURCE_DIR}/mk/linux/glestkeys.ini" - # "${PROJECT_SOURCE_DIR}/data/glest_game/editor.ico" - # DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}) - - # Installation of the program desktop icon file - #INSTALL(FILES - # "${PROJECT_SOURCE_DIR}/data/glest_game/editor.ico" - # DESTINATION ${MEGAGLEST_ICON_INSTALL_PATH}) - + + + # Requires an install prefix for the items below to work + IF(NOT CMAKE_INSTALL_PREFIX STREQUAL "") + # Installation of the program + INSTALL(TARGETS + ${TARGET_NAME} + DESTINATION ${MEGAGLEST_BIN_INSTALL_PATH}) + + IF(EXISTS ${HELP2MAN}) + MESSAGE(STATUS "**NOTE: Will Install manpage [${TARGET_NAME_MANPAGE}] to [${MEGAGLEST_MANPAGE_INSTALL_PATH}]") + + # Installation of the program manpage file + INSTALL(FILES + "${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME_MANPAGE}" + DESTINATION ${MEGAGLEST_MANPAGE_INSTALL_PATH}) + ENDIF() + + # Installation of the program config and image files + INSTALL(FILES + "${PROJECT_SOURCE_DIR}/editor.ico" + DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}) + + # Installation of the program desktop file + INSTALL(FILES + "${PROJECT_SOURCE_DIR}/megaglest_editor.desktop" + DESTINATION ${MEGAGLEST_DESKTOP_INSTALL_PATH}) + + #INSTALL(FILES + # "${PROJECT_SOURCE_DIR}/mk/linux/glest.ini" + # "${PROJECT_SOURCE_DIR}/mk/linux/glestkeys.ini" + # "${PROJECT_SOURCE_DIR}/data/glest_game/editor.ico" + # DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}) + + # Installation of the program desktop icon file + #INSTALL(FILES + # "${PROJECT_SOURCE_DIR}/data/glest_game/editor.ico" + # DESTINATION ${MEGAGLEST_ICON_INSTALL_PATH}) + + ENDIF() ENDIF() diff --git a/source/shared_lib/include/streflop/softfloat/softfloat-macros b/source/shared_lib/include/streflop/softfloat/softfloat-macros index 9661c1e17..83defe619 100644 --- a/source/shared_lib/include/streflop/softfloat/softfloat-macros +++ b/source/shared_lib/include/streflop/softfloat/softfloat-macros @@ -4,6 +4,7 @@ CHANGES: Inserted this file is a namespace Nicolas Brodu, 2006 =============================================================================*/ +#ifdef STREFLOP_SOFT namespace streflop { namespace SoftFloat { @@ -730,3 +731,4 @@ INLINE flag ne128( bits64 a0, bits64 a1, bits64 b0, bits64 b1 ) // Close namespaces } } +#endif \ No newline at end of file diff --git a/source/shared_lib/include/streflop/softfloat/softfloat-specialize b/source/shared_lib/include/streflop/softfloat/softfloat-specialize index d4256c6f0..c6859416d 100644 --- a/source/shared_lib/include/streflop/softfloat/softfloat-specialize +++ b/source/shared_lib/include/streflop/softfloat/softfloat-specialize @@ -12,6 +12,8 @@ CHANGES: Nicolas Brodu, 2006 =============================================================================*/ +#ifdef STREFLOP_SOFT + #include #include #include "../streflop.h" @@ -515,3 +517,4 @@ static float128 propagateFloat128NaN( float128 a, float128 b ) // NB060506: close namespaces } } +#endif \ No newline at end of file diff --git a/source/shared_lib/include/streflop/softfloat/softfloat.h b/source/shared_lib/include/streflop/softfloat/softfloat.h index b65f33de4..9376d3680 100644 --- a/source/shared_lib/include/streflop/softfloat/softfloat.h +++ b/source/shared_lib/include/streflop/softfloat/softfloat.h @@ -9,6 +9,8 @@ CHANGES: pack the fields of floatx80, just in case (should be useless) Nicolas Brodu, 2006 =============================================================================*/ +#ifdef STREFLOP_SOFT + #ifndef SOFTFLOAT_H #define SOFTFLOAT_H @@ -334,3 +336,4 @@ char float128_is_signaling_nan( float128 ); #endif #endif +#endif