From dee50239be8fff566b3ca687bc70900b391a8164 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Wed, 16 Aug 2017 20:11:07 +0500 Subject: 2017-08-16 --- src/Entity.hpp | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 132 insertions(+), 6 deletions(-) (limited to 'src/Entity.hpp') diff --git a/src/Entity.hpp b/src/Entity.hpp index 6df7983..c818abe 100644 --- a/src/Entity.hpp +++ b/src/Entity.hpp @@ -3,12 +3,138 @@ #include "Utility.hpp" #include "Vector.hpp" +enum class ObjectType{ + Boat=1, + ItemStack, + AreaEffectCloud, + Minecart=10, + ActivatedTNT=50, + EnderCrystal, + TippedArrow=60, + Snowball, + Egg, + FireBall, + FireCharge, + ThrownEnderpearl, + WitherSkull, + ShulkerBullet, + LlamaSpit, + FallingObjects=70, + Itemframes, + EyeOfEnder, + ThrownPotion, + ThrownExpBottle=75, + FireworkRocket, + LeashKnot, + ArmorStand, + EvocationFangs, + FishingHook=90, + SpectralArrow, + DragonFireball=93, +}; + +enum MobType { + Item = 1, + XPOrb, + AreaEffectCloud, + ElderGuardian, + WitherSkeleton, + Stray, + ThrownEgg, + LeashKnot, + Painting, + Arrow, + Snowball, + Fireball, + SmallFireball, + ThrownEnderpearl, + EyeOfEnderSignal, + ThrownPotion, + ThrownExpBottle, + ItemFrame, + WitherSkull, + PrimedTnt, + FallingSand, + FireworksRocketEntity, + Husk, + SpectralArrow, + ShulkerBullet, + DragonFireball, + ZombieVillager, + SkeletonHorse, + ZombieHorse, + ArmorStand, + Donkey, + Mule, + EvocationFangs, + EvocationIllager, + Vex, + VindicationIllager, + IllusionIllager, + MinecartCommandBlock=40, + Boat, + MinecartRideable, + MinecartChest, + MinecartFurnace, + MinecartTNT, + MinecartHopper, + MinecartSpawner, + Creeper=50, + Skeleton, + Spider, + Giant, + Zombie, + Slime, + Ghast, + PigZombie, + Enderman, + CaveSpider, + Silverfish, + Blaze, + LavaSlime, + EnderDragon, + WitherBoss, + Bat, + Witch, + Endermite, + Guardian, + Shulker, + Pig=90, + Sheep, + Cow, + Chicken, + Squid, + Wolf, + MushroomCow, + SnowMan, + Ozelot, + VillagerGolem, + Horse, + Rabbit, + PolarBear, + Llama, + LlamaSpit, + Parrot, + Villager=120, + EnderCrystal=200, +}; + struct Entity { Uuid uuid; - VectorF pos; - VectorF vel; - unsigned int entityId; - double yaw; - double pitch; + VectorF pos = 0; + VectorF vel = 0; + unsigned int entityId = 0; + double yaw = 0; + double pitch = 0; + double width = 1.0; + double height = 1.0; + glm::vec3 renderColor; + int entityType=0; + bool isMob=false; static VectorF DecodeVelocity(short x, short y, short z); -}; \ No newline at end of file + static VectorF DecodeDeltaPos(short deltaX, short deltaY, short deltaZ); +}; + +Entity CreateObject(ObjectType type); + +Entity CreateMob(MobType type); \ No newline at end of file -- cgit v1.2.3