mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
[Spells] Added basic support for icons and sounds
* few changes in spell format * save format changed
This commit is contained in:
@ -17,12 +17,14 @@
|
||||
#include "../lib/CCreatureHandler.h"
|
||||
#include "CBitmapHandler.h"
|
||||
#include "../lib/CObjectHandler.h"
|
||||
#include "../lib/CSpellHandler.h"
|
||||
#include "../lib/CDefObjInfoHandler.h"
|
||||
#include "../lib/CGameState.h"
|
||||
#include "../lib/JsonNode.h"
|
||||
#include "../lib/vcmi_endian.h"
|
||||
#include "../lib/GameConstants.h"
|
||||
#include "../lib/CStopWatch.h"
|
||||
#include "CAnimation.h"
|
||||
|
||||
using namespace boost::assign;
|
||||
using namespace CSDL_Ext;
|
||||
@ -115,9 +117,7 @@ void Graphics::initializeBattleGraphics()
|
||||
}
|
||||
|
||||
battleACToDef[ACid] = toAdd;
|
||||
}
|
||||
|
||||
spellEffectsPics = CDefHandler::giveDefEss("SpellInt.def");
|
||||
}
|
||||
}
|
||||
Graphics::Graphics()
|
||||
{
|
||||
@ -128,8 +128,7 @@ Graphics::Graphics()
|
||||
tasks += boost::bind(&Graphics::initializeBattleGraphics,this);
|
||||
tasks += boost::bind(&Graphics::loadErmuToPicture,this);
|
||||
tasks += boost::bind(&Graphics::initializeImageLists,this);
|
||||
tasks += GET_DEF_ESS(resources32,"RESOURCE.DEF");
|
||||
tasks += GET_DEF_ESS(spellscr,"SPELLSCR.DEF");
|
||||
tasks += GET_DEF_ESS(resources32,"RESOURCE.DEF");
|
||||
tasks += GET_DEF_ESS(heroMoveArrows,"ADAG.DEF");
|
||||
|
||||
CThreadHelper th(&tasks,std::max((ui32)1,boost::thread::hardware_concurrency()));
|
||||
@ -411,4 +410,12 @@ void Graphics::initializeImageLists()
|
||||
addImageListEntry(info.icons[1][1] + 2, "ITPA", info.iconSmall[1][1]);
|
||||
}
|
||||
}
|
||||
|
||||
for(const CSpell * spell : CGI->spellh->objects)
|
||||
{
|
||||
addImageListEntry(spell->id, "SPELLS", spell->iconBook);
|
||||
addImageListEntry(spell->id+1, "SPELLINT", spell->iconEffect);
|
||||
addImageListEntry(spell->id, "SPELLBON", spell->iconScenarioBonus);
|
||||
addImageListEntry(spell->id, "SPELLSCR", spell->iconScroll);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user