Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -ru minetest-orig/src/defaultsettings.cpp minetest/src/defaultsettings.cpp
- --- minetest-orig/src/defaultsettings.cpp 2012-10-14 02:55:49.525876499 -0400
- +++ minetest/src/defaultsettings.cpp 2012-10-14 07:04:09.214197587 -0400
- @@ -142,10 +142,5 @@
- 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 -ru minetest-orig/src/guiMainMenu.cpp minetest/src/guiMainMenu.cpp
- --- minetest-orig/src/guiMainMenu.cpp 2012-10-14 02:48:20.941866830 -0400
- +++ minetest/src/guiMainMenu.cpp 2012-10-14 06:46:43.438175053 -0400
- @@ -98,6 +98,10 @@
- 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 @@
- 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 @@
- }
- {
- + 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 -ru minetest-orig/src/guiMainMenu.h minetest/src/guiMainMenu.h
- --- minetest-orig/src/guiMainMenu.h 2012-10-14 02:48:20.941866830 -0400
- +++ minetest/src/guiMainMenu.h 2012-10-14 06:46:40.334174988 -0400
- @@ -41,6 +41,10 @@
- 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 -ru minetest-orig/src/main.cpp minetest/src/main.cpp
- --- minetest-orig/src/main.cpp 2012-10-14 02:53:45.365873821 -0400
- +++ minetest/src/main.cpp 2012-10-14 06:57:40.934189222 -0400
- @@ -1292,11 +1292,6 @@
- video::IVideoDriver* driver = device->getVideoDriver();
- - // Allow user to set mip-mapping by config file
- - // (see also, clientmap.cpp line 548)
- -
- - driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, g_settings->getBool("mip_map"));
- -
- /*
- This changes the minimum allowed number of vertices in a VBO.
- Default is 500.
- @@ -1441,6 +1436,11 @@
- 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
- @@ -1554,6 +1554,12 @@
- 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);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement