Browse Source

- fixed creature sounds (#802, #113)
- added missing sounds for commanders and sharpshooters (#524)
- minor fixes

Ivan Savenko 13 years ago
parent
commit
99439e1ed6

+ 8 - 4
client/BattleInterface/CBattleAnimations.cpp

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

+ 4 - 0
client/BattleInterface/CBattleInterface.cpp

@@ -564,6 +564,10 @@ void CBattleInterface::show(SDL_Surface * to)
 		{
 			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
 	for(int b=0; b<GameConstants::BFIELD_SIZE; ++b)

+ 127 - 50
config/cr_sounds.json

@@ -992,6 +992,15 @@
 			"move": "SHDMMOVE.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",
 			"attack": "SKELATTK.wav",
@@ -1197,57 +1206,125 @@
 			"killed": "ZMBLKILL.wav",
 			"move": "ZMBLMOVE.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.
-// 137 Sharpshooter
-// 149 ArrowTower
-// 150 SupremeArchangel
-// 151 DiamondDragon
-// 152 LordofThunder
-// 153 HellBaron
-// 154 BloodDragon
-// 155 DarknessDragon
-// 156 GhostBehemoth
-// 157 HellHydra
-// 158 SacredPhoenix
-// 159 Ghost
-// 160 God1War
-// 161 God2Peace
-// 162 God3Mana
-// 163 God4Lore
-// 164 MinotaurKing
-// 165 MineralElemental
-// 166 ElectricityElemental
-// 167 AncientBasilisk
-// 168 Gorynych
-// 169 WarZealot
-// 170 Myriad
-// 171 MedusaMatriarch
-// 172 Nightmare
-// 173 SantaGremlin
-// 174 Paladin1
-// 175 Hierophant1
-// 176 TempleGuardian1
-// 177 Succubus1
-// 178 SoulEater1
-// 179 Brute1
-// 180 OgreLeader1
-// 181 Shaman1
-// 182 AstralSpirit1
-// 183 Paladin2
-// 184 Hierophant2
-// 185 TempleGuardian2
-// 186 Succubus2
-// 187 SoulEater2
-// 188 Brute2
-// 189 OgreLeader2
-// 190 Shaman2
-// 191 AstralSpirit2
-// 192 SylvanCentaur
-// 193 Sorceress
-// 194 Werewolf
-// 195 HellSteed
-// 196 Dracolich
+// For future reference. Creatures from WoG and their sound prefixes.
+//aagl ZM150Z.def SupremeArchangel
+//godr ZM151Z.def DiamondDragon
+//gtit ZM152Z.def LordofThunder
+//advl ZM153Z.def HellBaron
+//ghdr ZM154Z.def BloodDragon
+//bkdr ZM155Z.def DarknessDragon
+//bmth ZM156Z.def GhostBehemoth
+//chyd ZM157Z.def HellHydra
+//phoe ZM158Z.def SacredPhoenix
+//wrth ZM159G.def Ghost
+//aagl ZM160G.def God1War
+//aagl ZM161G.def God2Peace
+//aagl ZM162G.def God3Mana
+//aagl ZM163G.def God4Lore
+//sglm ZM164GD.def MinotaurKing
+//sglm ZM165GD.def MineralElemental
+//sglm ZM166GD.def ElectricityElemental
+//sglm ZM167GD.def AncientBasilisk
+//bkdr ZM168DG.def Gorynych
+//zelt ZM169ZL.def WarZealot
+//hcrs ZM170SW.def Myriad
+//hcrs ZM171SR.def MedusaMatriarch
+//bgor ZM172N.def Nightmare
+//aagl ZM173M.def SantaGremlin
+
+//crus ZM174NPC.def Paladin2
+//monk ZM175NPC.def Hierophant2
+//lich ZM176NPC.def TempleGuardian2
+//sgrg ZM177NPC.def Succubus2
+//gnol ZM178NPC.def SoulEater2
+///pfoe ZM179NPC.def Brute2
+//trll ZM180NPC.def OgreLeader2
+//amag ZM181NPC.def Shaman2
+//geni ZM182NPC.def AstralSpirit2
+
+//ecnt ZM192Z.def SylvanCentaur
+//monk ZM193Z.def Sorceress
+//monk ZM194Z.def Werewolf
+//bgor ZM195Z.def HellSteed
+//ghdr ZM196Z.def Dracolich

+ 2 - 1
config/creatures.json

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