mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
* updated changelog
* version set to 0.72 * integrated save format version to the CLoadFile * fixed problems on entering non-number as resolution number * minor improvements
This commit is contained in:
11
ChangeLog
11
ChangeLog
@@ -1,4 +1,4 @@
|
|||||||
0.71 -> 0.72 (soon)
|
0.71 -> 0.72 (Jun 1 2009)
|
||||||
GENERAL:
|
GENERAL:
|
||||||
* many sound effects and music
|
* many sound effects and music
|
||||||
* autosave (to 5 subsequent files)
|
* autosave (to 5 subsequent files)
|
||||||
@@ -13,6 +13,7 @@ GENERAL:
|
|||||||
* timed events won't cause resources amount to be negative
|
* timed events won't cause resources amount to be negative
|
||||||
* support for sorcery secondary skill
|
* support for sorcery secondary skill
|
||||||
* reduntant quotation marks from artifact descriptions are removed
|
* reduntant quotation marks from artifact descriptions are removed
|
||||||
|
* no income at the first day
|
||||||
|
|
||||||
ADVENTURE INTERFACE:
|
ADVENTURE INTERFACE:
|
||||||
* fixed crasbug occurring on revisiting objects (by pressing space)
|
* fixed crasbug occurring on revisiting objects (by pressing space)
|
||||||
@@ -20,10 +21,12 @@ ADVENTURE INTERFACE:
|
|||||||
* fixed map scrolling with ctrl+arrows when some windows are opened
|
* fixed map scrolling with ctrl+arrows when some windows are opened
|
||||||
* clicking scrolling arrows in town/hero list won't open town/hero window
|
* clicking scrolling arrows in town/hero list won't open town/hero window
|
||||||
* pathfinder will now look for a path going via printed positions of roads when it's possible
|
* pathfinder will now look for a path going via printed positions of roads when it's possible
|
||||||
|
* enter can be used to open window with selected hero/town
|
||||||
|
|
||||||
BATTLES:
|
BATTLES:
|
||||||
|
* many creatures special skills implemented
|
||||||
* battle will end when one side has only war machines
|
* battle will end when one side has only war machines
|
||||||
* fixed problems with handling obstacles info
|
* fixed some problems with handling obstacles info
|
||||||
* fixed bug with defending / waiting while no stack is active
|
* fixed bug with defending / waiting while no stack is active
|
||||||
* spellbook button is inactive when hero cannot cast any spell
|
* spellbook button is inactive when hero cannot cast any spell
|
||||||
* obstacles will be placed more properly when resolution is different than 800x600
|
* obstacles will be placed more properly when resolution is different than 800x600
|
||||||
@@ -50,15 +53,19 @@ TOWNS:
|
|||||||
* resting in town with mage guild will replenih all the mana points
|
* resting in town with mage guild will replenih all the mana points
|
||||||
* fixed Blacksmith
|
* fixed Blacksmith
|
||||||
* the number of creatures at the beginning of game is their base growth
|
* the number of creatures at the beginning of game is their base growth
|
||||||
|
* it's possible to enter Tavern via Brotherhood of Sword
|
||||||
|
|
||||||
HERO WINDOW:
|
HERO WINDOW:
|
||||||
* fixed mana limit info in the hero window
|
* fixed mana limit info in the hero window
|
||||||
|
* war machines can't be removed
|
||||||
|
* fixed problems with removing artifacts when all visible slots in backpack are full
|
||||||
|
|
||||||
PREGAME:
|
PREGAME:
|
||||||
* clicking on "advanced options" a second time now closes the tab instead of refreshing it.
|
* clicking on "advanced options" a second time now closes the tab instead of refreshing it.
|
||||||
* Fix position of maps names.
|
* Fix position of maps names.
|
||||||
* Made the slider cursor much more responsive. Speedup the map select screen.
|
* Made the slider cursor much more responsive. Speedup the map select screen.
|
||||||
* Try to behave when no maps/saves are present.
|
* Try to behave when no maps/saves are present.
|
||||||
|
* Page Up / Page Down / Home / End hotkeys for scrolling through scenarios / games list
|
||||||
|
|
||||||
OBJECTS:
|
OBJECTS:
|
||||||
* Neutral creatures can join or escape depending on hero strength (escape formula needs to be improved)
|
* Neutral creatures can join or escape depending on hero strength (escape formula needs to be improved)
|
||||||
|
@@ -297,12 +297,15 @@ void processCommand(const std::string &message, CClient *&client)
|
|||||||
tlog4 << i++ <<". " << j->first.first << " x " << j->first.second << std::endl;
|
tlog4 << i++ <<". " << j->first.first << " x " << j->first.second << std::endl;
|
||||||
tlog4 << "Type number from 1 to " << i-1 << " to set appropriate resolution or 0 to cancel.\n";
|
tlog4 << "Type number from 1 to " << i-1 << " to set appropriate resolution or 0 to cancel.\n";
|
||||||
std::cin >> i;
|
std::cin >> i;
|
||||||
if(!i)
|
if(i < 0 || i > conf.guiOptions.size() || std::cin.bad() || std::cin.fail())
|
||||||
return;
|
|
||||||
else if(i < 0 || i > conf.guiOptions.size())
|
|
||||||
{
|
{
|
||||||
|
std::cin.clear();
|
||||||
tlog1 << "Invalid resolution ID! Not a number between 0 and " << conf.guiOptions.size() << ". No settings changed.\n";
|
tlog1 << "Invalid resolution ID! Not a number between 0 and " << conf.guiOptions.size() << ". No settings changed.\n";
|
||||||
}
|
}
|
||||||
|
else if(!i)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for(j=conf.guiOptions.begin(); j!=conf.guiOptions.end() && hlp++<i; j++); //move j to the i-th resolution info
|
for(j=conf.guiOptions.begin(); j!=conf.guiOptions.end() && hlp++<i; j++); //move j to the i-th resolution info
|
||||||
|
@@ -311,7 +311,7 @@ CSimpleWindow * CMessage::genWindow(std::string text, int player, int Lmar, int
|
|||||||
ret->pos.h=ret->bitmap->h;
|
ret->pos.h=ret->bitmap->h;
|
||||||
ret->pos.w=ret->bitmap->w;
|
ret->pos.w=ret->bitmap->w;
|
||||||
int curh = ret->bitmap->h/2 - (fontHeight*txtg->size())/2;
|
int curh = ret->bitmap->h/2 - (fontHeight*txtg->size())/2;
|
||||||
blitTextOnSur(txtg,fontHeight,curh,ret->bitmap, fontHeight);
|
blitTextOnSur(txtg,fontHeight,curh,ret->bitmap);
|
||||||
delete brtext;
|
delete brtext;
|
||||||
delete txtg;
|
delete txtg;
|
||||||
return ret;
|
return ret;
|
||||||
|
@@ -1355,6 +1355,7 @@ void CPlayerInterface::battleAttack(BattleAttack *ba)
|
|||||||
tlog5 << "CPlayerInterface::battleAttack - locking...";
|
tlog5 << "CPlayerInterface::battleAttack - locking...";
|
||||||
boost::unique_lock<boost::recursive_mutex> un(*pim);
|
boost::unique_lock<boost::recursive_mutex> un(*pim);
|
||||||
tlog5 << "done!\n";
|
tlog5 << "done!\n";
|
||||||
|
assert(curAction);
|
||||||
if(ba->lucky()) //lucky hit
|
if(ba->lucky()) //lucky hit
|
||||||
{
|
{
|
||||||
CStack *stack = cb->battleGetStackByID(ba->stackAttacking);
|
CStack *stack = cb->battleGetStackByID(ba->stackAttacking);
|
||||||
|
@@ -1089,12 +1089,14 @@ void MapSel::processGames(const std::vector<std::string> &pliczkiTemp)
|
|||||||
for(int i=0; i<pliczkiTemp.size(); i++)
|
for(int i=0; i<pliczkiTemp.size(); i++)
|
||||||
{
|
{
|
||||||
CLoadFile lf(pliczkiTemp[i]);
|
CLoadFile lf(pliczkiTemp[i]);
|
||||||
|
if(!lf.sfile)
|
||||||
|
continue;
|
||||||
|
|
||||||
ui8 sign[8];
|
ui8 sign[8];
|
||||||
lf >> sign >> hlp;
|
lf >> sign;
|
||||||
if(hlp != version)
|
if(std::memcmp(sign,"VCMISVG",7))
|
||||||
{
|
{
|
||||||
tlog3 << "\t\t" << pliczkiTemp[i] << " seems to be too " << ((hlp>version) ? "new" : "old") << " and will be ommited.\n";
|
tlog1 << pliczkiTemp[i] << " is not a correct savefile!" << std::endl;
|
||||||
ourGames[i] = NULL;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ourGames[i] = new CMapInfo();
|
ourGames[i] = new CMapInfo();
|
||||||
|
@@ -208,7 +208,7 @@ void CClient::load( const std::string & fname )
|
|||||||
CGI->mh = new CMapHandler();
|
CGI->mh = new CMapHandler();
|
||||||
|
|
||||||
CLoadFile lf(fname + ".vlgm1");
|
CLoadFile lf(fname + ".vlgm1");
|
||||||
lf >> sig >> ver >> dum >> *sig;
|
lf >> sig >> dum >> *sig;
|
||||||
tlog0 <<"Reading save signature: "<<tmh.getDif()<<std::endl;
|
tlog0 <<"Reading save signature: "<<tmh.getDif()<<std::endl;
|
||||||
|
|
||||||
lf >> *VLC;
|
lf >> *VLC;
|
||||||
|
2
global.h
2
global.h
@@ -19,7 +19,7 @@ typedef boost::int8_t si8; //signed int 8 bits (1 byte)
|
|||||||
#define THC
|
#define THC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define NAME_VER ("VCMI 0.71c")
|
#define NAME_VER ("VCMI 0.72")
|
||||||
#define CONSOLE_LOGGING_LEVEL 5
|
#define CONSOLE_LOGGING_LEVEL 5
|
||||||
#define FILE_LOGGING_LEVEL 6
|
#define FILE_LOGGING_LEVEL 6
|
||||||
|
|
||||||
|
@@ -47,6 +47,8 @@ void CGeneralTextHandler::load()
|
|||||||
buf1.substr(pom+1,eol-pom-1)));
|
buf1.substr(pom+1,eol-pom-1)));
|
||||||
boost::algorithm::replace_all(zelp[zelp.size()-1].first,"\t","");
|
boost::algorithm::replace_all(zelp[zelp.size()-1].first,"\t","");
|
||||||
boost::algorithm::replace_all(zelp[zelp.size()-1].second,"\t","");
|
boost::algorithm::replace_all(zelp[zelp.size()-1].second,"\t","");
|
||||||
|
if(zelp.back().second[0] == '\"' && zelp.back().second[zelp.back().second.size()-1] == '\"')
|
||||||
|
zelp.back().second = zelp.back().second.substr(1,zelp.back().second.size()-2);
|
||||||
}
|
}
|
||||||
itr=eol+2;
|
itr=eol+2;
|
||||||
}
|
}
|
||||||
|
@@ -206,6 +206,8 @@ void CSoundHandler::initCreaturesSounds(std::vector<CCreature> &creatures)
|
|||||||
ifs.close();
|
ifs.close();
|
||||||
ifs.clear();
|
ifs.clear();
|
||||||
|
|
||||||
|
//commented to avoid spurious warnings
|
||||||
|
/*
|
||||||
// Find creatures without sounds
|
// Find creatures without sounds
|
||||||
for(unsigned int i=0;i<creatures.size();i++)
|
for(unsigned int i=0;i<creatures.size();i++)
|
||||||
{
|
{
|
||||||
@@ -217,7 +219,7 @@ void CSoundHandler::initCreaturesSounds(std::vector<CCreature> &creatures)
|
|||||||
CCreature &c = creatures[i];
|
CCreature &c = creatures[i];
|
||||||
if (c.sounds.killed == soundBase::invalid)
|
if (c.sounds.killed == soundBase::invalid)
|
||||||
tlog1 << "creature " << c.idNumber << " doesn't have sounds" << std::endl;
|
tlog1 << "creature " << c.idNumber << " doesn't have sounds" << std::endl;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSoundHandler::initSpellsSounds(std::vector<CSpell> &spells)
|
void CSoundHandler::initSpellsSounds(std::vector<CSpell> &spells)
|
||||||
|
@@ -182,6 +182,11 @@ CSaveFile::CSaveFile( const std::string &fname )
|
|||||||
tlog1 << "Error: cannot open to write " << fname << std::endl;
|
tlog1 << "Error: cannot open to write " << fname << std::endl;
|
||||||
sfile = NULL;
|
sfile = NULL;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sfile->write("VCMI",4); //write magic identifier
|
||||||
|
*this << version; //write format version
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CSaveFile::~CSaveFile()
|
CSaveFile::~CSaveFile()
|
||||||
@@ -204,6 +209,27 @@ CLoadFile::CLoadFile( const std::string &fname )
|
|||||||
tlog1 << "Error: cannot open to read " << fname << std::endl;
|
tlog1 << "Error: cannot open to read " << fname << std::endl;
|
||||||
sfile = NULL;
|
sfile = NULL;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char buffer[4];
|
||||||
|
sfile->read(buffer, 4);
|
||||||
|
|
||||||
|
if(std::memcmp(buffer,"VCMI",4))
|
||||||
|
{
|
||||||
|
tlog1 << "Error: wrong save format!\n";
|
||||||
|
delete sfile;
|
||||||
|
sfile = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
*this >> myVersion;
|
||||||
|
if(myVersion != version)
|
||||||
|
{
|
||||||
|
tlog1 << "Wrong save format!\n";
|
||||||
|
delete sfile;
|
||||||
|
sfile = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CLoadFile::~CLoadFile()
|
CLoadFile::~CLoadFile()
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
#include <boost/mpl/identity.hpp>
|
#include <boost/mpl/identity.hpp>
|
||||||
|
|
||||||
#include <boost/type_traits/is_array.hpp>
|
#include <boost/type_traits/is_array.hpp>
|
||||||
const ui32 version = 704;
|
const ui32 version = 705;
|
||||||
class CConnection;
|
class CConnection;
|
||||||
namespace mpl = boost::mpl;
|
namespace mpl = boost::mpl;
|
||||||
|
|
||||||
@@ -426,10 +426,12 @@ template <typename Serializer> class DLL_EXPORT CISer : public CLoaderBase
|
|||||||
public:
|
public:
|
||||||
bool saving;
|
bool saving;
|
||||||
std::map<ui16,CBasicPointerLoader*> loaders; // typeID => CPointerSaver<serializer,type>
|
std::map<ui16,CBasicPointerLoader*> loaders; // typeID => CPointerSaver<serializer,type>
|
||||||
|
ui32 myVersion;
|
||||||
|
|
||||||
CISer()
|
CISer()
|
||||||
{
|
{
|
||||||
saving = false;
|
saving = false;
|
||||||
|
myVersion = version;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T> void registerType(const T * t=NULL)
|
template<typename T> void registerType(const T * t=NULL)
|
||||||
@@ -489,7 +491,7 @@ public:
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
void loadSerializable(T &data)
|
void loadSerializable(T &data)
|
||||||
{
|
{
|
||||||
data.serialize(*this,version);
|
data.serialize(*this,myVersion);
|
||||||
}
|
}
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void loadArray(T &data)
|
void loadArray(T &data)
|
||||||
|
@@ -1472,7 +1472,7 @@ void CGameHandler::save( const std::string &fname )
|
|||||||
tlog0 << "Serializing game info...\n";
|
tlog0 << "Serializing game info...\n";
|
||||||
CSaveFile save(std::string("Games") + PATHSEPARATOR + fname + ".vlgm1");
|
CSaveFile save(std::string("Games") + PATHSEPARATOR + fname + ".vlgm1");
|
||||||
char hlp[8] = "VCMISVG";
|
char hlp[8] = "VCMISVG";
|
||||||
save << hlp << version << static_cast<CMapHeader&>(*gs->map) << gs->scenarioOps->difficulty << *VLC << gs;
|
save << hlp << static_cast<CMapHeader&>(*gs->map) << gs->scenarioOps->difficulty << *VLC << gs;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@@ -184,7 +184,7 @@ void CVCMIServer::loadGame( CConnection *c )
|
|||||||
CMapHeader dum;
|
CMapHeader dum;
|
||||||
|
|
||||||
CLoadFile lf(fname + ".vlgm1");
|
CLoadFile lf(fname + ".vlgm1");
|
||||||
lf >> sig >> ver >> dum >> *sig;
|
lf >> sig >> dum >> *sig;
|
||||||
tlog0 <<"Reading save signature"<<std::endl;
|
tlog0 <<"Reading save signature"<<std::endl;
|
||||||
|
|
||||||
lf >> *VLC;
|
lf >> *VLC;
|
||||||
|
Reference in New Issue
Block a user