summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/minimal/mods/default/textures/default_nc_back.pngbin303 -> 317 bytes
-rw-r--r--games/minimal/mods/default/textures/default_nc_front.pngbin410 -> 378 bytes
-rw-r--r--games/minimal/mods/default/textures/default_nc_rb.pngbin203 -> 206 bytes
-rw-r--r--games/minimal/mods/default/textures/default_nc_side.pngbin260 -> 231 bytes
-rw-r--r--src/camera.cpp12
-rw-r--r--src/clientmap.cpp9
-rw-r--r--src/defaultsettings.cpp5
-rw-r--r--src/guiMainMenu.cpp60
-rw-r--r--src/guiMainMenu.h4
-rw-r--r--src/main.cpp14
-rw-r--r--src/nodedef.cpp8
11 files changed, 101 insertions, 11 deletions
diff --git a/games/minimal/mods/default/textures/default_nc_back.png b/games/minimal/mods/default/textures/default_nc_back.png
index f09f41658..febd7384a 100644
--- a/games/minimal/mods/default/textures/default_nc_back.png
+++ b/games/minimal/mods/default/textures/default_nc_back.png
Binary files differ
diff --git a/games/minimal/mods/default/textures/default_nc_front.png b/games/minimal/mods/default/textures/default_nc_front.png
index cad9edab1..53b02d174 100644
--- a/games/minimal/mods/default/textures/default_nc_front.png
+++ b/games/minimal/mods/default/textures/default_nc_front.png
Binary files differ
diff --git a/games/minimal/mods/default/textures/default_nc_rb.png b/games/minimal/mods/default/textures/default_nc_rb.png
index 7ebc9930d..7183e6986 100644
--- a/games/minimal/mods/default/textures/default_nc_rb.png
+++ b/games/minimal/mods/default/textures/default_nc_rb.png
Binary files differ
diff --git a/games/minimal/mods/default/textures/default_nc_side.png b/games/minimal/mods/default/textures/default_nc_side.png
index f954045fb..0a34c8bef 100644
--- a/games/minimal/mods/default/textures/default_nc_side.png
+++ b/games/minimal/mods/default/textures/default_nc_side.png
Binary files differ
diff --git a/src/camera.cpp b/src/camera.cpp
index f87f660e9..43f26cd8f 100644
--- a/src/camera.cpp
+++ b/src/camera.cpp
@@ -189,7 +189,7 @@ void Camera::step(f32 dtime)
if (m_digging_button != -1)
{
- f32 offset = dtime * 3.5;
+ f32 offset = dtime * 4.5;
float m_digging_anim_was = m_digging_anim;
m_digging_anim += offset;
if (m_digging_anim >= 1)
@@ -336,13 +336,13 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
if (m_digging_button != -1)
{
f32 digfrac = m_digging_anim;
- wield_position.X -= 30 * sin(pow(digfrac, 0.8f) * M_PI);
- wield_position.Y += 15 * sin(digfrac * 2 * M_PI);
- wield_position.Z += 5 * digfrac;
-
+ wield_position.X -= 50 * sin(pow(digfrac, 0.8f) * M_PI);
+ wield_position.Y += 24 * sin(digfrac * 1.8 * M_PI);
+ wield_position.Z += 25 * 0.5;
+
// Euler angles are PURE EVIL, so why not use quaternions?
core::quaternion quat_begin(wield_rotation * core::DEGTORAD);
- core::quaternion quat_end(v3f(90, -10, -130) * core::DEGTORAD);
+ core::quaternion quat_end(v3f(80, 30, 100) * core::DEGTORAD);
core::quaternion quat_slerp;
quat_slerp.slerp(quat_begin, quat_end, sin(digfrac * M_PI));
quat_slerp.toEuler(wield_rotation);
diff --git a/src/clientmap.cpp b/src/clientmap.cpp
index 64d5656d4..02c9fe9b1 100644
--- a/src/clientmap.cpp
+++ b/src/clientmap.cpp
@@ -413,6 +413,10 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
m_last_drawn_sectors.clear();
}
+ bool use_trilinear_filter = g_settings->getBool("trilinear_filter");
+ bool use_bilinear_filter = g_settings->getBool("bilinear_filter");
+ bool use_anisotropic_filter = g_settings->getBool("anisotropic_filter");
+
/*
Get time for measuring timeout.
@@ -544,6 +548,11 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
for(u32 i=0; i<c; i++)
{
scene::IMeshBuffer *buf = mesh->getMeshBuffer(i);
+
+ buf->getMaterial().setFlag(video::EMF_TRILINEAR_FILTER, use_trilinear_filter);
+ buf->getMaterial().setFlag(video::EMF_BILINEAR_FILTER, use_bilinear_filter);
+ buf->getMaterial().setFlag(video::EMF_ANISOTROPIC_FILTER, use_anisotropic_filter);
+
const video::SMaterial& material = buf->getMaterial();
video::IMaterialRenderer* rnd =
driver->getMaterialRenderer(material.MaterialType);
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index 3b37c18dc..6eaa28410 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -142,5 +142,10 @@ void set_default_settings(Settings *settings)
settings->setDefault("full_block_send_enable_min_time_from_building", "2.0");
settings->setDefault("dedicated_server_step", "0.05");
settings->setDefault("ignore_world_load_errors", "false");
+ settings->setDefault("mip_map", "false");
+ settings->setDefault("anisotropic_filter", "false");
+ settings->setDefault("bilinear_filter", "false");
+ settings->setDefault("trilinear_filter", "false");
+
}
diff --git a/src/guiMainMenu.cpp b/src/guiMainMenu.cpp
index 5e0a3c38f..0bdb44e5d 100644
--- a/src/guiMainMenu.cpp
+++ b/src/guiMainMenu.cpp
@@ -98,6 +98,10 @@ enum
GUI_ID_SMOOTH_LIGHTING_CB,
GUI_ID_3D_CLOUDS_CB,
GUI_ID_OPAQUE_WATER_CB,
+ GUI_ID_MIPMAP_CB,
+ GUI_ID_ANISOTROPIC_CB,
+ GUI_ID_BILINEAR_CB,
+ GUI_ID_TRILINEAR_CB,
GUI_ID_DAMAGE_CB,
GUI_ID_CREATIVE_CB,
GUI_ID_JOIN_GAME_BUTTON,
@@ -580,6 +584,38 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
Environment->addCheckBox(m_data->opaque_water, rect, this,
GUI_ID_OPAQUE_WATER_CB, wgettext("Opaque water"));
}
+
+
+ // Anisotropic/mipmap/bi-/trilinear settings
+
+ {
+ core::rect<s32> rect(0, 0, option_w+20, 30);
+ rect += m_topleft_client + v2s32(option_x+175, option_y);
+ Environment->addCheckBox(m_data->mip_map, rect, this,
+ GUI_ID_MIPMAP_CB, wgettext("Mip-Mapping"));
+ }
+
+ {
+ core::rect<s32> rect(0, 0, option_w+20, 30);
+ rect += m_topleft_client + v2s32(option_x+175, option_y+20);
+ Environment->addCheckBox(m_data->anisotropic_filter, rect, this,
+ GUI_ID_ANISOTROPIC_CB, wgettext("Anisotropic Filtering"));
+ }
+
+ {
+ core::rect<s32> rect(0, 0, option_w+20, 30);
+ rect += m_topleft_client + v2s32(option_x+175, option_y+20*2);
+ Environment->addCheckBox(m_data->bilinear_filter, rect, this,
+ GUI_ID_BILINEAR_CB, wgettext("Bi-Linear Filtering"));
+ }
+
+ {
+ core::rect<s32> rect(0, 0, option_w+20, 30);
+ rect += m_topleft_client + v2s32(option_x+175, option_y+20*3);
+ Environment->addCheckBox(m_data->trilinear_filter, rect, this,
+ GUI_ID_TRILINEAR_CB, wgettext("Tri-Linear Filtering"));
+ }
+
// Key change button
{
core::rect<s32> rect(0, 0, 120, 30);
@@ -761,6 +797,30 @@ void GUIMainMenu::readInput(MainMenuData *dst)
}
{
+ gui::IGUIElement *e = getElementFromId(GUI_ID_MIPMAP_CB);
+ if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX)
+ dst->mip_map = ((gui::IGUICheckBox*)e)->isChecked();
+ }
+
+ {
+ gui::IGUIElement *e = getElementFromId(GUI_ID_ANISOTROPIC_CB);
+ if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX)
+ dst->anisotropic_filter = ((gui::IGUICheckBox*)e)->isChecked();
+ }
+
+ {
+ gui::IGUIElement *e = getElementFromId(GUI_ID_BILINEAR_CB);
+ if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX)
+ dst->bilinear_filter = ((gui::IGUICheckBox*)e)->isChecked();
+ }
+
+ {
+ gui::IGUIElement *e = getElementFromId(GUI_ID_TRILINEAR_CB);
+ if(e != NULL && e->getType() == gui::EGUIET_CHECK_BOX)
+ dst->trilinear_filter = ((gui::IGUICheckBox*)e)->isChecked();
+ }
+
+ {
gui::IGUIElement *e = getElementFromId(GUI_ID_WORLD_LISTBOX);
if(e != NULL && e->getType() == gui::EGUIET_LIST_BOX)
dst->selected_world = ((gui::IGUIListBox*)e)->getSelected();
diff --git a/src/guiMainMenu.h b/src/guiMainMenu.h
index 715deb47d..abfc6bdb4 100644
--- a/src/guiMainMenu.h
+++ b/src/guiMainMenu.h
@@ -41,6 +41,10 @@ struct MainMenuData
bool smooth_lighting;
bool clouds_3d;
bool opaque_water;
+ bool mip_map;
+ bool anisotropic_filter;
+ bool bilinear_filter;
+ bool trilinear_filter;
// Server options
bool creative_mode;
bool enable_damage;
diff --git a/src/main.cpp b/src/main.cpp
index 6075e9d10..dcc47cd6b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1292,9 +1292,6 @@ int main(int argc, char *argv[])
video::IVideoDriver* driver = device->getVideoDriver();
- // Disable mipmaps (because some of them look ugly)
- driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
-
/*
This changes the minimum allowed number of vertices in a VBO.
Default is 500.
@@ -1439,6 +1436,11 @@ int main(int argc, char *argv[])
menudata.smooth_lighting = g_settings->getBool("smooth_lighting");
menudata.clouds_3d = g_settings->getBool("enable_3d_clouds");
menudata.opaque_water = g_settings->getBool("opaque_water");
+ menudata.mip_map = g_settings->getBool("mip_map");
+ menudata.anisotropic_filter = g_settings->getBool("anisotropic_filter");
+ menudata.bilinear_filter = g_settings->getBool("bilinear_filter");
+ menudata.trilinear_filter = g_settings->getBool("trilinear_filter");
+ driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, menudata.mip_map);
menudata.creative_mode = g_settings->getBool("creative_mode");
menudata.enable_damage = g_settings->getBool("enable_damage");
// Default to selecting nothing
@@ -1552,6 +1554,12 @@ int main(int argc, char *argv[])
g_settings->set("smooth_lighting", itos(menudata.smooth_lighting));
g_settings->set("enable_3d_clouds", itos(menudata.clouds_3d));
g_settings->set("opaque_water", itos(menudata.opaque_water));
+
+ g_settings->set("mip_map", itos(menudata.mip_map));
+ g_settings->set("anisotropic_filter", itos(menudata.anisotropic_filter));
+ g_settings->set("bilinear_filter", itos(menudata.bilinear_filter));
+ g_settings->set("trilinear_filter", itos(menudata.trilinear_filter));
+
g_settings->set("creative_mode", itos(menudata.creative_mode));
g_settings->set("enable_damage", itos(menudata.enable_damage));
g_settings->set("name", playername);
diff --git a/src/nodedef.cpp b/src/nodedef.cpp
index 466531efa..180219ba8 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -254,7 +254,6 @@ void ContentFeatures::serialize(std::ostream &os)
os<<serializeString(liquid_alternative_flowing);
os<<serializeString(liquid_alternative_source);
writeU8(os, liquid_viscosity);
- writeU8(os, liquid_renewable);
writeU8(os, light_source);
writeU32(os, damage_per_second);
node_box.serialize(os);
@@ -264,6 +263,9 @@ void ContentFeatures::serialize(std::ostream &os)
serializeSimpleSoundSpec(sound_footstep, os);
serializeSimpleSoundSpec(sound_dig, os);
serializeSimpleSoundSpec(sound_dug, os);
+ // Stuff below should be moved to correct place in a version that otherwise changes
+ // the protocol version
+ writeU8(os, liquid_renewable);
}
void ContentFeatures::deSerialize(std::istream &is)
@@ -309,7 +311,6 @@ void ContentFeatures::deSerialize(std::istream &is)
liquid_alternative_flowing = deSerializeString(is);
liquid_alternative_source = deSerializeString(is);
liquid_viscosity = readU8(is);
- liquid_renewable = readU8(is);
light_source = readU8(is);
damage_per_second = readU32(is);
node_box.deSerialize(is);
@@ -322,6 +323,9 @@ void ContentFeatures::deSerialize(std::istream &is)
// If you add anything here, insert it primarily inside the try-catch
// block to not need to increase the version.
try{
+ // Stuff below should be moved to correct place in a version that
+ // otherwise changes the protocol version
+ liquid_renewable = readU8(is);
}catch(SerializationError &e) {};
}