summaryrefslogtreecommitdiff
path: root/src/particles.h
diff options
context:
space:
mode:
authorSwampTurtle <SwampTurtle@telesight.nl>2020-04-12 12:23:41 +0000
committersfan5 <sfan5@live.de>2020-06-13 23:13:43 +0200
commitff42264d0783fd0eb5274f32fac6f9396c272d66 (patch)
tree10fc8e1628d68c00c165b9174b4187257e045f85 /src/particles.h
parentcaac1e131bb8a71b50a9506f992bf6756dae1f8a (diff)
downloadminetest-ff42264d0783fd0eb5274f32fac6f9396c272d66.tar.gz
minetest-ff42264d0783fd0eb5274f32fac6f9396c272d66.tar.bz2
minetest-ff42264d0783fd0eb5274f32fac6f9396c272d66.zip
Translated using Weblate (Dutch)
Currently translated at 61.1% (788 of 1288 strings)
Diffstat (limited to 'src/particles.h')
0 files changed, 0 insertions, 0 deletions
8 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
/*
Minetest-c55
Copyright (C) 2010-2012 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 "nodetimer.h"
#include "log.h"
#include "util/serialize.h"
#include "constants.h" // MAP_BLOCKSIZE

/*
	NodeTimer
*/

void NodeTimer::serialize(std::ostream &os) const
{
	writeF1000(os, timeout);
	writeF1000(os, elapsed);
}

void NodeTimer::deSerialize(std::istream &is)
{
	timeout = readF1000(is);
	elapsed = readF1000(is);
}

/*
	NodeTimerList
*/

void NodeTimerList::serialize(std::ostream &os, u8 map_format_version) const
{
	if(map_format_version == 24){
		// Version 0 is a placeholder for "nothing to see here; go away."
		if(m_data.size() == 0){
			writeU8(os, 0); // version
			return;
		}
		writeU8(os, 1); // version