From 9cbc50a7e051d4198c36dc5ff40ee21002ff2769 Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Wed, 20 Aug 2014 15:42:18 -0600 Subject: Got the core of NewMonster working --- src/Mobs/NewMonster.c | 0 src/Mobs/NewMonster.cpp | 10 ++++++++++ src/Mobs/NewMonster.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 59 insertions(+), 2 deletions(-) delete mode 100644 src/Mobs/NewMonster.c create mode 100644 src/Mobs/NewMonster.cpp diff --git a/src/Mobs/NewMonster.c b/src/Mobs/NewMonster.c deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/Mobs/NewMonster.cpp b/src/Mobs/NewMonster.cpp new file mode 100644 index 000000000..14fa54607 --- /dev/null +++ b/src/Mobs/NewMonster.cpp @@ -0,0 +1,10 @@ +#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules +#include "NewMonster.h" + +cNewMonster::cNewMonster(const AString & a_ConfigName, eType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height) + : super(etMonster, a_Width, a_Height) + , m_MobType(a_MobType) + , m_SoundHurt(a_SoundHurt) + , m_SoundDeath(a_SoundDeath) +{ +} diff --git a/src/Mobs/NewMonster.h b/src/Mobs/NewMonster.h index 7739fea45..dbc1447ec 100644 --- a/src/Mobs/NewMonster.h +++ b/src/Mobs/NewMonster.h @@ -6,11 +6,58 @@ #include "../BlockID.h" #include "../Item.h" #include "../Enchantments.h" -#include "../Mobs/AllComponents.h" +#include "Components/AllComponents.h" class cClientHandle; -class cWorld; \ No newline at end of file +class cWorld; + +class cNewMonster : public cPawn { + typedef cPawn super; +public: + /// This identifies individual monster type, as well as their network type-ID + enum eType + { + mtInvalidType = -1, + + mtBat = E_META_SPAWN_EGG_BAT, + mtBlaze = E_META_SPAWN_EGG_BLAZE, + mtCaveSpider = E_META_SPAWN_EGG_CAVE_SPIDER, + mtChicken = E_META_SPAWN_EGG_CHICKEN, + mtCow = E_META_SPAWN_EGG_COW, + mtCreeper = E_META_SPAWN_EGG_CREEPER, + mtEnderDragon = E_META_SPAWN_EGG_ENDER_DRAGON, + mtEnderman = E_META_SPAWN_EGG_ENDERMAN, + mtGhast = E_META_SPAWN_EGG_GHAST, + mtGiant = E_META_SPAWN_EGG_GIANT, + mtHorse = E_META_SPAWN_EGG_HORSE, + mtIronGolem = E_META_SPAWN_EGG_IRON_GOLEM, + mtMagmaCube = E_META_SPAWN_EGG_MAGMA_CUBE, + mtMooshroom = E_META_SPAWN_EGG_MOOSHROOM, + mtOcelot = E_META_SPAWN_EGG_OCELOT, + mtPig = E_META_SPAWN_EGG_PIG, + mtSheep = E_META_SPAWN_EGG_SHEEP, + mtSilverfish = E_META_SPAWN_EGG_SILVERFISH, + mtSkeleton = E_META_SPAWN_EGG_SKELETON, + mtSlime = E_META_SPAWN_EGG_SLIME, + mtSnowGolem = E_META_SPAWN_EGG_SNOW_GOLEM, + mtSpider = E_META_SPAWN_EGG_SPIDER, + mtSquid = E_META_SPAWN_EGG_SQUID, + mtVillager = E_META_SPAWN_EGG_VILLAGER, + mtWitch = E_META_SPAWN_EGG_WITCH, + mtWither = E_META_SPAWN_EGG_WITHER, + mtWolf = E_META_SPAWN_EGG_WOLF, + mtZombie = E_META_SPAWN_EGG_ZOMBIE, + mtZombiePigman = E_META_SPAWN_EGG_ZOMBIE_PIGMAN, + }; + + cNewMonster(const AString & a_ConfigName, eType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height); +protected: + eType m_MobType; + + AString m_SoundHurt; + AString m_SoundDeath; +}; -- cgit v1.2.3