mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
- compile fix
This commit is contained in:
@@ -44,7 +44,7 @@ private:
|
|||||||
std::map<soundBase::soundID, Mix_Chunk *> soundChunks;
|
std::map<soundBase::soundID, Mix_Chunk *> soundChunks;
|
||||||
|
|
||||||
Mix_Chunk *GetSoundChunk(soundBase::soundID soundID);
|
Mix_Chunk *GetSoundChunk(soundBase::soundID soundID);
|
||||||
Mix_Chunk *CSoundHandler::GetSoundChunk(std::string &sound);
|
Mix_Chunk *GetSoundChunk(std::string &sound);
|
||||||
|
|
||||||
//have entry for every currently active channel
|
//have entry for every currently active channel
|
||||||
//boost::function will be NULL if callback was not set
|
//boost::function will be NULL if callback was not set
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
#include "CModHandler.h"
|
#include "CModHandler.h"
|
||||||
#include "JsonNode.h"
|
#include "JsonNode.h"
|
||||||
#include "Filesystem\CResourceLoader.h"
|
#include "Filesystem/CResourceLoader.h"
|
||||||
#include "Filesystem\ISimpleResourceLoader.h"
|
#include "Filesystem/ISimpleResourceLoader.h"
|
||||||
/*
|
/*
|
||||||
* CModHandler.h, part of VCMI engine
|
* CModHandler.h, part of VCMI engine
|
||||||
*
|
*
|
||||||
@@ -69,13 +69,13 @@ void CModHandler::loadConfigFromFile (std::string name)
|
|||||||
|
|
||||||
//TODO: read mods from Mods/ folder
|
//TODO: read mods from Mods/ folder
|
||||||
|
|
||||||
auto & configList = CResourceHandler::get()->getResourcesWithName (ResourceID("CONFIG/MODS/HOTA/MOD", EResType::TEXT));
|
auto & configList = CResourceHandler::get()->getResourcesWithName (ResourceID("CONFIG/MODS/HOTA/MOD", EResType::TEXT));
|
||||||
|
|
||||||
BOOST_FOREACH(auto & entry, configList)
|
BOOST_FOREACH(auto & entry, configList)
|
||||||
{
|
{
|
||||||
auto stream = entry.getLoader()->load (entry.getResourceName());
|
auto stream = entry.getLoader()->load (entry.getResourceName());
|
||||||
std::unique_ptr<ui8[]> textData (new ui8[stream->getSize()]);
|
std::unique_ptr<ui8[]> textData (new ui8[stream->getSize()]);
|
||||||
stream->read (textData.get(), stream->getSize());
|
stream->read (textData.get(), stream->getSize());
|
||||||
|
|
||||||
tlog3 << "\t\tFound mod file: " << entry.getResourceName() << "\n";
|
tlog3 << "\t\tFound mod file: " << entry.getResourceName() << "\n";
|
||||||
const JsonNode config ((char*)textData.get(), stream->getSize());
|
const JsonNode config ((char*)textData.get(), stream->getSize());
|
||||||
|
|||||||
Reference in New Issue
Block a user