summaryrefslogtreecommitdiff
path: root/core/bind
AgeCommit message (Collapse)Author
2019-05-22Expose 2D polygon boolean operations in Geometry singletonAndrii Doroshenko (Xrayez)
Clipper 6.4.2 is used internally to perform polypaths clipping, as well as inflating/deflating polypaths. The following methods were added: ``` Geometry.merge_polygons_2d(poly_a, poly_b) # union Geometry.clip_polygons_2d(poly_a, poly_b) # difference Geometry.intersect_polygons_2d(poly_a, poly_b) # intersection Geometry.exclude_polygons_2d(poly_a, poly_b) # xor Geometry.clip_polyline_with_polygon_2d(poly_a, poly_b) Geometry.intersect_polyline_with_polygon_2d(poly_a, poly_b) Geometry.offset_polygon_2d(polygon, delta) # inflate/deflate Geometry.offset_polyline_2d(polyline, delta) # returns polygons // This one helps to implement CSG-like behaviour: Geometry.transform_points_2d(points, transform) ``` All the methods return an array of polygons/polylines. The resulting polygons could possibly be holes which could be checked with `Geometry.is_polygon_clockwise()` which was exposed to scripting as well.
2019-04-09Style: Apply new changes from clang-format 8.0Rémi Verschelde
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0, so contributors can keep using those versions for now (they will not undo those changes).
2019-04-07core_bind: Use the appropriate enum instead of intIgnacio Etcheverry
2019-04-02Enable warnings=extra on clang and GCC testers.marxin
And remove 2 warnings from warnings=extra.
2019-04-01Add object encoding param to serialization methodsFabio Alessandrelli
Network peers get_var/put_var File get_var/store_var GDScript/Mono/VisualScript bytes2var/var2bytes Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding. Break ABI compatibaility (API compatibility for GDNative).
2019-03-08Request Android record permission when neededDESKTOP-3H3MR3A\eloisa
2019-02-16Expose OS::get_current_video_driver to scripting languagesRémi Verschelde
2019-01-30Let memory stat functions return uint64_tPedro J. Estébanez
2019-01-11Fix error explanation in core_bind Thread::_start_funcPoommetee Ketson
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-27doc: Sync classref with current sourceRémi Verschelde
Fix various code formatting issues and argument names.
2018-12-20Added OS.get_system_time_msecs()volzhs
2018-11-23Changes IME input to use notification instead of callback, exposes IME ↵bruvzg
methods to gdscript/gdnative.
2018-11-16Add store_csv_line method for FileKanabenki
2018-11-08-Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky
-Removed one and zero hints for properties, replaced by default value
2018-11-07Expose OS::move_window_to_foregroundMarcelo Fernandez
2018-10-18Bind missing subresource flag in ResourceSaverAndrii Doroshenko (Xrayez)
2018-10-06Remove redundant "== true" codeAaron Franke
If it can be compared to a boolean, it can be evaluated as one in-place.
2018-09-28SCons: Build core's thirdparty code in own environmentRémi Verschelde
Also move Zlib and Zstd's build instructions to core/SCsub.
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-08-24Merge pull request #20712 from marcelofg55/midi_open_closeJuan Linietsky
Add OS::open_midi_inputs and OS::close_midi_inputs
2018-08-13fix #20390 :get_unix_time_from_datetime and get_date_time_from_unix_time can ↵RaphaelHunter
handle time before year 1970 now
2018-08-12Fix ResourceLoader::exists() false negative and readd deprecated has()Rémi Verschelde
2018-08-10Added function ResourceLoader.exists(), to check if a resource exists. ↵Juan Linietsky
Closes #19140
2018-08-10Revert "added get_creation_time function for gdscript"Juan Linietsky
2018-08-10Merge pull request #18914 from notwarp/masterJuan Linietsky
added get_creation_time function for gdscript
2018-08-04Add OS::open_midi_inputs and OS::close_midi_inputsMarcelo Fernandez
2018-07-21Added a new MIDIDriver classMarcelo Fernandez
2018-06-18Expose OS.get_ticks_usec()Marc Gilleron
2018-06-11IME context detection.Saracen
2018-05-30Improve return value of OS.execute in blocking/non-blocking variantsRémi Verschelde
Initialized the PID to -2, which will be the value returns in blocking- mode where the PID is not available. (-1 was already taken to signify an execution failure). OS::execute will now properly return a non-OK error code when it fails to execute the target file. The documentation was rewritten to be very clear about the differences between blocking and non-blocking mode. Fixes #19056.
2018-05-19GDScript access to copyright, license, author and donor information.Ibrahn Sahir
Adds following functions to the Engine singleton: get_author_info - names of Godot authors get_copyright_info - detailed source copyright get_license_info get_donor_info - donor names get_license_info - full text of licenses used, indexed by license names get_license_text - the text of the Godot Expat license
2018-05-16added get_creation_time function for gdscriptDaniele Giuliani
2018-05-08Merge pull request #14622 from bruvzg/non-rectangular-windowsHein-Pieter van Braam
Experimental support for windows with per-pixel transparency.
2018-05-07Merge pull request #17353 from zmanuel/timer_hysteresis_multiframe_pr1Juan Linietsky
Use hysteresis for smoother physics update frequency
2018-05-07Merge pull request #15943 from poke1024/geometry-line-lineJuan Linietsky
Add Geometry::line_intersects_line_2d()
2018-04-22Change ".." punctuation for "..." in editor strings (#16507)Hugo Locurcio
2018-04-18Merge pull request #18227 from bojidar-bg/fix-date-unix-crashRémi Verschelde
Fix crash resulting from bad month check in core_bind.cpp
2018-04-17Fix crash resulting from bad month check in core_bind.cppBojidar Marinov
Also, make it clear that day is 0-based. This might cause very slight differcies in existing games. Fixes #18221
2018-04-11iPhone X support and iOS-related fixesRuslan Mustakov
Starting from April 2018 Apple no longer accepts apps that do not support iPhone X. For games this mainly means respecting the safe area, unobstructed by notch and virtual home button. UI controls must be placed within the safe area so that users can interact with them. This commit: - Adds OS::get_window_safe_area method that returns unobscured area of the window, where interactive controls should be rendered. - Reorganizes how launch screens are exported - the previous way was incorrect and modern iPhones did not pick up the correct screens and because of that used a non-native resolution to render the game. - Adds launch screen options for iPhone X. - Makes launch screens optional in the export template. If not specified, a white screen will be used. - Adds App Store icon (1024x1024) export option as it now has to be bundled with the app instead of being provided in iTunes Connect. - Fixes crash when launching games in iOS Simulator. It happened because controllerWasConnected callback came before the engine was initialized. Now in such case the controllers will be queued up and registered after initialization is done. - Fixes issue with the virtual keyboard where for some reason autocorrection panel would intersect with the keyboard itself and not allow you to use the top row of the keyboard. This is fixed by disabling autocorrection altogether. Closes #17358. Fixes #17428. Fixes #17331.
2018-04-11Update classref and docs, fix missing parameters' namePoommetee Ketson
2018-04-09Add hysteresis to physics timestep count per frameManuel Moos
Add new class _TimerSync to manage timestep calculations. The new class handles the decisions about simulation progression previously handled by main::iteration(). It is fed the current timer ticks and determines how many physics updates are to be run and what the delta argument to the _process() functions should be. The new class tries to keep the number of physics updates per frame as constant as possible from frame to frame. Ideally, it would be N steps every render frame, but even with perfectly regular rendering, the general case is that N or N+1 steps are required per frame, for some fixed N. The best guess for N is stored in typical_physics_steps. When determining the number of steps to take, no restrictions are imposed between the choice of typical_physics_steps and typical_physics_steps+1 steps. Should more or less steps than that be required, the accumulated remaining time (as before, stored in time_accum) needs to surpass its boundaries by some minimal threshold. Once surpassed, typical_physics_steps is updated to allow the new step count for future updates. Care is taken that the modified calculation of the number of physics steps is not observable from game code that only checks the delta parameters to the _process and _physics_process functions; in addition to modifying the number of steps, the _process argument is modified as well to stay in expected bounds. Extra care is taken that the accumulated steps still sum up to roughly the real elapsed time, up to a maximum tolerated difference. To allow the hysteresis code to work correctly on higher refresh monitors, the number of typical physics steps is not only recorded and kept consistent for single render frames, but for groups of them. Currently, up to 12 frames are grouped that way. The engine parameter physics_jitter_fix controls both the maximum tolerated difference between wall clock time and summed up _process arguments and the threshold for changing typical_physics_steps. It is given in units of the real physics frame slice 1/physics_fps. Set physics_jitter_fix to 0 to disable the effects of the new code here. It starts to be effective against the random physics jitter at around 0.02 to 0.05. at values greater than 1 it starts having ill effects on the engine's ability to react sensibly to dropped frames and framerate changes.
2018-04-07Experimental support for windows with per-pixel transparency (macOS, X11 and ↵bruvzg
Windows).
2018-03-13Added File.get_path and File.get_path_absolute functionsMarcelo Fernandez
2018-03-04Clean and expose get_audio/video_driver_* funcs on OS classMarcelo Fernandez
2018-02-14Merge pull request #15564 from RandomShaper/adpod-topmostRémi Verschelde
Add new window setting: always on top
2018-02-12Added OS::center_window to center the window precisely on desktop platformsMarcelo Fernandez
2018-01-21Add Geometry::line_intersects_line_2d()Bernhard Liebl
2018-01-12get_target_fps and set_target_fps now both use an intPaul Joannon
2018-01-12Bind many more properties to scriptsBojidar Marinov
Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added