summaryrefslogtreecommitdiff
path: root/modules/gdscript
AgeCommit message (Collapse)Author
2017-03-05Refactoring: rename tools/editor/ to editor/Rémi Verschelde
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-02-28Merge pull request #7878 from RebelliousX/elseRémi Verschelde
Bunch of missing `else` statements and general logic
2017-02-28Inf and NaN support added to GDScript.Saracen
2017-02-28 Various fixes detected using PVS-Studio static analyzer.Thaer Razeq
- 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-26Merge pull request #7851 from shlomif/fix-some-compilation-warningsRémi Verschelde
Get rid of some compilation warnings.
2017-02-26Merge pull request #7809 from hpvb/fix-6798Rémi Verschelde
Allow preload to accept a const string.
2017-02-21Fix some compilation warnings.Shlomi Fish
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-renamed globals.h to global_config.cpp (this seems to have caused a few ↵Juan Linietsky
modified files) -.pck and .zip exporting redone, seems to be working..
2017-02-16Correct hash behavior for floating point numbersHein-Pieter van Braam
This fixes HashMap where a key or part of a key is a floating point number. To fix this the following has been done: * HashMap now takes an extra template argument Comparator. This class gets used to compare keys. The default Comperator now works correctly for common types and floating point numbets. * Variant implements ::hash_compare() now. This function implements nan-safe comparison for all types with components that contain floating point numbers. * Variant now has a VariantComparator which uses Variant::hash_compare() safely compare floating point components of variant's types. * The hash functions for floating point numbers will now normalize NaN values so that all floating point numbers that are NaN hash to the same value. C++ module writers that want to use HashMap internally in their modules can now also safeguard against this crash by defining their on Comperator class that safely compares their types. GDScript users, or writers of modules that don't use HashMap internally in their modules don't need to do anything. This fixes #7354 and fixes #6947.
2017-02-16Allow preload to accept a const string.Hein-Pieter van Braam
In preload() parsing this code will lookup the identifier in the local constant database. If the identifier corresponds to a string constant it is used as the path for preload(). Currently this does not work for global constants, only constants declared in the same class as the preload is happening. We can implement a full fix too. Maybe we can use this PR to discuss the possibilities. This (partially) fixes #6798
2017-02-15-begin of export work, not done yetJuan Linietsky
-fixes to make scenes exported from godot 2.x work
2017-02-13Remove bounds check when resuming from yield.Hein-Pieter van Braam
The code would get a pointer to the beginning of the call_args by using operator[] at the stack Vector. This does bound checking. When there are no call_args this bound check fails and the error mentioned in #7796 gets triggered. This bound check is actually not necessary as call_args just gets set to NULL and never dereferenced. This new code will just unconditionally set the pointer to the place where the call_args are if there are any. There is no NULL check for call_args anywhere so this is safe. Fixes #7796
2017-02-13Rename the _MD macro to D_METHODHein-Pieter van Braam
This new name also makes its purpose a little clearer This is a step towards fixing #56
2017-02-04Fix parsing bug which causes range(variable) to crash the enginelonesurvivor
problem was a segmentation fault caused by trying to access Vector constants[0] which isn't there if op->arguments.size() is not bigger than one. - the changed OR condition didn't make sense (always true), should be AND - changes the "constant" variable to be false per default and gets set to true when there is actually something pushed to "constants"
2017-01-25Removed import/export system, will start new one from scratch.Juan Linietsky
2017-01-23Merge pull request #7583 from karroffel/wildcardRémi Verschelde
made _ a special token in GDScript
2017-01-20made _ a special token in GDScriptkarroffel
2017-01-16Overloaded basic math funcs (double and float variants). Use real_t rather ↵Ferenc Arn
than float or double in generic functions (core/math) whenever possible. Also inlined some more math functions.
2017-01-16Merge pull request #7532 from tagcup/pcg_prngRémi Verschelde
Replace the existing PRNG (Xorshift31) with (minimal) PCG-32.
2017-01-16Style: Various fixes to play nice with clang-formatRémi Verschelde
2017-01-16Style: Fix statements ending with ';;'Rémi Verschelde
2017-01-16Style: Cleanups, added headers, renamed filesRémi Verschelde
Made sure files in core/ and tools/ have a proper Godot license header when written by us. Also renamed aabb.{cpp,h} and object_type_db.{cpp,h} to rect3.{cpp,h} and class_db.{cpp,h} respectively. Also added a proper header to core/io/base64.{c,h} after clarifying the licensing with the original author (public domain).
2017-01-15Replace the existing PRNG (Xorshift31) with (minimal) PCG (XSH-RR variant ↵Ferenc Arn
with 32-bit output, 64-bit state). PCG is better than many alternatives by many metrics (see www.pcg-random.org) including statistical quality with good speed.
2017-01-15Style: Cosmetic fixes to play nice with clang-formatRémi Verschelde
2017-01-14Compile error when duplicate key in dictionery literal #7034James Mintram
2017-01-14Merge pull request #6845 from karroffel/masterJuan Linietsky
Adds pattern matching to GDScript
2017-01-14Merge pull request #4918 from jjay/f/error_on_redefineJuan Linietsky
Redefine var results in an error
2017-01-14Style: Fix whole-line commented codeRémi Verschelde
They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
2017-01-14rename String.extension() -> String.get_extension() / String.basename() -> ↵Juan Linietsky
String.get_basename()
2017-01-12Implicit inheritance now defaults to Resource, will error for node scripts ↵Juan Linietsky
if extends not used.
2017-01-11More efficient iteration syntax, and range() is converted behind the scenes ↵Juan Linietsky
to it.
2017-01-11Merge pull request #6930 from bojidar-bg/gdscript-export-array-hintRémi Verschelde
Allow typing hints for Array class (in GDScript and Inspector)
2017-01-11Both Array and Dictionary are always in shared mode (removed copy on write).Juan Linietsky
2017-01-11Merge pull request #7093 from bojidar-bg/named-colorsRémi Verschelde
Add named colors to GDScript/Visual Script/core.
2017-01-11Type renames:Juan Linietsky
Matrix32 -> Transform2D Matrix3 -> Basis AABB -> Rect3 RawArray -> PoolByteArray IntArray -> PoolIntArray FloatArray -> PoolFloatArray Vector2Array -> PoolVector2Array Vector3Array -> PoolVector3Array ColorArray -> PoolColorArray
2017-01-11pattern matcher: Implemented backendKarroffel
changed comments
2017-01-11pattern matcher: Implemented transformationsKarroffel
2017-01-11pattern matching: implemented parserKarroffel
2017-01-10It is now possible to name layers of different kinds!Juan Linietsky
2017-01-10uses the global thread to protect the instacnes map in GDScript, closes #4615Juan Linietsky
2017-01-08Moved JSON functions to built-in to_json, parse_json, validate_jsonJuan Linietsky
2017-01-08Variant INT and REAL are now 64 bits (other types remain at 32)Juan Linietsky
2017-01-08renamed joystick to joypad everywhere around source code!Juan Linietsky
2017-01-08Fix code completion for new getnode syntaxJuan Linietsky
2017-01-08-Fix bugs related to PoolVector crashesJuan Linietsky
-Added ability to request nodes using $Name in GDScript :)
2017-01-07Memory pool vectors (DVector) have been enormously simplified in code, and ↵Juan Linietsky
renamed to PoolVector
2017-01-05-Changed most project settings in the engine, so they have major and minor ↵Juan Linietsky
categories. -Changed SectionedPropertyEditor to support this -Renamed Globals singleton to GlobalConfig, makes more sense. -Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
2017-01-04-GDScript support for accessing properties directlyJuan Linietsky
-Added code lookup and code completion support for properties too
2017-01-02ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky
Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
2017-01-02Revert expression reduction from #7390Rémi Verschelde
Fixes #7412.