Commit graph

45 commits

Author SHA1 Message Date
Dmitrii Maganov
5909f9f075 GDScript: Fix issues with typed arrays 2023-01-31 11:54:41 +02:00
Rémi Verschelde
c2790ec2b9
Merge pull request #68450 from KoBeWi/bracket_escapist
Allow to escape closing brackets in CFG tags
2023-01-12 21:53:15 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
lawnjelly
491594ef0f VariantParser make readahead optional
It turns out some areas are independently moving / reading filepointers outside of the VariantParser, which can cause the readahead caching to get out of sync.

This PR makes the VariantParser readahead to be optional to allow for these use cases.
2022-12-12 15:14:39 +00:00
Rémi Verschelde
f4bccf90a3
Merge pull request #69119 from lawnjelly/faster_variant_parser_master
Add readahead to VariantParser [4.x]
2022-12-05 00:06:14 +01:00
kobewi
0765908868 Don't break parsing on missing resources 2022-11-28 16:19:15 +01:00
lawnjelly
5df29fec20 Add readahead to VariantParser
Adds a readahead buffer to VariantParser, to prevent large numbers of freads for single bytes, which is inefficient.
2022-11-24 15:54:16 +00:00
kobewi
0d122ce459 Allow to escape closing brackets in CFG tags 2022-11-09 14:00:51 +01:00
Aaron Franke
2cea42cc7f
Rename Projection matrix to columns 2022-10-04 12:34:19 -05:00
Haoyu Qiu
3c0759608a Fix crash when encoding freed object in ConfigFile 2022-09-04 19:56:37 +08:00
kobewi
ee6fd704b5 Fix Vector4 serialization 2022-07-29 12:09:03 +02:00
reduz
455c06ecd4 Implement Vector4, Vector4i, Projection
Implement built-in classes Vector4, Vector4i and Projection.

* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.

These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.

**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
Rémi Verschelde
192499c743
Merge pull request #48989 from MarioLiebisch/variant-comment-line-breaks
Properly increase line counter when parsing comments
2022-05-05 13:41:08 +02:00
Rémi Verschelde
931838b330
Merge pull request #60627 from aaronfranke/rename-elements
Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
2022-05-03 14:40:01 +02:00
Hugo Locurcio
180e5d3028
Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
Aaron Franke
1bf94dff3a
Rename Basis "elements" to "rows" 2022-04-29 08:02:56 -05:00
Aaron Franke
b831fb0a54
Rename Transform2D "elements" to "columns" 2022-04-29 08:02:39 -05:00
bruvzg
de4c97758a
Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
bruvzg
244db37508
Cleanup and move char functions to the char_utils.h header. 2022-02-04 11:35:01 +02:00
Anilforextra
adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
bruvzg
8e79c5fb8d
Add support for the escaped UTF-16 and UTF-32 Unicode characters in the scripts and expressions. 2022-01-30 20:16:04 +02:00
Rémi Verschelde
8898d6dadc
Dictionary: Serialize empty dict as {} instead of {\n}
Also make sure to always convert multiline dictionaries to a single line for
its EditorHelp representation, as multiline values break formatting.
2022-01-18 11:31:21 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Emmanuel Leblond
f9ba2efe1e
Modify Dictionary::operator== to do real key/value comparison with recursive support (and add unittests) 2021-10-30 13:11:01 +02:00
Thakee Nathees
3f3ed5d34c NaN, INF read/write bug fixed
Fix: #40589
2021-10-05 09:25:49 -04:00
Aaron Franke
e5d85ac751
Fixes to tests for Variant and Geometry3D 2021-08-17 16:46:08 -05:00
Rémi Verschelde
ac3322b0af
Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
Hugo Locurcio
4bd5e4fd9b
Use the standard C INFINITY and NAN constants directly
The `Math_INF` and `Math_NAN` defines were just aliases for those
constants, so we might as well use them directly.

Some portions of the code were already using `INFINITY` directly.
2021-07-21 10:41:08 +02:00
bruvzg
eca4d2fccc Fix Variant tags parsing. 2021-07-05 15:46:41 +03:00
Lightning_A
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
Michael Alexsander Silva Dias
0ff4095b36 Better format arguments in variant parser 2021-06-18 00:06:40 -03:00
Rémi Verschelde
326e483ef3
VariantParser: Fix reading StringNames with '&'.
Keep support for '@' for now for compatibility.

Fixes #49535.
Fixes #49542.
2021-06-12 22:13:35 +02:00
Pedro J. Estébanez
04688b92ff Rename Reference to RefCounted 2021-06-11 18:48:42 +02:00
Jonathan Gollnick
6710ad1737
Let var2str display StringName with correct sigil 2021-06-10 16:30:28 -05:00
Marcel Admiraal
8acd13a456 Rename Quat to Quaternion 2021-06-04 18:14:32 +01:00
Aaron Franke
028d9fa2bd
Add "Transform" compatibility name for "Transform3D" in VariantParser 2021-06-04 08:07:08 -04:00
Aaron Franke
08a85352fb
Rename Variant TRANSFORM to TRANSFORM3D
Also _transform to _transform3d
2021-06-03 07:30:01 -04:00
Aaron Franke
de3f6699a5
Rename Transform to Transform3D in core 2021-06-03 07:30:01 -04:00
Mario Liebisch
bf708e72dc
Increase line counter when parsing comments 2021-05-23 09:37:53 +02:00
Aaron Franke
affe3c817a
Use real_t in GridMap and VariantParser 2021-03-19 00:56:34 -04:00
Rémi Verschelde
b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Pedro J. Estébanez
1b745c7bae Fix crash parsing a serialized Reference 2020-12-17 12:24:57 +01:00
reduz
127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Renamed from core/variant_parser.cpp (Browse further)