mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
* given hero is placed in the town entrance
Wspólne zmiany * some objects such as river delta won't be blitted "on" hero * tiles under FoW are inaccessible * giving random hero on RoE maps * improved protection against hero duplication * fixed starting values of primary abilities of random heroes on RoE/AB maps
This commit is contained in:
@ -843,33 +843,33 @@ void CPlayerInterface::yourTurn()
|
||||
for(;makingTurn;) // main loop
|
||||
{
|
||||
//updating water tiles
|
||||
int wnumber = -1;
|
||||
for(int s=0; s<CGI->mh->reader->defs.size(); ++s)
|
||||
{
|
||||
if(CGI->mh->reader->defs[s]->defName==std::string("WATRTL.DEF"))
|
||||
{
|
||||
wnumber = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(wnumber>=0)
|
||||
{
|
||||
for(int g=0; g<CGI->mh->reader->defs[wnumber]->ourImages.size(); ++g)
|
||||
{
|
||||
SDL_Color tab[32];
|
||||
for(int i=0; i<32; ++i)
|
||||
{
|
||||
tab[i] = CGI->mh->reader->defs[wnumber]->ourImages[g].bitmap->format->palette->colors[224 + (i+1)%32];
|
||||
}
|
||||
//SDL_SaveBMP(CGI->mh->reader->defs[wnumber]->ourImages[g].bitmap,"t1.bmp");
|
||||
for(int i=0; i<32; ++i)
|
||||
{
|
||||
CGI->mh->reader->defs[wnumber]->ourImages[g].bitmap->format->palette->colors[224 + i] = tab[i];
|
||||
}
|
||||
//SDL_SaveBMP(CGI->mh->reader->defs[wnumber]->ourImages[g].bitmap,"t2.bmp");
|
||||
CSDL_Ext::update(CGI->mh->reader->defs[wnumber]->ourImages[g].bitmap);
|
||||
}
|
||||
}
|
||||
//int wnumber = -1;
|
||||
//for(int s=0; s<CGI->mh->reader->defs.size(); ++s)
|
||||
//{
|
||||
// if(CGI->mh->reader->defs[s]->defName==std::string("WATRTL.DEF"))
|
||||
// {
|
||||
// wnumber = s;
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
//if(wnumber>=0)
|
||||
//{
|
||||
// for(int g=0; g<CGI->mh->reader->defs[wnumber]->ourImages.size(); ++g)
|
||||
// {
|
||||
// SDL_Color tab[32];
|
||||
// for(int i=0; i<32; ++i)
|
||||
// {
|
||||
// tab[i] = CGI->mh->reader->defs[wnumber]->ourImages[g].bitmap->format->palette->colors[160 + (i+1)%32];
|
||||
// }
|
||||
// //SDL_SaveBMP(CGI->mh->reader->defs[wnumber]->ourImages[g].bitmap,"t1.bmp");
|
||||
// for(int i=0; i<32; ++i)
|
||||
// {
|
||||
// CGI->mh->reader->defs[wnumber]->ourImages[g].bitmap->format->palette->colors[160 + i] = tab[i];
|
||||
// }
|
||||
// //SDL_SaveBMP(CGI->mh->reader->defs[wnumber]->ourImages[g].bitmap,"t2.bmp");
|
||||
// CSDL_Ext::update(CGI->mh->reader->defs[wnumber]->ourImages[g].bitmap);
|
||||
// }
|
||||
//}
|
||||
//water tiles updated
|
||||
CGI->screenh->updateScreen();
|
||||
int tv = th.getDif();
|
||||
|
Reference in New Issue
Block a user