Age | Commit message (Collapse) | Author |
|
|
|
- Renames PackedIntArray to PackedInt32Array.
- Renames PackedFloatArray to PackedFloat32Array.
- Adds PackedInt64Array and PackedFloat64Array.
- Renames Variant::REAL to Variant::FLOAT for consistency.
Packed arrays are for storing large amount of data and creating stuff like
meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of
memory. That said, many users requested the ability to have 64 bits packed
arrays for their games, so this is just an optional added type.
For Variant, the float datatype is always 64 bits, and exposed as `float`.
We still have `real_t` which is the datatype that can change from 32 to 64
bits depending on a compile flag (not entirely working right now, but that's
the idea). It affects math related datatypes and code only.
Neither Variant nor PackedArray make use of real_t, which is only intended
for math precision, so the term is removed from there to keep only float.
|
|
WARNING: Requires C++17 'guaranteed copy elision' to fix ambiguous
operator problems in Variant.
This was added for this commit (and future C++17 uses) in #36457.
|
|
objects and made them default.
|
|
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
|
|
|
|
Remove deprecated decimals builtin
|
|
32 bits.
|
|
Replaced by 'step_decimals' in 3.2 via #21425.
|
|
|
|
|
|
Also make builtin GDScript functions report return type as Variant in
release so type is converted when needed.
|
|
Happy new year to the wonderful Godot community!
We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.
Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
|
|
* Adds description for `ord()`
* Adds relationship description between `char()` and `ord()`
* Describes the argument of `char()` as Unicode code point instead of ASCII code
* Fixes wrong interval notation in `randi()` description
|
|
Fix `inst2dict` calling to getters to retrieve value
|
|
The resource path holds the original path which can be used to convert
a dictionary to instance consistently both within editor and exported projects
as the original path is automatically remapped from `gd` to `gdc` or `gde` in
exported projects.
|
|
Core is not touched, only for binding and scripting.
|
|
Fixes #33150
|
|
Use `GDScriptInstance` to iterate through all members directly instead.
This is similar to how `dict2inst` works and makes the serialization
behaviour more consistent.
|
|
Tiny addition I personally found useful - this allows us to `var my_ref := weakref(null)` for nullable weak ref (with type hint!). When trying to test if `my_ref` is holding valid reference, we can just `if my_ref.get_ref():` instead of `if my_ref and my_ref.get_ref():` everywhere.
|
|
|
|
"modules/gdnative", "modules/gdscript" directories.
|
|
Co-authored-by: Xrayez <https://github.com/Xrayez>
Co-authored-by: DleanJeans <https://github.com/DleanJeans>
|
|
"posmod" is the integer version of "fposmod". We do not need a "mod" because of the % operator.
I changed the default arg names from "x" and "y" to "a" and "b" because they are not coordinates. I also changed pow's arg names to "base" and "exp". Also, I reorganized the code in the VS built-in funcs switch statement.
|
|
It's not necessary, but the vast majority of calls of error macros
do have an ending semicolon, so it's best to be consistent.
Most WARN_DEPRECATED calls did *not* have a semicolon, but there's
no reason for them to be treated differently.
|
|
|
|
In GDScript, rename "decimals" to "step_decimals". In C#, add "StepDecimals", but keep the old functionality in a method called "DecimalCount".
|
|
|
|
Added smoothstep built-in function
|
|
|
|
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).
|
|
Fixes #25082, fixes #24709.
|
|
Happy new year to the wonderful Godot community!
|
|
Also French translation update and misc fixes to source strings.
|
|
GDscript function str2var now returns null on invalid input
|
|
str2var used to raise a blocking error when invalid input was passed. Now it logs an error message and
returns the input string. This solution was proposed in #13021.
Closes #11457 and #13021.
|
|
|
|
The arguments of atan2() should be y,x instead of x,y This was just wrong since the internal atan2 already had y,x as parameters, so if you followed the autocomplete the result would just be wrong.
|
|
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
|
|
|
|
|
|
Only for debug builds. Fix problems in non-tools targets.
|
|
This commit makes operator[] on Vector const and adds a write proxy to it. From
now on writes to Vectors need to happen through the .write proxy. So for
instance:
Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;
Failing to use the .write proxy will cause a compilation error.
In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.
_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
|
|
- Resolve types for all identifiers.
- Error when identifier is not found.
- Match return type and error when not returning a value when it should.
- Check unreachable code (code after sure return).
- Match argument count and types for function calls.
- Determine if return type of function call matches the assignment.
- Do static type check with match statement when possible.
- Use type hints to determine export type.
- Check compatibility between type hint and explicit export type.
|
|
Add new debug print method that shows line number where the print came from
|
|
|
|
|
|
GDScript: generalize lerp
|
|
|
|
Add argument count check for some GDScript functions
|