mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Reworked texture, material, mineral and whatever handling
This commit is contained in:
parent
035345f13d
commit
9f882bf74d
27 changed files with 952 additions and 1324 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue