summaryrefslogtreecommitdiff
path: root/core/variant.h
AgeCommit message (Collapse)Author
2017-09-25Fixed constness of variant functions, as well as visual script sequence ↵Juan Linietsky
ports. Closes #11258
2017-09-19Allow booleanization of all typesHein-Pieter van Braam
We now allow booleanization of all types. This means that empty versions of all types now evaluate to false. So a Vector2(0,0), Dictionary(), etc. This allows you to write GDScript like: if not Dictionary(): print("Empty dict") Booleanization can now also no longer fail. There is no more valid flag, this changes Variant and GDNative API.
2017-09-17Move Variant::evaluate() switch to computed gotoHein-Pieter van Braam
In an effort to make GDScript a little faster replace the double switch() with a computed goto on compilers that set __GNUC__. For compilers that don't support computed goto it will fall back to regular switch/case statements. In addition disable using boolean values in a mathematical context. Now boolean values can only be compared with other booleans. Booleans will also no longer be coerced to integers. This PR replaces #11308 and fixes #11291
2017-09-13Fix enums bindingsMaxim Sheronov
Add missed bindings for enums Move some enums to class to have correct output of api.json
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-10Improves method bind detection of signature typesIgnacio Etcheverry
2017-08-05few bugs fixed thanks to explicit bool constructor and clang.Juan Linietsky
explicit bool constructor has thus now been removed, as it served it's mission!
2017-08-05Made bool constructor explicit in Variant to avoid bugs, fixes #7843Juan Linietsky
2017-08-05renamed node path, closes #5691Juan Linietsky
2017-05-20Removal of InputEvent as built-in Variant type..Juan Linietsky
this might cause bugs I haven't found yet..
2017-05-17Fix two typos from previous commitRémi Verschelde
Also cleanup comments on variant types.
2017-05-17Removal of Image from Variant, converted to a Resource.Juan Linietsky
2017-04-08Add "Godot Engine contributors" copyright lineRémi Verschelde
2017-03-05A Whole New World (clang-format edition)Rémi Verschelde
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-05really fixed PTRCALL nowKarroffel
2017-03-05Added PowerState casting operator to VariantKarroffel
Without it Godot does not build with PTRCALL_ENABLED
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-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-11Type renames:Juan Linietsky
Matrix32 -> Transform2D Matrix3 -> Basis AABB -> Rect3 RawArray -> PoolByteArray IntArray -> PoolIntArray FloatArray -> PoolFloatArray Vector2Array -> PoolVector2Array Vector3Array -> PoolVector3Array ColorArray -> PoolColorArray
2017-01-08Variant INT and REAL are now 64 bits (other types remain at 32)Juan Linietsky
2017-01-07Memory pool vectors (DVector) have been enormously simplified in code, and ↵Juan Linietsky
renamed to PoolVector
2017-01-01Welcome in 2017, dear changelog reader!Rémi Verschelde
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!
2016-10-22Added small modification on parser for '+'Henrique L. Alves
2016-09-02Basic type constants for visual scriptJuan Linietsky
2016-08-03More progress on visual script editingJuan Linietsky
2016-06-20Property reporty base type when a function fails, fixes #4581 probably also ↵Juan Linietsky
closes other issues
2016-06-19Remove USE_QUAD_VECTORS unused checkJ08nY
2016-06-19Remove CHARTYPE_16BITS unused checksJ08nY
fix #5263
2016-05-17-Added configuration warning system for nodesJuan Linietsky
-Added a new "add" and "instance" buttons for scene tree -Added a vformat() function to ease translation work
2016-03-09remove trailing whitespaceHubert Jarosz
2016-03-01AnimationTreePlayer: blend value tracks (closes #2299)Josh Grams
Variant: - zero() sets a Variant to the appropriate type of zero value - blend() blends part of one Variant on top of another.
2016-01-04-make signals throw an error when target method is not found, fixes #2036Juan Linietsky
-removed 4 arguments limit for emit_signal() from script -remvoed 4 arguments limit for call_deferred() from script
2016-01-02-Ability to roll-back script-exported properties to their default value on ↵Juan Linietsky
the script, closes #2128
2016-01-01Update copyright to 2016 in headersGeorge Marques
2015-12-31-Changed var2str and str2var in GDScript to use VariantWriter and VariantParserJuan Linietsky
-It is now finally possible to parse back a variant from text!
2015-12-05-Display on animation editor which keys are invalid and which tracks are ↵Juan Linietsky
unresolved -Added a tool to clean up unresolved tracks and unused keys
2015-06-29Several performance improvements, mainly in loading and instancing scenes ↵Juan Linietsky
and resources. A general speedup should be apparent, with even more peformance increase when compiling optimized. WARNING: Tested and it seems to work, but if something breaks, please report.
2015-05-04-More strict argument type-checking, will make many bugs visible, fixes #1809Juan Linietsky
-added NOTIFICATION_INSTANCED
2015-05-01Sort xml files, so order is constantest31
Makes xml format work better with version control systems.
2015-04-18Updated copyright year in all headersJuan Linietsky
2015-02-15begin new serialization frameworkJuan Linietsky
also got rid of STL dependency on triangulator
2014-12-17-removed annoying pragmaJuan Linietsky
2014-12-16Merge branch 'master' of https://github.com/okamstudio/godotJuan Linietsky
2014-12-16New Code CompletionJuan Linietsky
-=-=-=-=-=-=-=-=-=- -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-15Small batch of fixesJuan Linietsky
-=-=-=-=-=-=-=-=-=-= -Fixed looping error in AudioStreamResampled -winrt port progress -fixes in material in ambient light
2014-12-08Small FixesJuan Linietsky
-=-=-=-=-=- -Bug in navmesh demo fixed -Bug in variant -Better Collada Exporter supports proper names of exported shapekeys
2014-09-19- more fixes on #672 on windowsJuan Linietsky
- 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-02-09GODOT IS OPEN SOURCEJuan Linietsky