mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Merge fixes
This commit is contained in:
parent
6e205a58b4
commit
483276b128
@ -80,7 +80,7 @@ public:
|
|||||||
h & static_cast<CBonusSystemNode&>(*this);
|
h & static_cast<CBonusSystemNode&>(*this);
|
||||||
h & name & description & eventText & image & large & advMapDef & iconIndex &
|
h & name & description & eventText & image & large & advMapDef & iconIndex &
|
||||||
price & possibleSlots & constituents & constituentOf & aClass & id;
|
price & possibleSlots & constituents & constituentOf & aClass & id;
|
||||||
if(version>=756)
|
if(version>=759)
|
||||||
{
|
{
|
||||||
h & identifier;
|
h & identifier;
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ public:
|
|||||||
h & idNumber & faction & sounds & animation;
|
h & idNumber & faction & sounds & animation;
|
||||||
|
|
||||||
h & doubleWide & special;
|
h & doubleWide & special;
|
||||||
if(version>=756)
|
if(version>=759)
|
||||||
{
|
{
|
||||||
h & identifier;
|
h & identifier;
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ public:
|
|||||||
h & ID & imageIndex & initialArmy & heroClass & secSkillsInit & spec & specialty & spells & haveSpellBook & sex & special;
|
h & ID & imageIndex & initialArmy & heroClass & secSkillsInit & spec & specialty & spells & haveSpellBook & sex & special;
|
||||||
h & name & biography & specName & specDescr & specTooltip;
|
h & name & biography & specName & specDescr & specTooltip;
|
||||||
h & iconSpecSmall & iconSpecLarge & portraitSmall & portraitLarge;
|
h & iconSpecSmall & iconSpecLarge & portraitSmall & portraitLarge;
|
||||||
if(version>=756)
|
if(version>=759)
|
||||||
{
|
{
|
||||||
h & identifier;
|
h & identifier;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "mapping/CCampaignHandler.h" //for CCampaignState
|
#include "mapping/CCampaignHandler.h" //for CCampaignState
|
||||||
#include "rmg/CMapGenerator.h" // for CMapGenOptions
|
#include "rmg/CMapGenerator.h" // for CMapGenOptions
|
||||||
|
|
||||||
const ui32 version = 758;
|
const ui32 version = 759;
|
||||||
const ui32 minSupportedVersion = 753;
|
const ui32 minSupportedVersion = 753;
|
||||||
|
|
||||||
class CISer;
|
class CISer;
|
||||||
|
@ -21,7 +21,21 @@ CFileInputStream::CFileInputStream(const boost::filesystem::path & file, si64 st
|
|||||||
}
|
}
|
||||||
|
|
||||||
CFileInputStream::CFileInputStream(const CFileInfo & file, si64 start, si64 size)
|
CFileInputStream::CFileInputStream(const CFileInfo & file, si64 start, si64 size)
|
||||||
: CFileInputStream{file.getName(), start, size} {}
|
: dataStart{start},
|
||||||
|
dataSize{size},
|
||||||
|
fileStream{file.getName(), std::ios::in | std::ios::binary}
|
||||||
|
{
|
||||||
|
if (fileStream.fail())
|
||||||
|
throw std::runtime_error("File " + file.getName() + " isn't available.");
|
||||||
|
|
||||||
|
if (dataSize == 0)
|
||||||
|
{
|
||||||
|
fileStream.seekg(0, std::ios::end);
|
||||||
|
dataSize = tell();
|
||||||
|
}
|
||||||
|
|
||||||
|
fileStream.seekg(dataStart, std::ios::beg);
|
||||||
|
}
|
||||||
|
|
||||||
si64 CFileInputStream::read(ui8 * data, si64 size)
|
si64 CFileInputStream::read(ui8 * data, si64 size)
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CZipStream::CZipStream(const boost::filesystem::path & archive, unz64_file_pos filepos)
|
CZipStream::CZipStream(std::shared_ptr<CIOApi> api, const boost::filesystem::path & archive, unz64_file_pos filepos)
|
||||||
{
|
{
|
||||||
zlib_filefunc64_def zlibApi;
|
zlib_filefunc64_def zlibApi;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ public:
|
|||||||
* @param archive path to archive to open
|
* @param archive path to archive to open
|
||||||
* @param filepos position of file to open
|
* @param filepos position of file to open
|
||||||
*/
|
*/
|
||||||
CZipStream(std::shared_ptr<CIOApi> api, const boost::filesystem::path & archive, unz_file_pos filepos);
|
CZipStream(std::shared_ptr<CIOApi> api, const boost::filesystem::path & archive, unz64_file_pos filepos);
|
||||||
~CZipStream();
|
~CZipStream();
|
||||||
|
|
||||||
si64 getSize() override;
|
si64 getSize() override;
|
||||||
|
@ -159,7 +159,7 @@ public:
|
|||||||
template <typename Handler> void serialize(Handler &h, const int version)
|
template <typename Handler> void serialize(Handler &h, const int version)
|
||||||
{
|
{
|
||||||
h & type & subtype & templates & rmgInfo & objectName;
|
h & type & subtype & templates & rmgInfo & objectName;
|
||||||
if(version >= 756)
|
if(version >= 759)
|
||||||
{
|
{
|
||||||
h & typeName & subTypeName;
|
h & typeName & subTypeName;
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ class DLL_LINKAGE CObjectClassesHandler : public IHandlerBase
|
|||||||
template <typename Handler> void serialize(Handler &h, const int version)
|
template <typename Handler> void serialize(Handler &h, const int version)
|
||||||
{
|
{
|
||||||
h & name & handlerName & base & subObjects;
|
h & name & handlerName & base & subObjects;
|
||||||
if(version >= 756)
|
if(version >= 759)
|
||||||
{
|
{
|
||||||
h & identifier & subIds;
|
h & identifier & subIds;
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ public:
|
|||||||
h & pos & ID & subID & id & tempOwner & blockVisit & appearance;
|
h & pos & ID & subID & id & tempOwner & blockVisit & appearance;
|
||||||
//definfo is handled by map serializer
|
//definfo is handled by map serializer
|
||||||
|
|
||||||
if(version >= 756)
|
if(version >= 759)
|
||||||
{
|
{
|
||||||
h & typeName & subTypeName;
|
h & typeName & subTypeName;
|
||||||
}
|
}
|
||||||
|
@ -598,7 +598,7 @@ void CMapLoaderJson::MapObjectLoader::construct()
|
|||||||
pos.x = configuration["x"].Float();
|
pos.x = configuration["x"].Float();
|
||||||
pos.y = configuration["y"].Float();
|
pos.y = configuration["y"].Float();
|
||||||
pos.z = configuration["l"].Float();
|
pos.z = configuration["l"].Float();
|
||||||
owner->map->grailRadious = configuration["options"]["grailRadius"].Float();
|
owner->map->grailRadius = configuration["options"]["grailRadius"].Float();
|
||||||
}
|
}
|
||||||
|
|
||||||
handler = VLC->objtypeh->getHandlerFor(typeName, subTypeName);
|
handler = VLC->objtypeh->getHandlerFor(typeName, subTypeName);
|
||||||
@ -879,7 +879,7 @@ void CMapSaverJson::writeObjects()
|
|||||||
grail["y"].Float() = map->grailPos.y;
|
grail["y"].Float() = map->grailPos.y;
|
||||||
grail["l"].Float() = map->grailPos.z;
|
grail["l"].Float() = map->grailPos.z;
|
||||||
|
|
||||||
grail["options"]["radius"].Float() = map->grailRadious;
|
grail["options"]["radius"].Float() = map->grailRadius;
|
||||||
|
|
||||||
std::string grailId = boost::str(boost::format("grail_%d") % map->objects.size());
|
std::string grailId = boost::str(boost::format("grail_%d") % map->objects.size());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user