1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-29 00:41:38 +02:00

Restored ambient sounds functionality

This commit is contained in:
Ivan Savenko
2023-03-01 17:20:05 +02:00
parent cdcd5a29dd
commit b57a07b10f
18 changed files with 361 additions and 133 deletions

View File

@ -136,21 +136,6 @@ bool CMapHandler::isInMap( const int3 & tile)
return map->isInTheMap(tile);
}
std::vector<std::string> CMapHandler::getAmbientSounds(const int3 & tile)
{
std::vector<std::string> result;
//for(auto & ttObj : ttiles[tile.z][tile.x][tile.y].objects)
//{
// if(ttObj.ambientSound)
// result.push_back(ttObj.ambientSound.get());
//}
if(map->isCoastalTile(tile))
result.emplace_back("LOOPOCEA");
return result;
}
void CMapHandler::onObjectFadeIn(const CGObjectInstance * obj)
{
for (auto * observer : observers)

View File

@ -28,17 +28,10 @@ VCMI_LIB_NAMESPACE_BEGIN
class CGObjectInstance;
class CGHeroInstance;
class CGBoat;
class CMap;
struct TerrainTile;
class PlayerColor;
VCMI_LIB_NAMESPACE_END
struct SDL_Surface;
class CAnimation;
class IImage;
class CMapHandler;
class IMapObjectObserver;
class CMapHandler
@ -74,9 +67,6 @@ public:
/// returns string description for terrain interaction
std::string getTerrainDescr(const int3 & pos, bool rightClick) const;
/// returns list of ambient sounds for specified tile
std::vector<std::string> getAmbientSounds(const int3 & tile);
/// determines if the map is ready to handle new hero movement (not available during fading animations)
bool hasOngoingAnimations();