void Database_Dummy::listAllLoadableBlocks(std::list<v3s16> &dst)
{
- for(std::map<unsigned long long, std::string>::iterator x = m_database.begin(); x != m_database.end(); ++x)
+ for(std::map<u64, std::string>::iterator x = m_database.begin(); x != m_database.end(); ++x)
{
v3s16 p = getIntegerAsBlock(x->first);
//dstream<<"block_i="<<block_i<<" p="<<PP(p)<<std::endl;
#ifndef DATABASE_DUMMY_HEADER
#define DATABASE_DUMMY_HEADER
-#include "database.h"
#include <map>
#include <string>
+#include "database.h"
+#include "irrlichttypes.h"
class ServerMap;
~Database_Dummy();
private:
ServerMap *srvmap;
- std::map<unsigned long long, std::string> m_database;
+ std::map<u64, std::string> m_database;
};
#endif
return mod - ((-i) % mod);
}
-long long Database::getBlockAsInteger(const v3s16 pos) {
- return (unsigned long long)pos.Z*16777216 +
- (unsigned long long)pos.Y*4096 +
- (unsigned long long)pos.X;
+s64 Database::getBlockAsInteger(const v3s16 pos) {
+ return (u64) pos.Z * 16777216 +
+ (u64) pos.Y * 4096 +
+ (u64) pos.X;
}
-v3s16 Database::getIntegerAsBlock(long long i) {
+v3s16 Database::getIntegerAsBlock(s64 i) {
s32 x = unsignedToSigned(pythonmodulo(i, 4096), 2048);
i = (i - x) / 4096;
s32 y = unsignedToSigned(pythonmodulo(i, 4096), 2048);
#include <list>
#include "irr_v3d.h"
+#include "irrlichttypes.h"
class MapBlock;
virtual void saveBlock(MapBlock *block)=0;
virtual MapBlock* loadBlock(v3s16 blockpos)=0;
- long long getBlockAsInteger(const v3s16 pos);
- v3s16 getIntegerAsBlock(long long i);
+ s64 getBlockAsInteger(const v3s16 pos);
+ v3s16 getIntegerAsBlock(s64 i);
virtual void listAllLoadableBlocks(std::list<v3s16> &dst)=0;
virtual int Initialized(void)=0;
virtual ~Database() {};
<<") (yaw="<<(wrapDegrees_0_360(camera_yaw))
<<") (t="<<client.getEnv().getClientMap().getHeat(pos_i)
<<"C, h="<<client.getEnv().getClientMap().getHumidity(pos_i)
- <<"%) (seed = "<<((unsigned long long)client.getMapSeed())
+ <<"%) (seed = "<<((u64)client.getMapSeed())
<<")";
guitext2->setText(narrow_to_wide(os.str()).c_str());
guitext2->setVisible(true);
#include "porting.h"
#include "util/string.h"
#include "../exceptions.h"
+#include "../irrlichttypes.h"
#include <sstream>
#include <iomanip>
bufpos += PADDING(bufpos, u64);
nprinted = snprintf(sbuf + pos, sbuflen,
is_unsigned ? "%llu, " : "%lli, ",
- (unsigned long long)*((u64 *)bufpos));
+ *((u64 *)bufpos));
bufpos += sizeof(u64);
}
break;
inline s64 stoi64(const std::string &s) {
std::stringstream tmp(s);
- long long t;
+ s64 t;
tmp >> t;
return t;
}