1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

- missing fields in town serialization

This commit is contained in:
Ivan Savenko 2012-12-13 13:07:56 +00:00
parent 71cbde7bbc
commit 23fcdd1a4a
5 changed files with 15 additions and 10 deletions

View File

@ -3585,10 +3585,8 @@ std::string CBattleInterface::SiegeHelper::getSiegeName(ui16 what, ui16 additInf
{ {
case 5: case 4: case 1: case 6: case 5: case 4: case 1: case 6:
return prefix + "TPW1.BMP"; return prefix + "TPW1.BMP";
case 0: case 2: case 3: case 7: case 8:
return prefix + "TPWL.BMP";
default: default:
return ""; return prefix + "TPWL.BMP";
} }
} }
case 2: //keep case 2: //keep

View File

@ -5326,16 +5326,12 @@ CUniversityWindow::CUniversityWindow(const CGHeroInstance * _hero, const IMarket
CIntObject * titlePic = nullptr; CIntObject * titlePic = nullptr;
if ( market->o->ID == Obj::UNIVERSITY ) // this is adventure map university
titlePic = new CPicture("UNIVBLDG");
else
if (market->o->ID == Obj::TOWN) if (market->o->ID == Obj::TOWN)
titlePic = new CAnimImage(CGI->townh->towns[ETownType::CONFLUX].clientInfo.buildingsIcons, EBuilding::MAGIC_UNIVERSITY); titlePic = new CAnimImage(CGI->townh->towns[ETownType::CONFLUX].clientInfo.buildingsIcons, EBuilding::MAGIC_UNIVERSITY);
else else
tlog0<<"Error: Image for university was not found!\n";//This should not happen titlePic = new CPicture("UNIVBLDG");
if (titlePic) titlePic->center(Point(232 + pos.x, 76 + pos.y));
titlePic->center(Point(232 + pos.x, 76 + pos.y));
//Clerk speech //Clerk speech
new CTextBox(CGI->generaltexth->allTexts[603], Rect(24, 129, 413, 70), 0, FONT_SMALL, CENTER, Colors::WHITE); new CTextBox(CGI->generaltexth->allTexts[603], Rect(24, 129, 413, 70), 0, FONT_SMALL, CENTER, Colors::WHITE);

View File

@ -1344,6 +1344,7 @@ void CGameState::init(StartInfo * si)
} }
/****************************TOWNS************************************************/ /****************************TOWNS************************************************/
tlog4 << "\tTowns"; tlog4 << "\tTowns";
CGTownInstance::universitySkills.clear();
for ( int i=0; i<4; i++) for ( int i=0; i<4; i++)
CGTownInstance::universitySkills.push_back(14+i);//skills for university CGTownInstance::universitySkills.push_back(14+i);//skills for university

View File

@ -102,7 +102,14 @@ public:
// Client-only data. Should be moved away from lib // Client-only data. Should be moved away from lib
struct ClientInfo struct ClientInfo
{ {
struct Point { si32 x; si32 y;}; struct Point
{
si32 x;
si32 y;
template <typename Handler> void serialize(Handler &h, const int version)
{ h & x & y; }
};
//icons [fort is present?][build limit reached?] -> index of icon in def files //icons [fort is present?][build limit reached?] -> index of icon in def files
int icons[2][2]; int icons[2][2];
@ -131,6 +138,8 @@ public:
template <typename Handler> void serialize(Handler &h, const int version) template <typename Handler> void serialize(Handler &h, const int version)
{ {
h & icons & musicTheme & townBackground & guildWindow & buildingsIcons & hallBackground & hallSlots & structures; h & icons & musicTheme & townBackground & guildWindow & buildingsIcons & hallBackground & hallSlots & structures;
h & advMapVillage & advMapCastle & advMapCapitol;
h & siegePrefix & siegePositions & siegeShooter & siegeShooterCropHeight;
} }
} clientInfo; } clientInfo;

View File

@ -827,6 +827,7 @@ public:
h & CGMagi::eyelist; h & CGMagi::eyelist;
h & CGObelisk::obeliskCount & CGObelisk::visited; h & CGObelisk::obeliskCount & CGObelisk::visited;
h & CGTownInstance::merchantArtifacts; h & CGTownInstance::merchantArtifacts;
h & CGTownInstance::universitySkills;
if(!h.saving) if(!h.saving)
{ {