Juan Linietsky
e8fb68e038
simplify the way window is allowed to steal focus, no longer relying on project.godot. Closes #9459
...
(cherry picked from commit 533014b88c
)
2017-08-27 12:53:45 +02:00
Sipaha
a6b160660c
Move wait_for_flush out of queue lock
...
(cherry picked from commit f6ee4cac39
)
2017-08-27 12:49:09 +02:00
Rémi Verschelde
3e397586bb
Merge pull request #10521 from RandomShaper/fix-double-parsing-2.1
...
Fix tokenization of doubles (2.1)
2017-08-22 15:03:33 +02:00
Pedro J. Estébanez
c97435cfa5
Fix tokenization of doubles
...
(cherry picked from commit 6759a28050
)
2017-08-22 00:01:04 +02:00
Hein-Pieter van Braam
364f2e8082
Correct hash behavior for floating point numbers
...
This backports the work in #7815 and the subsequent fixes in #8393
The following program now works as expected in this branch in both
release_debug and debug mode:
```gdscript
print(sqrt(-1))
print(sqrt(-1))
var simple1=asin(10.0)
var simple2=acos(10.0)
print(simple1)
print(simple2)
```
And successfully prints -nan 4 times
This fixes #9580 and fixes #8925
2017-08-20 23:44:28 +02:00
Marcelo Fernandez
647c4ae5bf
Add closest_power_of_2 func and implement mix_rate/latency on OS X
2017-08-18 12:10:21 -03:00
Juan Linietsky
641135ba21
Display the Y angle properly when rotating from gizmo, partially helps #1479
...
(cherry picked from commit cd9539f85d
)
2017-08-13 20:29:46 +02:00
Juan Linietsky
c1b6301050
keep default exported script values unless overriden, closes #8127
...
(cherry picked from commit 475e8b28b2
)
2017-08-13 20:29:43 +02:00
Raymoo
1aedd48929
Port StreamPeerBuffer to 2.1
2017-08-12 01:08:35 -07:00
Indah Sylvia
5014b9dc40
core/[io;object]: fix typo 'resoucre' to 'resource'
2017-08-08 18:07:29 +07:00
Rémi Verschelde
c1f54e1a45
Style: Apply clang-format on all files
...
Thus fixing some invalid changes that had still made it to the 2.1 branch.
2017-07-30 23:00:25 +02:00
Andreas Haas
992b415702
Bindings: Fix Object::get_meta return type.
...
The method was shown as void in the docs.
(cherry picked from commit 2b7b67b7b1
)
2017-07-30 21:12:08 +02:00
Pedro J. Estébanez
94fdbf67a9
Fix misplaced quote in error messsage
...
(cherry picked from commit 748240b090
)
2017-07-27 01:29:37 +02:00
Marcelo Fernandez
a3a01332b8
Fix cvs files freezing the editor when a double quote is not closed
2017-07-25 22:00:47 -03:00
Poommetee Ketson
61ff58403d
Ignore fuzzy translations
...
(cherry picked from commit fdd2a87b8f
)
2017-07-14 22:15:05 +02:00
Poommetee Ketson
7603d77d1d
AStar: add bool has_point(id)
...
(cherry picked from commit 2c9f6312e2
)
2017-07-14 22:14:37 +02:00
geequlim
da2bcda7be
Enhanced debugger. ake 2.1 more productive!
...
Allow access more informations from remote debugger.
Refector more debugger related code to allow full access to variables.
Array Property Editor now can edit with more objects including remote objects.
Implements `GDInstance::debug_get_globals` to query all gloabl constants avaliable in GDScriptLanguage.
Show globals in debug stack variable panel.
Disabe capitalize property name for remote object.
Add DictionaryPropertyEdit to edit with Dictionaries.
The serialization/unserialization workflow use binary data instead of dictionary to avoid send too large data.
Do not stop debugger if curent break point stack has error fix #9034 .
Don't send all content of strings but first 80 characters from remote debugger.
Add constants into the break point stack tree and remote object instance edit inspector.
Remote GDScript resource object instance list constants in the property inspector.
Add `self` to the local in the break point stack as a remote object.
Move some functions for GDScript related to thier base classes so debugger don't rely on the gdscript module any more.
The slef in the debugger tree now expanded as the instance of script instead of the script resource.
2017-07-11 17:44:28 +08:00
Rémi Verschelde
f99481e0c2
Merge pull request #8944 from RandomShaper/fix-error-handling-2.1
...
Make error handling more convenient (2.1)
2017-07-05 10:15:36 +02:00
Pedro J. Estébanez
e9b7640f84
Make error handling more convenient
...
By adding some PRAY_* macros that encapsulate both the check and the returning of a null reference (UB).
Plus transient avoidance of the flood of warnings emitted by Clang when checking 'this' for NULL.
Plus explanation about the do-while(0) loop in some error macros.
2017-07-05 09:31:37 +02:00
Juan Linietsky
026c580399
Changed Vector3.snap from fmod to stepify, which makes more sense, fixes #6399
...
(cherry picked from commit 23ababdcd5
)
2017-06-30 23:32:13 +02:00
Rémi Verschelde
1a1b97e059
Revert "Dictionary keys are now sorted by insertion order"
...
This reverts commit b8a16fbd0e
.
Too cutting edge for the stable branch, it also makes Dictionary
twice slower.
2017-06-28 08:05:30 +02:00
Rémi Verschelde
e3f9653353
Merge pull request #9410 from williamd1k0/advanced-string-format
...
Advanced string format (2.1)
2017-06-27 20:52:27 +02:00
Juan Linietsky
b8a16fbd0e
Dictionary keys are now sorted by insertion order
...
- Cherry-pick from 0a59c3c3a6
2017-06-26 20:29:17 -03:00
geequlim
9d49491afd
Fix crash with String copy from with NULL string parameter
...
(cherry picked from commit 4b2a44054a
)
2017-06-25 16:18:05 +02:00
Poommetee Ketson
4a0dc529ce
BuildSystem: generated files have .gen.ext
2017-06-25 20:31:56 +07:00
dumitru-stama
e9e39dd6dc
Added 'blit_rect_mask' method
2017-06-24 08:16:35 -07:00
d
48f8931d48
Added two new methods 'blend_rect_mask' and 'fill'
2017-06-18 10:27:50 -07:00
Rémi Verschelde
e17966ca01
Merge pull request #9167 from dumitru-stama/blitalpha
...
Added new "blend_rect" method as an alpha-aware blit_rect
2017-06-17 12:54:15 +02:00
dumitru.stama
e99d13c6bc
Fixed a blit_rect crash with out-of-bounds coords
2017-06-17 12:53:32 +02:00
Martin Capitanio
3213ddd060
Don't append standard ports to the request header.
...
Breaks the SSL communication with some servers,
do the same that the other curl, wget, firefox & co clients do.
Fixes #9146
(cherry picked from commit 5cabe5f0fc
)
2017-06-17 12:16:45 +02:00
toger5
e1f4abe062
added grow functions to Rect2
...
- grow_individual
- grow_margin
(cherry picked from commit 66b308925c
)
2017-06-17 12:04:49 +02:00
William Tumeo
a82bf83ea2
Add advanced string format
...
Cherry-pick from #7010
2017-06-16 00:41:51 -03:00
dumitru.stama
95dcd22b46
Added a new 'blend_rect' method acting as 'blit_rect' with alpha-blending
2017-06-14 00:55:52 -07:00
Rémi Verschelde
dc420b3b0a
Doc: Sync classref with current source
2017-06-14 09:26:43 +02:00
George Marques
1d759f02e6
Fix root path resolution on PCK file
2017-06-07 11:36:00 -03:00
Pedro J. Estébanez
bf4a25c272
Use builtin BC decompression when libsquish not available
...
Builtin code is revived and fixed.
2017-05-28 03:45:38 +02:00
Ferenc Arn
aef3c4a804
Use libsquish to decompress DXT textures.
...
Also ensure that save_png doesn't modify the image.
Removed the broken decompressor in the process.
2017-05-26 18:56:10 -05:00
Bojidar Marinov
831cb5b119
Fix weigth scale of A* being applied to the whole path and estimation
...
Attempt to fix #8584
(cherry picked from commit bd91730347
)
2017-05-27 00:42:59 +02:00
Ferenc Arn
89703435a1
Avoid overestimating the cost in AStar heuristics.
...
This is a necessary condition for finding optimal solutions.
This is achieved by simply requiring/ensuring that no weights are smaller than 1.
Fixes #8584 .
(cherry picked from commit e4eb093c62
)
2017-05-27 00:42:59 +02:00
Fabian Mathews
f0beb36652
Added bool to allow astar points to be connected in one direction only
...
(cherry picked from commit 2262a59ab3
)
2017-05-27 00:42:59 +02:00
Marcelo Fernandez
645636e27c
Fixed the IP resolver code blocking the main thread, it uses a Mutex now to lock its own thread.
...
(cherry picked from commit bba8f1db30
)
2017-05-26 23:56:31 +02:00
Rémi Verschelde
6cf507f004
Move other lone thirdparty files to thirdparty/misc
...
Also move Box2D ConvexDecomposition contrib code to
thirdparty/b2d_convexdecomp.
(cherry picked from commit d4029aa51a
)
2017-05-26 23:39:47 +02:00
Rémi Verschelde
86724ba1c6
Split thirdparty smaz.c out of compressed_translation.cpp
...
Code comes from 150e125cba/smaz.c
With a small modification to match Godot expectations:
```
diff --git a/thirdparty/core/smaz.c b/thirdparty/core/smaz.c
index 9b1ebc2..555dfea 100644
--- a/thirdparty/core/smaz.c
+++ b/thirdparty/core/smaz.c
@@ -14,7 +14,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#include <string.h>
/* Our compression codebook, used for compression */
-static char *Smaz_cb[241] = {
+static const char *Smaz_cb[241] = {
"\002s,\266", "\003had\232\002leW", "\003on \216", "", "\001yS",
"\002ma\255\002li\227", "\003or \260", "", "\002ll\230\003s t\277",
"\004fromg\002mel", "", "\003its\332", "\001z\333", "\003ingF", "\001>\336",
@@ -89,7 +89,7 @@ static char *Smaz_rcb[254] = {
"e, ", " it", "whi", " ma", "ge", "x", "e c", "men", ".com"
};
-int smaz_compress(char *in, int inlen, char *out, int outlen) {
+int smaz_compress(const char *in, int inlen, char *out, int outlen) {
unsigned int h1,h2,h3=0;
int verblen = 0, _outlen = outlen;
char verb[256], *_out = out;
@@ -167,7 +167,7 @@ out:
return out-_out;
}
-int smaz_decompress(char *in, int inlen, char *out, int outlen) {
+int smaz_decompress(const char *in, int inlen, char *out, int outlen) {
unsigned char *c = (unsigned char*) in;
char *_out = out;
int _outlen = outlen;
@@ -192,7 +192,7 @@ int smaz_decompress(char *in, int inlen, char *out, int outlen) {
inlen -= 2+len;
} else {
/* Codebook entry */
- char *s = Smaz_rcb[*c];
+ const char *s = Smaz_rcb[*c];
int len = strlen(s);
if (outlen < len) return _outlen+1;
diff --git a/thirdparty/core/smaz.h b/thirdparty/core/smaz.h
index a547d89..a9d8a33 100644
--- a/thirdparty/core/smaz.h
+++ b/thirdparty/core/smaz.h
@@ -14,7 +14,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#ifndef _SMAZ_H
#define _SMAZ_H
-int smaz_compress(char *in, int inlen, char *out, int outlen);
-int smaz_decompress(char *in, int inlen, char *out, int outlen);
+int smaz_compress(const char *in, int inlen, char *out, int outlen);
+int smaz_decompress(const char *in, int inlen, char *out, int outlen);
#endif
```
(cherry picked from commit c5f830d6b9
)
2017-05-26 23:35:15 +02:00
Rémi Verschelde
8312d421c6
Move core thirdparty files to thirdparty/{minizip,misc}
...
(cherry picked from commit 2398eb6ed4
)
2017-05-26 23:29:26 +02:00
Marco Melorio
b0d2b46efb
Update snake_case splitting
...
(cherry picked from commit 4677c0fbb8
)
2017-05-26 18:47:23 +02:00
Andreas Haas
a46dcfe12f
Core: fix possible memory leaks.
...
(cherry picked from commit a2734df7ed
)
2017-05-26 17:38:05 +02:00
Pedro J. Estébanez
fa4b09f63d
Make MessageQueue::flush() reentrant
2017-05-18 13:01:12 +02:00
Rémi Verschelde
aa046a85dc
Merge pull request #8740 from pixelpicosean/scrollingWithFactor
...
Implemented scrolling factor for precision trackpads for 2.1
2017-05-15 07:57:05 +02:00
Sean Bohan
ee670f3724
Implemented scrolling factor for smooth trackpad scrolling
...
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.
Ported from 304a1f5b5a
(#7864 ).
Fixes #492 and #3913 .
2017-05-15 06:44:00 +08:00
Fabio Alessandrelli
3044d0aed3
Compression::compress properly returns compressed size
...
selective pick from cbbcf72703
2017-05-12 20:01:53 +02:00