Commit graph

92 commits

Author SHA1 Message Date
lupoDharkael
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Rémi Verschelde
cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
fhuya
f097defba1 Re-architecture of the Godot Android plugin. 2020-03-05 10:00:19 -08:00
bruvzg
1af06d3d46
Rename scancode to keycode.
Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap.
Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
2020-02-25 12:30:33 +02:00
Juan Linietsky
3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
Marcel Admiraal
f0db13502a Remove duplicate WARN_PRINT macro. 2020-02-05 11:13:24 +01:00
Marcel Admiraal
5af3b4ca27 Remove duplicate ERR_PRINT macro. 2020-02-05 11:13:24 +01:00
bruvzg
d07cdc594f
[macOS] Load PCK from the .app bundle resources, instead of changing working directory. 2020-01-10 18:02:29 +02:00
Rémi Verschelde
eadf04e1dd
Merge pull request #34476 from volzhs/no-slash-localize_path
Make sure no additional slash being added with localize_path
2020-01-02 19:11:18 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
volzhs
02d5591d9d Make sure no additional slash being added with localize_path 2019-12-20 14:49:01 +09:00
Haoyu Qiu
e7e095da3f Encodes property names properly in project.godot 2019-12-20 10:42:08 +08:00
Emmanuel Leblond
a1f1a1d798
Revert "Fix localise_path method so that uncached scripts don't sometimes get loaded with two backslashes"
This reverts commit 1342551664.
2019-11-26 13:42:18 +01:00
Rafał Mikrut
99d8626f4a Fix some overflows and unitialized variables 2019-11-20 16:22:16 +01:00
Saracen
1342551664 Fix localise_path method so that uncached scripts don't sometimes get loaded with two backslashes 2019-11-06 03:32:02 +00:00
Rémi Verschelde
28fcc5e25a
Merge pull request #32291 from Dragoncraft89/add_load_resource_flag
Add flag to control the replacement of files by ProjectSettings.load_resource_pack
2019-09-25 16:30:01 +02:00
Florian Kothmeier
aae25abf30
Add flag to control the replacement of files by ProjectSettings.load_resource_pack 2019-09-25 15:29:59 +02:00
qarmin
17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Hugo Locurcio
5bd01bf637
Add a project description setting
The description is displayed as a tooltip when hovering the project
in the Project Manager. It can span multiple lines.

This partially addresses #8167.
2019-08-28 22:34:29 +02:00
Andrii Doroshenko (Xrayez)
f013596760 Allow to define and load script templates per project
Previously it was only possible to create custom script templates per
editor instance which could lead to certain name collisions, but now one
can create such templates per project tailored for specific use cases.

The default path to search for custom script templates is defined in
project settings via `editor/script_templates_search_path` setting as
`res://script_templates` path, yet this can be configured per project.

Templates have at most two origins now:

1. Project-specific, defined in `ProjectSettings`, for instance:
    - res://script_templates/
2. Editor script templates, for instance:
    - %APPDATA%/Godot/script_templates/

As script templates can have the same name over different paths,
the override mechanism was also added, enabling project-specific
templates over the editor ones.
2019-08-22 20:51:30 +03:00
Braden Bodily
71d71d55b5 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'
Condensed some if and ERR statements. Added dots to end of error messages

Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?),
core/os/memory.cpp,
drivers/png/png_driver_common.cpp,
drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
2019-08-17 12:33:15 +02:00
qarmin
01cc7a996b Use reference to constant in functions 2019-07-10 11:54:12 +02:00
Rémi Verschelde
6e9cb44004
Merge pull request #30282 from neikeq/editor_in_cs_equals_win
Re-write mono module editor code in C#
2019-07-05 10:29:19 +02:00
Rémi Verschelde
a149e412f7
Merge pull request #24086 from RandomShaper/bundle-pck-to-executable
Enhance game export
2019-07-05 10:28:29 +02:00
Ignacio Etcheverry
0639946c72 Fix localize_path not always working
We make sure the resource dir path ends with a trailing '/' for safety reasons, so we must make sure the path we compare it to does so as well.
2019-07-05 09:38:28 +02:00
Pedro J. Estébanez
40f4d3cf0f Add embedded PCK option to PC platforms
The basic point is as in 2.1 (appending the PCK into the executable), but this implementation also patches a dedicated section in the ELF/PE executable so that it matches the appended data perfectly.

The usage of integer types is simplified in existing code; namely, using plain `int` for small quantities.
2019-07-03 21:58:12 +02:00
qarmin
3c154eb93b Remove unnecessary code and add some error explanations 2019-07-01 12:59:42 +02:00
qarmin
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Rémi Verschelde
971b5160c6
Merge pull request #29306 from qarmin/small_code_fixes
Small fixes to unrechable code, possibly overflows, using NULL pointers
2019-06-12 12:49:21 +02:00
Rémi Verschelde
6d16f2f053 Fix error macro calls not ending with semicolon
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.
2019-06-11 14:49:34 +02:00
qarmin
8245db869f Small fixes to unrechable code, possibly overflows, using NULL pointers 2019-06-03 21:52:50 +02:00
Rémi Verschelde
9ad9d1f3b3 Don't localize paths that contain but are not in the resource path
This issue could be triggered if you try to access a path which contains
the resource path string in its absolute path, while pointing to a directory
which is *not* in the resource path.

It's clearer with an example: with `/my/project` as resource path, the
previous logic would also localize `/my/project_data` to `res://data`, which
is incorrect and would lead to a cryptic error.

Fixes #24761.

Co-authored-by: volzhs <volzhs@gmail.com>
2019-05-30 16:03:12 +02:00
Rémi Verschelde
62c9af4072
Merge pull request #25647 from QbieShay/fix_25440
Added a setting for files in which the editor should search (project specific)
2019-05-29 16:58:28 +02:00
muiroc
1f54b11da6 Enable object decoding when serializing binary project settings 2019-04-15 15:30:54 +02:00
lupoDharkael
650b698f51 Allow default audio bus layout modification 2019-04-05 17:19:25 +02:00
Fabio Alessandrelli
393e62b98a 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).
2019-04-01 15:53:19 +02:00
Rémi Verschelde
c74bf2e6b1 Define android/modules globally so it appears in Project Settings
Until now people had to add it manually to project.godot to load custom modules.
2019-03-07 11:25:58 +01:00
marxin
8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
QbieShay
c4eb974a8a Added a setting for files in which the editor should search (project wise).
Remembers the tickboxes but only during the same execution

Fixes #25440
2019-02-12 21:24:07 +01:00
Rémi Verschelde
02ffc59270 GLES2: Make Nvidia flicker workaround opt-in
It has a big impact on 2D and text rendering performance (cf. #24466)
so the solution seems worse than the bug it aims to work around.

It's now opt-in via "rendering/quality/2d/gles2_use_nvidia_rect_flicker_workaround"
for those who need it and have a simple enough game for the performance
drop not to be an issue.

Fixes #24466.
2019-01-14 19:02:07 +01:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde
616beb1041 ProjectManager: Warn when projects have different config_version
When opening projects for edition through the project manager, the
following checks are now done:

1. If the config_version is lower than the one used by the current
   engine version, users are asked if they want to convert to the new
   format or abort editing. Fixes #20626.
2. If the config_version is higher than the expected one (project
   from a more recent and incompatible engine version), projects are
   grayed out and can't be edited. Fixes #18758.

When editing from the command line, the behaviour is unchanged:
projects in situation (1) are automatically converted, while projects
in situation (2) show an error message (made more explicit).

The "Run" option from the project manager was not changed, so it will
still run (1) projects without converting them, and fail running (2)
projects.

Co-authored-by: groud <gilles.roudiere@gmail.com>
2018-12-21 12:45:27 +01:00
Marcelo Fernandez
8dad3811c5 Add application/config/project_settings_override option to override project settings 2018-12-13 18:23:51 -03:00
Rémi Verschelde
1169196f04
Merge pull request #22779 from Superwaitsum/LimitSettings
Limit several project settings
2018-10-25 11:38:06 +02:00
Superwaitsum
e5041ad0f5 Add some limits on the Editor Settings 2018-10-24 19:46:33 -05:00
Rémi Verschelde
9d926b72e1 Fix .pck lookup for extensionless binary names with a dot
This was not a problem on Windows as binary names are guaranteed to end
with '.exe', but on Unix systems binary extensions are purely cosmetic
and thus optional, which is a problem when using `get_basename()` to
lookup a potential '.pck' file, as it can fail on e.g. "My Game 2.0" (#15188).

To fix this, ProjectSettings::setup now checks for both basename + '.pck'
and filename + '.pck'.

Fixes #15188, supersedes and closes #22755.

Also took the opportunity to improve documentation on this core method.
2018-10-24 20:11:39 +02:00
Rémi Verschelde
1a16dabfb5
Merge pull request #21982 from luzpaz/misc-typos
Misc. typos
2018-09-13 10:59:00 +02:00
luz.paz
08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Rémi Verschelde
277b24dfb7 Make core/ includes absolute, remove subfolders from include path
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.
2018-09-12 09:52:22 +02:00
Rémi Verschelde
52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00