Commit Graph

4073 Commits

Author SHA1 Message Date
Craig Robbins
c16b1e2639 Optimise VoxelManipulator::copyFrom
~3-4x faster

This indirectly optimises MapBlock:copyTo() which in turn improves performance of MeshMakeData::fill()
2014-12-04 23:37:04 +10:00
Craig Robbins
f6912f4241 Right mouse button behaviour for craft/inventory If right mousebutton clicked once then don't drop single items into slots. If right mouse button has been clicked and held a second time, drop items as the mouse is moved. In the second case (automatically drop/place items as mouse is moved) only auto-drop into blank slots, or slots that contain the same item. 2014-12-04 23:30:53 +10:00
Calinou
d7b3046cf6 Make dropped items larger and rotate faster
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-12-04 21:10:12 +10:00
kwolekr
f0cd59034c Settings: Various setting group fixes and enhancements
- Remove blank setting values when setting has a group
 - Pair setting values with groups in file when possible
 - Preserve user-set whitespace in setting objects
 - Delete setting value when setting NoiseParams group
 - Delete overwritten groups outside of lock
2014-12-04 03:20:07 -05:00
paramat
0a5373d400 Add definable node_stone to biome API, mgv5, mgv7. Reduce and correct depth of mgv7 biomes. l_mapgen.cpp: add '#include mapgen_v5.h' because '#include mapgen_v7' is there. Improve underwater grass hack 2014-12-03 19:45:29 -05:00
kwolekr
fcb1ea903f Settings: Fix getNoiseParamsFromValue() 2014-12-02 21:09:16 -05:00
kwolekr
68c799bf99 Use setting groups for NoiseParams
Add format example to minetest.conf.example
Add Settings::setU16()
Throw exception on attempted access of NULL settings groups
2014-12-02 04:03:37 -05:00
Kahrl
78103e622c Fix style of comment in minetest.conf.example 2014-12-01 21:47:22 +01:00
Kahrl
e402aa8984 Add fontengine.cpp to Android.mk 2014-12-01 21:22:23 +01:00
sapier
93aab0362c Fix settings callback "call" lost on rebase 2014-12-01 19:47:57 +01:00
Craig Robbins
691b18c41b Fix node 0,0,0 being highlighted when enable_node_highlighting == false
Without this patch node 0,0,0 is highlighted when enable_node_highligting is false
There is a minor lighting issue remaining, however it seems to be related to a different bug (https://github.com/minetest/minetest/issues/1887)
2014-12-01 22:13:21 +10:00
Craig Robbins
d4f42938a5 Fix build
Note: this does not fix the warnings generated by clang
2014-12-01 15:17:47 +10:00
kwolekr
360660947b LuaSettings: Sanitize setting name strings 2014-11-30 19:01:54 -05:00
Kahrl
16781da4f9 Fix segfault at exit caused by non grabbed font 2014-11-30 23:21:14 +01:00
kwolekr
175b7a28e5 settings: Add setting groups and multiline entries 2014-11-30 16:11:21 -05:00
sapier
39162de15a Make hud use fontengine too
Fix non coding style conforming glb_fontengine to g_fontengine
Fix fonts never been deleted due to grabbed to often
2014-11-30 18:06:54 +01:00
Zefram
d1d6a97b1c Scale form elements consistently
The ratios between the sizes of form elements, including text, is now
fixed, aside from variations caused by rounding.  This makes form layout
almost fully predictable, and particularly independent of player's
screen size.  The proportions of non-text elements are the traditional
proportions.

For compatibility, the way in which element positions and sizes are
specified remains unchanged, in all its baroqueness, with one exception.
The exception is that the position of a label[] element is now defined
in terms of the vertically center of the first line of the label,
rather than the bottom of the first line of the label.  This change
allows a label to be precisely aligned with button text or an edit box,
which are positioned in a centering manner.  Label positioning remains
consistent with the previous system, just more precisely defined.

Make multi-line label[] elements work properly.  Previously the code set
a bounding rectangle assuming that there would be only a single line,
and as a result a multi-line label would be cut somewhere in the middle
of the second line.  Now multi-line labels not only work, but have
guaranteed line spacing relative to inventory slots, to aid alignment.

Incidentally fix tabheader[] elements which were being constrained to
the wrong width.

Given an unusually large form, in variable-size mode, the form rendering
system now chooses a scale that will fit the entire form on the screen,
if that doesn't make elements too small.  Fixed-size forms, including the
main menu, are have their sizes fixed in inch terms.  The fixed size for
fixed-size forms and the preferred and minimum sizes for variable-size
forms all scale according to the gui_scaling parameter.
2014-11-30 17:50:09 +01:00
sapier
dceb9f7d60 Implement proper font handling 2014-11-30 17:50:09 +01:00
kwolekr
25945dc539 noise: Throw exception on noise allocation failure 2014-11-29 16:52:45 -05:00
SmallJoker
a3e019c4f6 Fix MSVC compiling error (argc/argv not available to pass to init_gettext)
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-29 22:31:40 +10:00
Ciaran Gultnieks
c30346ea30 Improve Lua API documentation
Changes:
  * Add extra documentation for remove_item.

    This isn't as silly as it sounds: iterate a list containing items with
    unique metadata each, and remove_item the first one you find, placing
    into a different - fine, except the remove will invariably remove the
    wrong one, leading to items being duplicated and others destroyed.

    Arguably it's a bug, and Inventory::removeItem should actually remove
    the item you tell it to. (i.e. if the passed ItemStack has metadata,
    match it). But it seems reasonable to just document the behaviour
    more clearly.

 * Improve string_to_pos documentation.
 * Clarify dig_node documentation (return value).
 * Better on_step documentation.
 * get_nodemeta -> get_meta.
 * Other minor fixes.
2014-11-28 18:35:45 -05:00
Rui
2b1a151226 Update minetest.po (Japanese) 2014-11-28 23:09:58 +10:00
Craig Robbins
edb125837c Fix regression with command line --go option 2014-11-28 22:48:46 +10:00
SmallJoker
6a43b3af09 Add minetest.copy_table(table) To get rid off the "table references"
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-27 18:19:01 +10:00
Ciaran Gultnieks
77137a92cf Don't corrupt stepheight when setting other properties 2014-11-26 20:02:48 +01:00
Kahrl
264d740c9d Wield: always obey anisotropic_filter setting, not just for hi res textures 2014-11-26 19:54:04 +01:00
Kahrl
571ba5d9c5 EMF_USE_MIP_MAPS was introduced in Irrlicht 1.8, don't use in 1.7.3 or below
This is not optimal as it will cause minor graphical glitches for
Irrlicht 1.7 users, but at least it fixes the build.
2014-11-26 19:17:50 +01:00
Sokomine
9f9279008c added enable_build_where_you_stand option
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-27 01:07:11 +10:00
Kahrl
ec5188a49a Wieldmesh: don't force anisotropic filtering on, instead disable mipmaps
This should fix #1844. Thanks to oleastre for making the first version
of this commit (#1848).
2014-11-26 15:17:17 +01:00
Craig Davison
dbae8a8854 Fix some undeclared global variables 2014-11-26 22:50:08 +10:00
rubenwardy
8df8554fce Only set the camera update keymap when using a debug build
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-26 21:53:01 +10:00
Kodexky
9aaf67ebe0 Fix Android main menu crash, and user data directory check.
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-26 18:11:08 +10:00
Calinou
1c9f05d792 Increase step smoothing to fit 1:1 stairs (works well on slabs too)
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-26 17:28:02 +10:00
Craig Robbins
26cf98ccfc Fix client "double saving" simple singleplayer local maps 2014-11-26 00:49:54 +10:00
KodexKy
5413ed1195 Fixes for Android build errors. Enable sensor landscape rotation.
Fix typo in Android Makefile ndk path.
Fix touchscreen parts of game.cpp to work after Zeno's refactor.
Fix isdigit and isspace overload conflict with Android Irrlicht in string.h
Enable sensor landscape rotation in Android Manifiest.
Add mapgen v5 to Android build.
Fix Makefile not checking leveldb.

Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-25 13:28:51 +10:00
dvere
9878e8de4f Adjust the values of dirs1 and dirs2 so that rotate_and_place orients textures correctly
According to doc/lua_api.txt if paramtype2 == "facedir" the two least significant bits of parm2 orient the texture around the axis. For dirs1 (looking at a wall) these would be 0, 1, 2, 3 and for dirs2 (looking at the ceiling) 2, 1, 0, 3
2014-11-25 12:44:47 +10:00
ShadowNinja
a1db83e93f Make duplicate warning checks file and line specific 2014-11-23 16:34:49 -05:00
sapier
0dcc4b251f Fix console spaming by debug function on mod checking for global variable to exist. 2014-11-23 15:24:37 +01:00
RealBadAngel
0164483310 Port createForsythOptimizedMesh from Irrlicht 1.8
Mesh rotation helpers.
2014-11-23 00:51:08 +01:00
Craig Robbins
21464639b3 Fix regression with USE_REDIS (refactor_main) 2014-11-23 01:12:25 +10:00
Craig Robbins
d6cc0d8223 refactor main.cpp 2014-11-23 00:27:02 +10:00
Craig Robbins
cb2d467665 Fix smooth lighting (ambient occlusion)
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-22 21:58:00 +10:00
Pavel Puchkin
f7f24d1470 Fix compiling if no endian.h found
f7d6509 introduces error when no endian.h found in the system.

Since "CHECK_INCLUDE_FILE" returns empty string instead of "0", when
"cmake_config.h" is generated it has "#define CMAKE_HAVE_ENDIAN_H " line.
Later we have "#define HAVE_ENDIAN_H CMAKE_HAVE_ENDIAN_H" in the
"config.h", an thus "HAVE_ENDIAN_H" is also empty sting. Because of
this, "#if HAVE_ENDIAN_H" is incorrect preprocessor directive.

Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-22 21:56:38 +10:00
ShadowNinja
6c52de88fb Update credits menu 2014-11-21 11:35:29 -05:00
Rafael Reilova
f7d65091f8 serialize.h: use machine native byte swapping if available, fall-back to previous generic method if not (supported for GCC using endian.h, detection done in cmake) write/readARGB8() - just write 32-bit color in one op, instead of 4 1-byte ops cleanup: removed unneeded buffer init for some serialize-out functions use a #define for the fixed point factor in read/writeF1000()
nodemetadata.cpp, nodetimer.cpp
	optimzation: simpler deserialize node position method

staticobject.cpp:
	cleanup: use util/serialize.h inlines instead of its own de/serialization

serialize.cpp:
	minor optimization/cleanup: avoid generation of unneeded string temporary

CMakeLists.txt, cmake_config.h.in: detection of endian.h

config.h: added HAVE_ENDIAN_H

Commits due to feedback squashed

Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-21 22:33:48 +10:00
Craig Robbins
d406ac994b Optimise functions from CNodeDefManager and VoxelManipulator
CNodeDefManager::get()
VoxelManipulator::addArea()
2014-11-21 14:56:45 +10:00
Craig Robbins
ea404979e1 Optimise getTileInfo()
getTileInfo() ~1.5x faster
getSmoothLight ~2.0x faster
2014-11-21 14:56:45 +10:00
paramat
fcdb1a8fc2 Mgv5 1 up 1 down overgeneration for biome surface continuity 2014-11-20 23:13:09 -05:00
paramat
d39887dadd Mgv5 get ground level at point function. Fast spawn player version 2014-11-20 21:07:20 -05:00
ShadowNinja
c4e393deea Simplify loading of Android version of menu 2014-11-20 15:37:20 -05:00