Commit graph

6873 commits

Author SHA1 Message Date
eska
6e2bf31e5a Automatically zip web export templates
Also fix web builds on Windows and clean up
2017-02-20 06:59:19 +01:00
eska
335fdea581 Fix parallel asm.js/WebAssembly builds 2017-02-20 03:44:37 +01:00
Juan Linietsky
f6950956bd Editor Export Settings Dialog is completed!! Now on to make some exporters.. 2017-02-19 23:21:35 -03:00
Hein-Pieter van Braam
04e51859f0 Windows: Close audiodriver sooner on exit
In #7839 I see the same error that was fixed in #7833 occuring on the
Windows platform. This moves the audio driver closing to the same place
in OS_Windows::finalize() as it is in OS_X11::finalize()

This fixes #7839
2017-02-19 20:45:17 +01:00
Marc Gilleron
544d9cb24e Fixed Line2D editor doesn't respond to input 2017-02-19 02:55:47 +01:00
Rémi Verschelde
5e3fc7d069 Merge pull request #7835 from toger5/gitignoreToXcode
xCode added xcuserdata to gitignore
2017-02-18 19:23:29 +01:00
Hein-Pieter van Braam
d0c2015fe1 X11 return to cwd at exit
During runtime godot calls chdir() several times. This doesn't really
matter normally but when using tools such as gprof the location of the
profiling data is kind of hard to intuit.

With this PR we simply store the current working directory at start and
restore it once we're almost done exiting.

This doesn't use the OS abstractions as when we need to get the current
workdir we haven't yet initialized it (by necessity). This would break
if we tried to build X11 for windows, but since the X11 target is
hardcoded to use the UNIX abstractions I don't think it matters.
2017-02-18 12:41:26 +01:00
toger5
bafd4ed56c xCode added xcuserdata to gitignore 2017-02-18 10:44:48 +02:00
Rémi Verschelde
9a5442a226 Merge pull request #7833 from hpvb/x11-move-audio-drive-finalize
X11: Move audio driver finalize to the start of cleanup
2017-02-17 18:21:12 +01:00
Hein-Pieter van Braam
f70afbe129 X11: Move audio driver finalize to the start of cleanup
The audio driver cleanup needs to happen at the start of finish
otherwise a race still seems to exist with the destruction of the
audioserver. I think that destroying the X resoures before has something
to do with it.
2017-02-17 17:59:06 +01:00
volzhs
57ed6ef741 Translate ButtonArray text 2017-02-18 00:20:55 +09:00
volzhs
b8e58b2b7b Fix zero padding formatting 2017-02-18 00:20:05 +09:00
volzhs
6de3defe72 Update libwebp to 0.6.0 2017-02-17 23:49:40 +09:00
Rémi Verschelde
b96c7ace2d Merge pull request #7826 from hpvb/unix-finalize-audio-on-exit
X11: Finalize audiodrivers on exit
2017-02-17 11:05:26 +01:00
Hein-Pieter van Braam
a7fcdad16d X11: Finalize audiodrivers on exit
The audiodrivers loaded by OS_X11 are not destroyed before the
audioserver is. This causes a segfault on exit.

The code is taken from os_windows.cpp which did have the cleanup code.
2017-02-17 10:41:41 +01:00
Rémi Verschelde
36986531af Merge pull request #7815 from hpvb/fix-7354
Correct hash behavior for floating point numbers
2017-02-17 07:48:06 +01:00
Vincent
c20b186e73 RichTextLabel add function remove_line 2017-02-16 20:36:25 +01: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
Hein-Pieter van Braam
3e5743ca36 Allow preload to accept a const string.
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-16 14:29:18 +01:00
Juan Linietsky
903a3aa5f0 a ton of bug fixes to the renderer 2017-02-16 08:55:43 -03:00
Rémi Verschelde
3fadcac7c4 Merge pull request #7814 from Hinsbart/timer_pause
SceneTreeTimer: Ability to set pause mode
2017-02-16 08:52:19 +01:00
Juan Linietsky
da11d6d9e8 Many fixes to make exported scenes work better, still buggy. 2017-02-15 08:34:02 -03:00
Juan Linietsky
d7fd86d51a -begin of export work, not done yet
-fixes to make scenes exported from godot 2.x work
2017-02-15 08:30:32 -03:00
Andreas Haas
4de29f9c7a
SceneTreeTimer: Ability to set pause mode
Adds an additional flag to SceneTree::create_timer() that tells it whether or not to process when the game is paused.
Defaults to false in order to not break existing functionality.
2017-02-15 08:02:08 +01:00
Juan Linietsky
9cdd364fc0 Merge pull request #7811 from godotengine/revert-7807-fix-7354
Revert "Make nan==nan true for GDScript"
2017-02-14 17:05:51 -03:00
Juan Linietsky
04a6d2789e Revert "Make nan==nan true for GDScript" 2017-02-14 17:05:16 -03:00
Rémi Verschelde
78336990f4 Merge pull request #7807 from hpvb/fix-7354
Make nan==nan true for GDScript
2017-02-14 16:04:36 +01:00
Hein-Pieter van Braam
adcc211feb Make nan==nan true for GDScript
After discussing this with Reduz this seemed like the best way to
fix #7354. This will make composite values that contain NaN in the same
places as well as the same other values compare as the same.

Additionally non-composite values now also compare equal if they are
both NaN. This breaks IEEE specifications but this is probably what most
users expect. There is a GDScript function check for NaN if the user
needs this information.

This fixes #7354 and probably also fixes #6947
2017-02-14 13:32:23 +01:00
Rémi Verschelde
81edda18f3 Merge pull request #7803 from Hinsbart/spinbox_click
Spinbox: don't ignore double clicks.
2017-02-14 07:47:06 +01:00
Rémi Verschelde
fdbe1c3c61 Merge pull request #7801 from hpvb/fix-7796
Remove bounds check when resuming from yield. (fixes #7796)
2017-02-14 07:46:45 +01:00
Rémi Verschelde
fb4b4a30e7 Merge pull request #7792 from Hinsbart/inputmap_fixes
ProjectSettings: InputMap dialog fixes
2017-02-14 07:46:31 +01:00
Andreas Haas
dd4c2709e4
Spinbox: don't ignore double clicks.
Fixes the problem with spinboxes not updating when clicking too fast.
2017-02-14 00:57:49 +01:00
Ferenc Arn
eae94ba1c8 Use real_t as floating point type in physics code.
This is a continuation of an on-going work for 64-bit floating point builds, started in PR #7528. Covers physics, physics/joints and physics_2d code.

Also removed matrixToEulerXYZ function in favor of Basis::get_euler.
2017-02-13 17:42:02 -06:00
Rémi Verschelde
e837b25f55 Fix missing semicolon in previous commit 2017-02-13 23:46:25 +01:00
Hein-Pieter van Braam
e8611966de Remove bounds check when resuming from yield.
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-13 21:59:05 +01:00
Rémi Verschelde
55dc24f753 Merge pull request #7797 from Brett-Mitchell/patch-1
Fix for issue #7766
2017-02-13 21:02:51 +01:00
Brett-Mitchell
6921e11805 Fix for issue #7766
Add initialization for OS_OSX.mouse_mode in OS_OSX::OS_OSX().  mouse_mode now defaults to OS::MOUSE_MODE_VISIBLE.
2017-02-13 12:55:26 -05:00
Rémi Verschelde
ea7e8c8e86 Merge pull request #7795 from hpvb/rename-md-macro
Rename the _MD macro to D_METHOD
2017-02-13 15:46:17 +01:00
Rémi Verschelde
f6859fd31b Merge pull request #7794 from GodotExplorer/pr-fix-texturebutton
Fix compile error with TextureButton
2017-02-13 15:40:41 +01:00
geequlim
4ebc30e303 Fix compile error with TextureButton
Export TextureButton::ResizeMode as its own enum values
2017-02-13 21:17:47 +08:00
Hein-Pieter van Braam
411ee71b4d Rename the _MD macro to D_METHOD
This new name also makes its purpose a little clearer

This is a step towards fixing #56
2017-02-13 12:50:02 +01:00
Rémi Verschelde
bf64df4427 Merge pull request #7784 from hpvb/kill-scs-macro
Remove use of _SCS
2017-02-13 11:11:01 +01:00
Hein-Pieter van Braam
0f687f0ccb Remove use of _SCS from ADD_METHOD
This saves typing and is a step towards fixing #56
2017-02-13 10:37:47 +01:00
Andreas Haas
92ac7067e6
ProjectSettings: InputMap dialog fixes
Now the selection jumps to the correct action after a new event has been added.
Also sets the default device id for Joypad button events to 0.
2017-02-13 07:58:29 +01:00
Rémi Verschelde
70b9aa379d Merge pull request #7581 from Faless/v6_wild_bind
TCP/UDP listen bind to address and bugfixes
2017-02-12 23:31:40 +01:00
Rémi Verschelde
117a83fcb9 Merge pull request #7352 from Zylann/polyline
Polyline
2017-02-12 23:30:04 +01:00
Rémi Verschelde
37e75873ef Merge pull request #7789 from volzhs/update-script-button
Update attach/clear script tool bar icon in Scene panel
2017-02-12 23:29:04 +01:00
Rémi Verschelde
3cab47adba Merge pull request #7782 from SaracenOne/windows_relative_cursor_fix
Fix relative cursor data in CAPTURED mouse mode on Windows.
2017-02-12 23:26:19 +01:00
Rémi Verschelde
73cedc3901 Merge pull request #7775 from Hinsbart/particles_flip
Particles2D: implement texture flip parameters.
2017-02-12 23:25:34 +01:00
Rémi Verschelde
00b093d24d Merge pull request #7774 from hpvb/master
Add a simple signal handler for SIGCHLD on Unix
2017-02-12 23:25:20 +01:00