mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
More fixes.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
using namespace GeniusAI::BattleAI;
|
||||
using namespace std;
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include "../../hch/CHeroHandler.h"
|
||||
#include "../../lib/VCMI_Lib.h"
|
||||
#include "../../lib/NetPacks.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace GeniusAI;
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include "../hch/CCreatureHandler.h"
|
||||
#include "CPlayerInterface.h"
|
||||
#include "../CCallback.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
/*
|
||||
* CPreGame.cpp, part of VCMI engine
|
||||
*
|
||||
@@ -366,7 +367,7 @@ void CSelectionScreen::startGame()
|
||||
if(!(sel && sel->txt && sel->txt->text.size()))
|
||||
return;
|
||||
|
||||
selectedName = sel->txt->text;
|
||||
selectedName = "Games/" + sel->txt->text + ".vlgm1";
|
||||
LOCPLINT->cb->save(sel->txt->text);
|
||||
GH.popIntTotally(this);
|
||||
}
|
||||
@@ -555,7 +556,7 @@ SelectionTab::SelectionTab(EState Type, const boost::function<void(CMapInfo *)>
|
||||
if(selectedName[0] == 'M')
|
||||
txt->setText("NEWGAME");
|
||||
else
|
||||
selectFName("Games/" + selectedName + ".vlgm1");
|
||||
selectFName(selectedName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1642,6 +1643,7 @@ void CTextInput::clickLeft( tribool down, bool previousState )
|
||||
|
||||
void CTextInput::keyPressed( const SDL_KeyboardEvent & key )
|
||||
{
|
||||
if(key.state != SDL_PRESSED) return;
|
||||
switch(key.keysym.sym)
|
||||
{
|
||||
case SDLK_BACKSPACE:
|
||||
|
@@ -327,6 +327,7 @@ void CGameHandler::startBattle(const CArmedInstance *army1, const CArmedInstance
|
||||
BattleInfo *curB = new BattleInfo;
|
||||
curB->side1 = army1->tempOwner;
|
||||
curB->side2 = army2->tempOwner;
|
||||
if(curB->side2 == 254) curB->side2 = 255;
|
||||
setupBattle(curB, tile, army1->army, army2->army, hero1, hero2, creatureBank, town); //initializes stacks, places creatures on battlefield, blocks and informs player interfaces
|
||||
NEW_ROUND;
|
||||
//TODO: pre-tactic stuff, call scripts etc.
|
||||
|
Reference in New Issue
Block a user