mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-19 21:10:12 +02:00
* [bugfix] poprawne przypisywanie handlerów defom (nie trafiają już w próżnię)
* [bugfix] naprawiony straszliwy błąd z rozwalaniem sterty
This commit is contained in:
parent
7b77d94f57
commit
dd24f5cd40
@ -450,6 +450,8 @@ void CAmbarCendamo::deh3m()
|
||||
//teceDef();
|
||||
}
|
||||
std::vector<CDefHandler *> dhandlers = CGameInfo::mainObj->lodh->extractManyFiles(defsToUnpack, std::string("newh3sprite.lod"));
|
||||
for (int i=0;i<dhandlers.size();i++)
|
||||
map.defy[i].handler=dhandlers[i];
|
||||
std::cout<<'\r'<<"Reading defs: 100% "<<std::endl;
|
||||
SDL_FreeSurface(alphaTransSurf);
|
||||
THC std::cout<<"Wczytywanie defow: "<<th.getDif()<<std::endl;
|
||||
|
@ -486,7 +486,7 @@ int CLodHandler::infs2(unsigned char * in, int size, int realSize, unsigned char
|
||||
z_stream strm;
|
||||
unsigned char inx[NLoadHandlerHelp::fCHUNK];
|
||||
unsigned char outx[NLoadHandlerHelp::fCHUNK];
|
||||
out = new unsigned char [size];
|
||||
out = new unsigned char [realSize];
|
||||
int latPosOut = 0;
|
||||
|
||||
/* allocate inflate state */
|
||||
|
2
CMT.cpp
2
CMT.cpp
@ -337,7 +337,7 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
ac->deh3m();
|
||||
THC std::cout<<"Rozpoznawianie pliku lacznie: "<<tmh.getDif()<<std::endl;
|
||||
ac->loadDefs();
|
||||
THC std::cout<<"Wczytywanie defow: "<<tmh.getDif()<<std::endl;
|
||||
THC std::cout<<"Wczytywanie defow terenu: "<<tmh.getDif()<<std::endl;
|
||||
CMapHandler * mh = new CMapHandler();
|
||||
mh->reader = ac;
|
||||
THC std::cout<<"Stworzenie mapHandlera: "<<tmh.getDif()<<std::endl;
|
||||
|
@ -330,7 +330,12 @@ SDL_Surface * CMapHandler::terrainRect(int x, int y, int dx, int dy, int level,
|
||||
else if(CGameInfo::mainObj->ac->map.defy[CGameInfo::mainObj->objh->objInstances[gg].defNumber].printPriority==0)
|
||||
{
|
||||
ObjSorter os;
|
||||
os.bitmap = CGameInfo::mainObj->ac->map.defy[CGameInfo::mainObj->objh->objInstances[gg].defNumber].handler->ourImages[anim%CGameInfo::mainObj->ac->map.defy[CGameInfo::mainObj->objh->objInstances[gg].defNumber].handler->ourImages.size()].bitmap;
|
||||
|
||||
int defyod = CGameInfo::mainObj->objh->objInstances[gg].defNumber;
|
||||
int ourimagesod = anim%CGameInfo::mainObj->ac->map.defy[defyod].handler->ourImages.size();
|
||||
|
||||
os.bitmap = CGameInfo::mainObj->ac->map.defy[defyod].handler->ourImages[ourimagesod].bitmap;
|
||||
|
||||
os.xpos = (CGameInfo::mainObj->objh->objInstances[gg].x-x+4)*32;
|
||||
os.ypos = (CGameInfo::mainObj->objh->objInstances[gg].y-y+4)*32;
|
||||
if (CGameInfo::mainObj->ac->map.defy[CGameInfo::mainObj->objh->objInstances[gg].defNumber].isVisitable())
|
||||
|
Loading…
x
Reference in New Issue
Block a user