object_properties.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. Minetest
  3. Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU Lesser General Public License as published by
  6. the Free Software Foundation; either version 2.1 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public License along
  13. with this program; if not, write to the Free Software Foundation, Inc.,
  14. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  15. */
  16. #ifndef OBJECT_PROPERTIES_HEADER
  17. #define OBJECT_PROPERTIES_HEADER
  18. #include <string>
  19. #include "irrlichttypes_bloated.h"
  20. #include <iostream>
  21. #include <map>
  22. #include <vector>
  23. struct ObjectProperties
  24. {
  25. // Values are BS=1
  26. s16 hp_max;
  27. bool physical;
  28. bool collideWithObjects;
  29. float weight;
  30. core::aabbox3d<f32> collisionbox;
  31. std::string visual;
  32. std::string mesh;
  33. v2f visual_size;
  34. std::vector<std::string> textures;
  35. std::vector<video::SColor> colors;
  36. v2s16 spritediv;
  37. v2s16 initial_sprite_basepos;
  38. bool is_visible;
  39. bool makes_footstep_sound;
  40. float automatic_rotate;
  41. f32 stepheight;
  42. bool automatic_face_movement_dir;
  43. f32 automatic_face_movement_dir_offset;
  44. ObjectProperties();
  45. std::string dump();
  46. void serialize(std::ostream &os) const;
  47. void deSerialize(std::istream &is);
  48. };
  49. #endif