aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods/default/textures/heart.png
blob: c25f43b9a1172eab6436eeb475672433bdb6dcb3 (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 10 00 00 00 10 08 03 00 00 00 28 2d 0f .PNG........IHDR.............(-.
0020 53 00 00 00 48 50 4c 54 45 00 00 00 50 00 00 5f 00 00 60 00 00 67 00 00 68 00 00 70 00 00 80 00 S...HPLTE...P.._..`..g..h..p....
0040 00 88 00 00 8f 00 00 97 00 00 9f 00 00 af 00 00 b0 00 00 b7 00 00 bf 00 00 cf 00 00 df 00 00 e6 ................................
0060 00 00 ee 00 00 ef 00 00 f7 00 00 fe 00 00 ff 00 00 ef de 8a 72 00 00 00 01 74 52 4e 53 00 40 e6 ....................r....tRNS.@.
0080 d8 66 00 00 00 5e 49 44 41 54 78 da 8d 8b 51 12 80 20 08 05 29 b3 42 50 b3 52 ef 7f d3 8c 91 fa .f...^IDATx...Q.....).BP.R......
00a0 75 3f 98 d9 9d 07 0c 81 44 08 b0 39 9a bb a7 5a 13 62 bc 6a 9c 24 50 6d d0 d9 ce ed fe 50 8a 64 u?......D..9...Z.b.j.$Pm.....P.d
00c0 7d 51 08 84 a8 7e ec 20 ac 7d 92 19 3a 5c 24 78 a3 61 09 af 07 0b 1f 96 73 f6 e2 8a 61 d6 bd 7e }Q...~...}..:\$x.a......s...a..~
00e0 59 18 e5 01 42 4b 07 0b fc 93 22 70 00 00 00 00 49 45 4e 44 ae 42 60 82 Y...BK...."p....IEND.B`.
a id='n83' href='#n83'>83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
/*
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>

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
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "pointedthing.h"

#include "serialize.h"
#include "exceptions.h"
#include <sstream>

PointedThing::PointedThing(const v3s16 &under, const v3s16 &above,
	const v3s16 &real_under, const v3f &point, const v3s16 &normal,
	u16 box_id, f32 distSq):
	type(POINTEDTHING_NODE),
	node_undersurface(under),
	node_abovesurface(above),
	node_real_undersurface(real_under),
	intersection_point(point),
	intersection_normal(normal),
	box_id(box_id),
	distanceSq(distSq)
{}

PointedThing::PointedThing(s16 id, const v3f &point, const v3s16 &normal,
	f32 distSq) :
	type(POINTEDTHING_OBJECT),
	object_id(id),
	intersection_point(point),
	intersection_normal(normal),
	distanceSq(distSq)
{}

std::string PointedThing::dump() const
{
	std::ostringstream os(std::ios::binary);
	switch (type) {
	case POINTEDTHING_NOTHING:
		os << "[nothing]";
		break;
	case POINTEDTHING_NODE:
	{
		const v3s16 &u = node_undersurface;
		const v3s16 &a = node_abovesurface;
		os << "[node under=" << u.X << "," << u.Y << "," << u.Z << " above="
			<< a.X << "," << a.Y << "," << a.Z << "]";
	}
		break;
	case POINTEDTHING_OBJECT:
		os << "[object " << object_id << "]";
		break;
	default:
		os << "[unknown PointedThing]";
	}
	return os.str();
}

void PointedThing::serialize(std::ostream &os) const
{
	writeU8(os, 0); // version