1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

- fixed creature sounds (#802, #113)

- added missing sounds for commanders and sharpshooters (#524)
- minor fixes
This commit is contained in:
Ivan Savenko 2012-05-15 16:29:40 +00:00
parent fb34a48eec
commit 99439e1ed6
4 changed files with 141 additions and 55 deletions

View File

@ -385,7 +385,7 @@ void CMeleeAttackAnimation::endAnim()
bool CMovementAnimation::init() bool CMovementAnimation::init()
{ {
if( !isEarliest(false) ) if( !isEarliest(false) )
return false; return false;
//a few useful variables //a few useful variables
@ -428,8 +428,13 @@ bool CMovementAnimation::init()
} }
//unit reversed //unit reversed
// if(owner->moveSh <= 0) if(owner->moveSh >= 0)
// owner->moveSh = CCS->soundh->playSound(battle_sound(movedStack->getCreature(), move), -1); {
CCS->soundh->stopSound(owner->moveSh);
owner->moveSh = -1;
}
owner->moveSh = CCS->soundh->playSound(battle_sound(movedStack->getCreature(), move), -1);
tlog1<< "Playing sound " << owner->moveSh << "\n";
//step shift calculation //step shift calculation
posX = myAnim()->pos.x, posY = myAnim()->pos.y; // for precise calculations ;] posX = myAnim()->pos.x, posY = myAnim()->pos.y; // for precise calculations ;]
@ -531,7 +536,6 @@ void CMovementAnimation::endAnim()
if(movedStack) if(movedStack)
owner->addNewAnim(new CMovementEndAnimation(owner, stack, nextHex)); owner->addNewAnim(new CMovementEndAnimation(owner, stack, nextHex));
if(owner->moveSh >= 0) if(owner->moveSh >= 0)
{ {
CCS->soundh->stopSound(owner->moveSh); CCS->soundh->stopSound(owner->moveSh);

View File

@ -564,6 +564,10 @@ void CBattleInterface::show(SDL_Surface * to)
{ {
CSDL_Ext::blit8bppAlphaTo24bpp(cellBorders, NULL, to, &pos); CSDL_Ext::blit8bppAlphaTo24bpp(cellBorders, NULL, to, &pos);
} }
//Blit absolute obstacles
BOOST_FOREACH(const CObstacleInstance &oi, curInt->cb->battleGetAllObstacles())
if(oi.obstacleType == CObstacleInstance::ABSOLUTE_OBSTACLE)
blitAt(imageOfObstacle(oi), pos.x + oi.getInfo().width, pos.y + oi.getInfo().height, to);
} }
//printing hovered cell //printing hovered cell
for(int b=0; b<GameConstants::BFIELD_SIZE; ++b) for(int b=0; b<GameConstants::BFIELD_SIZE; ++b)

View File

@ -992,6 +992,15 @@
"move": "SHDMMOVE.wav", "move": "SHDMMOVE.wav",
"wince": "SHDMWNCE.wav" "wince": "SHDMWNCE.wav"
}, },
{
"name": "Sharpshooter",
"attack": "HCRSATTK.wav",
"defend": "HCRSDFND.wav",
"killed": "HCRSKILL.wav",
"move": "HCRSMOVE.wav",
"shoot": "HCRSSHOT.wav",
"wince": "HCRSWNCE.wav"
},
{ {
"name": "Skeleton", "name": "Skeleton",
"attack": "SKELATTK.wav", "attack": "SKELATTK.wav",
@ -1197,57 +1206,125 @@
"killed": "ZMBLKILL.wav", "killed": "ZMBLKILL.wav",
"move": "ZMBLMOVE.wav", "move": "ZMBLMOVE.wav",
"wince": "ZMBLWNCE.wav" "wince": "ZMBLWNCE.wav"
},
// Commanders
{
"name": "AstralSpirit1",
"attack": "GENIATTK.wav",
"defend": "GENIDFND.wav",
"killed": "GENIKILL.wav",
"move": "GENIMOVE.wav",
"wince": "GENIWNCE.wav"
},
{
"name": "Shaman1",
"attack": "AMAGATTK.wav",
"defend": "AMAGDFND.wav",
"killed": "AMAGKILL.wav",
"move": "AMAGMOVE.wav",
"shoot": "AMAGSHOT.wav",
"wince": "AMAGWNCE.wav"
},
{
"name": "OgreLeader1",
"attack": "TRLLATTK.wav",
"defend": "TRLLDFND.wav",
"killed": "TRLLKILL.wav",
"move": "TRLLMOVE.wav",
"wince": "TRLLWNCE.wav"
},
{
"name": "Brute1",
"attack": "PFOEATTK.wav",
"defend": "PFOEDFND.wav",
"killed": "PFOEKILL.wav",
"move": "PFOEMOVE.wav",
"wince": "PFOEWNCE.wav"
},
{
"name": "SoulEater1",
"attack": "GNOLATTK.wav",
"defend": "GNOLDFND.wav",
"killed": "GNOLKILL.wav",
"move": "GNOLMOVE.wav",
"wince": "GNOLWNCE.wav"
},
{
"name": "Succubus1",
"attack": "SGRGATTK.wav",
"defend": "SGRGDFND.wav",
"killed": "SGRGKILL.wav",
"move": "SGRGMOVE.wav",
"wince": "SGRGWNCE.wav"
},
{
"name": "TempleGuardian1",
"attack": "LICHATTK.wav",
"defend": "LICHDFND.wav",
"killed": "LICHKILL.wav",
"move": "LICHMOVE.wav",
"shoot": "LICHSHOT.wav",
"wince": "LICHWNCE.wav",
"ext1": "LICHATK2.wav"
},
{
"name": "Hierophant1",
"attack": "MONKATTK.wav",
"defend": "MONKDFND.wav",
"killed": "MONKKILL.wav",
"move": "MONKMOVE.wav",
"shoot": "MONKSHOT.wav",
"wince": "MONKWNCE.wav"
},
{
"name": "Paladin1",
"attack": "CRUSATTK.wav",
"defend": "CRUSDFND.wav",
"killed": "CRUSKILL.wav",
"move": "CRUSMOVE.wav",
"wince": "CRUSWNCE.wav"
} }
] ]
} }
// For future reference. Creatures from WoG. // For future reference. Creatures from WoG and their sound prefixes.
// 137 Sharpshooter //aagl ZM150Z.def SupremeArchangel
// 149 ArrowTower //godr ZM151Z.def DiamondDragon
// 150 SupremeArchangel //gtit ZM152Z.def LordofThunder
// 151 DiamondDragon //advl ZM153Z.def HellBaron
// 152 LordofThunder //ghdr ZM154Z.def BloodDragon
// 153 HellBaron //bkdr ZM155Z.def DarknessDragon
// 154 BloodDragon //bmth ZM156Z.def GhostBehemoth
// 155 DarknessDragon //chyd ZM157Z.def HellHydra
// 156 GhostBehemoth //phoe ZM158Z.def SacredPhoenix
// 157 HellHydra //wrth ZM159G.def Ghost
// 158 SacredPhoenix //aagl ZM160G.def God1War
// 159 Ghost //aagl ZM161G.def God2Peace
// 160 God1War //aagl ZM162G.def God3Mana
// 161 God2Peace //aagl ZM163G.def God4Lore
// 162 God3Mana //sglm ZM164GD.def MinotaurKing
// 163 God4Lore //sglm ZM165GD.def MineralElemental
// 164 MinotaurKing //sglm ZM166GD.def ElectricityElemental
// 165 MineralElemental //sglm ZM167GD.def AncientBasilisk
// 166 ElectricityElemental //bkdr ZM168DG.def Gorynych
// 167 AncientBasilisk //zelt ZM169ZL.def WarZealot
// 168 Gorynych //hcrs ZM170SW.def Myriad
// 169 WarZealot //hcrs ZM171SR.def MedusaMatriarch
// 170 Myriad //bgor ZM172N.def Nightmare
// 171 MedusaMatriarch //aagl ZM173M.def SantaGremlin
// 172 Nightmare
// 173 SantaGremlin //crus ZM174NPC.def Paladin2
// 174 Paladin1 //monk ZM175NPC.def Hierophant2
// 175 Hierophant1 //lich ZM176NPC.def TempleGuardian2
// 176 TempleGuardian1 //sgrg ZM177NPC.def Succubus2
// 177 Succubus1 //gnol ZM178NPC.def SoulEater2
// 178 SoulEater1 ///pfoe ZM179NPC.def Brute2
// 179 Brute1 //trll ZM180NPC.def OgreLeader2
// 180 OgreLeader1 //amag ZM181NPC.def Shaman2
// 181 Shaman1 //geni ZM182NPC.def AstralSpirit2
// 182 AstralSpirit1
// 183 Paladin2 //ecnt ZM192Z.def SylvanCentaur
// 184 Hierophant2 //monk ZM193Z.def Sorceress
// 185 TempleGuardian2 //monk ZM194Z.def Werewolf
// 186 Succubus2 //bgor ZM195Z.def HellSteed
// 187 SoulEater2 //ghdr ZM196Z.def Dracolich
// 188 Brute2
// 189 OgreLeader2
// 190 Shaman2
// 191 AstralSpirit2
// 192 SylvanCentaur
// 193 Sorceress
// 194 Werewolf
// 195 HellSteed
// 196 Dracolich

View File

@ -1465,6 +1465,7 @@
"level": 3, "level": 3,
"name": [ "Mummy" ], "name": [ "Mummy" ],
"faction": -1, "faction": -1,
"ability_add": [ [ "UNDEAD", 0, 0, 0 ] ],
"defname": "CMUMMY.DEF" "defname": "CMUMMY.DEF"
}, },
@ -1771,7 +1772,7 @@
[ "CREATURE_ENCHANT_POWER", 1, 0, 0 ] , [ "CREATURE_ENCHANT_POWER", 1, 0, 0 ] ,
[ "SPELLCASTER", 3, 27, 0 ] ], //expert shield [ "SPELLCASTER", 3, 27, 0 ] ], //expert shield
"defname": "ZM175NPC.DEF", "defname": "ZM175NPC.DEF",
"projectile_defname": "PLCBOWX.DEF" "projectile_defname": "CPRZEAX.DEF"
}, },
{ {