From ba8a01e24a19e95ce98c40a12abf6ffe90820bcc Mon Sep 17 00:00:00 2001 From: Alex Shulgin Date: Sat, 30 Oct 2021 17:21:52 +0200 Subject: [PATCH] re-order newly added icns --- src/fheroes2/agg/agg_image.cpp | 6 +++--- src/fheroes2/agg/icn.cpp | 15 +++++++-------- src/fheroes2/agg/icn.h | 20 +++++++++----------- src/fheroes2/monster/monster.cpp | 6 +++++- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/fheroes2/agg/agg_image.cpp b/src/fheroes2/agg/agg_image.cpp index ca39b9808a9..6cec42c2e36 100644 --- a/src/fheroes2/agg/agg_image.cpp +++ b/src/fheroes2/agg/agg_image.cpp @@ -979,9 +979,9 @@ namespace fheroes2 return true; case ICN::CSTLWRLK: LoadOriginalICN( id ); - LoadOriginalICN( ICN::HYDRA2_DW ); - if ( _icnVsSprite[id].size() > 28 && _icnVsSprite[ICN::HYDRA2_DW].size() > 0 ) { - _icnVsSprite[id][28] = _icnVsSprite[ICN::HYDRA2_DW][0]; + LoadOriginalICN( ICN::HYDRA2DW ); + if ( _icnVsSprite[id].size() > 28 && _icnVsSprite[ICN::HYDRA2DW].size() > 0 ) { + _icnVsSprite[id][28] = _icnVsSprite[ICN::HYDRA2DW][0]; } return true; case ICN::CSTLWZRD: diff --git a/src/fheroes2/agg/icn.cpp b/src/fheroes2/agg/icn.cpp index 8dfb66df299..3d99d9412be 100644 --- a/src/fheroes2/agg/icn.cpp +++ b/src/fheroes2/agg/icn.cpp @@ -94,7 +94,7 @@ namespace ICN { HEROEXTE, "HEROEXTE.ICN" }, { HEROEXTG, "HEROEXTG.ICN" }, { HEROFL00, "HEROFL00.ICN" }, { HEROFL01, "HEROFL01.ICN" }, { HEROFL02, "HEROFL02.ICN" }, { HEROFL03, "HEROFL03.ICN" }, { HEROFL04, "HEROFL04.ICN" }, { HEROFL05, "HEROFL05.ICN" }, { HEROFL06, "HEROFL06.ICN" }, { HEROLOGE, "HEROLOGE.ICN" }, { HEROLOGO, "HEROLOGO.ICN" }, { HISCORE, "HISCORE.ICN" }, { HOURGLAS, "HOURGLAS.ICN" }, { HSBKG, "HSBKG.ICN" }, { HSBTNS, "HSBTNS.ICN" }, - { HSICONS, "HSICONS.ICN" }, { HYDRA, "HYDRA.ICN" }, { HYDRA2, "HYDRA2.ICN" }, { HYDRA2_DW, "HYDRA2_DW.ICN" }, { HYPNOTIZ, "HYPNOTIZ.ICN" }, { ICECLOUD, "ICECLOUD.ICN" }, { KEEP, "KEEP.ICN" }, + { HSICONS, "HSICONS.ICN" }, { HYDRA, "HYDRA.ICN" }, { HYPNOTIZ, "HYPNOTIZ.ICN" }, { ICECLOUD, "ICECLOUD.ICN" }, { KEEP, "KEEP.ICN" }, { KNGT32, "KNGT32.ICN" }, { LETTER12, "LETTER12.ICN" }, { LETTER4, "LETTER4.ICN" }, { LETTER6, "LETTER6.ICN" }, { LGNDXTRA, "LGNDXTRA.ICN" }, { LGNDXTRE, "LGNDXTRE.ICN" }, { LICH2, "LICH2.ICN" }, { LICHCLOD, "LICHCLOD.ICN" }, { LICH, "LICH.ICN" }, { LICH_MSL, "LICH_MSL.ICN" }, { LISTBOX, "LISTBOX.ICN" }, { LISTBOXS, "LISTBOXS.ICN" }, { LOCATORE, "LOCATORE.ICN" }, { LOCATORS, "LOCATORS.ICN" }, { MAGE1, "MAGE1.ICN" }, @@ -102,7 +102,7 @@ namespace ICN { MAGEGLDW, "MAGEGLDW.ICN" }, { MAGEGLDZ, "MAGEGLDZ.ICN" }, { MAGIC01, "MAGIC01.ICN" }, { MAGIC02, "MAGIC02.ICN" }, { MAGIC03, "MAGIC03.ICN" }, { MAGIC04, "MAGIC04.ICN" }, { MAGIC06, "MAGIC06.ICN" }, { MAGIC07, "MAGIC07.ICN" }, { MAGIC08, "MAGIC08.ICN" }, { MANA, "MANA.ICN" }, { MEDUSA, "MEDUSA.ICN" }, { METEOR, "METEOR.ICN" }, { MINICAPT, "MINICAPT.ICN" }, { MINIHERO, "MINIHERO.ICN" }, { MINILKMR, "MINILKMR.ICN" }, - { MINIMON, "MINIMON.ICN" }, { MINIMONX, "MINIMONX.ICN" }, { MINIPORT, "MINIPORT.ICN" }, { MINISS, "MINISS.ICN" }, { MINITOWN, "MINITOWN.ICN" }, { MINOTAU2, "MINOTAU2.ICN" }, + { MINIMON, "MINIMON.ICN" }, { MINIPORT, "MINIPORT.ICN" }, { MINISS, "MINISS.ICN" }, { MINITOWN, "MINITOWN.ICN" }, { MINOTAU2, "MINOTAU2.ICN" }, { MINOTAUR, "MINOTAUR.ICN" }, { MISC12, "MISC12.ICN" }, { MISC4, "MISC4.ICN" }, { MISC6, "MISC6.ICN" }, { MOATPART, "MOATPART.ICN" }, { MOATWHOL, "MOATWHOL.ICN" }, { MOBILITY, "MOBILITY.ICN" }, { MONH0000, "MONH0000.ICN" }, { MONH0001, "MONH0001.ICN" }, { MONH0002, "MONH0002.ICN" }, { MONH0003, "MONH0003.ICN" }, { MONH0004, "MONH0004.ICN" }, { MONH0005, "MONH0005.ICN" }, { MONH0006, "MONH0006.ICN" }, { MONH0007, "MONH0007.ICN" }, @@ -117,10 +117,7 @@ namespace ICN { MONH0048, "MONH0048.ICN" }, { MONH0049, "MONH0049.ICN" }, { MONH0050, "MONH0050.ICN" }, { MONH0051, "MONH0051.ICN" }, { MONH0052, "MONH0052.ICN" }, { MONH0053, "MONH0053.ICN" }, { MONH0054, "MONH0054.ICN" }, { MONH0055, "MONH0055.ICN" }, { MONH0056, "MONH0056.ICN" }, { MONH0057, "MONH0057.ICN" }, { MONH0058, "MONH0058.ICN" }, { MONH0059, "MONH0059.ICN" }, { MONH0060, "MONH0060.ICN" }, { MONH0061, "MONH0061.ICN" }, { MONH0062, "MONH0062.ICN" }, - { MONH0063, "MONH0063.ICN" }, { MONH0064, "MONH0064.ICN" }, { MONH0065, "MONH0065.ICN" }, { MONH0066, "MONH0066.ICN" }, { MONH0067, "MONH0067.ICN" }, - { MONH0067, "MONH0068.ICN" }, { MONH0069, "MONH0069.ICN" }, { MONH0070, "MONH0070.ICN" }, { MONH0071, "MONH0071.ICN" }, - { MONS32, "MONS32.ICN" }, { MONS32X, "MONS32X.ICN" }, - { MORALEB, "MORALEB.ICN" }, + { MONH0063, "MONH0063.ICN" }, { MONH0064, "MONH0064.ICN" }, { MONH0065, "MONH0065.ICN" }, { MONS32, "MONS32.ICN" }, { MORALEB, "MORALEB.ICN" }, { MORALEG, "MORALEG.ICN" }, { MTNCRCK, "MTNCRCK.ICN" }, { MTNDIRT, "MTNDIRT.ICN" }, { MTNDSRT, "MTNDSRT.ICN" }, { MTNGRAS, "MTNGRAS.ICN" }, { MTNLAVA, "MTNLAVA.ICN" }, { MTNMULT, "MTNMULT.ICN" }, { MTNSNOW, "MTNSNOW.ICN" }, { MTNSWMP, "MTNSWMP.ICN" }, { MUMMY2, "MUMMY2.ICN" }, { MUMMYW, "MUMMYW.ICN" }, { NECR32, "NECR32.ICN" }, { NETBOX, "NETBOX.ICN" }, { NGEXTRA, "NGEXTRA.ICN" }, { NGHSBKG, "NGHSBKG.ICN" }, @@ -196,7 +193,7 @@ namespace ICN { TWNWDW_2, "TWNWDW_2.ICN" }, { TWNWDW_3, "TWNWDW_3.ICN" }, { TWNWDW_4, "TWNWDW_4.ICN" }, { TWNWDW_5, "TWNWDW_5.ICN" }, { TWNWEXT0, "TWNWEXT0.ICN" }, { TWNWLTUR, "TWNWLTUR.ICN" }, { TWNWMAGE, "TWNWMAGE.ICN" }, { TWNWMARK, "TWNWMARK.ICN" }, { TWNWMOAT, "TWNWMOAT.ICN" }, { TWNWRTUR, "TWNWRTUR.ICN" }, { TWNWSPEC, "TWNWSPEC.ICN" }, { TWNWSTAT, "TWNWSTAT.ICN" }, { TWNWTENT, "TWNWTENT.ICN" }, { TWNWTHIE, "TWNWTHIE.ICN" }, { TWNWTVRN, "TWNWTVRN.ICN" }, - { TWNWUP_3, "TWNWUP_3.ICN" }, { TWNWUP_4, "TWNWUP_4.ICN" }, { TWNWUP5B, "TWNWUP5B.ICN" }, { TWNWUP_5, "TWNWUP_5.ICN" }, { TWNWWEL2, "TWNWWEL2.ICN" }, { TWNWWELL, "TWNWWELL.ICN" }, + { TWNWUP_3, "TWNWUP_3.ICN" }, { TWNWUP5B, "TWNWUP5B.ICN" }, { TWNWUP_5, "TWNWUP_5.ICN" }, { TWNWWEL2, "TWNWWEL2.ICN" }, { TWNWWELL, "TWNWWELL.ICN" }, { TWNZBOAT, "TWNZBOAT.ICN" }, { TWNZCAPT, "TWNZCAPT.ICN" }, { TWNZCSTL, "TWNZCSTL.ICN" }, { TWNZDOCK, "TWNZDOCK.ICN" }, { TWNZDW_0, "TWNZDW_0.ICN" }, { TWNZDW_1, "TWNZDW_1.ICN" }, { TWNZDW_2, "TWNZDW_2.ICN" }, { TWNZDW_3, "TWNZDW_3.ICN" }, { TWNZDW_4, "TWNZDW_4.ICN" }, { TWNZDW_5, "TWNZDW_5.ICN" }, { TWNZEXT0, "TWNZEXT0.ICN" }, { TWNZLTUR, "TWNZLTUR.ICN" }, { TWNZMAGE, "TWNZMAGE.ICN" }, { TWNZMARK, "TWNZMARK.ICN" }, { TWNZMOAT, "TWNZMOAT.ICN" }, @@ -212,7 +209,9 @@ namespace ICN { X_LOADCM, "X_LOADCM.ICN" }, { X_CMPBKG, "X_CMPBKG.ICN" }, { X_CMPBTN, "X_CMPBTN.ICN" }, { X_CMPEXT, "X_CMPEXT.ICN" }, { X_TRACK1, "X_TRACK1.ICN" }, { X_TRACK2, "X_TRACK2.ICN" }, { X_TRACK3, "X_TRACK3.ICN" }, { X_TRACK4, "X_TRACK4.ICN" }, { X_LOC1, "X_LOC1.ICN" }, { X_LOC2, "X_LOC2.ICN" }, { X_LOC3, "X_LOC3.ICN" }, { XPRIMARY, "XPRIMARY.ICN" }, { Y_BFLG32, "Y-BFLG32.ICN" }, { Y_FLAG32, "Y-FLAG32.ICN" }, { YINYANG, "YINYANG.ICN" }, - { ZOMBIE2, "ZOMBIE2.ICN" }, { ZOMBIE, "ZOMBIE.ICN" } }; + { ZOMBIE2, "ZOMBIE2.ICN" }, { ZOMBIE, "ZOMBIE.ICN" }, + { HYDRA2, "HYDRA2.ICN" }, { HYDRA2DW, "HYDRA2DW.ICN" }, { MINIMONX, "MINIMONX.ICN" }, { MONH0071, "MONH0071.ICN" }, { MONS32X, "MONS32X.ICN" }, + { TWNWUP_4, "TWNWUP_4.ICN" } }; } const char * ICN::GetString( int icn ) diff --git a/src/fheroes2/agg/icn.h b/src/fheroes2/agg/icn.h index 733ebebd16c..fdddd6776f8 100644 --- a/src/fheroes2/agg/icn.h +++ b/src/fheroes2/agg/icn.h @@ -326,8 +326,6 @@ namespace ICN HSBTNS, HSICONS, HYDRA, - HYDRA2, - HYDRA2_DW, HYPNOTIZ, ICECLOUD, KEEP, @@ -367,7 +365,6 @@ namespace ICN MINIHERO, MINILKMR, MINIMON, - MINIMONX, MINIPORT, MINISS, MINITOWN, @@ -445,14 +442,7 @@ namespace ICN MONH0063, MONH0064, MONH0065, - MONH0066, - MONH0067, - MONH0068, - MONH0069, - MONH0070, - MONH0071, MONS32, - MONS32X, MORALEB, MORALEG, MTNCRCK, @@ -830,7 +820,6 @@ namespace ICN TWNWTHIE, TWNWTVRN, TWNWUP_3, - TWNWUP_4, TWNWUP5B, TWNWUP_5, TWNWWEL2, @@ -913,6 +902,15 @@ namespace ICN ZOMBIE2, ZOMBIE, + HYDRA2, + HYDRA2DW, + + MINIMONX, + MONH0071, + MONS32X, + + TWNWUP_4, + LAST_VALID_FILE_ICN, // Real ICNs need a special reference to ICN files. Put generated by application ICNs at the end of this enumeration. // system diff --git a/src/fheroes2/monster/monster.cpp b/src/fheroes2/monster/monster.cpp index e1cfc64ed71..73597f8c5e5 100644 --- a/src/fheroes2/monster/monster.cpp +++ b/src/fheroes2/monster/monster.cpp @@ -1047,7 +1047,11 @@ Monster Monster::fromSpriteIndex( const int index ) int Monster::ICNMonh( void ) const { - return id >= PEASANT && id < MONSTER_COUNT ? ICN::MONH0000 + id - PEASANT : ICN::UNKNOWN; + return ( id >= PEASANT && id < WATER_ELEMENT ) + ? ICN::MONH0000 + id - PEASANT + : ( ( id >= ACID_HYDRA && id < MONSTER_COUNT ) + ? ICN::MONH0071 + id - ACID_HYDRA + : ICN::UNKNOWN ); } payment_t Monster::GetCost( void ) const