3998 Commits

Author SHA1 Message Date
SmallJoker
30a051a904 Fix MSVC build
Note: The unit test was technically incorrect for all platforms but passes due to implicit casting
2014-12-05 16:09:53 +10:00
RealBadAngel
dbab810924 Recalculate normals for mesh #0. Fix for issue #1902. 2014-12-05 01:05:18 +01:00
Craig Robbins
b6235a1aa3 (INTERIM) Make sizes of the font in formspecs consistent and not so large
Until a permanent fix can be developed
2014-12-05 02:35:21 +10:00
Craig Robbins
b986657bd0 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
a72877a132 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
2e6eeedeb4 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
b932f38797 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
896f946cec 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
0115c946d8 Settings: Fix getNoiseParamsFromValue() 2014-12-02 21:09:16 -05:00
kwolekr
3eee8323c9 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
31e5a6cb00 Fix style of comment in minetest.conf.example 2014-12-01 21:47:22 +01:00
Kahrl
8bc9094f3c Add fontengine.cpp to Android.mk 2014-12-01 21:22:23 +01:00
sapier
898864943a Fix settings callback "call" lost on rebase 2014-12-01 19:47:57 +01:00
Craig Robbins
203dfd7e80 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
74c5e74422 Fix build
Note: this does not fix the warnings generated by clang
2014-12-01 15:17:47 +10:00
kwolekr
0132801247 LuaSettings: Sanitize setting name strings 2014-11-30 19:01:54 -05:00
Kahrl
69eb405345 Fix segfault at exit caused by non grabbed font 2014-11-30 23:21:14 +01:00
kwolekr
fa458443f0 settings: Add setting groups and multiline entries 2014-11-30 16:11:21 -05:00
sapier
71a289a979 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
dfee893fae 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
794909cbe8 Implement proper font handling 2014-11-30 17:50:09 +01:00
kwolekr
019cb29665 noise: Throw exception on noise allocation failure 2014-11-29 16:52:45 -05:00
SmallJoker
273792497a 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
e45c914ce5 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
435681e57b Update minetest.po (Japanese) 2014-11-28 23:09:58 +10:00
Craig Robbins
2a70791101 Fix regression with command line --go option 2014-11-28 22:48:46 +10:00
SmallJoker
e42349140d 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
879bf6a6be Don't corrupt stepheight when setting other properties 2014-11-26 20:02:48 +01:00
Kahrl
ee0a70ff80 Wield: always obey anisotropic_filter setting, not just for hi res textures 2014-11-26 19:54:04 +01:00
Kahrl
41ae053ce8 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
34daa9f25e 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
e0516491ee 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
f7c264cec7 Fix some undeclared global variables 2014-11-26 22:50:08 +10:00
rubenwardy
4d24b3d54d 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
1cfa499e89 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
34eca4c0bb 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
cc53cc316c Fix client "double saving" simple singleplayer local maps 2014-11-26 00:49:54 +10:00
KodexKy
a176874dd9 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
4e0dc35971 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
cc2855e59b Make duplicate warning checks file and line specific 2014-11-23 16:34:49 -05:00
sapier
6a043635dc Fix console spaming by debug function on mod checking for global variable to exist. 2014-11-23 15:24:37 +01:00
RealBadAngel
a1b22f2377 Port createForsythOptimizedMesh from Irrlicht 1.8
Mesh rotation helpers.
2014-11-23 00:51:08 +01:00
Craig Robbins
56bb048150 Fix regression with USE_REDIS (refactor_main) 2014-11-23 01:12:25 +10:00
Craig Robbins
3471011165 refactor main.cpp 2014-11-23 00:27:02 +10:00
Craig Robbins
26b19607d9 Fix smooth lighting (ambient occlusion)
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-22 21:58:00 +10:00
Pavel Puchkin
2cb61120aa 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
27a7170c55 Update credits menu 2014-11-21 11:35:29 -05:00
Rafael Reilova
55e0686e6d 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
47d1207aa8 Optimise functions from CNodeDefManager and VoxelManipulator
CNodeDefManager::get()
VoxelManipulator::addArea()
2014-11-21 14:56:45 +10:00
Craig Robbins
680a729b90 Optimise getTileInfo()
getTileInfo() ~1.5x faster
getSmoothLight ~2.0x faster
2014-11-21 14:56:45 +10:00