Back sqlite3 for WIN, fix Sky
This commit is contained in:
parent
c3b2eeca49
commit
a13e033c89
|
@ -182,7 +182,7 @@ if(UNIX AND NOT APPLE)
|
|||
install(FILES "misc/MultiCraft.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps")
|
||||
install(FILES "misc/MultiCraft-xorg-icon-128.png"
|
||||
DESTINATION "${ICONDIR}/hicolor/128x128/apps"
|
||||
RENAME "minetest.png")
|
||||
RENAME "MultiCraft.png")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>net.minetest.minetest.desktop</id>
|
||||
<id>com.MultiCraft.game.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>LGPL-2.1+ and CC-BY-SA-3.0 and MIT and Apache-2.0</project_license>
|
||||
<name>Minetest</name>
|
||||
<project_license>LGPL-3.0+ and CC-BY-SA-3.0 and MIT and Apache-2.0</project_license>
|
||||
<name>MultiCraft</name>
|
||||
<summary>Multiplayer infinite-world block sandbox game</summary>
|
||||
<description>
|
||||
<p>
|
||||
Minetest is an infinite-world block sandbox game and game engine.
|
||||
MultiCraft is an infinite-world block sandbox game and game engine.
|
||||
</p><p>
|
||||
Players can create and destroy various types of blocks in a
|
||||
three-dimensional open world. This allows forming structures in
|
||||
every possible creation, on multiplayer servers or in singleplayer.
|
||||
</p><p>
|
||||
Minetest is designed to be simple, stable, and portable.
|
||||
MultiCraft is designed to be simple, stable, and portable.
|
||||
It is lightweight enough to run on fairly old hardware.
|
||||
</p><p>
|
||||
Minetest has many features, including:
|
||||
MultiCraft has many features, including:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Ability to walk around, dig, and build in a near-infinite voxel world</li>
|
||||
|
@ -51,8 +51,8 @@
|
|||
<url type="faq">http://wiki.minetest.net/FAQ</url>
|
||||
<url type="help">http://wiki.minetest.net</url>
|
||||
<provides>
|
||||
<binary>minetest</binary>
|
||||
<binary>multicraft</binary>
|
||||
</provides>
|
||||
<translation type="gettext">minetest</translation>
|
||||
<translation type="gettext">multicraft</translation>
|
||||
<update_contact>sfan5@live.de</update_contact>
|
||||
</component>
|
|
@ -1,6 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Name=Minetest
|
||||
GenericName=Minetest
|
||||
Name=MultiCraft
|
||||
GenericName=MultiCraft
|
||||
Comment=Multiplayer infinite-world block sandbox
|
||||
Comment[de]=Mehrspieler-Sandkastenspiel mit unendlichen Blockwelten
|
||||
Comment[es]=Juego sandbox multijugador con mundos infinitos
|
||||
|
@ -8,8 +8,8 @@ Comment[fr]=Jeu multijoueurs de type bac à sable avec des mondes infinis
|
|||
Comment[ja]=マルチプレイに対応した、無限の世界のブロック型サンドボックスゲームです
|
||||
Comment[ru]=Игра-песочница с безграничным миром, состоящим из блоков
|
||||
Comment[tr]=Tek-Çok oyuncuyla küplerden sonsuz dünyalar inşa et
|
||||
Exec=minetest
|
||||
Icon=minetest
|
||||
Exec=multicraft
|
||||
Icon=multicraft
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Game;Simulation;
|
|
@ -232,8 +232,6 @@ if(ENABLE_REDIS)
|
|||
endif(ENABLE_REDIS)
|
||||
|
||||
|
||||
#find_package(SQLite3 REQUIRED)
|
||||
|
||||
OPTION(ENABLE_SPATIAL "Enable SpatialIndex AreaStore backend" TRUE)
|
||||
set(USE_SPATIAL FALSE)
|
||||
|
||||
|
@ -259,6 +257,8 @@ add_definitions(-DUSE_CMAKE_CONFIG_H)
|
|||
|
||||
if(WIN32)
|
||||
# Windows
|
||||
# Add SQLITE3
|
||||
find_package(SQLite3 REQUIRED)
|
||||
if(MSVC) # MSVC Specifics
|
||||
set(PLATFORM_LIBS dbghelp.lib ${PLATFORM_LIBS})
|
||||
# Surpress some useless warnings
|
||||
|
@ -383,6 +383,7 @@ set(common_SRCS
|
|||
database-leveldb.cpp
|
||||
database-postgresql.cpp
|
||||
database-redis.cpp
|
||||
database-sqlite3.cpp
|
||||
database.cpp
|
||||
debug.cpp
|
||||
defaultsettings.cpp
|
||||
|
@ -460,7 +461,6 @@ set(common_SRCS
|
|||
${UNITTEST_SRCS}
|
||||
)
|
||||
|
||||
|
||||
# This gives us the icon and file version information
|
||||
if(WIN32)
|
||||
set(WINRESOURCE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../misc/winresource.rc")
|
||||
|
@ -558,6 +558,9 @@ include_directories(
|
|||
${PROJECT_SOURCE_DIR}/script
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
include_directories(${SQLITE3_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(USE_FREETYPE)
|
||||
include_directories(${FREETYPE_INCLUDE_DIRS} ${CGUITTFONT_INCLUDE_DIR})
|
||||
|
@ -592,6 +595,12 @@ if(BUILD_CLIENT)
|
|||
${PLATFORM_LIBS}
|
||||
${CLIENT_PLATFORM_LIBS}
|
||||
)
|
||||
if(WIN32)
|
||||
target_link_libraries(
|
||||
${client_LIBS}
|
||||
${SQLITE3_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
if(APPLE)
|
||||
target_link_libraries(
|
||||
${client_LIBS}
|
||||
|
@ -800,9 +809,15 @@ if(WIN32)
|
|||
if(FREETYPE_DLL)
|
||||
install(FILES ${FREETYPE_DLL} DESTINATION ${BINDIR})
|
||||
endif()
|
||||
if(SQLITE3_DLL)
|
||||
install(FILES ${SQLITE3_DLL} DESTINATION ${BINDIR})
|
||||
endif()
|
||||
if(LEVELDB_DLL)
|
||||
install(FILES ${LEVELDB_DLL} DESTINATION ${BINDIR})
|
||||
endif()
|
||||
if(LUA_DLL)
|
||||
install(FILES ${LUA_DLL} DESTINATION ${BINDIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(BUILD_CLIENT)
|
||||
|
|
|
@ -43,6 +43,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "version.h"
|
||||
#include "drawscene.h"
|
||||
#include "database.h"
|
||||
#ifdef _WIN32
|
||||
#include "database-sqlite3.h"
|
||||
#endif
|
||||
#include "serialization.h"
|
||||
#include "guiscalingfilter.h"
|
||||
#include "script/scripting_client.h"
|
||||
|
@ -769,7 +772,7 @@ void Client::initLocalMapSaving(const Address &address,
|
|||
return;
|
||||
}
|
||||
|
||||
/*const std::string world_path = porting::path_user
|
||||
const std::string world_path = porting::path_user
|
||||
+ DIR_DELIM + "worlds"
|
||||
+ DIR_DELIM + "server_"
|
||||
+ hostname + "_" + std::to_string(address.getPort());
|
||||
|
@ -778,7 +781,7 @@ void Client::initLocalMapSaving(const Address &address,
|
|||
|
||||
m_localdb = new MapDatabaseSQLite3(world_path);
|
||||
m_localdb->beginSave();
|
||||
actionstream << "Local map saving started, map will be saved at '" << world_path << "'" << std::endl;*/
|
||||
actionstream << "Local map saving started, map will be saved at '" << world_path << "'" << std::endl;
|
||||
}
|
||||
|
||||
void Client::ReceiveAll()
|
||||
|
|
|
@ -43,6 +43,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "server.h"
|
||||
#include "database.h"
|
||||
#include "database-dummy.h"
|
||||
#ifdef _WIN32
|
||||
#include "database-sqlite3.h"
|
||||
#endif
|
||||
#include "script/scripting_server.h"
|
||||
#include <deque>
|
||||
#include <queue>
|
||||
|
@ -2287,6 +2290,8 @@ MapDatabase *ServerMap::createDatabase(
|
|||
const std::string &savedir,
|
||||
Settings &conf)
|
||||
{
|
||||
if (name == "sqlite3")
|
||||
return new MapDatabaseSQLite3(savedir);
|
||||
if (name == "dummy")
|
||||
return new Database_Dummy();
|
||||
#if USE_LEVELDB
|
||||
|
|
|
@ -621,9 +621,9 @@ bool setWindowIcon(IrrlichtDevice *device)
|
|||
HWND hWnd; // Window handle
|
||||
|
||||
switch (device->getVideoDriver()->getDriverType()) {
|
||||
case video::EDT_DIRECT3D8:
|
||||
/* case video::EDT_DIRECT3D8:
|
||||
hWnd = reinterpret_cast<HWND>(exposedData.D3D8.HWnd);
|
||||
break;
|
||||
break;*/
|
||||
case video::EDT_DIRECT3D9:
|
||||
hWnd = reinterpret_cast<HWND>(exposedData.D3D9.HWnd);
|
||||
break;
|
||||
|
|
|
@ -39,6 +39,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "gameparams.h"
|
||||
#include "database-dummy.h"
|
||||
#include "database-files.h"
|
||||
#ifdef _WIN32
|
||||
#include "database-sqlite3.h"
|
||||
#endif
|
||||
#if USE_POSTGRESQL
|
||||
#include "database-postgresql.h"
|
||||
#endif
|
||||
|
@ -2168,7 +2171,9 @@ PlayerDatabase *ServerEnvironment::openPlayerDatabase(const std::string &name,
|
|||
const std::string &savedir, const Settings &conf)
|
||||
{
|
||||
|
||||
if (name == "dummy")
|
||||
if (name == "sqlite3")
|
||||
return new PlayerDatabaseSQLite3(savedir);
|
||||
else if (name == "dummy")
|
||||
return new Database_Dummy();
|
||||
#if USE_POSTGRESQL
|
||||
else if (name == "postgresql") {
|
||||
|
|
16
src/sky.cpp
16
src/sky.cpp
|
@ -191,7 +191,7 @@ void Sky::render()
|
|||
video::SColor cloudyfogcolor = m_bgcolor;
|
||||
|
||||
// Draw far cloudy fog thing blended with skycolor
|
||||
for (u32 j = 0; j < 4; j++) {
|
||||
/* for (u32 j = 0; j < 4; j++) {
|
||||
video::SColor c = cloudyfogcolor.getInterpolated(m_skycolor, 0.45);
|
||||
vertices[0] = video::S3DVertex(-1, 0.08, -1, 0, 0, 1, c, t, t);
|
||||
vertices[1] = video::S3DVertex( 1, 0.08, -1, 0, 0, 1, c, o, t);
|
||||
|
@ -212,10 +212,10 @@ void Sky::render()
|
|||
vertices[i].Pos.rotateXZBy(-180);
|
||||
}
|
||||
driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2);
|
||||
}
|
||||
}*/
|
||||
|
||||
// Draw far cloudy fog thing
|
||||
for (u32 j = 0; j < 4; j++) {
|
||||
/* for (u32 j = 0; j < 4; j++) {
|
||||
video::SColor c = cloudyfogcolor;
|
||||
vertices[0] = video::S3DVertex(-1, -1.0, -1, 0, 0, 1, c, t, t);
|
||||
vertices[1] = video::S3DVertex( 1, -1.0, -1, 0, 0, 1, c, o, t);
|
||||
|
@ -236,7 +236,7 @@ void Sky::render()
|
|||
vertices[i].Pos.rotateXZBy(-180);
|
||||
}
|
||||
driver->drawIndexedTriangleFan(&vertices[0], 4, indices, 2);
|
||||
}
|
||||
}*/
|
||||
|
||||
// Draw bottom far cloudy fog thing
|
||||
video::SColor c = cloudyfogcolor;
|
||||
|
@ -502,7 +502,7 @@ void Sky::render()
|
|||
|
||||
// Draw far cloudy fog thing below east and west horizons
|
||||
for (u32 j = 0; j < 2; j++) {
|
||||
video::SColor c = cloudyfogcolor;
|
||||
video::SColor c = m_skycolor;
|
||||
vertices[0] = video::S3DVertex(-1, -1.0, -1, 0, 0, 1, c, t, t);
|
||||
vertices[1] = video::S3DVertex( 1, -1.0, -1, 0, 0, 1, c, o, t);
|
||||
vertices[2] = video::S3DVertex( 1, -0.02, -1, 0, 0, 1, c, o, o);
|
||||
|
@ -560,12 +560,12 @@ void Sky::update(float time_of_day, float time_brightness,
|
|||
video::SColorf cloudcolor_bright_dawn_f(1.0, 0.7, 0.5);
|
||||
*/
|
||||
|
||||
video::SColorf bgcolor_bright_normal_f = video::SColor(255, 155, 193, 240);
|
||||
video::SColorf bgcolor_bright_normal_f = video::SColor(255, 2, 145, 255);
|
||||
video::SColorf bgcolor_bright_indoor_f = video::SColor(255, 100, 100, 100);
|
||||
video::SColorf bgcolor_bright_dawn_f = video::SColor(255, 186, 193, 240);
|
||||
video::SColorf bgcolor_bright_dawn_f = video::SColor(255, 180, 186, 255);
|
||||
video::SColorf bgcolor_bright_night_f = video::SColor(255, 64, 144, 255);
|
||||
|
||||
video::SColorf skycolor_bright_normal_f = video::SColor(255, 2, 138, 255);
|
||||
video::SColorf skycolor_bright_normal_f = video::SColor(255, 2, 145, 255);
|
||||
video::SColorf skycolor_bright_dawn_f = video::SColor(255, 180, 186, 255);
|
||||
video::SColorf skycolor_bright_night_f = video::SColor(255, 0, 107, 255);
|
||||
|
||||
|
|
|
@ -293,7 +293,11 @@ bool loadGameConfAndInitWorld(const std::string &path, const SubgameSpec &gamesp
|
|||
if (!fs::PathExists(worldmt_path)) {
|
||||
std::ostringstream ss(std::ios_base::binary);
|
||||
ss << "gameid = " << gamespec.id
|
||||
#ifdef _WIN32
|
||||
<< "\nbackend = sqlite3"
|
||||
#else
|
||||
<< "\nbackend = leveldb"
|
||||
#endif
|
||||
<< "\ncreative_mode = " << g_settings->get("creative_mode")
|
||||
<< "\nenable_damage = " << g_settings->get("enable_damage")
|
||||
<< "\n";
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 295 B After Width: | Height: | Size: 295 B |
Binary file not shown.
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Loading…
Reference in New Issue