Before, this lua code led to a crash:
local pcg = PcgRandom(42)
local value = pcg:next()
This was because if you called s32 PcgRandom::range(min, max) with the
minimum and maximum possible values for s32 integers (which the lua
binding code did), u32 PcgRandom::range(bound) got called with 0 as the
bound. The bound however is one above the maximum value, so 0 is a "special"
value to pass to this function. This commit fixes the lua crash by
assigning the RNG's full range to the bound 0, which is also fits to the
"maximum is bound - 1" principle, as (u32)-1 is the maximum value in the
u32 range.
When tunnels entirely above ground were avoided, the
missing pseudorandom calls changed the allowed caves.
Now, above ground tunnels are not placed while
still running all previous pseudorandom calls.
Previously, sound failed due to errors with hardfp abi build
instructions. As the problem couldn't be found, the softfp
compatible abi was chosen instead.
This move will cause a small performance overhead, but due to the
abi being armeabi-v7a, the internal calculations will still be done
using the FPU.
We also fix some issues with ABI information passing. However, the
fixes aren't sufficient to get sound working.
The patch also fixes an issue with the gitignore file.
Multiplying by a factor of 1/1000.f (rather than dividing by 1000.f) directly
introduces an error of 1 ULP. With this patch, an exact comparison of a
floating point literal with the deserialized F1000 form representing it is now
guaranteed to be successful.
In addition, the maxmium and minimum safely representible floating point
numbers are now well-defined as constants.
Before, android_version.h got changed at every new commit. Now, we
only change it with new minetest releases. Analogous to how cmake
does it, we add an android_version_githash.h file that communicates
the git hash to C++ code.
Also, unify VERS_MAJOR, VERS_MINOR and VERS_PATCH variable
calculation inside the whole makefile.