diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-01-26 00:41:06 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-01-26 00:41:06 +0200 |
commit | 9f882bf74d452521cb7fb1806ab453aaa28da343 (patch) | |
tree | a5676871bd8f3adf44fade49162ea0342d49ac4d /src/utility.h | |
parent | 035345f13d2da9eced87a426a671d3bc4df392b5 (diff) | |
download | minetest-9f882bf74d452521cb7fb1806ab453aaa28da343.tar.xz |
Reworked texture, material, mineral and whatever handling
Diffstat (limited to 'src/utility.h')
-rw-r--r-- | src/utility.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/utility.h b/src/utility.h index fd2881cff..785ff167c 100644 --- a/src/utility.h +++ b/src/utility.h @@ -36,6 +36,9 @@ with this program; if not, write to the Free Software Foundation, Inc., extern const v3s16 g_26dirs[26]; +// 26th is (0,0,0) +extern const v3s16 g_27dirs[27]; + inline void writeU32(u8 *data, u32 i) { data[0] = ((i>>24)&0xff); @@ -666,6 +669,14 @@ inline s32 stoi(std::string s) return atoi(s.c_str()); } +inline float stof(std::string s) +{ + float f; + std::istringstream ss(s); + ss>>f; + return f; +} + inline std::string itos(s32 i) { std::ostringstream o; |