Age | Commit message (Collapse) | Author |
|
Reduz optimized field indexing in 3c85703 but the changes didn't apply
to dictionary so this code remained untouched. However, the logic for
validity checking was changed but not updated for the dictionary case.
|
|
Implement operator != on Pool*Array types
|
|
|
|
boost to GDScript.
|
|
These types previously had equality checks but not inequality checks.
Add these too.
This fixes #11466
|
|
Implement Linux-style likely()/unlikely() macros
|
|
|
|
This implement branch prediction macros likely() and unlikely() like in
Linux. When using these macros please ensure that when you use them the
condition in the branch really is very, very likely or unlikely. Think
90+% of the time. Primarily useful for error checking. (And I implement
these macros for all our error checking macros now)
See this article for more information:
https://kernelnewbies.org/FAQ/LikelyUnlikely
There are more places where these macros may make sense in renderer and
physics engine. Placing them will come in another commit down the line.
|
|
Also fix bugs when meshes are always generated.
|
|
Allow equality checks between null and arbitrary types
|
|
Uninitialzed values in GDScript are of type NIL so not allowing null
comparisons did end up breaking some code.
This commit reenables NULL equality checks for all types. We're going to
have to figure out how to make this fast for the compiler later.
|
|
Verbose and Platform-specific implementation for is_nan
|
|
Rename user facing methods and variables as well as the corresponding
C++ methods according to the folloming changes:
* pos -> position
* rot -> rotation
* loc -> location
C++ variables are left as is.
|
|
|
|
Refactor core/set.h
|
|
Adds 3 and 4 digit html shortcuts to Color
|
|
Be type-strict checking on equality checks
|
|
We now allow booleanization of all types. This means that empty versions
of all types now evaluate to false. So a Vector2(0,0), Dictionary(),
etc.
This allows you to write GDScript like:
if not Dictionary():
print("Empty dict")
Booleanization can now also no longer fail. There is no more valid flag,
this changes Variant and GDNative API.
|
|
added OAHashMap type
|
|
|
|
After a short discussion with @reduz and @karroffel we decided to make
all non number/number comparisons return type errors on comparisons.
Now bool == bool is allowed but Vector2 == Vector3 is a type error and
no longer 'not equal'. The same has been done for the != operators.
In addition I forgot to add some failures to some Object operators
meaning that there was a potential for a crasher.
|
|
Various GDScript performance tweaks
|
|
operator= does not need to call reference() if the new value is of the
same type as the old. This saves us zeroing the Variant, This speeds
up reuse of a Variant in a loop by roughly 50%.
|
|
Fix MSVC compilation errors
|
|
|
|
|
|
|
|
In an effort to make GDScript a little faster replace the double
switch() with a computed goto on compilers that set __GNUC__. For
compilers that don't support computed goto it will fall back to regular
switch/case statements.
In addition disable using boolean values in a mathematical context. Now
boolean values can only be compared with other booleans. Booleans will
also no longer be coerced to integers.
This PR replaces #11308 and fixes #11291
|
|
|
|
added JSON singleton
|
|
Moved class_name and return_val to initializer list
|
|
Implement +,-,/, * and negate operators for Color type
|
|
Fixed naming of pck file
|
|
|
|
Expose more methods for UndoRedo
|
|
|
|
|
|
There was no way to access JSON functionality in scripting languages
apart from GDScript because the JSON class wasn't exposed to ClassDB.
|
|
Fix enums bindings
|
|
|
|
Previously godot_variant_new_object constructed Variant without
accounting for the fact that the Object can be a Reference, so refcount
was not increased and References were destructed prematurely.
Also, Reference::init_ref did not propagate refcount increment to the
script instance, which led to desync of refcount info on the script
side and Godot side.
|
|
Thanks to @Marqin for the notice.
|
|
Add missed bindings for enums
Move some enums to class to have correct output of api.json
|
|
|
|
Fixed loading package from resource folder, exporting textures to bun…
|
|
[ci skip]
|
|
|
|
Color::html now expands 3 and 4 digit hex values into 6 and 8 digit
values by repeating each digit. This is to bring it in line with how
html handles these values
fixes #10997
|
|
possible to save module files in module directories and the build system will
recognize them.
|
|
|