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

Fourth part of sailing code.

Support for Shipyard (both for town and adventure map versions). Improved boat displaying code. Minor changes.
This commit is contained in:
Michał W. Urbańczyk
2009-07-26 03:33:13 +00:00
parent 7853a19b54
commit 9fd4b5bb62
23 changed files with 527 additions and 52 deletions

View File

@@ -490,6 +490,32 @@ DLL_EXPORT void GiveHero::applyGs( CGameState *gs )
h->inTownGarrison = false;
}
DLL_EXPORT void NewObject::applyGs( CGameState *gs )
{
CGObjectInstance *o = NULL;
switch(ID)
{
case 8:
o = new CGBoat();
break;
default:
o = new CGObjectInstance();
break;
}
o->ID = ID;
o->subID = subID;
o->pos = pos;
o->defInfo = VLC->dobjinfo->gobjs[ID][subID];
id = o->id = gs->map->objects.size();
o->hoverName = VLC->generaltexth->names[ID];
gs->map->objects.push_back(o);
gs->map->addBlockVisTiles(o);
o->initObj();
assert(o->defInfo);
}
DLL_EXPORT void NewTurn::applyGs( CGameState *gs )
{
gs->day = day;