1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

* partial handling of advmap objects changing battle background (like clover field) (their existence should change the background but nothing else)

* map should be drawn faster because empty tiles are no more blitted (according to info from .msk files) - I hope it will work correctly, if not please report or turn it off if too hard to make it work
This commit is contained in:
mateuszb
2009-07-01 15:58:20 +00:00
parent 824061e185
commit 50a49460bf
7 changed files with 64 additions and 28 deletions

View File

@@ -6,6 +6,7 @@
#include "VCMI_Lib.h"
#include <zlib.h>
#include <boost/crc.hpp>
#include "../hch/CLodHandler.h"
/*
* map.cpp, part of VCMI engine
@@ -1358,6 +1359,14 @@ void Mapa::readDefInfo( unsigned char * bufor, int &i)
if(vinya->id == 26)
std::memset(vinya->blockMap,255,6);
//calculating coverageMap
std::string nameCopy = vinya->name;
std::string msk = spriteh->getTextFile(nameCopy.replace( nameCopy.size()-4, 4, ".MSK" ));
for(int i=0; i<6; ++i)
{
vinya->coverageMap[i] = msk[i+2];
}
defy.push_back(vinya); // add this def to the vector
}
}