Commit Graph

497 Commits

Author SHA1 Message Date
e33764744c Added generator audio stream, and spectrum analyzer audio effect
Made AudioFrame and Vector2 equivalent for casting.
Added ability to obtain the playback object from stream players.
Added ability to obtain effect instance from audio server.
2019-04-10 12:58:06 -03:00
c8994b56f9 Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
3cf2bdbd84 Merge pull request #27506 from Chaosus/astar
Added functions to AStar for disable/enable points to effectivly create obstacles
2019-04-08 12:19:51 +02:00
7f3373d79f Merge pull request #27452 from Chaosus/direction_to
Added method to retrieve a direction vector from one point to another
2019-04-08 12:00:54 +02:00
d211aff777 Merge pull request #27231 from Chaosus/smoothstep
Added smoothstep built-in function
2019-04-08 10:03:42 +02:00
cc71fb2308 Added functions to AStar for disable/enable points 2019-04-08 09:28:03 +03:00
514a3fb96a Added smoothstep built-in function 2019-04-07 14:11:26 +03:00
134be5c728 Merge pull request #27043 from Chaosus/randfn
Added gaussian distribution function to RNG
2019-04-07 08:32:04 +03:00
3b697ce8d5 Merge pull request #26486 from marxin/fix-Wdeprecated-copy
Fix new GCC 9 warnings: -Wdeprecated-copy.
2019-04-06 18:21:18 +02:00
34ea708596 Merge pull request #26699 from Schroedi/fix-line-circle-intersect
Fixes Geometry.segment_intersects_circle working only one way.
2019-04-06 12:42:16 +02:00
55f3bd97a2 Added direction_to method to vectors 2019-04-05 17:09:57 +03:00
8460d0678c Small fixes to static analyzer bugs 2019-04-04 22:00:16 +02:00
29a1202d39 Merge pull request #27171 from Chaosus/randfix
Properly setup seed in RNG
2019-04-01 17:17:30 +02:00
e3bd84fa57 Merge pull request #27485 from Faless/io/encode_decode_safety_pr
Safer encode/decode variant.
2019-04-01 17:00:40 +02:00
dee98d3b6d Some improvements to is_equal_approx, restored Quat operator. 2019-04-01 11:11:02 -03:00
393e62b98a Add object encoding param to serialization methods
Network peers get_var/put_var
File get_var/store_var
GDScript/Mono/VisualScript bytes2var/var2bytes
Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding.

Break ABI compatibaility (API compatibility for GDNative).
2019-04-01 15:53:19 +02:00
6280be46a6 Properly setup seed in RNG 2019-03-27 19:37:25 +03:00
6232e7eed3 Add missing methods to Rect2i
Replace inline with _FORCE_INLINE_ in short methods.
Remove unused and redundant method no_area() as we already have has_no_area().
Add grow_individual() grow_margin() and expand() to Rect2i.
2019-03-21 17:35:01 +01:00
5f1b9a2313 Improved uniformity of RandomPCG::randf.
When generating single precision floats, Godot casts a uint32_t to float,
causing uniformity loss.

This new randf, inspired by T. R. Campbell's random_real, samples the output
of rand as the fraction part of an infinite binary number, with some tricks
to reduce ops and branching. This method provides "good enough" uniformity at
decent speed, for floats greater than 2^-64. Smaller numbers are floored to 0.
2019-03-19 18:14:58 +08:00
5f137925dc Added normally distributed generation function to RNG 2019-03-17 08:09:46 +03:00
aff3dd36ba Merge pull request #25495 from IronicallySerious/fix-expand-macros
Fix parameterised macros in core. Addresses #25488
2019-03-16 11:20:52 -07:00
bce56cf337 Fix -Wc++11-extensions warning after #26737
Fixes #26769.
2019-03-07 22:48:00 +01:00
4eccb58bc5 Fixed get_seed() not returning the correct seed. 2019-03-07 02:45:18 -06:00
dcbe55a1fa Fixes Geometry.segment_intersects_circle working only one way. 2019-03-06 12:28:54 +01:00
078b869d9a TileSet/TileMap: Decompose solid non-convex polygons into convexes. Real fix for #24003 2019-03-04 21:03:10 -03:00
6be77da7eb Fix new GCC 9 warnings: -Wdeprecated-copy. 2019-03-02 14:37:02 +01:00
33c6b0ec1a Scale quickhull tolerance with mesh size
Taken from three.js's implementation. Tested with a wide variety of
meshes.
2019-03-01 20:58:39 +00:00
3299045988 Remove setting that caused is_inside_tree() errors on doppler tracking enabled. 2019-02-26 09:16:23 -03:00
a32b26dfa2 Several fixes to make GLES2 on HTML5 work much better.
Changed math class error reporting to be a bit less paranoid.
2019-02-25 21:47:29 -03:00
bc4d781277 Fix wrapi to use int64_t instead int 2019-02-25 10:51:04 +03:00
18b90508a1 Fix crash when using wrapi() with a range of zero
`wrapi()` and `wrapf()` will now return the value of
the `min` parameter if the range is equal to zero.
2019-02-23 16:16:32 +01:00
8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
c496781bf6 fixed AStar improper point deletion (leads to crash) 2019-02-20 17:24:58 +01:00
54b95b6c5a Add FRUSTUM camera mode, allowing tilted frustums
This new camera mode makes it easy to create tilted frustums for mirror
or portal effects.

This work was kindly sponsored by IMVU.
2019-02-19 17:48:08 +01:00
4121df235e Fix parameterised macros in core. Addresses #25488
This adds the saves the programmer of doing something like SWAP(x++, y--)
and getting the wrong result unless the parameters are evaluated
before use.
2019-02-18 22:08:42 +05:30
f6fcbcfe9e Merge pull request #25680 from Chaosus/random_fix
Fix random generation, to not always retrieve 0 after seed()
2019-02-16 23:24:02 +01:00
3b6d05db3e Fix typo for randd and randf
* And improve documentation according to issue #25938
2019-02-16 21:05:18 +01:00
55ca2a7c88 Merge pull request #25821 from akien-mga/sync-class-and-filenames
Ensure classes match their header filename
2019-02-13 08:49:39 +01:00
06df7b0963 [Core] Transform2D add set_scale and fix set_rotation
Note: These are still not exposed to GDScript
2019-02-12 17:59:29 -05:00
b7cc2bb1e2 Core: Ensure classes match their header filename
Also drop some unused files.

Renamed:
- `core/dvector.h` -> `pool_vector.h`
- `core/io/resource_import.h` -> `resource_importer.h`
- `core/sort.h` -> `sort_array.h`
- `core/string_db.h` -> `string_name.h`

Dropped:
- `core/allocators.h`
- `core/os/shell.h`
- `core/variant_construct_string.cpp`
2019-02-12 13:34:25 +01:00
f946b28f75 Fix random generation, to not retrieve 0 after seed() 2019-02-10 14:16:02 +03:00
3f837d5cc5 [Core] Rename Matrix3 file to Basis
The code already referred to "Basis", it's just the file name that was different for some reason.
2019-02-09 14:42:23 -05:00
e34a4c63a7 Fix AStar crashing with large (>1e30) estimated values
Fixes #21601
2019-01-30 20:22:08 +02:00
a0581cca1f Revert "Revert "Update random_pcg.h""
This reverts commit 6f704c338a.

Sorry about this, this was a test and not meant to be pushed to master. :/
2019-01-23 10:36:36 +01:00
6f704c338a Revert "Update random_pcg.h"
This reverts commit 64e584a97e.
2019-01-23 10:30:18 +01:00
35466475fe Fix HTML5 build warning 2019-01-20 00:12:50 +01:00
9ddf1115bc Revert "fixed invalid implementation of Plane::intersects_segment and Plane::intersects_ray" 2019-01-13 11:06:34 +01:00
2c36078be4 fixed invalid implementations of Plane::intersects_segment and Plane::intersects_ray 2019-01-12 00:38:16 +03:00
e46f28e02d Removed splits in Polygon editor, replace by internal vertices and polygon support. 2019-01-08 19:11:08 -03:00
64e584a97e Update random_pcg.h
little fix to function types
2019-01-07 23:13:16 +01:00