Commit graph

242 commits

Author SHA1 Message Date
Juan Linietsky
5b3709d309 Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00
Rémi Verschelde
519df0d34d Use new Godot icon consistently everywhere 2017-05-17 19:53:59 +02:00
Juan Linietsky
98a3296702 Removal of Image from Variant, converted to a Resource. 2017-05-17 07:37:45 -03:00
Fabio Alessandrelli
98eb58a93c Allow selecting editor debug host and port.
Possibly fixes various editor<->debugger connection related problems.
2017-05-09 15:05:45 +02:00
Rémi Verschelde
7ce8342ac5 Rename project file to "project.godot"
Slimmed down variant from the reverted #8375.
The rationale behind the name change is to give Godot's project file a unique
extension (".godot") that can be registered on the OS to be associated with
the Godot binary (OS registration not implemented here).

This PR also adds the possibility to start the game or editor if launched
with the project.godot passed as argument, which paves the way for allowing
a similar behaviour on a double-click in the OS file manager (code originally
by @Hinsbart).

Closes #6915.
2017-05-01 17:50:19 +02:00
Juan Linietsky
6d2f985db4 Revert "Use .godot as file extension for project files." 2017-04-29 17:56:51 +02:00
Rémi Verschelde
5ae1e172da Merge pull request #8277 from tagcup/math_checks
Added various functions basic math classes. Also enabled math checks …
2017-04-24 11:16:20 +02:00
Rémi Verschelde
515f92d03b Fix property warnings and hide some debug prints
"ALL IS GOOD" was a lie.

In particular, removes verbose "path not recognized" false positive.

The actual logic is to (somewhat naively) check all ResourceFormatLoaders
and to pick the first good match, so no need to warn about the formats
that do not match the type hint.
2017-04-23 11:17:32 +02:00
Rémi Verschelde
474f18512a Merge pull request #8375 from Hinsbart/project_extension
Use .godot as file extension for project files.
2017-04-17 23:28:15 +02:00
Shockblast
2f76257da4 [GD 3.0] Fix stretch mode 2d... again
Objects on the screen were not displayed when the project was played,
because it looked for the values of width and height of menus with old
names (godot 2.1?) For that reason delivered value (0, 0).
2017-04-16 18:02:22 -03:00
Andreas Haas
c06a2db63a
Use .godot as file extension for project files.
Now project files don't have to be named "godot.cfg" anymore, they can have any name so as long as it ends with *.godot.
Also godot will automatically start the editor now if launched with a project file as an argument.
This allows for double-clicking of projects to open them :)

Code-wise this should be complete, but there's still work to do:

- Make a nice icon for godot projects.
- Work on installers/packaging -> register the extension and icon with godot.
- Update the 2.1 to 3.0 exporter.

Tested on linux and windows so far.
2017-04-16 10:19:07 +02:00
darkoff9
200c84b6b2 Fix joystick crash when mapping is -1 2017-04-10 23:41:47 +02:00
Andreas Haas
31a80ded89
Re-add ouya gamepad mapping.
Also adds yet another type of ps4 controller.
2017-04-10 16:35:12 +02:00
Sergey Pusnei
8589ca3903 Rename [gs]et_pos to [gs]et_position for Controls
Control set_pos -> set_position
Control set_global_pos -> set_global_position
[gs]et_mouse_pos -> [gs]et_mouse_position
[gs]et_global_mouse_pos -> [gs]et_global_mouse_position
fixes #8005
2017-04-10 08:27:34 +02:00
Juan Linietsky
7ba71fb243 Restored (And auto-generated) splash image 2017-04-09 20:03:38 -03:00
Rémi Verschelde
df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Rémi Verschelde
b81d5f4687 Merge pull request #8308 from RandomShaper/optimize-out-debug-n-non-tools
Optimize-out some debug and/or non-tools methods
2017-04-07 22:22:54 +02:00
Pedro J. Estébanez
665bf52948 Optimize-out some debug and/or non-tools methods
Collisions and nav debug are conditionally compiled depending on DEBUG_ENABLED
is_editor_hint() and is_node_being_edited() are compiled only with TOOLS_ENABLED
Every affected method is implemented in the header in case its macro is not present (the getters just returning false and the setters having an empty body) so the compiler can inline and finally no-op-out them as likely as possible.
is_node_being_edited() already showed a similar optimization effort and has been adapted to this change.
Furthermore, and as a consequence, -debugcol and -debugnav will not work on non-debug (strict release) builds.
This can bring a little bit of runtime performance on release and non-tooled builds (less code, so less cycles to spend and maybe more cache friendly).
2017-04-07 16:35:55 +02:00
Juan Linietsky
74808ac4d9 New particle system, mostly working, some small features missing. 2017-04-06 23:49:27 -03:00
Ferenc Arn
9a37ff1e34 Added various functions basic math classes. Also enabled math checks only for debug builds.
Added set_scale, set_rotation_euler, set_rotation_axis_angle. Addresses #2565 directly.
Added an euler angle constructor for Basis in GDScript and also exposed is_normalized for vectors and quaternions.
Various other changes mostly cosmetic in nature.
2017-04-06 13:03:56 -05:00
Pedro J. Estébanez
58cd4461d1 Fix warped mouse panning on Linux
Fix/improve it also on certain edge cases for any platform
2017-04-03 02:56:14 +02:00
Andreas Haas
b9d606af71
Input: Update Gamepad mappings. 2017-04-02 09:43:37 +02:00
Jordan Patterson
86de80db89
Initialize hat values for mapping and revert X360 mappings. 2017-03-31 13:27:02 +02:00
Andreas Haas
c0b6756875
Input: Remove usage of platform dependent event IDs.
The ID property for InputEvents is set by `SceneTree` when sending the event down the tree.
So there's no need for the platform specific code to set this value when it will later be overriden anyway...
2017-03-26 15:59:32 +02:00
Rémi Verschelde
4911555f6c Merge pull request #8137 from Hinsbart/mbutton_pos
Input: Update mouse position on mouse-button events.
2017-03-24 22:53:27 +01:00
Rémi Verschelde
98baec6880 Merge pull request #8109 from RandomShaper/warped-panning
Implement warped mouse panning for 2D & 3D editors
2017-03-24 22:50:39 +01:00
Andreas Haas
468719c480
Input: Update mouse position on mouse-button events. 2017-03-24 21:56:39 +01:00
Rémi Verschelde
debeee56f7 Fix typos in source code using codespell
From https://github.com/lucasdemarchi/codespell
2017-03-24 21:45:31 +01:00
Pedro J. Estébanez
f5004b78d0 Implement warped mouse panning for 2D & 3D editors
Enabled by default as in Blender, but can be disabled separately for 2D & 3D;
the core functionality is in Input so this could be reused or even exposed to scripts in the future
2017-03-22 21:36:52 +01:00
Andreas Haas
a69e449782
Input: bind parse_input_event()
When using get_tree().input_event(ev), the engine will JUST send the event down the SceneTree.
However, you won't get any of the benefits of the Input singleton:
- No InputMap actions will be emitted
- The internal input state won't be modified, so methods like `Input.get_mouse_pos()` or `Input.is_joy_button_pressed` won't return the expected output after sending the event.

This is fixed by using `Input.parse_input_event(ev)` instead.
I guess we'll also have to update the docs to reflect that this is the preferred method of sending custom InputEvents.
2017-03-19 09:20:44 +01:00
Rémi Verschelde
5dbf1809c6 A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?

I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon

A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format

A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
2017-03-05 16:44:50 +01:00
Rémi Verschelde
e1c1d7d1d7 Add a bunch of missing Godot headers in own files 2017-03-05 15:47:28 +01:00
Rémi Verschelde
49c065d29c Refactoring: rename tools/editor/ to editor/
The other subfolders of tools/ had already been moved to either
editor/, misc/ or thirdparty/, so the hiding the editor code that
deep was no longer meaningful.
2017-03-05 14:21:25 +01:00
Geequlim
886f646cba Implements modules documents
Editor can generate documents for modules in thier own xml files
2017-03-04 17:20:36 +01:00
Thaer Razeq
f50488a361 Various fixes detected using PVS-Studio static analyzer.
- Add FIXME tags comments to some unfixed potential bugs
- Remove some checks (always false: unsigned never < 0)
- Fix some if statements based on reviews.
- Bunch of missing `else` statements
2017-02-28 07:52:02 -06:00
Rémi Verschelde
34a0aa6900 Merge pull request #7862 from Hinsbart/joypad_connections
Better handling of joypad device IDs.
2017-02-26 21:30:24 +01:00
Andreas Haas
a175ac7032
Better handling of joypad device IDs.
Now InputDefault is responsible for giving out joypad device IDs to the platform, instead of each platform handling this itself.
This makes it possible for c++ modules to add their own "custom" gamepad devices, without the risk of messing up events in case the user also has regular gamepads attached (using the OS code).
For now, it's implemented for the main desktop platforms.
Possible targets for future work: android, uwp, javascript
2017-02-26 21:01:31 +01:00
Rémi Verschelde
1ec8b9fb7d Merge pull request #7851 from shlomif/fix-some-compilation-warnings
Get rid of some compilation warnings.
2017-02-26 20:22:48 +01:00
Shlomi Fish
0a2c387d5c Fix some compilation warnings.
Redone the commit based on the input in
https://github.com/godotengine/godot/pull/7851 . Not all warnings were
fixed but it's a start.
2017-02-21 11:59:19 +02:00
Juan Linietsky
de0045cf1b -renamed globals.h to global_config.cpp (this seems to have caused a few modified files)
-.pck and .zip exporting redone, seems to be working..
2017-02-21 00:06:30 -03:00
Hein-Pieter van Braam
411ee71b4d Rename the _MD macro to D_METHOD
This new name also makes its purpose a little clearer

This is a step towards fixing #56
2017-02-13 12:50:02 +01:00
Rémi Verschelde
b87a232668 Reorder the folders in tools to prepare moving tools/editor
- `certs` and `editor_fonts` go to `thirdparty`
- `dist` and `scripts` go to a new `misc` folder
- `collada` and `doc` go to `tools/editor`

The next step will be to rename `tools/editor` to `editor` directly,
but this will be done at the right time to avoid breaking too many PRs.
2017-02-09 00:08:27 +01:00
Juan Linietsky
102b5fce85 Renamed engine.cfg to godot.cfg, to forcefully break compatibility with 2.x 2017-02-04 20:53:55 -03:00
Rémi Verschelde
af6d59eed6 Merge pull request #7649 from Faless/fix_input_master
Keyboard Input modifiers do not block actions.
2017-02-02 08:07:47 +01:00
Juan Linietsky
2cd2ca7bbc Lot of work in new importer, importing textures now works. 2017-02-01 09:46:36 -03:00
Juan Linietsky
96de0141cc Removed import/export system, will start new one from scratch. 2017-01-25 21:57:08 -03:00
Fabio Alessandrelli
9100db7b94 Keyboard Input modifiers do not block actions.
This means, if you press "F" while holding "shift" and there is and
action registered for "F" that action should be pressed.
This commit restore this behaviour, lost when implementing
is_action_just_pressed.
If you want "blocking modifiers" you should code it via script.

Fixes 6826
2017-01-25 21:21:19 +01:00
Juan Linietsky
7e1afeafd4 Audio bus editing is COMPLETE! 2017-01-25 14:31:52 -03:00
Juan Linietsky
3b019bf644 Ability to delete, drag and drop audio buses! 2017-01-23 23:12:41 -03:00
Rémi Verschelde
2a0ddc1e89 Style: Various fixes to play nice with clang-format 2017-01-16 08:49:52 +01:00