mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-13 11:40:38 +02:00
* fixes for glitches in garrisons in non 800x600 resolutions
* fixed timed events * in recruitment window upgraded creatures will be selected by default * bumped version number * spell points won't be negative
This commit is contained in:
parent
01a222066b
commit
d1d2823c58
@ -203,7 +203,7 @@ void CHeroWindow::setHero(const CGHeroInstance *hero)
|
||||
portraitArea->text = hero->getBiography();
|
||||
|
||||
delete garr;
|
||||
/*gar4button->owner = */garr = new CGarrisonInt(pos.x+80, pos.y+493, 8, Point(), curBack, Point(63,7), curHero);
|
||||
garr = new CGarrisonInt(pos.x+80, pos.y+493, 8, Point(), curBack, Point(16,486), curHero);
|
||||
garr->update = false;
|
||||
gar4button->callback = boost::bind(&CGarrisonInt::splitClick,garr);//actualization of callback function
|
||||
|
||||
|
@ -333,7 +333,8 @@ void CGarrisonSlot::show(SDL_Surface * to)
|
||||
else //empty slot
|
||||
{
|
||||
Rect pos1 = pos, pos2 = pos; //positions on the garr bg sur and scren
|
||||
pos1 -= owner->surOffset;
|
||||
pos1.x = owner->surOffset.x;
|
||||
pos1.y = owner->surOffset.y;
|
||||
|
||||
SDL_BlitSurface(owner->sur,&pos1,to,&pos2);
|
||||
if(owner->splitting)
|
||||
@ -1746,7 +1747,7 @@ void CRecruitmentWindow::show(SDL_Surface * to)
|
||||
}
|
||||
|
||||
CRecruitmentWindow::CRecruitmentWindow(const std::vector<std::pair<int,int> > &Creatures, const boost::function<void(int,int)> &Recruit) //creatures - pairs<creature_ID,amount>
|
||||
:recruit(Recruit), which(0)
|
||||
:recruit(Recruit), which(Creatures.size()-1)
|
||||
{
|
||||
creatures.resize(Creatures.size());
|
||||
amounts.resize(Creatures.size());
|
||||
@ -3193,7 +3194,7 @@ void CGarrisonWindow::show(SDL_Surface * to)
|
||||
quit->show(to);
|
||||
garr->show(to);
|
||||
|
||||
blitAt(graphics->flags->ourImages[garr->odown->getOwner()].bitmap,pos.x+29,pos.y+125,to);
|
||||
blitAt(graphics->flags->ourImages[garr->odown->getOwner()].bitmap,pos.x+28,pos.y+124,to);
|
||||
blitAt(graphics->portraitLarge[static_cast<const CGHeroInstance*>(garr->odown)->portrait],pos.x+29,pos.y+222,to);
|
||||
printAtMiddle(CGI->generaltexth->allTexts[709],pos.x+275,pos.y+30,GEOR16,tytulowy,to);
|
||||
}
|
||||
@ -3208,7 +3209,7 @@ CGarrisonWindow::CGarrisonWindow( const CArmedInstance *up, const CGHeroInstance
|
||||
pos.w = screen->w;
|
||||
pos.h = screen->h;
|
||||
|
||||
garr = new CGarrisonInt(pos.x+92, pos.y+129, 4, Point(0,94), bg, Point(124,102), up, down);
|
||||
garr = new CGarrisonInt(pos.x+92, pos.y+127, 4, Point(0,96), bg, Point(93,127), up, down);
|
||||
split = new AdventureMapButton(CGI->generaltexth->tcommands[3],"",boost::bind(&CGarrisonInt::splitClick,garr),pos.x+88,pos.y+314,"IDV6432.DEF");
|
||||
quit = new AdventureMapButton(CGI->generaltexth->tcommands[8],"",boost::bind(&CGarrisonWindow::close,this),pos.x+399,pos.y+314,"IOK6432.DEF",SDLK_RETURN);
|
||||
}
|
||||
|
@ -129,7 +129,7 @@
|
||||
EnableFunctionLevelLinking="false"
|
||||
EnableEnhancedInstructionSet="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="0"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
|
2
global.h
2
global.h
@ -19,7 +19,7 @@ typedef boost::int8_t si8; //signed int 8 bits (1 byte)
|
||||
#define THC
|
||||
#endif
|
||||
|
||||
#define NAME_VER ("VCMI 0.72c")
|
||||
#define NAME_VER ("VCMI 0.72d")
|
||||
#define CONSOLE_LOGGING_LEVEL 5
|
||||
#define FILE_LOGGING_LEVEL 6
|
||||
|
||||
|
@ -288,7 +288,7 @@ struct SetMana : public CPackForClient //110
|
||||
DLL_EXPORT void applyGs(CGameState *gs);
|
||||
|
||||
|
||||
ui32 hid, val;
|
||||
si32 hid, val;
|
||||
|
||||
template <typename Handler> void serialize(Handler &h, const int version)
|
||||
{
|
||||
|
@ -125,7 +125,7 @@
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="false"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="0"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@ -141,7 +141,7 @@
|
||||
AdditionalDependencies="zdll.lib"
|
||||
Version=""
|
||||
AdditionalLibraryDirectories="../../libs;"
|
||||
GenerateDebugInformation="false"
|
||||
GenerateDebugInformation="true"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
LinkTimeCodeGeneration="0"
|
||||
|
@ -1913,9 +1913,13 @@ void Mapa::readEvents( unsigned char * bufor, int &i )
|
||||
else
|
||||
ne->humanAffected = true;
|
||||
ne->computerAffected = bufor[i]; ++i;
|
||||
ne->firstOccurence = bufor[i]; ++i;
|
||||
ne->firstOccurence = readNormalNr(bufor,i, 2); i+=2;
|
||||
ne->nextOccurence = bufor[i]; ++i;
|
||||
i+=18;
|
||||
|
||||
char unknown[17];
|
||||
memcpy(unknown, bufor+i, 17);
|
||||
i+=17;
|
||||
|
||||
events.push_back(ne);
|
||||
}
|
||||
}
|
||||
|
@ -2566,6 +2566,7 @@ bool CGameHandler::makeCustomAction( BattleAction &ba )
|
||||
|
||||
void CGameHandler::handleTimeEvents()
|
||||
{
|
||||
gs->map->events.sort(evntCmp);
|
||||
while(gs->map->events.size() && gs->map->events.front()->firstOccurence+1 == gs->day)
|
||||
{
|
||||
CMapEvent *ev = gs->map->events.front();
|
||||
|
@ -122,7 +122,7 @@
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="false"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="0"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4251"
|
||||
/>
|
||||
<Tool
|
||||
@ -138,7 +138,7 @@
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="VCMI_lib.lib zdll.lib"
|
||||
AdditionalLibraryDirectories="../../libs;../"
|
||||
GenerateDebugInformation="false"
|
||||
GenerateDebugInformation="true"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user