aboutsummaryrefslogtreecommitdiff
path: root/core (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Finish implementation of GDnative builtins bindingsEmmanuel Leblond2017-05-191-1/+0
|
* Merge pull request #8807 from RandomShaper/mq-flush-reentrantRémi Verschelde2017-05-181-6/+9
|\ | | | | Make MessageQueue::flush() reentrant
| * Make MessageQueue::flush() reentrantPedro J. Estébanez2017-05-181-6/+9
| |
* | Merge pull request #8649 from neikeq/pr-ringbuffer-findRémi Verschelde2017-05-181-0/+26
|\ \ | | | | | | RingBuffer: Adds find() method
| * | RingBuffer: Adds find() methodIgnacio Etcheverry2017-05-051-0/+26
| | |
* | | Fix two typos from previous commitRémi Verschelde2017-05-176-93/+28
| | | | | | | | | | | | Also cleanup comments on variant types.
* | | Removal of Image from Variant, converted to a Resource.Juan Linietsky2017-05-1723-618/+257
| |/ |/|
* | Fix natural sorting order in EditorFileDialog, FileDialog and ↵Damian Day2017-05-122-3/+61
| | | | | | | | | | | | | | | | | | | | EditorFileSystemDirectory Make EditorFileDialog, FileDialog and EditorFileSystemDirectory alphanumerical sorting more natural Added a new method 'naturalnocasecmp_to' and comparator 'NaturalNoCaseComparator' to String. Fixes #8712.
* | Fixed the IP resolver code blocking the main thread, it uses a Mutex now to ↵Marcelo Fernandez2017-05-081-18/+47
| | | | | | | | lock its own thread.
* | Implemented scrolling factor for smooth trackpad scrollingtoger52017-05-071-1/+5
| | | | | | | | | | Working platforms platform: OSX, Windows. Support for almost all ui elements, including project list.
* | Merge pull request #8658 from Faless/explain_out_of_mem_msg_queue_masterRémi Verschelde2017-05-051-4/+6
|\ \ | | | | | | Better explain out of memory error in message queue
| * | Better explain out of memory error in message queueFabio Alessandrelli2017-05-051-4/+6
| |/ | | | | | | Also effectively saves one unnecessary call when everything is fine.
* | Merge pull request #8642 from RandomShaper/fix-pack-get-curr-dirRémi Verschelde2017-05-051-5/+4
|\ \ | |/ |/| Fix infinite loop in DirAccessPack::get_current_dir()
| * Fix infinite loop in DirAccessPack::get_current_dir()Pedro J. Estébanez2017-05-041-5/+4
| |
* | Rename project file to "project.godot"Rémi Verschelde2017-05-012-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #8572 from akien-mga/thirdpartyRémi Verschelde2017-04-2938-12334/+77
|\ \ | | | | | | Moving more thirdparty stuff (minizip, some single-file external libs) to the thirdparty directory
| * | Move other lone thirdparty files to thirdparty/miscRémi Verschelde2017-04-281-1/+1
| | | | | | | | | | | | | | | Also move Box2D ConvexDecomposition contrib code to thirdparty/b2d_convexdecomp.
| * | Split thirdparty smaz.c out of compressed_translation.cppRémi Verschelde2017-04-282-209/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code comes from https://github.com/antirez/smaz/blob/150e125cbae2e8fd20dd332432776ce13395d4d4/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 ```
| * | Move core thirdparty files to thirdparty/{minizip,misc}Rémi Verschelde2017-04-2837-12125/+74
| |/
* / Revert "Use .godot as file extension for project files."Juan Linietsky2017-04-292-61/+14
|/
* Fix recognition of resource extensions.Andreas Haas2017-04-261-1/+1
| | | | Also removes a related debug print.
* Fix wrong fallback for localevolzhs2017-04-261-1/+1
|
* Merge pull request #8506 from iam13islucky/patch-1Rémi Verschelde2017-04-241-1/+1
|\ | | | | [3.0] Fix bug in Image::_get_pixelb
| * [3.0] Fix bug in Image::_get_pixelbiam13islucky2017-04-231-1/+1
| | | | | | | | Fixes issue: https://github.com/godotengine/godot/issues/8158
* | Merge pull request #8469 from Melix19/patch-2Rémi Verschelde2017-04-241-1/+3
|\ \ | | | | | | Update snake_case splitting
| * | Update snake_case splittingMarco Melorio2017-04-231-1/+3
| |/
* | Merge pull request #8420 from magyar123/pr-script-files-as-baseRémi Verschelde2017-04-241-0/+1
|\ \ | | | | | | Added the ability to select files as base when creating scripts
| * | Added the ability to select files as base when creating scriptsmbalint122017-04-151-0/+1
| | |
* | | Merge pull request #8277 from tagcup/math_checksRémi Verschelde2017-04-249-42/+151
|\ \ \ | | | | | | | | Added various functions basic math classes. Also enabled math checks …
| * | | Added various functions basic math classes. Also enabled math checks only ↵Ferenc Arn2017-04-069-42/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Fix property warnings and hide some debug printsRémi Verschelde2017-04-231-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | "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.
* | | Move VERSION_MKSTRING logic to version.hRémi Verschelde2017-04-203-11/+38
| | | | | | | | | | | | | | | | | | | | | Fixes a bug where the VERSION_PATCH define is not yet in scope if typedefs.h is included before version.h at compilation time. (cherry picked from commit 3b687c5474113b64f186388883ca85cdfe6523d4)
* | | Merge pull request #8417 from neikeq/hello-thereRémi Verschelde2017-04-201-1/+2
|\ \ \ | | | | | | | | External editor improvements and fixes
| * | | External editor improvements and fixesIgnacio Etcheverry2017-04-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable changes: - Now ScriptLanguages have the option to override the global external editor setting. If `ScriptLanguage::open_in_external_editor()` returns `ERR_UNAVAILABLE` (which it does by default), then the global external editor option will be used. - Added formatting to the external editor execution arguments. Now it's possible to write something like this: `{project} -g {file}:{line}:{col}`. - `VisualScript::get_member_line()` now can return the line of functions (well, it returns the id of the _Function_ node of the function). I guess there is nothing else we can get a "line" from. Fixes: - Fixes a bug where `ScriptEditor::script_goto_method()` would not work if the script is not already open in the built-in editor. - Fixes wrong DEFVAL for `cursor_set_column` and `cursor_set_line` in TextEdit. - `Script::get_member_line()` now returns -1 ("found nothing") by default.
* | | | Fixed that playing the project opens the project managerMarco Melorio2017-04-181-1/+1
| | | | | | | | | | | | Fixes #8445
* | | | Merge pull request #8441 from tagcup/seed_fixRémi Verschelde2017-04-183-6/+3
|\ \ \ \ | | | | | | | | | | Fix PRNG randomization.
| * | | | Fix PRNG randomization.Ferenc Arn2017-04-173-6/+3
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | PCG32 doesn't like small seeds, which leads to zero random values (prior to #7532, zero values were handled as special cases). Use a large default seed, and also add a shift in Math::randomize. Fixes #8423.
* | | | Merge pull request #8375 from Hinsbart/project_extensionRémi Verschelde2017-04-172-14/+61
|\ \ \ \ | |/ / / |/| | | Use .godot as file extension for project files.
| * | | Use .godot as file extension for project files.Andreas Haas2017-04-162-14/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Correct Variant::hash_compare()Hein-Pieter van Braam2017-04-142-19/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a logic error in #7815 which made Variant.hash_compare() == Variant.hash_compare() always true. In an attempt to short-circuit the NaN check I made an (in hindsight) obvious error: 10 == 12 || is_nan(10) == is_nan(12) This will be true for all inputs, except for the NaN, not-NaN case. The macro has been updated to now generate: (10 == 12) || (is_nan(10) && is_nan(10)) so: (10 == 12) || (is_nan(10) && is_nan(12)) = false False or (False and False) is False (10 == 10) || (is_nan(10) && is_nan(10)) = true True or (False and False) is True (Nan == 10) || (is_nan(NaN) && is_nan(10)) = false False or (True and False) is False (Nan == Nan) || (is_nan(NaN) && is_nan(NaN)) = true False or (True and True) is True Which is correct for all cases. This bug was triggered because the hash function for floating point numbers can very easily generate collisions for the tested Vector3(). I've also added an extra hashing step to the float hash function to make this less likely to occur. This fixes #8081 and probably many more random weirdness.
* | | Fix a pesky bug in marshalls.cpp/encode_variantBojidar Marinov2017-04-111-1/+1
| | | | | | | | | | | | Fixes #7556 running game from editor on LLVM builds.
* | | Rename [gs]et_pos to [gs]et_position for ControlsSergey Pusnei2017-04-105-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge pull request #8333 from touilleMan/classdb-class_sget_property-bindingRémi Verschelde2017-04-092-0/+21
|\ \ \ | | | | | | | | Add _ClassDB.class_[g|s]et_property to ClassDB exposed methods
| * | | Add return value in ClassDB.class_[g|s]et_property bindingsEmmanuel Leblond2017-04-091-2/+2
| | | |
| * | | Add _ClassDB.class_[g|s]et_property to ClassDB exposed methodsEmmanuel Leblond2017-04-092-0/+21
| | | |
* | | | Particle system is complete. Rejoice!Juan Linietsky2017-04-081-10/+11
| |/ / |/| |
* | | Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-08233-0/+233
|/ /
* | New particle system, mostly working, some small features missing.Juan Linietsky2017-04-062-24/+1
| |
* | Merge pull request #8286 from Hinsbart/memleaksRémi Verschelde2017-04-062-2/+2
|\ \ | |/ |/| Core: fix possible memory leaks.
| * Core: fix possible memory leaks.Andreas Haas2017-04-062-2/+2
| |