1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Fixed creature bonus parser. Fixed several uninitialized variables. Updated data build script to v0.85.

This commit is contained in:
Frank Zago 2011-06-03 03:23:50 +00:00
parent 4d699d735c
commit aca118b613
7 changed files with 15 additions and 6 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2009,2010 Frank Zago
# Copyright (c) 2009,2010,2011 Frank Zago
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -18,7 +18,7 @@
# Data files needed:
# data1.cab and data1.hdr from the original CDROM
# the WoG release v3.58f: allinone_358f.zip
# the VCMI distribution: vcmi_084.zip
# the VCMI distribution: vcmi_085.zip
# Usage: put this script and the 4 data files into the same directory
# and run the script.
@ -106,7 +106,7 @@ rm -rf temp
mkdir temp
cd temp
unzip ../vcmi_084.zip
unzip ../vcmi_085.zip
find . -name "*.dll" | xargs rm -f
find . -name "*.DLL" | xargs rm -f

View File

@ -976,6 +976,7 @@ endTurn(CGI->generaltexth->zelp[302].first,CGI->generaltexth->zelp[302].second,
heroList(ADVOPT.hlistSize),
townList(ADVOPT.tlistSize,ADVOPT.tlistX,ADVOPT.tlistY,ADVOPT.tlistAU,ADVOPT.tlistAD)//(5,&genRect(192,48,747,196),747,196,747,372),
{
state = NA;
spellBeingCasted = NULL;
pos.x = pos.y = 0;
pos.w = screen->w;

View File

@ -605,7 +605,7 @@ void CServerHandler::startServer()
{
th.update();
serverThread = new boost::thread(&CServerHandler::callServer, this); //runs server executable; //TODO: will it work on non-windows platforms?
serverThread = new boost::thread(&CServerHandler::callServer, this); //runs server executable;
if(verbose)
tlog0 << "Setting up thread calling server: " << th.getDif() << std::endl;
}
@ -644,6 +644,7 @@ CServerHandler::CServerHandler(bool runServer /*= false*/)
serverThread = NULL;
shared = NULL;
port = boost::lexical_cast<std::string>(conf.cc.port);
verbose = false;
boost::interprocess::shared_memory_object::remove("vcmi_memory"); //if the application has previously crashed, the memory may not have been removed. to avoid problems - try to destroy it
try

View File

@ -375,6 +375,7 @@ CGuiHandler::CGuiHandler()
// Creates the FPS manager and sets the framerate to 48 which is doubled the value of the original Heroes 3 FPS rate
mainFPSmng = new FPSManager(48);
mainFPSmng->init(); // resets internal clock, needed for FPS manager
}
CGuiHandler::~CGuiHandler()

View File

@ -6798,6 +6798,7 @@ CLabel::CLabel(int x, int y, EFonts Font /*= FONT_SMALL*/, EAlignment Align, con
pos.y += y;
pos.w = pos.h = 0;
bg = NULL;
ignoreLeadingWhitespace = false;
}
void CLabel::setTxt(const std::string &Txt)
@ -7198,4 +7199,4 @@ CIntObject * createCreWindow(const CStackInstance *s, int type, boost::function<
return new CCreInfoWindow(*s, type==3, Upg, Dsm, ui);
else
return new CCreatureWindow(*s, type, Upg, Dsm, ui);
}
}

View File

@ -612,11 +612,15 @@ void CCreatureHandler::loadCreatures()
getline(ifs, buf, '\t');
getline(ifs, buf2, '\t');
getline(ifs, buf3);
if (ifs.eof() || ifs.fail())
break;
it = bonusNameMap.find(buf);
if (it != bonusNameMap.end())
stackBonuses[it->second] = std::pair<std::string, std::string>(buf2,buf3);
else
tlog2 << "Bonus " << buf << " not recognized, ingoring\n";
tlog2 << "Bonus " << buf << " not recognized, ignoring\n";
}
}
ifs.close();

View File

@ -564,6 +564,7 @@ void CHeroHandler::loadNativeTerrains()
CHero::CHero()
{
startingSpell = -1;
sex = 0xff;
}
CHero::~CHero()