From be851871cd43316d12fd9a5f2cc6dec98a1c9ce0 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 30 Jan 2011 01:44:54 +0200 Subject: map generation framework under development... not quite operational at this point. --- src/utility.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/utility.h') diff --git a/src/utility.h b/src/utility.h index 055c8db1a..a61de1c37 100644 --- a/src/utility.h +++ b/src/utility.h @@ -538,6 +538,23 @@ inline v3s16 getContainerPos(v3s16 p, s16 d) ); } +inline v2s16 getContainerPos(v2s16 p, v2s16 d) +{ + return v2s16( + getContainerPos(p.X, d.X), + getContainerPos(p.Y, d.Y) + ); +} + +inline v3s16 getContainerPos(v3s16 p, v3s16 d) +{ + return v3s16( + getContainerPos(p.X, d.X), + getContainerPos(p.Y, d.Y), + getContainerPos(p.Z, d.Z) + ); +} + inline bool isInArea(v3s16 p, s16 d) { return ( -- cgit v1.2.3