Commit graph

764 commits

Author SHA1 Message Date
volzhs
e56961f58b Fix comparison bug with InputEvent
(cherry picked from commit b76a0ca40c)
2016-10-31 00:02:04 +01:00
Rémi Verschelde
5a49e45d21 SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.

(cherry picked from commit fc8ccd5b8c)
2016-10-30 14:51:34 +01:00
Juan Linietsky
7d25d20861 Added a generic AStar implementation to Godot.
It's pretty fast, use it for games where Navigation does not cut it.

(cherry picked from commit 827a9aa829)
2016-10-18 18:35:44 +02:00
Fabio Alessandrelli
ea48675ffa Properly handle absolute paths in Globals::localize_path
This give a proper fix for #4280 - #3106 , allowing absolute paths
that starts from the file system, not the resource folder

(cherry picked from commit 2f2cea070e)
2016-10-17 20:49:12 +02:00
Răzvan Cosmin Rădulescu
04255541a0 Fixes hash float negative 0 problem
Before this was giving an error:

var a = {Vector2(1, 0): 5, Vector2(-1, 0): 7}
    print(a)
    print(a[Vector2(1, 0)])
    print(a[-Vector2(1, 0)])

This simple commit fixes the issue.

(cherry picked from commit 9ad0850301)
2016-10-17 20:48:15 +02:00
Mateusz Adamczyk
ce1138cb02 Added simple check to viewport, if matrix32 is invesile (https://github.com/godotengine/godot/issues/6296).
(cherry picked from commit 8671836b76)
2016-10-09 17:40:37 +02:00
Răzvan Cosmin Rădulescu
97ebfddaaf fixes #6331, Variant::can_convert
(cherry picked from commit f2af5ab949)
2016-10-09 17:34:00 +02:00
J08nY
5b942f056a Vector3: added angle_to(Vector3 other)
(cherry picked from commit deb36b44d1)
2016-10-09 17:33:36 +02:00
J08nY
44ba542de6 Vector3: format properly, fix indents
(cherry picked from commit f468cfc379)
2016-10-09 17:33:30 +02:00
Pedro J. Estébanez
12d4d65668 Improve debug focus behavior
Fix focusing debugged game on Windows
Add re-focusing editor on continue

(cherry picked from commit 66dac878ac)
2016-10-09 17:29:59 +02:00
Fabio Alessandrelli
56dc7aa568 Properly encode InputEvent of type NONE. Fix #5987
In the editor settings you can disable default editor shortcuts.
When a default shortcut is disabled an InputEvent of type NONE must
be stored in the config file to allow the editor to remember that setting.
variant_parser.cpp was not properly encoding InputEvent of type NONE causing
the "corruption" of the editor settings file.

(cherry picked from commit 941f460384)
2016-10-09 17:29:27 +02:00
J08nY
f315d352ec PCKPacker: moved from tools into core, fixes #4129
(cherry picked from commit b1fba2e013)
2016-10-09 17:28:11 +02:00
volzhs
73e7ccabf5 Fix typo for word_wrap
(cherry picked from commit c333659ebc)
2016-10-09 17:23:58 +02:00
volzhs
721599c797 Fix error when using 2 or more slashes on resource path
(cherry picked from commit 0866f49f4e)
2016-10-09 17:23:53 +02:00
Andreas Haas
5adb75c2e7 Throw error when trying to emit a non-existing signal.
closes #6017

(cherry picked from commit 276087e92d)
2016-10-09 17:22:08 +02:00
Andreas Haas
33223e7a8a Add function to get readable names for joystick events
Closes #6476

(cherry picked from commit e0fcd9331a)
2016-10-09 17:19:57 +02:00
anneomcl
12edde80f2 Fix for #6158. Converting Vector2 to Size2 for scaling functions.
(cherry picked from commit aa5ade834c)
2016-10-09 17:18:54 +02:00
Andreas Haas
94e5c48004 Expose Vector2::clamped() to scripts
Needed this and wondered that there's no built-in function for it.
So I wanted to implement it and saw that it's actually already there, just wasn't bound ^^

(cherry picked from commit c21412fa7e)
2016-10-09 17:18:29 +02:00
Andreas Haas
e788ffff65 Fix input action pressed state not changing for quick joystick movements.
fixes #6488
Also removes a bunch of dead code related to checking if a joystick axis is pressed.

(cherry picked from commit 84783fe77b)
2016-10-09 17:16:19 +02:00
supaiku
3f30a22cb0 Show object string cast instead of object id in debugger
(cherry picked from commit 0108e7c33a)
2016-09-18 23:06:51 +02:00
Rémi Verschelde
48d1e8bd4e InputEvent: Fix event comparisons when type is NONE
Was a regression from 2e5a4cb5ca.
Fixes #6376.

(cherry picked from commit eff6519aaf)
2016-09-18 23:03:10 +02:00
Rémi Verschelde
de5f49aac5 i18n: Update list of supported locales based off glibc
Fixes #5733, fixes #6214.

(cherry picked from commit 54e97e5ee6)
2016-09-18 23:02:14 +02:00
volzhs
265715f5b2 Show last added action on Input Map and implement InputEvent "=="
(cherry picked from commit 2e5a4cb5ca)
2016-09-01 08:45:37 +02:00
caryoscelus
83864514f9 fix string iterator
Since strings are null-terminated, size() returns incorrect length,
so use length() instead.

fixes #6287

(cherry picked from commit 810fbb70ae)
2016-09-01 08:44:30 +02:00
Ignacio Etcheverry
b1ea299edf Matrix32: Add constructor that takes six real_t params
(cherry picked from commit 3578800230)
2016-09-01 08:44:22 +02:00
Franklin Sobrinho
f9aeb91850 Implemented UndoRedo mergeable modes
(cherry picked from commit debf574df3)
2016-09-01 08:41:04 +02:00
Franklin Sobrinho
5f9e6d2b48 Added add_property_info function to Globals and EditorSettings classes
(cherry picked from commit 9f242ed6e5)
2016-09-01 08:40:49 +02:00
Juan Linietsky
58556f5f95 Fixed bug in make_dir_recursive, closes #6016
(cherry picked from commit df6dbadc3e)
2016-08-08 23:45:39 +02:00
eska
03a4b8cbc8 Revert documentation of return type for FuncRef::call_func from b80c42e
bind_native_method doesn't support this style of return type documentation.
2016-08-08 17:49:30 +02:00
Rémi Verschelde
37ce438787 Merge pull request #5976 from allkhor/master
Fix String::is_valid_integer() for single symbols + and -
2016-07-31 20:07:20 +02:00
eska
b80c42ef4e Document FuncRef, GDFunctionState, InstancePlaceholder, RID, World2D 2016-07-30 21:27:58 +02:00
allkhor
09c4d65b64 Fix String::is_valid_integer() for single symbols + and - 2016-07-31 00:18:30 +06:00
Ignacio Etcheverry
2d4c4b6ea9 Fix regression with str() improvements for math types 2016-07-28 14:58:12 +02:00
Rémi Verschelde
c6c9f29827 Merge pull request #5921 from neikeq/pr-issue-5919
Prettier str() for some math types
2016-07-27 17:23:17 +02:00
Ignacio Etcheverry
eefca1ada9 Prettier str() for some math types 2016-07-27 17:00:07 +02:00
Bojidar Marinov
2150855faf
Fix reading of empty StringArray-s in .tscn
Closes #5912
2016-07-27 17:59:42 +03:00
Juan Linietsky
9151eb591d Changed the way the step decimals are computed to a safer way, fixes many issues. 2016-07-26 17:25:10 -03:00
Juan Linietsky
c9d0053754 Merge pull request #5524 from pkowal1982/master
Array has(var value) function
2016-07-24 12:21:29 -03:00
Rémi Verschelde
308d405c31 Turn some prints to error logs, remove others
Fixes #5876 in passing.
2016-07-24 00:02:19 +02:00
Johan Manuel
5d52146ff7 Fix warnings in core/variant_op.cpp
Adds default cases in switches where needed, and replaces '0;' with ';;'
in macro expansions (as suggested by @vnen in #5587).
2016-07-23 14:58:37 +02:00
Rémi Verschelde
c57b992774 Merge pull request #5847 from 29jm/patch-3
Expose virtual keyboard functions to GDScript
2016-07-22 08:39:07 +02:00
Johan Manuel
ec8c6e2c7c Expose virtual keyboard functions to GDScript 2016-07-21 23:58:58 +02:00
Rémi Verschelde
d723e5a62f Merge pull request #5560 from vnen/os-request-attention
Add OS.request_attention() for Windows
2016-07-21 17:29:45 +02:00
Juan Linietsky
79a7473cac put text formats for resources and scenes as priority 2016-07-19 21:40:05 -03:00
Juan Linietsky
0988970c1f Fixed properly not save signals that already exist in their base scenes, closes #5656 2016-07-19 21:26:12 -03:00
Rémi Verschelde
87d0515d09 Fix main scene not being saved when set via Play button
Fixes #1134 for real. Also tweaked the engine.cfg template
and the preference order when browsing for the main scene.
2016-07-19 21:35:14 +02:00
Rémi Verschelde
525fb01fd2 Revert "Homogeinize resource formats loaders/savers"
The text format definition needs to stay in `scene/` as it relies
on other scene components, and `core/` must stay self-contained.

This reverts commits a5e27503fd
and 1492fd8460.
2016-07-19 18:15:01 +02:00
Rémi Verschelde
c328693e83 Merge pull request #5709 from akien-mga/pr-get-engine-version
OS: Add get_engine_version method
2016-07-18 00:55:29 +02:00
Rémi Verschelde
b2953bc1cc OS: Add get_engine_version method
Fixes #5693.
2016-07-18 00:54:56 +02:00
Rémi Verschelde
8de5aedb9e Merge pull request #5718 from jay3d/master
Added gyroscope support to Godot and Android
2016-07-18 00:52:15 +02:00
Rémi Verschelde
22419082d9 Remove some noisy debug prints
Part of #5031
2016-07-17 18:25:21 +02:00
Juan Linietsky
24d86e33a6 Merge pull request #5467 from RandomShaper/enhance-tidy-extensions
Enhance/tidy file extensions management
2016-07-16 09:28:49 -03:00
Rémi Verschelde
f07d4f556a i18n: Add missing locale identifiers for Bengali and Urdu
Fixes errors showing up since the addition of those WIP translations.
2016-07-16 13:17:09 +02:00
Jamil Halabi
370ae3512d Added gyroscope support to Godot and Android 2016-07-16 01:43:32 +08:00
George Marques
9a931e333c
Fix binding of File::get_sha256()
Fix #5698
2016-07-14 14:23:22 -03:00
punto-
bba89aef3b Merge pull request #5559 from Hinsbart/connected_joysticks
Input: add get_connected_joysticks() method.
2016-07-10 14:00:27 -03:00
Juan Linietsky
9dac41432e Merge pull request #5443 from samuelgrigolato/iterate-string-in-gdscript
Add support to String type in gdscript iteration
2016-07-10 13:32:37 -03:00
Juan Linietsky
28641fd9b8 Merge pull request #5525 from SuperUserNameMan/window_get_latin_kb_variant
windows get_latin_keyboard_variant() implementation and gdscript binding, #5503
2016-07-10 12:41:05 -03:00
Rémi Verschelde
3a70d4a072 Merge pull request #5589 from akien-mga/pr-unused-var
Removing some more unused vars and dead code
2016-07-09 14:33:30 +02:00
Rémi Verschelde
a15de80942 classref: Fix arg name for is_action_pressed/released
Also position TEXTURE_SPHERE constant properly.
2016-07-08 23:40:43 +02:00
Rémi Verschelde
f40f360a2c Remove unused variables (fourth pass) + dead code
Also fix a potential regression from 3fcb9b1ec1.
2016-07-08 16:47:55 +02:00
Pawel Kowal
96eb97cbbf Array has(var value) function 2016-07-07 11:40:38 +02:00
George Marques
29b62ce5d0
Make sure builtin types' constants remain in order
This adds a list of constants for VariantCall to make sure the order of
register is kept when showing in the editor help and in the documentation.

This also remove the sorting of constants from the doctool, so it keeps
the natural order in classes.xml.
2016-07-05 17:09:16 -03:00
George Marques
5c355a63d3
Add OS.request_attention() for Windows 2016-07-05 12:29:08 -03:00
J08nY
0f767fe8b9
Fixed HQ2x compiler warnings 2016-07-05 16:52:31 +02:00
Andreas Haas
45cfd199a4
Input: add get_connected_joysticks() method.
fixes #5465
2016-07-05 14:08:02 +02:00
SuperUserNameMan
7a142780f0 windows get_latin_keyboard_variant() implementation and gdscript binding 2016-07-03 19:35:13 +02:00
Juan Linietsky
eade613dc7 Merge pull request #5522 from neikeq/pr-issue-5519
Prettier str() for arrays
2016-07-02 11:35:30 -03:00
Ignacio Etcheverry
38ed5d9c7d Prettier str() for arrays 2016-07-02 15:54:37 +02:00
Juan Linietsky
72ab3c2236 Do a second stage remap, so it considers translation first, atlas second, closes #5147 2016-06-29 10:18:46 -03:00
Pedro J. Estébanez
1492fd8460 Make text formats preferent over binary ones 2016-06-28 19:25:10 +02:00
Pedro J. Estébanez
92f10a3582 Tidy up population of extensions list 2016-06-28 18:58:40 +02:00
Pedro J. Estébanez
a5e27503fd Homogeinize resource formats loaders/savers 2016-06-28 18:27:12 +02:00
Rémi Verschelde
bd424d8f73 Fix style bug in event queue
Same fix as for 1f9812ab83
Not sure if this code actually does anything though, `buffer_max_used` seems unused.
2016-06-28 08:00:33 +02:00
Juan Linietsky
1f9812ab83 fix bug in reporting of message queue size 2016-06-27 19:07:58 -03:00
Juan Linietsky
efdcf205d2 Make most resources (save for packedscenes and scripts) reload if they change on disk. Closes #4059. 2016-06-27 13:17:20 -03:00
Juan Linietsky
47d6cc08bb Properly deliver localized coordinates when passing gui events through parents, closes #4215 2016-06-27 10:00:36 -03:00
Samuel Grigolato
9ac7eaa89c Add support to String type in gdscript iteration. #5188 2016-06-26 21:13:31 -03:00
Juan Linietsky
fb9d1498bf Cleaner way to enable ptrcall 2016-06-26 11:59:25 -03:00
Juan Linietsky
3813160ea0 -Fix crashes with thread_exit()
-Added draft of C script API (still disabled and unused)
2016-06-26 10:54:45 -03:00
Rémi Verschelde
8a5d23c820 Merge pull request #5412 from vnen/dvector-invert-bind
Expose *Array.invert() to script
2016-06-26 09:46:51 +02:00
George Marques
a6ec3af349
Expose *Array.invert() to script
Properly solve #4601.
2016-06-25 14:16:28 -03:00
Juan Linietsky
8dac3bf3b1 Added function to notify ScriptLanguage when a thread is created/freed, allows scripts to allocate a stack there via TLS 2016-06-25 10:41:23 -03:00
Juan Linietsky
62dfee768d changed way to return reference 2016-06-24 20:06:07 -03:00
Rémi Verschelde
d52fa2e0eb Merge pull request #5380 from vnen/string-canvasitem-docs
Documentation for String and CanvasItem
2016-06-24 21:16:20 +02:00
George Marques
f4dfa37a23
Fix bug in String==StrRange comparison
It was comparing the StrRange with itself, always return true if both
were the same length.

Fix #3843
2016-06-24 12:39:58 -03:00
George Marques
98b02209a4
Add sha256_buffer() function to String 2016-06-23 13:59:23 -03:00
Rémi Verschelde
60fa2b9815 Merge pull request #5201 from Hinsbart/quat_op
Expose missing Quaternion operators.
2016-06-23 10:00:05 +02:00
Rémi Verschelde
0f54ab93bc Fix typo to PTRCALL_ENABLED from previous commit
And boo @reduz, those trailing spaces :p
2016-06-23 07:54:30 +02:00
Rémi Verschelde
20112a338d Merge pull request #5338 from J08nY/array-bindings
*Array bindings
2016-06-23 07:21:10 +02:00
Juan Linietsky
d6225b1e00 Improved binding system (ObjectTypeDB::bind_method) to be friendlier to statically typed languages, should help in the Mono integration.
Disabled by default.
2016-06-22 23:13:41 -03:00
J08nY
797168e62d
*Array: added bindings for other DVector methods
- affects {RAW,INT,REAL,STRING,VECTOR2,VECTOR3,COLOR}_ARRAY
 - adds bindings for append(),append_array(),remove(),insert()
 - broadens #4245
2016-06-22 11:51:59 +02:00
Rémi Verschelde
0266d752b3 Merge pull request #5333 from J08nY/signal-list-fix
Object: get_signal_connection_list fixed
2016-06-22 07:52:23 +02:00
Juan Linietsky
3edf66477a Fixed error using the same atlas rect for all images, closes #4139 2016-06-21 20:51:41 -03:00
Juan Linietsky
d57b09e47b Better support in ScriptLanguage for GC based scripts 2016-06-21 19:36:22 -03:00
Andreas Haas
d08092e113 Expose missing Quaternion operators.
Scripts can now evaluate the following cases:
 - (quat * real) and (quat / real)
 - (quat + quat) and (quat - quat)
2016-06-21 23:26:38 +02:00
Andreas Haas
6d09183c44 Set default duration parameter of joystick vibration to 0. 2016-06-21 17:06:41 +02:00
Rémi Verschelde
81a5e4238d Merge pull request #5325 from vnen/doc-file
Add class reference for File class
2016-06-21 16:34:18 +02:00
George Marques
0f20d8756e
Fix File.get_as_text() to return the whole file
It was returning only from the cursor forward.
2016-06-21 11:25:03 -03:00
J08nY
621b8d1324
Object: get_signal_connection_list fixed
now returns only the connections for the signal argument, as specified
fixes #5329
2016-06-21 13:07:50 +02:00