Commit graph

4662 commits

Author SHA1 Message Date
Fabio Alessandrelli 502ff74fee
Merge pull request #43536 from jonbonazza/hmac
feat: HMAC support in Crypto APIs
2020-12-03 11:08:16 +01:00
Rémi Verschelde 2a0de6d88c
Merge pull request #44044 from Wavesonics/xatlas-options-master
xatlas should be using the options configured here
2020-12-02 20:53:54 +01:00
Adam Brown 9367b1d6c1 xatlas should be using the options configured here
It was using the defaults by mistake
2020-12-02 09:22:35 -08:00
reduz 70f5972905 Refactored Mesh internals and formats.
-Changed how mesh data is organized, hoping to make it more efficient on Vulkan and GLES.
-Removed compression, it now always uses the most efficient format.
-Added support for custom arrays (up to 8 custom formats)
-Added support for 8 weights in skeleton data.
-Added a simple optional versioning system for imported assets, to reimport if binary is newer
-Fixes #43979 (I needed to test)

WARNING:

-NOT backwards compatible with previous 4.x-devel, will most likely never be, but it will force reimport scenes due to version change.
-NOT backwards compatible with 3.x scenes, this will be eventually re-added.
-Skeletons not working any longer, will fix in next PR.
2020-12-02 13:07:59 -03:00
Rémi Verschelde d1231be1c8
Merge pull request #41095 from ThakeeNathees/GDScript-Documentation
GDScript(2.0) Documentation generation system
2020-12-02 14:15:38 +01:00
George Marques 0019aa940e
Merge pull request #41773 from ThakeeNathees/default-argument-override-buf-fix
GDScript default argument override bug fix
2020-12-02 09:54:47 -03:00
Adam Brown 23c754360a xatlas: Sync with upstream 5571fc7
Fixes #44017 by changing the `normalize()` function to check for non-negative rather than non-zero via an epsilon check.
2020-12-02 00:17:45 -08:00
Thakee Nathees 42bfa16996 Refactor DocData into core and editor (DocTools) parts 2020-12-02 00:48:39 +05:30
Rémi Verschelde 04bef80b42
Merge pull request #43992 from vnen/variant-internal-object-set
Fix VariantInternal initialization and setting of object
2020-11-30 20:22:15 +01:00
Rémi Verschelde 8f3dde18f1
Merge pull request #43504 from AndreaCatania/gds_fix_2
Implement proper error print, Fixes a crash when no error messages are generated by the analyser.
2020-11-30 19:10:38 +01:00
George Marques 029fd88adb
Fix VariantInternal initialization and setting of object
- Initialize Object pointer to nullptr so it's not used by mistake.
- When setting an Object check if it's a reference so refcounting works
  as intended.
2020-11-30 14:49:52 -03:00
George Marques a604e72dc9
GDScript: Don't construct ref values in compiler
Values that are passed by reference are not suited for being constructed
at compile time because in this case they would be shared across all the
construction statements.
2020-11-30 09:42:22 -03:00
Thakee Nathees d0e7d9b62f Documentation generation for GDScript
- ClassDoc added to GDScript and property reflection data were extracted
from parse tree

- GDScript comments are collected from tokenizer for documentation and
applied to the ClassDoc by the GDScript compiler

- private docs were excluded (name with underscore prefix and doesn't
have any doc comments)

- default values (of non exported vars), arguments are extraced from the
parser

- Integrated with GDScript 2.0 and new enums were added.

- merge conflicts fixed
2020-11-29 19:45:36 +05:30
Thakee Nathees d42b305377 GDScript default argument override bug fix
Fix: #41766
2020-11-28 20:42:57 +05:30
AndreaCatania 40403b02fb Implement proper error print, Fixes a crash when no error messages are generated by the analyser. 2020-11-28 13:47:52 +01:00
Rémi Verschelde a09846e015
Merge pull request #42109 from EricEzaM/PR/input-and-shortcuts-rework
Shortcuts rework - fixed issues with input propagation and triggering of unwanted shortcuts.
2020-11-28 09:04:25 +01:00
Rémi Verschelde a6751e6c58
Merge pull request #41100 from bruvzg/ctl_text_server_interface
[Complex Text Layouts] Implement TextServer interface.
2020-11-28 09:03:15 +01:00
Rémi Verschelde d395f70828
Merge pull request #43500 from AndreaCatania/gds_fixes
Fixes crash when parse_expression returns nullptr.
2020-11-27 16:37:45 +01:00
Rémi Verschelde 9f9b269d32
Merge pull request #43914 from ThakeeNathees/range-argument-type-bug-fix
GDScript: range function type check bug fixed
2020-11-27 15:08:02 +01:00
George Marques cf7a6be1db
Merge pull request #43226 from mateosss/unreachable-prop-crash
Fix crash due to unreachable code in properties
2020-11-27 11:03:20 -03:00
Thakee Nathees f0613a91be GDScript range function typecheck bug fixed
Fix: #43586
2020-11-27 18:23:35 +05:30
Jon Bonazza d5925fd522 feat: HMAC support in Crypto APIs 2020-11-26 18:39:56 -08:00
George Marques fbb806fd68
Unregister GDScriptFunctionState class
This is not user accessible anymore so it does not need to be show in
documentation.
2020-11-26 21:39:54 -03:00
Rémi Verschelde ed2f84735b
Merge pull request #43895 from vnen/gdscript-operators-fix
GDScript: Improve handling of operators
2020-11-26 21:19:31 +01:00
Rémi Verschelde e5ff2d0ffd
Merge pull request #43894 from vnen/gdscript-some-fixes
Some GDScript fixes
2020-11-26 18:56:42 +01:00
George Marques 0cb185927c
GDScript: Improve handling of operators
- Use the new functions in Variant to determine the validity and resulting
  type of operators.
- Split the operator function in codegen between binary and unary, since
  the unary ones have now a special requirement of having the second
  argument to be the NIL type when requesting info.
2020-11-26 14:41:55 -03:00
George Marques 627ca7f30e
GDScript: Don't clear depended parsers too soon
It can wait until the analyzer itself is destructed, otherwise other
phases might be using freed parsers.
2020-11-26 14:14:29 -03:00
George Marques 817fb3d702
GDScript: Give an error if dependency can't be parsed
Otherwise this may lead to a crash when the dependency is not present.
2020-11-26 12:27:48 -03:00
bruvzg 99666de00f
[Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
bruvzg 07d14f5bb8
[Complex Text Layouts] Implement GDNative interface for TextServer. 2020-11-26 13:55:29 +02:00
bruvzg 200828276e
[Complex Text Layouts] Implement ICU / HarfBuzz based TextServer module. 2020-11-26 13:55:28 +02:00
bruvzg b9f441e81e
[Complex Text Layouts] Add third-party TextServer dependencies (ICU, HarfBuzz, Graphite). 2020-11-26 13:55:27 +02:00
bruvzg 493da99269
[Complex Text Layouts] Implement TextServer interface. Implement Fallback TextServer. 2020-11-26 13:55:26 +02:00
Jordan Schidlowsky afa15c5f15 fixes crash for OPCODE_CAST_TO_NATIVE opcode in gdscript disassemlber 2020-11-25 16:26:32 -06:00
Rémi Verschelde fc28de64c4
Merge pull request #43856 from vnen/gdscript-some-fixes
A couple of GDScript fixes
2020-11-25 17:13:41 +01:00
Rémi Verschelde a5ee8d881f
Merge pull request #43775 from vnen/gdscript-fix-stack
GDScript: Fix mishandling of stack pointers
2020-11-25 16:25:51 +01:00
George Marques ed3d8f31df
GDScript: Fix return of cast expression on compilation
It was mistakenly returning the source instead of the result.
2020-11-25 11:37:51 -03:00
George Marques fb3dc2670a
GDScript: Fix range() being treated as array when optimized out
The call of range() in a for loop is optimized to use int or vectors, to
avoid allocating an array, however the type was set as array still. With
the new typed VM this is an issue as the type mismatch the actual value,
resulting in wrong instructions to be selected.
2020-11-25 11:35:07 -03:00
George Marques 2e528ef382
GDScript: Fix mishandling of stack pointers
- Replace the for loop temporaries by locals. They cause conflicts with
  the stack when being popped, while locals are properly handled in the
  scope.
- Change the interface for the codegen so the for loop list doesn't live
  through the whole block if it's a temporary.
- Keep track of the actual amount of local variables in the stack. Using
  the size of the map is misleading in cases where multiple locals have
  the same name (which is allowed when there's no shadowing).
- Added a few debug checks for temporaries, to avoid them being wrongly
  manipulated in the future. They should not live more than a line of
  code.
- Rearrange some of compiler code to make sure the temporaries don't
  live across blocks.
2020-11-25 11:24:13 -03:00
Rémi Verschelde d76806d322
Core: Always enable ptrcall, remove PTRCALL_ENABLED define
ptrcall is now also used to optimize calls in GDScript, on top of the existing
use by the GDNative and Mono modules.

It no longer makes sense to make it optional.
2020-11-25 14:08:17 +01:00
Marcel Admiraal 4f654dad13 Fix useless assignement in webrtc/library_godot_webrtc.js 2020-11-25 10:09:53 +00:00
Rémi Verschelde 50db0e66ac
Merge pull request #43747 from Faless/js/4.0_lint
[HTML5] Linting, fixes.
2020-11-23 12:38:17 +01:00
Fabio Alessandrelli 4617a7fa9c [HTML5] Run eslint --fix.
Should I write a poem about this whole new world? ;)
2020-11-23 12:15:18 +01:00
Eric M efe5c250d5 Implement new shortcuts system.
unhandled_key_input changed to unhandled_button_input. Controls can set a 'shortcut_context' which they can then use to determine if their shortcuts should be triggered or not, based on if the viewport's focused GUI control is a child of their 'shortcut context'.
2020-11-23 21:14:26 +10:00
Rémi Verschelde a248e6f8c3
Merge pull request #43781 from MaxMutantMayer/regex_unit_tests
Move and add new RegEx test cases
2020-11-23 10:07:07 +01:00
Rémi Verschelde 4ed42bfc29
Merge pull request #43725 from vnen/gdscript-typed-vm-2
GDScript: Typed VM Take 2
2020-11-23 09:59:20 +01:00
Maximilian Mayer 7edb50a31c Move and add new RegEx test cases
Test cases for 'RegEx' are moved from 'test_string.h' to own test suite
in 'test_regex.h'. Additionally, new tests are introduced and '_init' is
removed as it isn't implemented/used anywhere.
2020-11-22 22:48:03 +01:00
Hugo Locurcio 1a616726cf
Document that WebM videos don't support the alpha channel 2020-11-22 17:43:07 +01:00
George Marques 5518e2a68e
GDScript: Add faster instruction for validated constructor
Only for built-in types.
2020-11-21 13:30:17 -03:00
George Marques e0dca3c6b6
GDScript: Add typed iterate instructions 2020-11-21 13:24:50 -03:00