1 /******************************
2 ** Tsunagari Tile Engine **
4 ** Copyright 2011 OmegaSDG **
5 ******************************/
11 coord_t
coord(long x
, long y
, long z
)
20 cube_t
cube(long x1
, long y1
, long z1
,
21 long x2
, long y2
, long z2
)
33 bool parseBool(const std::string
& s
)
44 std::vector
<std::string
> splitStr(std::string str
, const std::string
& delimiter
)
46 std::vector
<std::string
> strlist
;
49 pos
= str
.find(delimiter
);
51 while (pos
!= std::string::npos
) {
52 if (pos
!= std::string::npos
|| pos
+1 != str
.size()) {
53 if (str
.size() != 0 && pos
!= 0) // Don't save empty strings
54 strlist
.push_back(str
.substr(0, pos
)); // Save
55 str
= str
.substr(pos
+delimiter
.size()); // Cut delimiter
57 pos
= str
.find(delimiter
);
60 if (pos
== std::string::npos
&& str
.size() != 0)
61 strlist
.push_back(str
);
66 std::string
itostr(long in
)
68 std::stringstream out
;