aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
Commit message (Expand)AuthorAge
* Fix "make install" and add underscore to doc file nameest312015-09-14
* Rename minetest-icon.svg to minetest.svg - Fixes #1564HEXcube2015-09-03
* Continue with 0.4.13-devest312015-08-20
* Bump version to 0.4.13est312015-08-20
* Fix a typo in comment of CMakeLists.txtD Laboratory2015-07-18
* Make Git version detection use VERSION_STRING instead of tagsShadowNinja2015-05-05
* Revert the upper-case PROJECT_NAME nonsense that was part of #2402sfan52015-04-27
* Clean up and tweak build systemShadowNinja2015-03-27
* Standalone bundle for OSX (w/ dependencies!)Pavel Puchkin2015-03-17
* Uncomment version patch fieldBlockMen2015-02-18
* Bump version to 0.4.12Perttu Ahola2015-02-18
* Uncomment version patch fieldkwolekr2014-12-26
* Bump version to 0.4.11kwolekr2014-12-24
* Fix OSX packaging finallyPavel Puchkin2014-12-16
* Add basic support for generating API documentation using DoxygenJürgen Doser2014-12-12
* Add ZLIBWAPI_DLL and LEVELDB_DLL CMake options Remove legacy MINGWM10_DLL CMa...sfan52014-07-29
* Switch back repository to dev-mode after 0.4.10 release.sapier2014-07-07
* Update version numbers for 0.4.10sapier2014-07-06
* OS X compatibility fixesMartin Doege2014-06-29
* Fix AppData path for RUN_IN_PLACE, fixes #1365sfan52014-06-13
* Add AppData fileDavid Gumberg2014-06-13
* Improved win32 file version informationsapier2014-03-02
* Add check to avoid usage of broken LuaJIT < 2.0.0beta8sapier2014-02-13
* Reenable -dev suffixKahrl2014-01-03
* Bump version to 0.4.9kwolekr2014-01-01
* Reenable -dev suffixPilzAdam2013-11-24
* Bump version to 0.4.8kwolekr2013-11-24
* Show git hash in version string at top left corner of windowKahrl2013-09-28
* Fix installation of textures/texture_packs_here.txtPilzAdam2013-08-04
* Fixes cmake-gui causing RUN_IN_PLACE to be always offMetaDucky2013-06-13
* Bump version to 0.4.7PilzAdam2013-06-06
* Install mods/mods_here.txt instead of mods/minetest/mods_here.txtPilzAdam2013-05-19
* Remove survival and build from CMakeLists.txtPilzAdam2013-05-18
* Remove common from CMakeLists.txt, README.txt, lua-api.txt and buildwin.shPilzAdam2013-05-18
* Install menu textures of minetest_gamePilzAdam2013-05-04
* Revert "Fix to be able to build from dir different than source dir"kwolekr2013-04-07
* Fix to be able to build from dir different than source dirDiego Martínez2013-04-06
* Install "build" and "survival" games with "make install"Diego Martínez2013-04-05
* Bump version to 0.4.6kwolekr2013-04-03
* Install locales in minetest directory, so they are correctly loadedZeg92013-03-30
* CMakeLists.txt: Add games/common to be installed when availablePerttu Ahola2013-03-22
* Bump version to 0.4.5kwolekr2013-03-04
* Add Freetype supportIlya Zhuravlev2013-02-14
* Call this 0.4.4-d1 because it has a protocol addition since 0.4.4Perttu Ahola2013-01-02
* Bump version to 0.4.4Perttu Ahola2012-12-06
* Install shaders properlyPerttu Ahola2012-12-02
* Change version to 0.4.4-dev because... ehm... why it wasn't that already?Perttu Ahola2012-11-29
* Bump version to 0.4.4 as this isn't compatible with 0.4.3Perttu Ahola2012-11-26
* Version 0.4.3Perttu Ahola2012-09-05
* Version 0.4.3-rc0; increase PROTOCOL_VERSION due to backwards-incompatible In...Perttu Ahola2012-09-05
inline s32 sqlite_to_int(sqlite3_stmt *s, int iCol) { return sqlite3_column_int(s, iCol); } inline u32 sqlite_to_uint(sqlite3_stmt *s, int iCol) { return (u32) sqlite3_column_int(s, iCol); } inline float sqlite_to_float(sqlite3_stmt *s, int iCol) { return (float) sqlite3_column_double(s, iCol); } inline const v3f sqlite_to_v3f(sqlite3_stmt *s, int iCol) { return v3f(sqlite_to_float(s, iCol), sqlite_to_float(s, iCol + 1), sqlite_to_float(s, iCol + 2)); } // Query verifiers helpers inline void sqlite3_vrfy(int s, const std::string &m = "", int r = SQLITE_OK) const { if (s != r) throw DatabaseException(m + ": " + sqlite3_errmsg(m_database)); } inline void sqlite3_vrfy(const int s, const int r, const std::string &m = "") const { sqlite3_vrfy(s, m, r); } // Create the database structure virtual void createDatabase() = 0; virtual void initStatements() = 0; sqlite3 *m_database = nullptr; private: // Open the database void openDatabase(); bool m_initialized = false; std::string m_savedir = ""; std::string m_dbname = ""; sqlite3_stmt *m_stmt_begin = nullptr; sqlite3_stmt *m_stmt_end = nullptr; s64 m_busy_handler_data[2]; static int busyHandler(void *data, int count); }; class MapDatabaseSQLite3 : private Database_SQLite3, public MapDatabase { public: MapDatabaseSQLite3(const std::string &savedir); virtual ~MapDatabaseSQLite3(); bool saveBlock(const v3s16 &pos, const std::string &data); void loadBlock(const v3s16 &pos, std::string *block); bool deleteBlock(const v3s16 &pos); void listAllLoadableBlocks(std::vector<v3s16> &dst); void beginSave() { Database_SQLite3::beginSave(); } void endSave() { Database_SQLite3::endSave(); } protected: virtual void createDatabase(); virtual void initStatements(); private: void bindPos(sqlite3_stmt *stmt, const v3s16 &pos, int index = 1); // Map sqlite3_stmt *m_stmt_read = nullptr; sqlite3_stmt *m_stmt_write = nullptr; sqlite3_stmt *m_stmt_list = nullptr; sqlite3_stmt *m_stmt_delete = nullptr; }; class PlayerDatabaseSQLite3 : private Database_SQLite3, public PlayerDatabase { public: PlayerDatabaseSQLite3(const std::string &savedir); virtual ~PlayerDatabaseSQLite3(); void savePlayer(RemotePlayer *player); bool loadPlayer(RemotePlayer *player, PlayerSAO *sao); bool removePlayer(const std::string &name); void listPlayers(std::vector<std::string> &res); protected: virtual void createDatabase(); virtual void initStatements(); private: bool playerDataExists(const std::string &name); // Players sqlite3_stmt *m_stmt_player_load = nullptr; sqlite3_stmt *m_stmt_player_add = nullptr; sqlite3_stmt *m_stmt_player_update = nullptr; sqlite3_stmt *m_stmt_player_remove = nullptr; sqlite3_stmt *m_stmt_player_list = nullptr; sqlite3_stmt *m_stmt_player_load_inventory = nullptr; sqlite3_stmt *m_stmt_player_load_inventory_items = nullptr; sqlite3_stmt *m_stmt_player_add_inventory = nullptr; sqlite3_stmt *m_stmt_player_add_inventory_items = nullptr; sqlite3_stmt *m_stmt_player_remove_inventory = nullptr; sqlite3_stmt *m_stmt_player_remove_inventory_items = nullptr; sqlite3_stmt *m_stmt_player_metadata_load = nullptr; sqlite3_stmt *m_stmt_player_metadata_remove = nullptr; sqlite3_stmt *m_stmt_player_metadata_add = nullptr; };