From 4d5177ff708c7e696eead18200e240047ff520fe Mon Sep 17 00:00:00 2001 From: number Zero Date: Sat, 18 Feb 2017 21:53:05 +0300 Subject: Add mesh generation delay --- src/settings_translation_file.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/settings_translation_file.cpp') diff --git a/src/settings_translation_file.cpp b/src/settings_translation_file.cpp index 39223d9ce..9ec21c415 100644 --- a/src/settings_translation_file.cpp +++ b/src/settings_translation_file.cpp @@ -245,6 +245,8 @@ fake_function() { gettext("Maximum proportion of current window to be used for hotbar.\nUseful if there's something to be displayed right or left of hotbar."); gettext("Mesh cache"); gettext("Enables caching of facedir rotated meshes."); + gettext("Mapblock mesh generation delay"); + gettext("Delay between mesh updates on the client in ms. Increasing this will slow\ndown the rate of mesh updates, thus reducing jitter on slower clients."); gettext("Minimap"); gettext("Enables minimap."); gettext("Round minimap"); -- cgit v1.2.3 From 0a8834608d21998bd05b899bd91ddc2196762926 Mon Sep 17 00:00:00 2001 From: number Zero Date: Thu, 12 Jan 2017 12:19:36 +0300 Subject: Hard-coded undersampling. Adds uniform undersampling for the 3D rendered scene. GUI elements are not undersampled, resulting in better playability for users with low-performance platforms with readable fonts and formspecs. The undersampling setting can be set to 0 (disabled), 2, 3, 4 pixels which translates into a resolution reduction of x4, x9 or x16, and is significant. --- builtin/settingtypes.txt | 5 +++++ minetest.conf.example | 6 +++++ src/defaultsettings.cpp | 1 + src/drawscene.cpp | 47 +++++++++++++++++++++++++++++++++------ src/settings_translation_file.cpp | 2 ++ 5 files changed, 54 insertions(+), 7 deletions(-) (limited to 'src/settings_translation_file.cpp') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index a3b91fe74..2c74d6c44 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -362,6 +362,11 @@ texture_min_size (Minimum texture size for filters) int 64 # when set to higher number than 0. fsaa (FSAA) enum 0 0,1,2,4,8,16 +# Undersampling is similar to using lower screen resolution, but it applies +# to the game world only, keeping the GUI intact. +# It should give significant performance boost at the cost of less detailed image. +undersampling (Undersampling) enum 0 0,2,3,4 + [***Shaders] # Shaders allow advanced visual effects and may increase performance on some video cards. diff --git a/minetest.conf.example b/minetest.conf.example index 9e9039bf2..d147ebfac 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -404,6 +404,12 @@ # type: enum values: 0, 1, 2, 4, 8, 16 # fsaa = 0 +# Undersampling is similar to using lower screen resolution, but it applies +# to the game world only, keeping the GUI intact. +# It should give significant performance boost at the cost of less detailed image. +# type: enum values: 0, 2, 3, 4 +# undersampling = 0 + #### Shaders # Shaders allow advanced visual effects and may increase performance on some video cards. diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 2a49a0eca..c6ced5931 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -108,6 +108,7 @@ void set_default_settings(Settings *settings) settings->setDefault("show_debug", "true"); #endif settings->setDefault("fsaa", "0"); + settings->setDefault("undersampling", "0"); settings->setDefault("enable_fog", "true"); settings->setDefault("fog_start", "0.4"); settings->setDefault("3d_mode", "none"); diff --git a/src/drawscene.cpp b/src/drawscene.cpp index 663c8828c..421b96f12 100644 --- a/src/drawscene.cpp +++ b/src/drawscene.cpp @@ -459,10 +459,37 @@ void draw_pageflip_3d_mode(Camera& camera, bool show_hud, #endif } -void draw_plain(Camera &camera, bool show_hud, Hud &hud, - video::IVideoDriver *driver, bool draw_wield_tool, - Client &client, gui::IGUIEnvironment *guienv) +// returns (size / coef), rounded upwards +inline int scaledown(int coef, int size) { + return (size + coef - 1) / coef; +} + +void draw_plain(Camera &camera, bool show_hud, + Hud &hud, video::IVideoDriver *driver, + scene::ISceneManager *smgr, const v2u32 &screensize, + bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv, + video::SColor skycolor) +{ + // Undersampling-specific stuff + static video::ITexture *image = NULL; + static v2u32 last_pixelated_size = v2u32(0, 0); + int undersampling = g_settings->getU16("undersampling"); + v2u32 pixelated_size; + v2u32 dest_size; + if (undersampling > 0) { + pixelated_size = v2u32(scaledown(undersampling, screensize.X), + scaledown(undersampling, screensize.Y)); + dest_size = v2u32(undersampling * pixelated_size.X, undersampling * pixelated_size.Y); + if (pixelated_size != last_pixelated_size) { + init_texture(driver, pixelated_size, &image, "mt_drawimage_img1"); + last_pixelated_size = pixelated_size; + } + driver->setRenderTarget(image, true, true, skycolor); + } + + // Render + smgr->drawAll(); driver->setTransform(video::ETS_WORLD, core::IdentityMatrix); if (show_hud) { hud.drawSelectionMesh(); @@ -470,10 +497,18 @@ void draw_plain(Camera &camera, bool show_hud, Hud &hud, camera.drawWieldedTool(); } } + + // Upscale lowres render + if (undersampling > 0) { + driver->setRenderTarget(0, true, true); + driver->draw2DImage(image, + irr::core::rect(0, 0, dest_size.X, dest_size.Y), + irr::core::rect(0, 0, pixelated_size.X, pixelated_size.Y)); + } } void draw_scene(video::IVideoDriver *driver, scene::ISceneManager *smgr, - Camera &camera, Client& client, LocalPlayer *player, Hud &hud, + Camera &camera, Client &client, LocalPlayer *player, Hud &hud, Minimap &mapper, gui::IGUIEnvironment *guienv, const v2u32 &screensize, const video::SColor &skycolor, bool show_hud, bool show_minimap) @@ -496,8 +531,6 @@ void draw_scene(video::IVideoDriver *driver, scene::ISceneManager *smgr, const std::string &draw_mode = g_settings->get("3d_mode"); - smgr->drawAll(); - if (draw_mode == "anaglyph") { draw_anaglyph_3d_mode(camera, show_hud, hud, driver, @@ -531,7 +564,7 @@ void draw_scene(video::IVideoDriver *driver, scene::ISceneManager *smgr, } else { draw_plain(camera, show_hud, hud, driver, - draw_wield_tool, client, guienv); + smgr, screensize, draw_wield_tool, client, guienv, skycolor); } /* diff --git a/src/settings_translation_file.cpp b/src/settings_translation_file.cpp index 9ec21c415..93f2688d7 100644 --- a/src/settings_translation_file.cpp +++ b/src/settings_translation_file.cpp @@ -152,6 +152,8 @@ fake_function() { gettext("When using bilinear/trilinear/anisotropic filters, low-resolution textures\ncan be blurred, so automatically upscale them with nearest-neighbor\ninterpolation to preserve crisp pixels. This sets the minimum texture size\nfor the upscaled textures; higher values look sharper, but require more\nmemory. Powers of 2 are recommended. Setting this higher than 1 may not\nhave a visible effect unless bilinear/trilinear/anisotropic filtering is\nenabled."); gettext("FSAA"); gettext("Experimental option, might cause visible spaces between blocks\nwhen set to higher number than 0."); + gettext("Undersampling"); + gettext("Undersampling is similar to using lower screen resolution, but it applies\nto the game world only, keeping the GUI intact.\nIt should give significant performance boost at the cost of less detailed image."); gettext("Shaders"); gettext("Shaders"); gettext("Shaders allow advanced visual effects and may increase performance on some video cards.\nThy only work with the OpenGL video backend."); -- cgit v1.2.3 From de5ecc9fa31d557e2d0ca638b1c98435707046b9 Mon Sep 17 00:00:00 2001 From: Ekdohibs Date: Thu, 20 Apr 2017 06:06:15 +0200 Subject: Run generate_from_settingtypes.lua --- src/settings_translation_file.cpp | 253 ++++++++++++++++++++++++++------------ 1 file changed, 174 insertions(+), 79 deletions(-) (limited to 'src/settings_translation_file.cpp') diff --git a/src/settings_translation_file.cpp b/src/settings_translation_file.cpp index 93f2688d7..d34665181 100644 --- a/src/settings_translation_file.cpp +++ b/src/settings_translation_file.cpp @@ -37,6 +37,10 @@ fake_function() { gettext("Continuous forward movement (only used for testing)."); gettext("Enable Joysticks"); gettext("Enable Joysticks"); + gettext("Joystick ID"); + gettext("The identifier of the joystick to use"); + gettext("Joystick Type"); + gettext("The type of joystick"); gettext("Joystick button repetition interval"); gettext("The time in seconds it takes between repeated events\nwhen holding down a joystick button combination."); gettext("Joystick frustum sensitivity"); @@ -61,6 +65,8 @@ fake_function() { gettext("Key for opening the chat window.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Command key"); gettext("Key for opening the chat window to type commands.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); + gettext("Command key"); + gettext("Key for opening the chat window to type local commands.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Console key"); gettext("Key for opening the chat console.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Range select key"); @@ -81,10 +87,14 @@ fake_function() { gettext("Key for taking screenshots.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Drop item key"); gettext("Key for dropping the currently selected item.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); + gettext("View zoom key"); + gettext("Key to use view zoom when possible.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("HUD toggle key"); gettext("Key for toggling the display of the HUD.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Chat toggle key"); gettext("Key for toggling the display of the chat.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); + gettext("Large chat console key"); + gettext("Key for toggling the display of the large chat console.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Fog toggle key"); gettext("Key for toggling the display of the fog.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Camera update toggle key"); @@ -114,6 +124,8 @@ fake_function() { gettext("Show entity selection boxes"); gettext("Connect to external media server"); gettext("Enable usage of remote media server (if provided by server).\nRemote servers offer a significantly faster way to download media (e.g. textures)\nwhen connecting to the server."); + gettext("Client modding"); + gettext("Enable Lua modding support on client.\nThis support is experimental and API can change."); gettext("Serverlist URL"); gettext("URL to the server list displayed in the Multiplayer Tab."); gettext("Serverlist file"); @@ -137,6 +149,8 @@ fake_function() { gettext("Use 3D cloud look instead of flat."); gettext("Node highlighting"); gettext("Method used to highlight selected object."); + gettext("Digging particles"); + gettext("Adds particles when digging a node."); gettext("Filtering"); gettext("Mipmapping"); gettext("Use mip mapping to scale textures. May slightly increase performance."); @@ -156,7 +170,9 @@ fake_function() { gettext("Undersampling is similar to using lower screen resolution, but it applies\nto the game world only, keeping the GUI intact.\nIt should give significant performance boost at the cost of less detailed image."); gettext("Shaders"); gettext("Shaders"); - gettext("Shaders allow advanced visual effects and may increase performance on some video cards.\nThy only work with the OpenGL video backend."); + gettext("Shaders allow advanced visual effects and may increase performance on some video cards.\nThis only works with the OpenGL video backend."); + gettext("Shader path"); + gettext("Path to shader directory. If no path is defined, default location will be used."); gettext("Tone Mapping"); gettext("Filmic tone mapping"); gettext("Enables filmic tone mapping"); @@ -214,7 +230,7 @@ fake_function() { gettext("Field of view for zoom"); gettext("Field of view while zooming in degrees.\nThis requires the \"zoom\" privilege on the server."); gettext("Gamma"); - gettext("Adjust the gamma encoding for the light tables. Lower numbers are brighter.\nThis setting is for the client only and is ignored by the server."); + gettext("Adjust the gamma encoding for the light tables. Higher numbers are brighter.\nThis setting is for the client only and is ignored by the server."); gettext("Texture path"); gettext("Path to texture directory. All textures are first searched from here."); gettext("Video driver"); @@ -223,12 +239,16 @@ fake_function() { gettext("Height on which clouds are appearing."); gettext("Cloud radius"); gettext("Radius of cloud area stated in number of 64 node cloud squares.\nValues larger than 26 will start to produce sharp cutoffs at cloud area corners."); - gettext("View bobbing"); + gettext("Enable view bobbing"); + gettext("Enables view bobbing when walking."); + gettext("View bobbing factor"); gettext("Multiplier for view bobbing.\nFor example: 0 for no view bobbing; 1.0 for normal; 2.0 for double."); - gettext("Fall bobbing"); + gettext("Fall bobbing factor"); gettext("Multiplier for fall bobbing.\nFor example: 0 for no view bobbing; 1.0 for normal; 2.0 for double."); gettext("3D mode"); gettext("3D support.\nCurrently supported:\n- none: no 3d output.\n- anaglyph: cyan/magenta color 3d.\n- interlaced: odd/even line based polarisation screen support.\n- topbottom: split screen top/bottom.\n- sidebyside: split screen side by side.\n- pageflip: quadbuffer based 3d."); + gettext("Console height"); + gettext("In-game chat console height, between 0.1 (10%) and 1.0 (100%)."); gettext("Console color"); gettext("In-game chat console background color (R,G,B)."); gettext("Console alpha"); @@ -245,10 +265,14 @@ fake_function() { gettext("Whether node texture animations should be desynchronized per mapblock."); gettext("Maximum hotbar width"); gettext("Maximum proportion of current window to be used for hotbar.\nUseful if there's something to be displayed right or left of hotbar."); + gettext("HUD scale factor"); + gettext("Modifies the size of the hudbar elements."); gettext("Mesh cache"); gettext("Enables caching of facedir rotated meshes."); gettext("Mapblock mesh generation delay"); gettext("Delay between mesh updates on the client in ms. Increasing this will slow\ndown the rate of mesh updates, thus reducing jitter on slower clients."); + gettext("Mapblock mesh generator's MapBlock cache size MB"); + gettext("Size of the MapBlock cache of the mesh generator. Increasing this will\nincrease the cache hit %, reducing the data being copied from the main\nthread, thus reducing jitter."); gettext("Minimap"); gettext("Enables minimap."); gettext("Round minimap"); @@ -261,8 +285,12 @@ fake_function() { gettext("The strength (darkness) of node ambient-occlusion shading.\nLower is darker, Higher is lighter. The valid range of values for this\nsetting is 0.25 to 4.0 inclusive. If the value is out of range it will be\nset to the nearest valid value."); gettext("Inventory items animations"); gettext("Enables animation of inventory items."); + gettext("Inventory image hack"); + gettext("Android systems only: Tries to create inventory textures from meshes\nwhen no supported render was found."); gettext("Fog Start"); gettext("Fraction of the visible distance at which fog starts to be rendered"); + gettext("Opaque liquids"); + gettext("Makes all liquids opaque"); gettext("Menus"); gettext("Clouds in menu"); gettext("Use a cloud animation for the main menu background."); @@ -299,6 +327,8 @@ fake_function() { gettext("Advanced"); gettext("DPI"); gettext("Adjust dpi configuration to your screen (non X11/Android only) e.g. for 4k screens."); + gettext("Enable console window"); + gettext("Windows systems only: Start Minetest with the command line window in the background.\nContains the same information as the file debug.txt (default name)."); gettext("Sound"); gettext("Sound"); gettext("Volume"); @@ -355,8 +385,12 @@ fake_function() { gettext("World directory (everything in the world is stored here).\nNot needed if starting from the main menu."); gettext("Item entity TTL"); gettext("Time in seconds for item entity (dropped items) to live.\nSetting it to -1 disables the feature."); + gettext("Status message on connection"); + gettext("If enabled, show the server status message on player connection."); gettext("Damage"); gettext("Enable players getting damage and dying."); + gettext("Creative"); + gettext("Enable creative mode for new created maps."); gettext("Fixed map seed"); gettext("A chosen map seed for a new map, leave empty for random.\nWill be overridden when creating a new world in the main menu."); gettext("Default password"); @@ -442,6 +476,8 @@ fake_function() { gettext("Liquid update interval in seconds."); gettext("block send optimize distance"); gettext("At this distance the server will aggressively optimize which blocks are sent to clients.\nSmall values potentially improve performance a lot, at the expense of visible rendering glitches.\n(some blocks will not be rendered under water and in caves, as well as sometimes on land)\nSetting this to a value greater than max_block_send_distance disables this optimization.\nStated in mapblocks (16 nodes)"); + gettext("Server side occlusion culling"); + gettext("If enabled the server will perform map block occlusion culling based on\non the eye position of the player. This can reduce the number of blocks\nsent to the client 50-80%. The client will not longer receive most invisible\nso that the utility of noclip mode is reduced."); gettext("Mapgen"); gettext("Mapgen name"); gettext("Name of map generator to be used when creating a new world.\nCreating a world in the main menu will override this."); @@ -450,7 +486,7 @@ fake_function() { gettext("Max block generate distance"); gettext("From how far blocks are generated for clients, stated in mapblocks (16 nodes)."); gettext("Map generation limit"); - gettext("Where the map generator stops.\nPlease note:\n- Limited to 31000 (setting above has no effect)\n- The map generator works in groups of 80x80x80 nodes (5x5x5 MapBlocks).\n- Those groups have an offset of -32, -32 nodes from the origin.\n- Only groups which are within the map_generation_limit are generated"); + gettext("Limit of map generation, in nodes, in all 6 directions from (0, 0, 0).\nOnly mapchunks completely within the mapgen limit are generated.\nValue is stored per-world."); gettext("Mapgen flags"); gettext("Global map generation attributes.\nIn Mapgen v6 the 'decorations' flag controls all decorations except trees\nand junglegrass, in all other mapgens this flag controls all decorations.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); gettext("Advanced"); @@ -466,109 +502,168 @@ fake_function() { gettext("Maximum number of blocks to be queued that are to be generated.\nSet to blank for an appropriate amount to be chosen automatically."); gettext("Number of emerge threads"); gettext("Number of emerge threads to use. Make this field blank, or increase this number\nto use multiple threads. On multiprocessor systems, this will improve mapgen speed greatly\nat the cost of slightly buggy caves."); - gettext("Mapgen biome heat noise parameters"); - gettext("Noise parameters for biome API temperature, humidity and biome blend."); - gettext("Mapgen heat blend noise parameters"); - gettext("Mapgen biome humidity noise parameters"); - gettext("Mapgen biome humidity blend noise parameters"); + gettext("Biome API temperature and humidity noise parameters"); + gettext("Heat noise"); + gettext("Temperature variation for biomes."); + gettext("Heat blend noise"); + gettext("Small-scale temperature variation for blending biomes on borders."); + gettext("Humidity noise"); + gettext("Humidity variation for biomes."); + gettext("Humidity blend noise"); + gettext("Small-scale humidity variation for blending biomes on borders."); gettext("Mapgen v5"); - gettext("Mapgen v5 cave width"); + gettext("Mapgen v5 specific flags"); + gettext("Map generation attributes specific to Mapgen v5.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); + gettext("Cave width"); gettext("Controls width of tunnels, a smaller value creates wider tunnels."); - gettext("Mapgen v5 filler depth noise parameters"); - gettext("Mapgen v5 factor noise parameters"); - gettext("Mapgen v5 height noise parameters"); - gettext("Mapgen v5 cave1 noise parameters"); - gettext("Mapgen v5 cave2 noise parameters"); + gettext("Cavern limit"); + gettext("Y-level of cavern upper limit."); + gettext("Cavern taper"); + gettext("Y-distance over which caverns expand to full size."); + gettext("Cavern threshold"); + gettext("Defines full size of caverns, smaller values create larger caverns."); + gettext("Filler depth noise"); + gettext("Variation of biome filler depth."); + gettext("Factor noise"); + gettext("Variation of terrain vertical scale.\nWhen noise is < -0.55 terrain is near-flat."); + gettext("Height noise"); + gettext("Y-level of average terrain surface."); + gettext("Cave1 noise"); + gettext("First of 2 3D noises that together define tunnels."); + gettext("Cave2 noise"); + gettext("Second of 2 3D noises that together define tunnels."); + gettext("Cavern noise"); + gettext("3D noise defining giant caverns."); gettext("Mapgen v6"); - gettext("Mapgen v6 flags"); - gettext("Map generation attributes specific to Mapgen v6.\nWhen snowbiomes are enabled jungles are automatically enabled, the 'jungles' flag is ignored.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); - gettext("Mapgen v6 desert frequency"); - gettext("Controls size of deserts and beaches in Mapgen v6.\nWhen snowbiomes are enabled 'mgv6_freq_desert' is ignored."); - gettext("Mapgen v6 beach frequency"); - gettext("Mapgen v6 terrain base noise parameters"); - gettext("Mapgen v6 terrain altitude noise parameters"); - gettext("Mapgen v6 steepness noise parameters"); - gettext("Mapgen v6 height select noise parameters"); - gettext("Mapgen v6 mud noise parameters"); - gettext("Mapgen v6 beach noise parameters"); - gettext("Mapgen v6 biome noise parameters"); - gettext("Mapgen v6 cave noise parameters"); - gettext("Mapgen v6 humidity noise parameters"); - gettext("Mapgen v6 trees noise parameters"); - gettext("Mapgen v6 apple trees noise parameters"); + gettext("Mapgen v6 specific flags"); + gettext("Map generation attributes specific to Mapgen v6.\nThe 'snowbiomes' flag enables the new 5 biome system.\nWhen the new biome system is enabled jungles are automatically enabled and\nthe 'jungles' flag is ignored.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); + gettext("Desert noise threshold"); + gettext("Deserts occur when np_biome exceeds this value.\nWhen the new biome system is enabled, this is ignored."); + gettext("Beach noise threshold"); + gettext("Sandy beaches occur when np_beach exceeds this value."); + gettext("Terrain base noise"); + gettext("Y-level of lower terrain and lakebeds."); + gettext("Terrain higher noise"); + gettext("Y-level of higher (cliff-top) terrain."); + gettext("Steepness noise"); + gettext("Varies steepness of cliffs."); + gettext("Height select noise"); + gettext("Defines areas of 'terrain_higher' (cliff-top terrain)."); + gettext("Mud noise"); + gettext("Varies depth of biome surface nodes."); + gettext("Beach noise"); + gettext("Defines areas with sandy beaches."); + gettext("Biome noise"); + gettext("Temperature variation for biomes."); + gettext("Cave noise"); + gettext("Variation of number of caves."); + gettext("Humidity noise"); + gettext("Humidity variation for biomes."); + gettext("Trees noise"); + gettext("Defines tree areas and tree density."); + gettext("Apple trees noise"); + gettext("Defines areas where trees have apples."); gettext("Mapgen v7"); - gettext("Mapgen v7 flags"); + gettext("Mapgen v7 specific flags"); gettext("Map generation attributes specific to Mapgen v7.\nThe 'ridges' flag enables the rivers.\nFloatlands are currently experimental and subject to change.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); - gettext("Mapgen v7 cave width"); + gettext("Cave width"); gettext("Controls width of tunnels, a smaller value creates wider tunnels."); - gettext("Mapgen v7 floatland mountain density"); + gettext("Floatland mountain density"); gettext("Controls the density of floatland mountain terrain.\nIs an offset added to the 'np_mountain' noise value."); - gettext("Mapgen v7 floatland mountain height"); + gettext("Floatland mountain height"); gettext("Typical maximum height, above and below midpoint, of floatland mountain terrain."); - gettext("Mapgen v7 floatland level"); + gettext("Floatland level"); gettext("Y-level of floatland midpoint and lake surface."); - gettext("Mapgen v7 shadow limit"); + gettext("Shadow limit"); gettext("Y-level to which floatland shadows extend."); - gettext("Mapgen v7 terrain base noise parameters"); - gettext("Mapgen v7 terrain altitude noise parameters"); - gettext("Mapgen v7 terrain persistation noise parameters"); - gettext("Mapgen v7 height select noise parameters"); - gettext("Mapgen v7 filler depth noise parameters"); - gettext("Mapgen v7 mount height noise parameters"); - gettext("Mapgen v7 river course noise parameters"); - gettext("Mapgen v7 floatland base terrain noise parameters"); - gettext("Mapgen v7 floatland base terrain height noise parameters"); - gettext("Mapgen v7 mountain noise parameters"); - gettext("Mapgen v7 river channel wall noise parameters"); - gettext("Mapgen v7 cave1 noise parameters"); - gettext("Mapgen v7 cave2 noise parameters"); + gettext("Cavern limit"); + gettext("Y-level of cavern upper limit."); + gettext("Cavern taper"); + gettext("Y-distance over which caverns expand to full size."); + gettext("Cavern threshold"); + gettext("Defines full size of caverns, smaller values create larger caverns."); + gettext("Terrain base noise"); + gettext("Y-level of higher (cliff-top) terrain."); + gettext("Terrain alt noise"); + gettext("Y-level of lower terrain and lakebeds."); + gettext("Terrain persistence noise"); + gettext("Varies roughness of terrain.\nDefines the 'persistence' value for terrain_base and terrain_alt noises."); + gettext("Height select noise"); + gettext("Defines areas of higher (cliff-top) terrain and affects steepness of cliffs."); + gettext("Filler depth noise"); + gettext("Variation of biome filler depth."); + gettext("Mountain height noise"); + gettext("Variation of maximum mountain height (in nodes)."); + gettext("Ridge underwater noise"); + gettext("Defines large-scale river channel structure."); + gettext("Floatland base noise"); + gettext("Defines areas of floatland smooth terrain.\nSmooth floatlands occur when noise > 0."); + gettext("Floatland base height noise"); + gettext("Variation of hill height and lake depth on floatland smooth terrain."); + gettext("Mountain noise"); + gettext("3D noise defining mountain structure and height.\nAlso defines structure of floatland mountain terrain."); + gettext("Ridge noise"); + gettext("3D noise defining structure of river canyon walls."); + gettext("Cavern noise"); + gettext("3D noise defining giant caverns."); + gettext("Cave1 noise"); + gettext("First of 2 3D noises that together define tunnels."); + gettext("Cave2 noise"); + gettext("Second of 2 3D noises that together define tunnels."); gettext("Mapgen flat"); - gettext("Mapgen flat flags"); + gettext("Mapgen flat specific flags"); gettext("Map generation attributes specific to Mapgen flat.\nOccasional lakes and hills can be added to the flat world.\nFlags that are not specified in the flag string are not modified from the default.\nFlags starting with 'no' are used to explicitly disable them."); - gettext("Mapgen flat ground level"); + gettext("Ground level"); gettext("Y of flat ground."); - gettext("Mapgen flat large cave depth"); + gettext("Large cave depth"); gettext("Y of upper limit of large pseudorandom caves."); - gettext("Mapgen flat cave width"); + gettext("Cave width"); gettext("Controls width of tunnels, a smaller value creates wider tunnels."); - gettext("Mapgen flat lake threshold"); + gettext("Lake threshold"); gettext("Terrain noise threshold for lakes.\nControls proportion of world area covered by lakes.\nAdjust towards 0.0 for a larger proportion."); - gettext("Mapgen flat lake steepness"); + gettext("Lake steepness"); gettext("Controls steepness/depth of lake depressions."); - gettext("Mapgen flat hill threshold"); + gettext("Hill threshold"); gettext("Terrain noise threshold for hills.\nControls proportion of world area covered by hills.\nAdjust towards 0.0 for a larger proportion."); - gettext("Mapgen flat hill steepness"); + gettext("Hill steepness"); gettext("Controls steepness/height of hills."); - gettext("Mapgen flat terrain noise parameters"); - gettext("Determines terrain shape.\nThe 3 numbers in brackets control the scale of the\nterrain, the 3 numbers should be identical."); - gettext("Mapgen flat filler depth noise parameters"); - gettext("Mapgen flat cave1 noise parameters"); - gettext("Mapgen flat cave2 noise parameters"); + gettext("Terrain noise"); + gettext("Defines location and terrain of optional hills and lakes."); + gettext("Filler depth noise"); + gettext("Variation of biome filler depth."); + gettext("Cave1 noise"); + gettext("First of 2 3D noises that together define tunnels."); + gettext("Cave2 noise"); + gettext("Second of 2 3D noises that together define tunnels."); gettext("Mapgen fractal"); - gettext("Mapgen fractal cave width"); + gettext("Cave width"); gettext("Controls width of tunnels, a smaller value creates wider tunnels."); - gettext("Mapgen fractal fractal"); + gettext("Fractal type"); gettext("Choice of 18 fractals from 9 formulas.\n1 = 4D \"Roundy\" mandelbrot set.\n2 = 4D \"Roundy\" julia set.\n3 = 4D \"Squarry\" mandelbrot set.\n4 = 4D \"Squarry\" julia set.\n5 = 4D \"Mandy Cousin\" mandelbrot set.\n6 = 4D \"Mandy Cousin\" julia set.\n7 = 4D \"Variation\" mandelbrot set.\n8 = 4D \"Variation\" julia set.\n9 = 3D \"Mandelbrot/Mandelbar\" mandelbrot set.\n10 = 3D \"Mandelbrot/Mandelbar\" julia set.\n11 = 3D \"Christmas Tree\" mandelbrot set.\n12 = 3D \"Christmas Tree\" julia set.\n13 = 3D \"Mandelbulb\" mandelbrot set.\n14 = 3D \"Mandelbulb\" julia set.\n15 = 3D \"Cosine Mandelbulb\" mandelbrot set.\n16 = 3D \"Cosine Mandelbulb\" julia set.\n17 = 4D \"Mandelbulb\" mandelbrot set.\n18 = 4D \"Mandelbulb\" julia set."); - gettext("Mapgen fractal iterations"); + gettext("Iterations"); gettext("Iterations of the recursive function.\nControls the amount of fine detail."); - gettext("Mapgen fractal scale"); + gettext("Scale"); gettext("Approximate (X,Y,Z) scale of fractal in nodes."); - gettext("Mapgen fractal offset"); + gettext("Offset"); gettext("(X,Y,Z) offset of fractal from world centre in units of 'scale'.\nUsed to move a suitable spawn area of low land close to (0, 0).\nThe default is suitable for mandelbrot sets, it needs to be edited for julia sets.\nRange roughly -2 to 2. Multiply by 'scale' for offset in nodes."); - gettext("Mapgen fractal slice w"); + gettext("Slice w"); gettext("W co-ordinate of the generated 3D slice of a 4D fractal.\nDetermines which 3D slice of the 4D shape is generated.\nHas no effect on 3D fractals.\nRange roughly -2 to 2."); - gettext("Mapgen fractal julia x"); + gettext("Julia x"); gettext("Julia set only: X component of hypercomplex constant determining julia shape.\nRange roughly -2 to 2."); - gettext("Mapgen fractal julia y"); + gettext("Julia y"); gettext("Julia set only: Y component of hypercomplex constant determining julia shape.\nRange roughly -2 to 2."); - gettext("Mapgen fractal julia z"); + gettext("Julia z"); gettext("Julia set only: Z component of hypercomplex constant determining julia shape.\nRange roughly -2 to 2."); - gettext("Mapgen fractal julia w"); + gettext("Julia w"); gettext("Julia set only: W component of hypercomplex constant determining julia shape.\nHas no effect on 3D fractals.\nRange roughly -2 to 2."); - gettext("Mapgen fractal seabed noise parameters"); - gettext("Mapgen fractal filler depth noise parameters"); - gettext("Mapgen fractal cave1 noise parameters"); - gettext("Mapgen fractal cave2 noise parameters"); + gettext("Seabed noise"); + gettext("Y-level of seabed."); + gettext("Filler depth noise"); + gettext("Variation of biome filler depth."); + gettext("Cave1 noise"); + gettext("First of 2 3D noises that together define tunnels."); + gettext("Cave2 noise"); + gettext("Second of 2 3D noises that together define tunnels."); gettext("Mapgen Valleys"); gettext("General"); gettext("Valleys C Flags"); @@ -624,7 +719,7 @@ fake_function() { gettext("Default report format"); gettext("The default format in which profiles are being saved,\nwhen calling `/profiler save [format]` without format."); gettext("Report path"); - gettext("The file path relative to your worldpath in which profiles will be saved to.\n"); + gettext("The file path relative to your worldpath in which profiles will be saved to."); gettext("Instrumentation"); gettext("Entity methods"); gettext("Instrument the methods of entities on registration."); -- cgit v1.2.3 From db17225a976e20c6628afe70dd6b230673287b4d Mon Sep 17 00:00:00 2001 From: Louis Pearson Date: Tue, 25 Apr 2017 06:11:51 -0500 Subject: Footsteps without view bobbing (#5645) * Remove redundant view_bobbing setting Also fixes bug where disabling view_bobbing disables footstep sounds. * Removes redundant view_bobbing setting Setting view_bobbing amount to 0 is now the only way to turn view_bobbing on and off. Also fixed a bug where footstep sounds would not play when view_bobbing was disabled. --- builtin/settingtypes.txt | 5 +---- minetest.conf.example | 7 +------ po/be/minetest.po | 2 +- po/ca/minetest.po | 2 +- po/cs/minetest.po | 2 +- po/da/minetest.po | 2 +- po/de/minetest.po | 2 +- po/eo/minetest.po | 2 +- po/es/minetest.po | 2 +- po/et/minetest.po | 2 +- po/fr/minetest.po | 2 +- po/he/minetest.po | 2 +- po/hu/minetest.po | 2 +- po/id/minetest.po | 2 +- po/it/minetest.po | 2 +- po/ja/minetest.po | 2 +- po/jbo/minetest.po | 2 +- po/ko/minetest.po | 2 +- po/ky/minetest.po | 2 +- po/lt/minetest.po | 2 +- po/minetest.pot | 2 +- po/ms/minetest.po | 2 +- po/nb/minetest.po | 2 +- po/nl/minetest.po | 2 +- po/pl/minetest.po | 2 +- po/pt/minetest.po | 2 +- po/pt_BR/minetest.po | 2 +- po/ro/minetest.po | 2 +- po/ru/minetest.po | 2 +- po/sr_Cyrl/minetest.po | 2 +- po/sw/minetest.po | 2 +- po/tr/minetest.po | 2 +- po/uk/minetest.po | 2 +- po/zh_CN/minetest.po | 2 +- po/zh_TW/minetest.po | 2 +- src/camera.cpp | 9 +++------ src/camera.h | 1 - src/defaultsettings.cpp | 1 - src/settings_translation_file.cpp | 2 +- 39 files changed, 39 insertions(+), 52 deletions(-) (limited to 'src/settings_translation_file.cpp') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 5dc48c00e..29a96ab8e 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -492,10 +492,7 @@ cloud_height (Cloud height) int 120 # Values larger than 26 will start to produce sharp cutoffs at cloud area corners. cloud_radius (Cloud radius) int 12 -# Enables view bobbing when walking. -view_bobbing (Enable view bobbing) bool true - -# Multiplier for view bobbing. +# Enable view bobbing and amount of view bobbing. # For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double. view_bobbing_amount (View bobbing factor) float 1.0 diff --git a/minetest.conf.example b/minetest.conf.example index bdd6fd7f4..ecbadb556 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -569,11 +569,7 @@ # type: int # cloud_radius = 12 -# Enables view bobbing when walking. -# type: bool -# view_bobbing = true - -# Multiplier for view bobbing. +# Enable view bobbing and amount of view bobbing. # For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double. # type: float # view_bobbing_amount = 1.0 @@ -1815,4 +1811,3 @@ # Print the engine's profiling data in regular intervals (in seconds). 0 = disable. Useful for developers. # type: int # profiler_print_interval = 0 - diff --git a/po/be/minetest.po b/po/be/minetest.po index 2466caea7..95a39697f 100644 --- a/po/be/minetest.po +++ b/po/be/minetest.po @@ -3670,7 +3670,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "Множнік калыхання пры праглядзе.\n" diff --git a/po/ca/minetest.po b/po/ca/minetest.po index eaf350f89..32b247ffc 100644 --- a/po/ca/minetest.po +++ b/po/ca/minetest.po @@ -3465,7 +3465,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/cs/minetest.po b/po/cs/minetest.po index c7d1720f0..917bc652b 100644 --- a/po/cs/minetest.po +++ b/po/cs/minetest.po @@ -3383,7 +3383,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/da/minetest.po b/po/da/minetest.po index b1aa649ba..c2bbd1477 100644 --- a/po/da/minetest.po +++ b/po/da/minetest.po @@ -3663,7 +3663,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/de/minetest.po b/po/de/minetest.po index a81fd0d56..ac51254cc 100644 --- a/po/de/minetest.po +++ b/po/de/minetest.po @@ -3746,7 +3746,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "Faktor für Auf- und Abbewegung (grafischer Effekt).\n" diff --git a/po/eo/minetest.po b/po/eo/minetest.po index adf29a0b6..71dd16892 100644 --- a/po/eo/minetest.po +++ b/po/eo/minetest.po @@ -3387,7 +3387,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/es/minetest.po b/po/es/minetest.po index 72438dc26..6cd0e184e 100644 --- a/po/es/minetest.po +++ b/po/es/minetest.po @@ -3526,7 +3526,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/et/minetest.po b/po/et/minetest.po index 94c9c7207..3cde4052b 100644 --- a/po/et/minetest.po +++ b/po/et/minetest.po @@ -3403,7 +3403,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/fr/minetest.po b/po/fr/minetest.po index f3aec72a6..9d1c0331a 100644 --- a/po/fr/minetest.po +++ b/po/fr/minetest.po @@ -3709,7 +3709,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "Facteur de mouvement de bras.\n" diff --git a/po/he/minetest.po b/po/he/minetest.po index 2e5367a9d..1b88f9111 100644 --- a/po/he/minetest.po +++ b/po/he/minetest.po @@ -3301,7 +3301,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/hu/minetest.po b/po/hu/minetest.po index a461b6a6b..b5824cc6b 100644 --- a/po/hu/minetest.po +++ b/po/hu/minetest.po @@ -3615,7 +3615,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/id/minetest.po b/po/id/minetest.po index 20464ab7a..4a3a24c48 100644 --- a/po/id/minetest.po +++ b/po/id/minetest.po @@ -3580,7 +3580,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/it/minetest.po b/po/it/minetest.po index b41f38cab..df5a7d0da 100644 --- a/po/it/minetest.po +++ b/po/it/minetest.po @@ -3720,7 +3720,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "Moltiplicatore per l'ondeggiamento visivo.\n" diff --git a/po/ja/minetest.po b/po/ja/minetest.po index f26036749..32e01a81b 100644 --- a/po/ja/minetest.po +++ b/po/ja/minetest.po @@ -3535,7 +3535,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/jbo/minetest.po b/po/jbo/minetest.po index 12ac80a39..749d53c35 100644 --- a/po/jbo/minetest.po +++ b/po/jbo/minetest.po @@ -3348,7 +3348,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/ko/minetest.po b/po/ko/minetest.po index 9bee4ee70..34bc7ddec 100644 --- a/po/ko/minetest.po +++ b/po/ko/minetest.po @@ -3507,7 +3507,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "화면 흔들림 멀티플라이어\n" diff --git a/po/ky/minetest.po b/po/ky/minetest.po index 72c729f8d..52704f78d 100644 --- a/po/ky/minetest.po +++ b/po/ky/minetest.po @@ -3403,7 +3403,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/lt/minetest.po b/po/lt/minetest.po index 7556e0309..c00c0df84 100644 --- a/po/lt/minetest.po +++ b/po/lt/minetest.po @@ -3383,7 +3383,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/minetest.pot b/po/minetest.pot index 46a74b448..1dddd0a71 100644 --- a/po/minetest.pot +++ b/po/minetest.pot @@ -2279,7 +2279,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/ms/minetest.po b/po/ms/minetest.po index 97f7a75f3..e53039522 100644 --- a/po/ms/minetest.po +++ b/po/ms/minetest.po @@ -2481,7 +2481,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/nb/minetest.po b/po/nb/minetest.po index 28bcb3f90..d3a8bdc67 100644 --- a/po/nb/minetest.po +++ b/po/nb/minetest.po @@ -3314,7 +3314,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/nl/minetest.po b/po/nl/minetest.po index 68e3e7b6d..be29ac829 100644 --- a/po/nl/minetest.po +++ b/po/nl/minetest.po @@ -3719,7 +3719,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "Vermenigvuldigingsfactor van loopbeweging.\n" diff --git a/po/pl/minetest.po b/po/pl/minetest.po index 8af82c0d6..0bf0ea84f 100644 --- a/po/pl/minetest.po +++ b/po/pl/minetest.po @@ -3674,7 +3674,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/pt/minetest.po b/po/pt/minetest.po index cef144845..992d0d608 100644 --- a/po/pt/minetest.po +++ b/po/pt/minetest.po @@ -3509,7 +3509,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/pt_BR/minetest.po b/po/pt_BR/minetest.po index 76d473a96..648b13a1c 100644 --- a/po/pt_BR/minetest.po +++ b/po/pt_BR/minetest.po @@ -3711,7 +3711,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "Multiplicador para sacudir a exibição.\n" diff --git a/po/ro/minetest.po b/po/ro/minetest.po index a9efb035f..4b0a724ea 100644 --- a/po/ro/minetest.po +++ b/po/ro/minetest.po @@ -3429,7 +3429,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/ru/minetest.po b/po/ru/minetest.po index 4406ec5a0..c3f2465a3 100644 --- a/po/ru/minetest.po +++ b/po/ru/minetest.po @@ -3628,7 +3628,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/sr_Cyrl/minetest.po b/po/sr_Cyrl/minetest.po index 0a0078f23..2d8739639 100644 --- a/po/sr_Cyrl/minetest.po +++ b/po/sr_Cyrl/minetest.po @@ -3359,7 +3359,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/sw/minetest.po b/po/sw/minetest.po index abf0da24d..b33e622aa 100644 --- a/po/sw/minetest.po +++ b/po/sw/minetest.po @@ -3644,7 +3644,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "Mengi kwa ajili ya Mwoneko kando.\n" diff --git a/po/tr/minetest.po b/po/tr/minetest.po index 707ce11d9..5db7287d4 100644 --- a/po/tr/minetest.po +++ b/po/tr/minetest.po @@ -3477,7 +3477,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/uk/minetest.po b/po/uk/minetest.po index 0035c792f..5271f4a5d 100644 --- a/po/uk/minetest.po +++ b/po/uk/minetest.po @@ -3350,7 +3350,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/zh_CN/minetest.po b/po/zh_CN/minetest.po index 410d98082..0503513e9 100644 --- a/po/zh_CN/minetest.po +++ b/po/zh_CN/minetest.po @@ -3421,7 +3421,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/zh_TW/minetest.po b/po/zh_TW/minetest.po index 7718ae462..55716950d 100644 --- a/po/zh_TW/minetest.po +++ b/po/zh_TW/minetest.po @@ -3608,7 +3608,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "視野晃動的倍數。\n" diff --git a/src/camera.cpp b/src/camera.cpp index 7e83dadeb..b119bbfbb 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -102,7 +102,6 @@ Camera::Camera(scene::ISceneManager* smgr, MapDrawControl& draw_control, m_cache_view_bobbing_amount = g_settings->getFloat("view_bobbing_amount"); m_cache_fov = g_settings->getFloat("fov"); m_cache_zoom_fov = g_settings->getFloat("zoom_fov"); - m_cache_view_bobbing = g_settings->getBool("view_bobbing"); m_nametags.clear(); } @@ -280,8 +279,8 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime, v3f rel_cam_target = v3f(0,0,1); v3f rel_cam_up = v3f(0,1,0); - if (m_view_bobbing_anim != 0 && m_camera_mode < CAMERA_MODE_THIRD) - { + if (m_cache_view_bobbing_amount != 0.0f && m_view_bobbing_anim != 0.0f && + m_camera_mode < CAMERA_MODE_THIRD) { f32 bobfrac = my_modf(m_view_bobbing_anim * 2); f32 bobdir = (m_view_bobbing_anim < 0.5) ? 1.0 : -1.0; @@ -467,9 +466,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime, const bool swimming = (movement_XZ || player->swimming_vertical) && player->in_liquid; const bool climbing = movement_Y && player->is_climbing; if ((walking || swimming || climbing) && - m_cache_view_bobbing && - (!g_settings->getBool("free_move") || !m_client->checkLocalPrivilege("fly"))) - { + (!g_settings->getBool("free_move") || !m_client->checkLocalPrivilege("fly"))) { // Start animation m_view_bobbing_state = 1; m_view_bobbing_speed = MYMIN(speed.getLength(), 70); diff --git a/src/camera.h b/src/camera.h index f57efdf10..e4c1d0b25 100644 --- a/src/camera.h +++ b/src/camera.h @@ -231,7 +231,6 @@ private: f32 m_cache_view_bobbing_amount; f32 m_cache_fov; f32 m_cache_zoom_fov; - bool m_cache_view_bobbing; std::list m_nametags; }; diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 573b5e2d8..d45e386cf 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -171,7 +171,6 @@ void set_default_settings(Settings *settings) // Effects settings->setDefault("directional_colored_fog", "true"); - settings->setDefault("view_bobbing", "true"); settings->setDefault("inventory_items_animations", "false"); settings->setDefault("mip_map", "false"); settings->setDefault("anisotropic_filter", "false"); diff --git a/src/settings_translation_file.cpp b/src/settings_translation_file.cpp index d34665181..47601135d 100644 --- a/src/settings_translation_file.cpp +++ b/src/settings_translation_file.cpp @@ -242,7 +242,7 @@ fake_function() { gettext("Enable view bobbing"); gettext("Enables view bobbing when walking."); gettext("View bobbing factor"); - gettext("Multiplier for view bobbing.\nFor example: 0 for no view bobbing; 1.0 for normal; 2.0 for double."); + gettext("Enable view bobbing and amount of view bobbing.\nFor example: 0 for no view bobbing; 1.0 for normal; 2.0 for double."); gettext("Fall bobbing factor"); gettext("Multiplier for fall bobbing.\nFor example: 0 for no view bobbing; 1.0 for normal; 2.0 for double."); gettext("3D mode"); -- cgit v1.2.3 From 07c17db11450f235b67895ce39a5aef67458107d Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 3 Jul 2014 07:46:19 +0200 Subject: Add configurable key bindings for hotbar scrolling, and for changing volume. --- builtin/settingtypes.txt | 20 ++++++++++++++++++++ minetest.conf.example | 25 +++++++++++++++++++++++++ src/client/keys.h | 5 +++++ src/defaultsettings.cpp | 5 +++++ src/game.cpp | 35 +++++++++++++++++++++++++++++++++-- src/guiKeyChangeMenu.cpp | 24 ++++++++++++++++++------ src/settings_translation_file.cpp | 10 ++++++++++ 7 files changed, 116 insertions(+), 8 deletions(-) (limited to 'src/settings_translation_file.cpp') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 4b82a1e0e..61c04e616 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -186,6 +186,26 @@ keymap_fastmove (Fast key) key KEY_KEY_J # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 keymap_noclip (Noclip key) key KEY_KEY_H +# Key for selecting the next item in the hotbar. +# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 +keymap_hotbar_next (Hotbar next key) key KEY_KEY_N + +# Key for selecting the previous item in the hotbar. +# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 +keymap_hotbar_previous (Hotbar previous key) key KEY_KEY_B + +# Key for muting the game. +# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 +keymap_mute (Mute key) key KEY_KEY_M + +# Key for increasing the volume. +# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 +keymap_increase_volume (Inc. volume key) key + +# Key for decreasing the volume. +# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 +keymap_decrease_volume (Dec. volume key) key + # Key for toggling autorun. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 keymap_autorun (Autorun key) key diff --git a/minetest.conf.example b/minetest.conf.example index b9efc432a..6c6ce91b8 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -186,6 +186,31 @@ # type: key # keymap_noclip = KEY_KEY_H +# Key for selecting the next item in the hotbar. +# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 +# type: key +# keymap_hotbar_next = KEY_KEY_N + +# Key for selecting the previous item in the hotbar. +# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 +# type: key +# keymap_hotbar_previous = KEY_KEY_B + +# Key for muting the game. +# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 +# type: key +# keymap_mute = KEY_KEY_M + +# Key for increasing the volume. +# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 +# type: key +# keymap_increase_volume = + +# Key for decreasing the volume. +# See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 +# type: key +# keymap_decrease_volume = + # Key for toggling autorun. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key diff --git a/src/client/keys.h b/src/client/keys.h index 76ae38ff0..9478737f6 100644 --- a/src/client/keys.h +++ b/src/client/keys.h @@ -50,6 +50,11 @@ public: FREEMOVE, FASTMOVE, NOCLIP, + HOTBAR_PREV, + HOTBAR_NEXT, + MUTE, + INC_VOLUME, + DEC_VOLUME, CINEMATIC, SCREENSHOT, TOGGLE_HUD, diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 434c887e8..c583220bd 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -80,6 +80,11 @@ void set_default_settings(Settings *settings) settings->setDefault("keymap_freemove", "KEY_KEY_K"); settings->setDefault("keymap_fastmove", "KEY_KEY_J"); settings->setDefault("keymap_noclip", "KEY_KEY_H"); + settings->setDefault("keymap_hotbar_next", "KEY_KEY_N"); + settings->setDefault("keymap_hotbar_previous", "KEY_KEY_B"); + settings->setDefault("keymap_mute", "KEY_KEY_M"); + settings->setDefault("keymap_increase_volume", ""); + settings->setDefault("keymap_decrease_volume", ""); settings->setDefault("keymap_cinematic", ""); settings->setDefault("keymap_toggle_hud", "KEY_F1"); settings->setDefault("keymap_toggle_chat", "KEY_F2"); diff --git a/src/game.cpp b/src/game.cpp index 61282b463..9de473231 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1049,6 +1049,11 @@ void KeyCache::populate() key[KeyType::FREEMOVE] = getKeySetting("keymap_freemove"); key[KeyType::FASTMOVE] = getKeySetting("keymap_fastmove"); key[KeyType::NOCLIP] = getKeySetting("keymap_noclip"); + key[KeyType::HOTBAR_PREV] = getKeySetting("keymap_hotbar_previous"); + key[KeyType::HOTBAR_NEXT] = getKeySetting("keymap_hotbar_next"); + key[KeyType::MUTE] = getKeySetting("keymap_mute"); + key[KeyType::INC_VOLUME] = getKeySetting("keymap_increase_volume"); + key[KeyType::DEC_VOLUME] = getKeySetting("keymap_decrease_volume"); key[KeyType::CINEMATIC] = getKeySetting("keymap_cinematic"); key[KeyType::SCREENSHOT] = getKeySetting("keymap_screenshot"); key[KeyType::TOGGLE_HUD] = getKeySetting("keymap_toggle_hud"); @@ -2493,6 +2498,30 @@ void Game::processKeyInput() toggleFast(); } else if (wasKeyDown(KeyType::NOCLIP)) { toggleNoClip(); + } else if (wasKeyDown(KeyType::MUTE)) { + float volume = g_settings->getFloat("sound_volume"); + if (volume < 0.001f) { + g_settings->setFloat("sound_volume", 1.0f); + m_statustext = narrow_to_wide(gettext("Volume changed to 100%")); + } else { + g_settings->setFloat("sound_volume", 0.0f); + m_statustext = narrow_to_wide(gettext("Volume changed to 0%")); + } + runData.statustext_time = 0; + } else if (wasKeyDown(KeyType::INC_VOLUME)) { + float new_volume = rangelim(g_settings->getFloat("sound_volume") + 0.1f, 0.0f, 1.0f); + char buf[100]; + g_settings->setFloat("sound_volume", new_volume); + snprintf(buf, sizeof(buf), gettext("Volume changed to %d%%"), myround(new_volume * 100)); + m_statustext = narrow_to_wide(buf); + runData.statustext_time = 0; + } else if (wasKeyDown(KeyType::DEC_VOLUME)) { + float new_volume = rangelim(g_settings->getFloat("sound_volume") - 0.1f, 0.0f, 1.0f); + char buf[100]; + g_settings->setFloat("sound_volume", new_volume); + snprintf(buf, sizeof(buf), gettext("Volume changed to %d%%"), myround(new_volume * 100)); + m_statustext = narrow_to_wide(buf); + runData.statustext_time = 0; } else if (wasKeyDown(KeyType::CINEMATIC)) { toggleCinematic(); } else if (wasKeyDown(KeyType::SCREENSHOT)) { @@ -2560,11 +2589,13 @@ void Game::processItemSelection(u16 *new_playeritem) s32 dir = wheel; - if (input->joystick.wasKeyDown(KeyType::SCROLL_DOWN)) { + if (input->joystick.wasKeyDown(KeyType::SCROLL_DOWN) || + wasKeyDown(KeyType::HOTBAR_NEXT)) { dir = -1; } - if (input->joystick.wasKeyDown(KeyType::SCROLL_UP)) { + if (input->joystick.wasKeyDown(KeyType::SCROLL_UP) || + wasKeyDown(KeyType::HOTBAR_PREV)) { dir = 1; } diff --git a/src/guiKeyChangeMenu.cpp b/src/guiKeyChangeMenu.cpp index e85ee8271..ae53c56f9 100644 --- a/src/guiKeyChangeMenu.cpp +++ b/src/guiKeyChangeMenu.cpp @@ -58,6 +58,11 @@ enum GUI_ID_KEY_SNEAK_BUTTON, GUI_ID_KEY_DROP_BUTTON, GUI_ID_KEY_INVENTORY_BUTTON, + GUI_ID_KEY_HOTBAR_PREV_BUTTON, + GUI_ID_KEY_HOTBAR_NEXT_BUTTON, + GUI_ID_KEY_MUTE_BUTTON, + GUI_ID_KEY_DEC_VOLUME_BUTTON, + GUI_ID_KEY_INC_VOLUME_BUTTON, GUI_ID_KEY_DUMP_BUTTON, GUI_ID_KEY_RANGE_BUTTON, GUI_ID_KEY_ZOOM_BUTTON, @@ -109,7 +114,7 @@ void GUIKeyChangeMenu::removeChildren() void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { removeChildren(); - v2s32 size(620, 430); + v2s32 size(745, 430); core::rect < s32 > rect(screensize.X / 2 - size.X / 2, screensize.Y / 2 - size.Y / 2, screensize.X / 2 + size.X / 2, @@ -146,15 +151,17 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect < s32 > rect(0, 0, 100, 30); - rect += topleft + v2s32(offset.X + 115, offset.Y - 5); + rect += topleft + v2s32(offset.X + 120, offset.Y - 5); const wchar_t *text = wgettext(k->key.name()); k->button = Environment->addButton(rect, this, k->id, text); delete[] text; } - if(i + 1 == KMaxButtonPerColumns) - offset = v2s32(260, 60); - else + if ((i + 1) % KMaxButtonPerColumns == 0) { + offset.X += 230; + offset.Y = 60; + } else { offset += v2s32(0, 25); + } } { @@ -215,7 +222,7 @@ void GUIKeyChangeMenu::drawMenu() video::SColor bgcolor(140, 0, 0, 0); { - core::rect < s32 > rect(0, 0, 620, 620); + core::rect < s32 > rect(0, 0, 745, 620); rect += AbsoluteRect.UpperLeftCorner; driver->draw2DRectangle(bgcolor, rect, &AbsoluteClippingRect); } @@ -407,6 +414,11 @@ void GUIKeyChangeMenu::init_keys() this->add_key(GUI_ID_KEY_SNEAK_BUTTON, wgettext("Sneak"), "keymap_sneak"); this->add_key(GUI_ID_KEY_DROP_BUTTON, wgettext("Drop"), "keymap_drop"); this->add_key(GUI_ID_KEY_INVENTORY_BUTTON, wgettext("Inventory"), "keymap_inventory"); + this->add_key(GUI_ID_KEY_HOTBAR_PREV_BUTTON,wgettext("Prev. item"), "keymap_hotbar_previous"); + this->add_key(GUI_ID_KEY_HOTBAR_NEXT_BUTTON,wgettext("Next item"), "keymap_hotbar_next"); + this->add_key(GUI_ID_KEY_MUTE_BUTTON, wgettext("Mute"), "keymap_mute"); + this->add_key(GUI_ID_KEY_DEC_VOLUME_BUTTON,wgettext("Dec. volume"), "keymap_decrease_volume"); + this->add_key(GUI_ID_KEY_INC_VOLUME_BUTTON,wgettext("Inc. volume"), "keymap_increase_volume"); this->add_key(GUI_ID_KEY_CHAT_BUTTON, wgettext("Chat"), "keymap_chat"); this->add_key(GUI_ID_KEY_CMD_BUTTON, wgettext("Command"), "keymap_cmd"); this->add_key(GUI_ID_KEY_CMD_LOCAL_BUTTON, wgettext("Local command"), "keymap_cmd_local"); diff --git a/src/settings_translation_file.cpp b/src/settings_translation_file.cpp index 47601135d..383da33a7 100644 --- a/src/settings_translation_file.cpp +++ b/src/settings_translation_file.cpp @@ -77,6 +77,16 @@ fake_function() { gettext("Key for toggling fast mode.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Noclip key"); gettext("Key for toggling noclip mode.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); + gettext("Hotbar next key"); + gettext("Key for selecting the next item in the hotbar.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); + gettext("Hotbar previous key"); + gettext("Key for selecting the previous item in the hotbar.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); + gettext("Mute key"); + gettext("Key for muting the game.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); + gettext("Inc. volume key"); + gettext("Key for increasing the volume.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); + gettext("Dec. volume key"); + gettext("Key for decreasing the volume.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Autorun key"); gettext("Key for toggling autorun.\nSee http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3"); gettext("Cinematic mode key"); -- cgit v1.2.3