1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-31 22:05:10 +02:00
vcmi/lib/RegisterTypes.cpp

162 lines
5.8 KiB
C++
Raw Normal View History

2009-03-07 15:55:56 +00:00
#define VCMI_DLL
#include "Connection.h"
#include "NetPacks.h"
#include "VCMI_Lib.h"
#include "../hch/CObjectHandler.h"
2009-03-07 15:55:56 +00:00
#include "../hch/CHeroHandler.h"
#include "../hch/CTownHandler.h"
#include "RegisterTypes.h"
/*
* RegisterTypes.cpp, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
2009-03-07 15:55:56 +00:00
template<typename Serializer> DLL_EXPORT
void registerTypes1(Serializer &s)
{
2009-03-15 12:53:58 +00:00
s.template registerType<CGHeroInstance>();
s.template registerType<CGTownInstance>();
s.template registerType<CTownBonus>();
s.template registerType<CGPandoraBox>();
2009-03-15 12:53:58 +00:00
s.template registerType<CGEvent>();
s.template registerType<CGDwelling>();
2009-03-15 12:53:58 +00:00
s.template registerType<CGVisitableOPH>();
s.template registerType<CGVisitableOPW>();
s.template registerType<CGTeleport>();
s.template registerType<CGPickable>();
s.template registerType<CGCreature>();
s.template registerType<CGSignBottle>();
s.template registerType<CGSeerHut>();
s.template registerType<CGWitchHut>();
s.template registerType<CGScholar>();
s.template registerType<CGGarrison>();
s.template registerType<CGArtifact>();
s.template registerType<CGResource>();
s.template registerType<CGMine>();
s.template registerType<CGShrine>();
s.template registerType<CGQuestGuard>();
s.template registerType<CGBonusingObject>();
2009-09-23 12:42:14 +00:00
s.template registerType<CGMagicSpring>();
2009-03-15 12:53:58 +00:00
s.template registerType<CGMagicWell>();
s.template registerType<CGObservatory>();
s.template registerType<CGKeys>();
s.template registerType<CGKeymasterTent>();
s.template registerType<CGBorderGuard>();
s.template registerType<CGBoat>();
s.template registerType<CGMagi>();
s.template registerType<CGSirens>();
s.template registerType<CGOnceVisitable>();
s.template registerType<CBank>();
s.template registerType<CGPyramid>();
s.template registerType<CGShipyard>();
s.template registerType<CCartographer>();
2009-03-15 12:53:58 +00:00
s.template registerType<CGObjectInstance>();
s.template registerType<COPWBonus>();
}
template<typename Serializer> DLL_EXPORT
void registerTypes2(Serializer &s)
{
s.template registerType<PackageApplied>();
2009-03-15 12:53:58 +00:00
s.template registerType<SystemMessage>();
s.template registerType<PlayerBlocked>();
2009-03-15 12:53:58 +00:00
s.template registerType<YourTurn>();
s.template registerType<SetResource>();
s.template registerType<SetResources>();
s.template registerType<SetPrimSkill>();
s.template registerType<SetSecSkill>();
s.template registerType<HeroVisitCastle>();
s.template registerType<ChangeSpells>();
s.template registerType<SetMana>();
s.template registerType<SetMovePoints>();
s.template registerType<FoWChange>();
s.template registerType<SetAvailableHeroes>();
s.template registerType<GiveBonus>();
s.template registerType<ChangeObjPos>();
s.template registerType<RemoveObject>();
s.template registerType<TryMoveHero>();
s.template registerType<SetGarrisons>();
s.template registerType<NewStructures>();
s.template registerType<RazeStructures>();
2009-03-15 12:53:58 +00:00
s.template registerType<SetAvailableCreatures>();
s.template registerType<SetHeroesInTown>();
s.template registerType<SetHeroArtifacts>();
s.template registerType<HeroRecruited>();
s.template registerType<GiveHero>();
s.template registerType<NewTurn>();
s.template registerType<InfoWindow>();
s.template registerType<SetObjectProperty>();
s.template registerType<SetHoverName>();
s.template registerType<HeroLevelUp>();
s.template registerType<BlockingDialog>();
s.template registerType<GarrisonDialog>();
2009-03-15 12:53:58 +00:00
s.template registerType<BattleStart>();
s.template registerType<BattleNextRound>();
s.template registerType<BattleSetActiveStack>();
s.template registerType<BattleResult>();
s.template registerType<BattleStackMoved>();
s.template registerType<BattleStackAttacked>();
s.template registerType<BattleAttack>();
s.template registerType<StartAction>();
s.template registerType<EndAction>();
2009-05-12 03:35:51 +00:00
s.template registerType<SpellCast>();
2009-03-15 12:53:58 +00:00
s.template registerType<SetStackEffect>();
s.template registerType<StacksInjured>();
s.template registerType<BattleResultsApplied>();
2009-08-04 17:05:49 +00:00
s.template registerType<StacksHealedOrResurrected>();
s.template registerType<ObstaclesRemoved>();
2009-09-01 13:54:13 +00:00
s.template registerType<CatapultAttack>();
2009-09-05 14:10:26 +00:00
s.template registerType<BattleStacksRemoved>();
2009-03-15 12:53:58 +00:00
s.template registerType<ShowInInfobox>();
s.template registerType<OpenWindow>();
s.template registerType<NewObject>();
s.template registerType<SaveGame>();
2009-03-15 12:53:58 +00:00
s.template registerType<SetSelection>();
s.template registerType<PlayerMessage>();
s.template registerType<CenterView>();
}
template<typename Serializer> DLL_EXPORT
void registerTypes3(Serializer &s)
{
2009-03-15 12:53:58 +00:00
s.template registerType<CloseServer>();
s.template registerType<EndTurn>();
s.template registerType<DismissHero>();
s.template registerType<MoveHero>();
s.template registerType<ArrangeStacks>();
s.template registerType<DisbandCreature>();
s.template registerType<BuildStructure>();
s.template registerType<RecruitCreatures>();
s.template registerType<UpgradeCreature>();
s.template registerType<GarrisonHeroSwap>();
s.template registerType<ExchangeArtifacts>();
s.template registerType<SetArtifact>();
2009-03-15 12:53:58 +00:00
s.template registerType<BuyArtifact>();
s.template registerType<TradeOnMarketplace>();
s.template registerType<SetFormation>();
s.template registerType<HireHero>();
s.template registerType<BuildBoat>();
2009-03-15 12:53:58 +00:00
s.template registerType<QueryReply>();
s.template registerType<MakeAction>();
s.template registerType<MakeCustomAction>();
s.template registerType<SaveGame>();
2009-03-15 12:53:58 +00:00
s.template registerType<SetSelection>();
s.template registerType<PlayerMessage>();
}
template<typename Serializer> DLL_EXPORT
void registerTypes(Serializer &s)
{
registerTypes1(s);
registerTypes2(s);
registerTypes3(s);
2009-05-12 03:35:51 +00:00
}