X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fobject_properties.cpp;h=2eebc27d684c7a9df8aa4db805d08bbdf0003629;hb=b2ab5fd1615ac5f907e43992d0905a56cddf798f;hp=c91384ada3569643534ea426ad1208825a2db962;hpb=f9675bd2b4d48b9517cd4939a5cfe1ea9c775b6c;p=minetest.git diff --git a/src/object_properties.cpp b/src/object_properties.cpp index c91384ada..2eebc27d6 100644 --- a/src/object_properties.cpp +++ b/src/object_properties.cpp @@ -1,6 +1,6 @@ /* -Minetest-c55 -Copyright (C) 2012 celeron55, Perttu Ahola +Minetest +Copyright (C) 2013 celeron55, Perttu Ahola This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -18,99 +18,191 @@ with this program; if not, write to the Free Software Foundation, Inc., */ #include "object_properties.h" +#include "irrlichttypes_bloated.h" +#include "exceptions.h" #include "util/serialize.h" +#include "util/basic_macros.h" #include -#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")" -#define PP2(x) "("<<(x).X<<","<<(x).Y<<")" +static const video::SColor NULL_BGCOLOR{0, 1, 1, 1}; -ObjectProperties::ObjectProperties(): - hp_max(1), - physical(false), - weight(5), - collisionbox(-0.5,-0.5,-0.5, 0.5,0.5,0.5), - visual("sprite"), - mesh(""), - visual_size(1,1), - spritediv(1,1), - initial_sprite_basepos(0,0), - is_visible(true), - makes_footstep_sound(false), - automatic_rotate(0) +ObjectProperties::ObjectProperties() { - textures.push_back("unknown_object.png"); + textures.emplace_back("unknown_object.png"); + colors.emplace_back(255,255,255,255); } std::string ObjectProperties::dump() { std::ostringstream os(std::ios::binary); - os<<"hp_max="<