Commit Graph

2674 Commits

Author SHA1 Message Date
Anish c70a3671b0 Fixes VideostreamGDNative crash on audio_channel=0.
Added an if case to check if the mix_callback exists before running any
of the audio code.

Fixes: #28644
(cherry picked from commit f0757f31a4)
2019-09-26 14:48:53 +02:00
Bojidar Marinov 33b2d65f98 Fix slight issues with autocompletion and member lists in GDScript
Fixes #27152
Fixes #28591

(cherry picked from commit f9d9530902)
2019-09-26 14:48:16 +02:00
Andrii Doroshenko (Xrayez) 9114357bc5 Fix BMP loader to distinguish between compression types
Some of the values in compression enumeration represent uncompressed formats:

https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/4e588f70-bd92-4a6f-b77f-35d0feaf7a57

This allows the loader to proceed with uncompressed formats.
Note that loading compressed BMP's is still not supported.

(cherry picked from commit 422a8ffe02)
2019-09-26 14:42:51 +02:00
Andrii Doroshenko (Xrayez) f8dce7ade9 Fix BMP loader incorrectly interpreting color table size
Color table should exist for images with bit count <= 8. Importing 16-bit
BMP images could also likely have a color table but they're not currently
supported in Godot.

(cherry picked from commit d5c5aabbf2)
2019-09-26 14:42:13 +02:00
Andrii Doroshenko (Xrayez) 5dd3d3dadf Import 4/1 bit bmp images
Add some sanity checks according to bmp specification.

Read color table and index data within the same scope and
then simply extend the color palette.

This particular implementation has one limitation: not all 4/1 bit images
can be imported as it requires bit unpacking (size dimensions must be
a multiple of 8 for 1-bit and 2 (even) for 4-bit images).

(cherry picked from commit 6484da5721)
2019-09-26 14:41:27 +02:00
Shinryuuji c6ee986f53 Add support for 8bpp bmp files
(cherry picked from commit b9578b8f46)
2019-09-26 14:41:04 +02:00
Vasiliy Makarov d3422f8cf7 Fix pvrtc encoder
Always resize image to square of power2
Enable mipmaps only if original texture has it enabled
Fix #28534, #28541

(cherry picked from commit 4009d26022)
2019-09-24 09:00:46 +02:00
Andrii Doroshenko (Xrayez) f6c0078264 Fix TGA indexed images loaded with flipped color table
This fixes incorrect color table lookup where red and blue channels were flipped.

(cherry picked from commit d0f0f1f1cb)
2019-09-24 09:00:45 +02:00
ShyRed a849625813 Fix missing re-activation of bullet physics sleep feature
Adds the missing option of re-enabling the sleep feature in bullet physics once a body had the sleep feature disabled.

(cherry picked from commit 0877cf6419)
2019-09-24 09:00:45 +02:00
hbina085 8c2e10c393 Many fallthrough switch cases now have the FALLTHROUGH macro to tell the compiler that this is intended.
(cherry picked from commit 9f0c6a6009)
2019-09-24 09:00:45 +02:00
Rémi Verschelde fc18d637a8 Fix -Wimplicit-fallthrough warnings from GCC 8
Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional.
Can be replaced by `[[fallthrough]]` if/when we switch to C++17.

The warning is now enabled by default for GCC on `extra` warnings level
(part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet,
but we could enable it manually once we switch to C++11. There's no
equivalent feature in MSVC for now.

Fixes #26135.

(cherry picked from commit fc370b3feb)
2019-09-24 09:00:45 +02:00
qarmin 3b703d6707 Small fixes, mostly dupicated code
(cherry picked from commit 856a8226a5)
2019-09-24 09:00:45 +02:00
Aaron Franke 3a7aa3a0e4
[3.1] [Mono] Make all structs serializable
Manually cherrypicked from https://github.com/godotengine/godot/pull/31191
2019-08-19 19:23:18 -04:00
Aaron Franke 329817edad
[3.1] [Mono] Backport gitignore files
This avoids seeing files generated on master when switching to the 3.1 branch.
2019-08-19 19:19:21 -04:00
Rémi Verschelde a5082c010a doc: Fix invalid tags or properties introduced in recent cherry-picks 2019-07-29 17:55:20 +02:00
Michael Alexsander Silva Dias eef5dc98fa Update some dead links in the codebase
(cherry picked from commit 12ae7a4c02)
2019-07-29 17:47:46 +02:00
Remi Rampin 417f223e63 DOC: Fix spelling
See also https://github.com/godotengine/godot-docs/pull/2595

(cherry picked from commit ddfd67401f)
2019-07-29 17:47:46 +02:00
tree786 37e9ec842c doc: UPNP: Add example on how to open/close a port
I have added a small code sample to show how to automate the process of port forwarding (and closing after you are done).
Thanks to @mhilbrunner for explaining how to achieve t0his (see #18780)

(cherry picked from commit 2a63853720)
2019-07-29 17:47:46 +02:00
Rémi Verschelde 383c678a1e doc: Replace all [code]CONSTANT[/code] by new [constant CONSTANT] hyperlinks
(cherry picked from commit bc82781f7d)
2019-07-29 17:32:54 +02:00
Rémi Verschelde 7a97fd99c7 Properly expose all Error constants to scripting languages
(cherry picked from commit 1bf448dd87)
2019-07-29 17:32:54 +02:00
Rémi Verschelde 755896b036 doc: Complete and harmonize all _MAX constant descriptions
(cherry picked from commit 86ed7a9884)
2019-07-29 17:32:53 +02:00
Chaosus 67efb30f2a Extends wrapi/wrapf docs
(cherry picked from commit 4c137bebe8)
2019-07-29 16:17:43 +02:00
Rémi Verschelde 0893bb9a02 doc: Improve docs for Resource* classes
Also move module-specific classes to their own module's `doc_classes`
folder.

(cherry picked from commit 0764451dc5)
2019-07-29 16:05:01 +02:00
Tomasz Chabora dea5dafea5 Consistently wrap booleans in [code]
(cherry picked from commit b0846f60c9)
2019-07-29 14:54:32 +02:00
Rémi Verschelde df6a6a2004 doc: Sync classref with current source 2019-07-05 11:34:47 +02:00
Fabio Alessandrelli a24e681e1c Fix ENet incorrectly binding to wildcard.
Values were not properly initialized, and wildcard would evaluate to
true in most cases.

(cherry picked from commit abe2c22966)
2019-07-03 16:32:41 +02:00
hilfazer c7551515e3 autocomplete for enum values
(cherry picked from commit ca1932636f)
2019-06-27 09:59:58 +02:00
Aaron Franke a51257e2b7
[Mono] Change Atan2 arguments to Y X 2019-06-09 04:15:32 -04:00
Rémi Verschelde 5f683f7c17 SCons: Clean xatlas SCsub from thekla/poshlib defines
Those are not used in xatlas.

(cherry picked from commit eb155bc91a)
2019-06-04 11:11:21 +02:00
Fabio Alessandrelli 0e6a49a5bc Freetype clone env for no-SMID single file
Fix freetype build issue for javascript platform.
When disabling optimizations (SMID) in specific freetype, source files,
we need to make sure to copy all other CPPFLAGS, not just override them.

(cherry picked from commit 4f9408a0f8)
2019-06-04 11:08:40 +02:00
Fabio Alessandrelli 20a37529f5 Revert "Update libwebsockets to 3.1 (plus UWP patch)"
This reverts commit 90210c4862.

(cherry picked from commit be414e4476)
2019-06-04 11:05:33 +02:00
Rémi Verschelde f156b2e1cd doc: Make all tutorial links track "3.1" in 3.1 branch
See discussion in #29104.
2019-06-01 11:39:37 +02:00
Ryan Stein a31bbb4bd9 Add RegEx substitution testcase and fix relevant docs 2019-05-09 11:11:53 -04:00
Bastiaan Olij b2b112d703 Sort data exported to the api.json file for GDNative
(cherry picked from commit 0d2f3f4f50)
2019-05-02 14:40:03 +02:00
Ignacio Etcheverry 1c77481d3e Fix invalid mono log file name on Windows
(cherry picked from commit d93c354807)
2019-04-26 16:31:01 +02:00
Rémi Verschelde a24899ee25 Revert "Update freetype to 2.10.0"
This reverts commit 9e2cf9ef0b.

It caused this regression: 28335.
Fixes #28335.
2019-04-25 14:18:42 +02:00
Rémi Verschelde f7d5bee636 Revert "C#: Add DynamicGodotObject class"
This reverts commit 4c10a322d1.
2019-04-25 14:08:14 +02:00
Rémi Verschelde a485d862f1 doc: Sync classref with current source 2019-04-25 14:00:31 +02:00
Ignacio Etcheverry 39f1a110a1 Fix wrong method binds and registered class
(cherry picked from commit 2f3328a039)
2019-04-22 21:57:06 +02:00
Rémi Verschelde cab4921477 Revert "GDScript: Don't allow built-in scripts to use class_name"
This reverts commit 42514bfd80.

There is still an unsolved regression from this commit (#28002)
which needs to be addressed before cherry-picking this one.
2019-04-21 14:06:06 +02:00
Chaosus 6ab01490f5 Added smoothstep built-in function
(cherry picked from commit 514a3fb96a)
2019-04-20 23:30:56 +02:00
Chaosus 340bf6e80c Added direction_to method to vectors
(cherry picked from commit 55f3bd97a2)
2019-04-20 23:24:35 +02:00
Fabio Alessandrelli e0fe795433 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).

(cherry picked from commit 393e62b98a)
2019-04-20 23:15:02 +02:00
Ignacio Etcheverry 9b65bd18bc Fix memory leak introduced in bb6814a
(cherry picked from commit 0338e55a6e)
2019-04-20 23:10:55 +02:00
Ignacio Etcheverry 4c10a322d1 C#: Add DynamicGodotObject class
Expands to Object.call, Object.set and Object.get for accessing members. This means it can also access members from scripts written in other languages, like GDScript.

(cherry picked from commit bb6814aef0)
2019-04-20 23:10:43 +02:00
Ignacio Etcheverry 17cb8878c7 Workaround for syntax highlighting issue in GitHub
(cherry picked from commit 7a4cf6339d)
2019-04-20 23:01:08 +02:00
ForLoveOfCats 24ac1439e8 Mono: Convert all items to string before printing
(cherry picked from commit 25f563c4c8)
2019-04-20 23:00:21 +02:00
Nuno Cardoso fce901ce40 Fixes #17233 allowing C# to override _GetPropertyList
(cherry picked from commit d011c8e109)
2019-04-20 22:56:42 +02:00
Ignacio Etcheverry c7e5b371be Mono: Logging improvements
- The default log level in debug builds is now 'info' instead of 'debug'.
- Add option to specify a different log level with the 'GODOT_MONO_LOG_LEVEL' environment variable.
- The name of log files is now a readable date and time.
- Always print the log file path (previously it was printed only it in verbose mode).

(cherry picked from commit 20e5e2fec7)
2019-04-20 22:49:26 +02:00
volzhs 9e2cf9ef0b Update freetype to 2.10.0
(cherry picked from commit a6300b454d)
2019-04-20 22:42:45 +02:00