Commit graph

53 commits

Author SHA1 Message Date
Rémi Verschelde
df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Saggi Mizrahi
c464609bda Add '$' to token names
It was missing from this array and would cause godot to crash or report
bad errors.

Signed-off-by: Saggi Mizrahi <saggi@mizrahi.cc>
2017-04-01 03:20:23 +03: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
Saracen
5e938f0001 Inf and NaN support added to GDScript. 2017-02-28 21:52:33 +00:00
Hein-Pieter van Braam
b696beea65 Correct hash behavior for floating point numbers
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-16 18:44:29 +01:00
karroffel
c24c739da5 made _ a special token in GDScript 2017-01-20 09:26:55 +01:00
Juan Linietsky
4261880c94 Merge pull request #6845 from karroffel/master
Adds pattern matching to GDScript
2017-01-14 17:08:10 -03:00
Rémi Verschelde
93ab45b6b5 Style: Fix whole-line commented code
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-14 14:52:23 +01:00
Juan Linietsky
bc26f90581 Type renames:
Matrix32 -> Transform2D
	Matrix3 -> Basis
	AABB -> Rect3
	RawArray -> PoolByteArray
	IntArray -> PoolIntArray
	FloatArray -> PoolFloatArray
	Vector2Array -> PoolVector2Array
	Vector3Array -> PoolVector3Array
	ColorArray -> PoolColorArray
2017-01-11 00:52:51 -03:00
Karroffel
f8a7c46273 pattern matching: implemented parser 2017-01-11 04:39:55 +01:00
Juan Linietsky
62273e51a2 Moved JSON functions to built-in to_json, parse_json, validate_json 2017-01-08 22:40:00 -03:00
Juan Linietsky
13cdccf23b Variant INT and REAL are now 64 bits (other types remain at 32) 2017-01-08 20:58:39 -03:00
Juan Linietsky
8b912d1115 -Fix bugs related to PoolVector crashes
-Added ability to request nodes using $Name in GDScript :)
2017-01-08 02:04:53 -03:00
Rémi Verschelde
c7bc44d5ad Welcome in 2017, dear changelog reader!
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer
with state-of-the-art rendering techniques tuned to work as low as middle
end handheld devices - without compromising with the possibilities given
for higher end desktop games of course. Great times ahead for the Godot
community and the gamers that will play our games!
2017-01-01 22:03:33 +01:00
Pedro J. Estébanez
1b3dcac281 Adapt overlooked instances of zero-based column numbers 2016-10-13 12:57:14 +02:00
Pedro J. Estébanez
2f80965845 Make text column numbers one-based
Make one-based the column number on the code editor

Make one-based the column number for GDScript error messages

Make one-based the column number for shader code error messages
2016-10-10 11:56:45 +02:00
Juan Linietsky
fc61eb37ce Merge pull request #5920 from 29jm/fix-warnings
Fix some more warnings
2016-09-10 12:21:02 -03:00
Bojidar Marinov
4ee82a2c38
Adds enums to GDScript
Fixes #2966
2016-08-27 15:27:02 +03:00
Juan Linietsky
1add52b55e Brand new networked multiplayer 2016-08-19 16:48:41 -03:00
Johan Manuel
a4674bda47 Fix some comparisons between signed and unsigned integers 2016-08-13 13:21:35 +02:00
Rémi Verschelde
b6ac91c0e6 Removed unused variables (first pass)
Fixes various gcc 5.4.0 warnings for -Wunused-variable and -Wunused-but-set-variable
2016-07-07 23:15:03 +02:00
Dennis Brakhane
c246931f03 correctly parse floats in scientific notation
GDScript incorrectly parsed float values in scientific notation
when no decimal point was given. "1e-5" was parsed as "15".

Fix this by not requiring a decimal point when we found an exponent
for the number to be considered a float.

Fixes #5267
2016-06-18 13:20:45 +02:00
Juan Linietsky
ceeb5453a8 gdscript tokenizer will dislike use of case, closes #4991 2016-06-11 21:45:37 -03:00
Hubert Jarosz
4a4f247914
remove trailing whitespace 2016-03-09 00:00:52 +01:00
Franklin Sobrinho
0426806ebf Removed GDScript "function" keyword 2016-01-13 17:59:39 -03:00
Ignacio Etcheverry
d50e8d2bad Added missing onready token name 2016-01-07 18:59:37 +01:00
Juan Linietsky
23441ec867 Added var2bytes and bytes2var to convet any variable to bytes and back. Closes #2075 2016-01-02 21:07:03 -03:00
Juan Linietsky
61745855d0 PI is now a built-in constant, fixes #2134 2016-01-02 17:56:45 -03:00
Juan Linietsky
0e0a7c9494 -properly handle newline in \ (line continuation) in gdscript, fixes #2112
-also fix a small crash in export detection with scripts that include themselves
2016-01-02 13:56:58 -03:00
George Marques
5be9ff7b67 Update copyright to 2016 in headers 2016-01-01 11:50:53 -02:00
Juan Linietsky
64872ca811 small fixes to color8 2015-12-31 18:32:56 -03:00
reduz
7d2d1442f8 -add breakpoint statement to ease with debugging, closes #3165 2015-12-29 12:11:21 -03:00
reduz
30c12297dc - added 'onready' keyword to gdscript. Defers initialization of member variables until _ready() is run. 2015-12-28 19:32:51 -03:00
eska
d1a75a6757 Remove unexpected GDScript built-in type aliases 2015-11-23 02:09:19 +01:00
neikeq
6c5b031ba9 Add missing token name for signal. closes #2201 2015-08-07 22:20:52 +02:00
Juan Linietsky
8280bb0de0 more debugger fixes
-setting/clearing breakpoints during run-time now works
-multi-line strings resulted in wrong line numbers in bytecode, fixed
2015-08-04 20:17:39 -03:00
Juan Linietsky
2b64f73b04 more code completion improvements
-calltip dissapears with more types of keypresses or when pressing ')'
-properly looks into autoloaded scripts or nodes with another script for
script functions/variables/etc.
2015-06-27 15:52:39 -03:00
Juan Linietsky
a67486a39e improved get_node(), connect(), etc code completion.
-properly completes text arguments
-includes the "/root" autoloads
2015-06-26 01:14:49 -03:00
Juan Linietsky
48f1d02da4 added ability to define signals in script
closes #2175
2015-06-24 13:29:45 -03:00
Juan Linietsky
65d48d6d39 -Added prints() function, fixes #1132, #1859
-Tabs work inside built-in log window, fixes #1867
2015-05-09 18:09:58 -03:00
Juan Linietsky
fdaa2920eb Updated copyright year in all headers 2015-04-18 14:38:54 -03:00
Juan Linietsky
daeac73c54 restored @ for nodepaths/stringnames 2015-02-19 18:12:45 -03:00
Juan Linietsky
bcf27feb98 New Code Completion
-=-=-=-=-=-=-=-=-=-

-Massive improvement to code completion
-Argument hinting for functions

If you manage to out-smart the code-completion in a situation where completion
should be possible to guess, let me know.

 Please enter the commit message for your changes. Lines starting
2014-12-16 22:31:57 -03:00
Juan Linietsky
d85b67be53 Bug Fixes
-=-=-=-=-

-Fixed problem with scaling shapes (#827), related to not taking scale in consideration for calculating the moment of inertia
-Added support for multiline strings (or comments) using """
-Save subscene bug, properties not being saved in root node (#806)
-Fix Crash in CollisionPolygon2DEditor (#814)
-Restored Ability to compile without 3D (#795)
-Fix InterpolatedCamera (#803)
-Fix UV Import for OBJ Meshes (#771)
-Fixed issue with modifier gizmos (#794)
-Fixed CapsuleShape gizmo handle (#50)
-Fixed Import Button (not properly working in 3D) (#733)
-Many misc fixes (though no new features)
2014-11-02 11:31:01 -03:00
Juan Linietsky
e82dc40205 -Much improvement to baked light baker
-Fixed many bugs in stretch mode
-Fixes to camera project and unproject as consequence of the above
-added setget to script (documented in script doc)
-more fixes to collada exporter for blender
2014-10-27 22:54:32 -03:00
Guy Rabiller
f1744c8c31 Fix issue #821: GDScript now accepts single quoted as well as double quoted strings. 2014-10-26 10:33:35 +01:00
Juan Linietsky
0a557f3bf5 - more fixes on #672 on windows
- added #660, but need help on osx, help please I don't have a mac!
- fixed #667 and #668 (eol detection in comments)
- added #670 (hint when using method without () )
2014-09-19 21:01:41 -03:00
Juan Linietsky
549d344f0f Fixing Issues...
- #672 (default user:// in $HOME/.godot/app_userdata (linux/osx) and $APPDATA/Godot/app_userdata (Windows)
- #676 (draw both tiles and octants in order from top to bottom, left to right )
- #686 (unicode escape sequences work now)
- #702 (was not a bug, but a test was added to see if bodies went too far away)
2014-09-19 18:39:50 -03:00
Juan Linietsky
8cab401d08 3D Physics Rework, Other Stuff
-=-=-=-=-=-=-=-=-=-=-=-=-=-

3D Physics:
-Fixed "Bounce" parameter in 3D
-Fixed bug affecting Area (sometims it would not detect properly)
-Vehicle Body has seen heavy work
-Added Query API for doing space queries in 3D. Needs some docs though.
-Added JOINTS! Adapted Bullet Joints: and created easy gizmos for setting them up:
   -PinJoint
   -HingeJoint (with motor)
   -SliderJoint
   -ConeTwistJoint
   -Generic6DOFJoint
-Added OBJECT PICKING! based on the new query API. Any physics object now (Area or Body) has the following signals and virtual functions:
    -input_event (mouse or multitouch input over the body)
    -mouse_enter (mouse entered the body area)
    -mouse_exit (mouse exited body area)
   For Area it needs to be activated manually, as it isn't by default (ray goes thru).

Other:

-Begun working on Windows 8 (RT) port. Compiles but does not work yet.
-Added TheoraPlayer library for improved to-texture and portable video support.
-Fixed a few bugs in the renderer, collada importer, collada exporter, etc.
2014-09-15 11:33:30 -03:00
Juan Linietsky
9b8696d3dd Light Baker!
-=-=-=-=-=-=

-Support for lightmap baker, have fun figuring out how it works before tutorial is published.
2014-06-11 10:41:03 -03:00