Compare commits

..

461 Commits

Author SHA1 Message Date
820dd1d001 Version 2.0.4.1, hotfix for #5620 2016-07-10 11:45:08 +02:00
78883ea57d Fix builtin OpenSSL configuration
Fixes a bug that happens on Windows 64-bits.

(cherry picked from commit 2c6d0d4905)
2016-07-10 10:30:17 +02:00
9cc9b45948 Finally fixes the infamous bug #4444, hoping to never see you again.
Closes #4444.

(cherry picked from commit b0f0ae0723)
2016-07-10 10:30:17 +02:00
828fa9af11 Fix help search dialog titles
(cherry picked from commit af395cea42)
2016-07-10 10:30:17 +02:00
8a615b27ad fixes #5464 windows_joystick close_joystick bug
(cherry picked from commit 2511f48339)
2016-07-10 10:30:17 +02:00
5184b215a9 Revert "update EditorDirDialog on external change, closes #4629"
This reverts commit 257d370677.
Fixes #5620.
2016-07-10 10:30:05 +02:00
7ce99c23dd Version 2.0.4 stable 2016-07-09 01:05:23 +02:00
af3cf7806e OSX export: Default to fat format, make it an enum
Since we want to distribute only the fat binary in the official templates, this should
make it work out of the box. 32 bits and 64 bits options are still available for people
that want them, but will throw an error if the binaries are not in the template zip.

(cherry picked from commit 02aeac12d1)
2016-07-09 01:01:31 +02:00
687248bbf4 added "arch" parameter, made iphone use it to build isim
(cherry picked from commit 10c512e46d)
2016-07-09 00:54:22 +02:00
6d6b14d112 iOS simulator: merge into iphone detect.py
Fixes #4489

(cherry picked from commit dc8c145488)
2016-07-09 00:54:16 +02:00
75cc8dc6b4 corrently parse utf8 from zip_io open, closes #1708
this probably failed when exporting or opening android apk files too, should fix that too.

(cherry picked from commit 1c541a2bee)
2016-07-09 00:08:33 +02:00
106199dfa7 classref: Add docs for InputEvent* and InputMap
(cherry picked from commit 69c8b583e7)
2016-07-08 23:45:31 +02:00
192688e7eb classref: Fix arg name for is_action_pressed/released
Also position TEXTURE_SPHERE constant properly.

(cherry picked from commit a15de80942)
2016-07-08 23:41:58 +02:00
a9a8bb281d Pass mouse position to Input singleton in web export
(cherry picked from commit 4beeff9433)
2016-07-08 21:27:00 +02:00
90c8dbb890 Fix own world option of Viewport.
It happens when the viewport has WorldEnviroment child with a valid Enviroment

(cherry picked from commit 6b154c9706)
2016-07-08 20:47:19 +02:00
6e7db99614 Avoid crash if setting modifiers fails, closes #5158
(cherry picked from commit 7e3044981e)
2016-07-08 19:28:54 +02:00
3963f89ebd remove warnings if a script is missing and can't be opened
(cherry picked from commit d8c31e0e74)
2016-07-08 19:28:54 +02:00
f4a5963ca9 Fix several bugs related to node duplication and signals, closes #5405
(cherry picked from commit 17e4ead62a)
2016-07-08 19:18:09 +02:00
d4cb381ce0 Update String.capitalize() documentation
(cherry picked from commit fe49b71804)
2016-07-08 19:15:03 +02:00
2c3511a284 classref: Sync for new sorting of constants 2016-07-08 19:13:06 +02:00
9420a1b6c1 Make sure builtin types' constants remain in order
This adds a list of constants for VariantCall to make sure the order of
register is kept when showing in the editor help and in the documentation.

This also remove the sorting of constants from the doctool, so it keeps
the natural order in classes.xml.

(cherry picked from commit 29b62ce5d0)
2016-07-08 19:01:59 +02:00
8aeacd935c Fix crash when null value through jni on android
(cherry picked from commit b09dbaa78e)
2016-07-08 19:01:36 +02:00
f9b7baa546 Prettier str() for arrays
(cherry picked from commit 38ed5d9c7d)
2016-07-08 18:56:50 +02:00
7589307911 Windows: prevent freeze while moving or resizing the game window.
When moving or resizing the window, Windows spins up a seperate event-loop, effectively blocking the normal one.
To work around this, we're starting a timer that will continue sending WM_TIMER messages which we can use to keep the mainloop running.

fixes #4695

(cherry picked from commit 6856c52491)
2016-07-08 18:56:28 +02:00
6199efbc7e throw error if GridContainer::set_columns goes below 1, closes #5316
(cherry picked from commit f6725f9768)
2016-07-08 18:52:30 +02:00
801db4c708 Make both signals be ordered and samplelibrary items too, fixes scenes changing for git, closes #5289
(cherry picked from commit b391306828)
2016-07-08 18:52:17 +02:00
9b90d70ae7 Only emit item_selected once per Tree row, closes #5280
(cherry picked from commit 89bb72b2d3)
2016-07-08 18:48:46 +02:00
242ceb1869 Remove error when getting dependencies from tscn files in some cases, closes #3897
(cherry picked from commit 519fce94e9)
2016-07-08 18:43:29 +02:00
de0b7b871b Fix bug in inner class reference, closes #1411
(cherry picked from commit cf6450043d)
2016-07-08 18:42:07 +02:00
eaca35adfe Fixed bug related to resolving constants in a class, closes #1110
(cherry picked from commit f4c6640827)
2016-07-08 18:42:02 +02:00
dffa1da012 Fix extends issue, closes #4026
(cherry picked from commit 565bb3afcc)
2016-07-08 18:41:37 +02:00
a2103bac7c Fixed bug in instance state ordering, closes #3904
(cherry picked from commit 8e1c0f287d)
2016-07-08 18:39:23 +02:00
a2d2eb9a63 Avoid recursion in filesystem scanning, closes #3838
(cherry picked from commit 41a26528e4)
2016-07-08 18:39:12 +02:00
3ce0380ba4 Fix style bug in event queue
Same fix as for 1f9812ab83
Not sure if this code actually does anything though, `buffer_max_used` seems unused.

(cherry picked from commit bd424d8f73)
2016-07-08 18:38:35 +02:00
34e6e284db fix bug in reporting of message queue size
(cherry picked from commit 1f9812ab83)
2016-07-08 18:38:14 +02:00
302abb1449 Properly complain when a scene file has not be selected, closes #3811
(cherry picked from commit d41b7a66e9)
2016-07-08 18:36:06 +02:00
c5fd6a3b69 Ability to rotate controls using tool, closes #3800
(cherry picked from commit e2d208f122)
2016-07-08 18:34:31 +02:00
6813c89021 Properly deliver localized coordinates when passing gui events through parents, closes #4215
(cherry picked from commit 47d6cc08bb)
2016-07-08 18:34:10 +02:00
406daa8f7f Fix compiling for X11 on non-86, this fixes #5444
(cherry picked from commit 9e751178eb)
2016-07-08 18:33:27 +02:00
694120210a Fix visual server error when minimizing the window
(cherry picked from commit bf44275b1a)
2016-07-08 18:33:13 +02:00
9a7c310134 Avoid mirroring to go negative to fix crash, closes #4036
(cherry picked from commit 10f411b47b)
2016-07-08 18:23:22 +02:00
ea7da3bf08 remove the warning of instances in use at exit
(cherry picked from commit 8baa85d6b4)
2016-07-08 18:23:08 +02:00
9592dd3e3b Fix error reporting when a scene is not imported properly, closes #3968
(cherry picked from commit 33f1204dc4)
2016-07-08 18:20:55 +02:00
9d85bfa00a Fixed selected text turning black, issue 5199
(cherry picked from commit 7f98f37f13)
2016-07-08 18:18:48 +02:00
5083e18b89 Optimize member access with self
Let the compiler take the fast path when a member is superfluously accessed with `self.`.

(cherry picked from commit d306b9bea5)
2016-07-08 18:18:00 +02:00
3ff466770a Changes X11 res_name to "Godot_Engine"
Add additional/alternative WM_CLASS; only affects the game window, avoids redundancy and allows finer control in WMs (#5265)
(cherry picked from commit dd1ad31757)
2016-07-08 18:16:09 +02:00
584deb807e Fix string array parameter check with jni
(cherry picked from commit 456b7733fc)
2016-07-08 18:07:11 +02:00
6116174d49 Remove duplicated aidl for android
Tested IAP function on device.

(cherry picked from commit a5a5bdef25)
2016-07-08 18:06:59 +02:00
8a451e49e5 Revert "Fixed the order of events called by _input, closes #4384"
This reverts commit 299b0102f0.
2016-07-08 16:25:19 +02:00
b0aab53853 Dynamic property list for control margins allowing floating point properties to be used with ratio anchors.
(cherry picked from commit d8392dd117)
2016-07-08 16:25:19 +02:00
10eedf62b8 Fixed bug using DirAccess in Android Marshmallow due to data dir being a symlink 2016-07-02 11:46:15 -03:00
673ef0cf88 Ignore some 2.1-specific files 2016-06-25 02:04:27 +02:00
f7436c7d16 Add "bool" to GDScript reserverd keywords
Noticed that "bool" wasn't highlighted when used like `export(bool) var is_xy = false`

(cherry picked from commit c871cf6801)
2016-06-25 02:04:27 +02:00
c015341221 Fix bug in String==StrRange comparison
It was comparing the StrRange with itself, always return true if both
were the same length.

Fix #3843

(cherry picked from commit f4dfa37a23)
2016-06-25 02:04:27 +02:00
6e49bc8210 Properly report a valid error instead of reporting as a bug, closes #3841
(cherry picked from commit 95e3279d34)
2016-06-25 02:04:27 +02:00
c2226d1199 Fix network IP setting change
Fix #5368

(cherry picked from commit 515472bc52)
2016-06-25 02:04:27 +02:00
7fd9ff70f9 Add docs for String and CanvasItem
(cherry picked from commit 6776fa63de)
2016-06-25 02:04:27 +02:00
1218d8f2a2 Rename CanvasItem.edit_get() to edit_get_state()
This makes more sense of what it does and correlates to edit_set_state()

(cherry picked from commit b06d235ce8)
2016-06-25 01:56:14 +02:00
cf300ace96 Fix issue saving flags (size fill expand), fixes #4176
(cherry picked from commit a8f8f52b19)
2016-06-25 01:55:39 +02:00
4e1dcd3d0b png: Do not output warnings as errors
(cherry picked from commit 9bf3ee7acc)
2016-06-25 01:55:31 +02:00
5907bddda5 Fixed save as not working with scripts
(cherry picked from commit c68e4e8cbe)
2016-06-25 01:54:13 +02:00
39cc2cbfb9 fix android resource locale
(cherry picked from commit 591be5df25)
2016-06-25 01:54:00 +02:00
140949e013 Fixed error using the same atlas rect for all images, closes #4139
(cherry picked from commit 3edf66477a)
2016-06-25 01:53:27 +02:00
5b3551a91f classref: Sync with the new sorting behaviour 2016-06-25 01:52:14 +02:00
2389712638 Fix classes.xml sorting
Make methods, signals, theme items and constants sort correctly

(cherry picked from commit 9bde4e5652
+ a needed change from e8eb396d7cfec8a96efb78719c0556f1beccf68)
2016-06-25 01:50:58 +02:00
1a3d408f52 classref: Sync with backported patches 2016-06-25 01:50:55 +02:00
0ce2f76d5a Fix a inherited transform bug with Camera2D preview drawing
Closes #5339

(cherry picked from commit f3342eb72e)
2016-06-25 01:42:00 +02:00
35c64c1824 Fix File.get_as_text() to return the whole file
It was returning only from the cursor forward.

(cherry picked from commit 0f20d8756e)
2016-06-25 01:42:00 +02:00
aa581a067d Add classref for File class
(cherry picked from commit 4d33eb01d7)
2016-06-25 01:42:00 +02:00
418cd58d47 Renamed Trackpad Hint to Emulate 3 Button Mouse. (#5258)
(cherry picked from commit b3b1fdae85)
2016-06-25 01:42:00 +02:00
0c71eb8a1e do not crash when generating preview of very large sound files, fixes #4123
(cherry picked from commit 9b8f2741ae)
2016-06-25 01:42:00 +02:00
3318860539 fix CanvasItem.get_global_transform() and CanvasItem.get_local_transform(), closes #4075
(cherry picked from commit fa0d1cd27c)
2016-06-25 01:41:59 +02:00
d1dbc7fe93 fix bug decompressing bc texture, closes #4404
(cherry picked from commit 9d4cdc6d8a)
2016-06-25 01:41:59 +02:00
299b0102f0 Fixed the order of events called by _input, closes #4384
(cherry picked from commit ad8d4a6b26)
2016-06-25 01:41:59 +02:00
fb255a69b6 Add quotes to .tscn keys, solves #4366
(cherry picked from commit 6872139300)
2016-06-25 01:41:59 +02:00
1bfaea0d76 added missing status, closes #4361
(cherry picked from commit e9d2c9ad51)
2016-06-25 01:41:59 +02:00
ad01fa2248 Allow mouse wheel to go throuhgh so scroll containers work properly, fixes #4431
(cherry picked from commit 85d8000449)
2016-06-25 01:41:59 +02:00
b457b8ac89 Fix error storing path for children of instanced nodes in .tscn, fixes #4320 fixes #4579 fixes #4580
(cherry picked from commit 6bdd17f07c)
2016-06-25 01:41:59 +02:00
5582d37af9 correct current Intent for android
(cherry picked from commit 780fa60072)
2016-06-25 01:41:59 +02:00
8c5577e9e4 properly initialize loops to 0 in eventplayer
(cherry picked from commit 93441d6119)
2016-06-25 01:41:59 +02:00
7076e98f40 fix loop counter for eventstream, closes #4493
(cherry picked from commit 8f7a1367fe)
2016-06-25 01:41:59 +02:00
a71ea0abc6 Make dure to only call drop_data if can_drop_data returned true, closes #4616
(cherry picked from commit 0e07f49a03)
2016-06-25 01:41:59 +02:00
edadb46bd4 Fix TextEdit cursor position after undo remove text
It was going to where the text started, now it goes to where the text
ends.

(cherry picked from commit 831ae2d510)
2016-06-25 01:41:58 +02:00
86c4bbc031 libtheora: New version 1.1.1
(cherry picked from commit 214f316cf9)
2016-06-25 01:41:58 +02:00
8d9121f0b0 libvorbis: New version 1.3.5
(cherry picked from commit 644e9076bb)
2016-06-25 01:41:58 +02:00
c9716ebd00 Clarification about enter keys confusion
Some Languages threat KEY_RETURN and KEY_ENTER keys having the same keycode (eg: Javascript).
Added additional explanation about this issue.
Related to #4595

(cherry picked from commit 92fc3fa536)
2016-06-25 01:41:58 +02:00
a04be3e44b libogg: New version 1.3.2
(cherry picked from commit 98f23d27a4)
2016-06-25 01:41:58 +02:00
af41d7bffa Add function to get the color picker dialog from ColorPickerButton, closes #4415
(cherry picked from commit 400febf585)
2016-06-25 01:41:58 +02:00
61b087dd66 Classref: Mutex, Semaphore, Thread, *Array (#5278)
(cherry picked from commit b587a13293)
2016-06-25 01:41:58 +02:00
257d370677 update EditorDirDialog on external change, closes #4629
(cherry picked from commit 5e7f1fc79b)
2016-06-25 01:41:57 +02:00
beb2176399 Make ".." always appear even if dir is unlistable (likely lacking permissions), closes #1938
(cherry picked from commit adc13e9027)
2016-06-25 01:41:57 +02:00
18cb1f8e44 LineEdit: Fix and improve selection behaviour
(cherry picked from commit 99612207b7)
2016-06-25 01:41:57 +02:00
a04a78c7f6 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

(cherry picked from commit c246931f03)
2016-06-25 01:41:57 +02:00
8df46cddcb Fixed fractional offset not being reset in ringbuffer resamples, closes #4764
Probably fixes other streamplayer issues too.

(cherry picked from commit 3b5f1afb5c)
2016-06-25 01:41:57 +02:00
775b089548 TabContainer now reports proper minimum size, closes #4896
(cherry picked from commit 65bcde0a7d)
2016-06-25 01:41:57 +02:00
7b36595641 Send body inout notifications after state is applied, fixes #4683
(cherry picked from commit 95dc15b750)
2016-06-25 01:41:57 +02:00
f5d3d9cc5f Classref: added PacketPeer*
(cherry picked from commit 541a1226cd)
2016-06-25 01:41:57 +02:00
be4babccba Fixed PacketPeer.get_var() return type in docs
(cherry picked from commit 6bbc53ee18)
2016-06-25 01:41:57 +02:00
6a1368d24d fix errors while exporting android
(cherry picked from commit e6bbe91994)
2016-06-25 01:41:57 +02:00
109e58cf75 Classref: Added docs for StreamPeer* (#5216)
(cherry picked from commit cffdc52482)
2016-06-25 01:41:56 +02:00
0b8cf7946e Fix javascript build in Windows
Fix #3438

(cherry picked from commit c48ffed87a)
2016-06-25 01:41:56 +02:00
c1e004ffca String documentation: .ord_at() returns int not String
fixes #5189

(cherry picked from commit 58a891265a)
2016-06-25 01:41:56 +02:00
d662f5aa63 does not fix the bug reported in #4326 and #4818,
but at least make sure it throws and error and does not crash

(cherry picked from commit 333de40180)
2016-06-25 01:41:56 +02:00
85c6d1b37d correctly wrap lines longer than width in richtextlabel, fixes #4735
(cherry picked from commit c204170232)
2016-06-25 01:41:56 +02:00
fd4d666289 Better error text when trying to add/remove/move child nodes in a busy parent, closes #4838
(cherry picked from commit 37ed2bae69)
2016-06-25 01:41:56 +02:00
d8f9c95dbd Fix crash in code completion
Fix #4641

(cherry picked from commit 17b6cebcfe)
2016-06-25 01:41:56 +02:00
56c5da8565 changed visual server free() to free_rid() like in the other servers. Fixes #4917
(cherry picked from commit 64b4253dbf)
2016-06-25 01:41:56 +02:00
c2e09a21ac Update gamepad mappings.
Merge mappings from https://github.com/gabomdq/SDL_GameControllerDB

(cherry picked from commit 3d0b390457)
2016-06-25 01:41:56 +02:00
d8d926730c Dictionary: rename param in .has() .has_all() .erase()
fixes #5190, param should be named key, not value

(cherry picked from commit 7a19e3c6ae)
2016-06-25 01:22:42 +02:00
da45e32ef1 -Avoid negative zero from being saved to config files o resource files, fixes #4758
(cherry picked from commit 910151a361)
2016-06-25 01:22:41 +02:00
b075525e84 resolve numerical error when comparing instancing an inheritance to avoid saving changed properties when they didn't, closes 4759
(cherry picked from commit f0abda999e)
2016-06-25 01:22:41 +02:00
6525e0017c Fixed ancient bug that prevented proper theme editing, closes #4924
(cherry picked from commit c1056a9bfb)
2016-06-25 01:22:41 +02:00
c54744ce4d Documented many Physics2D* classes
(cherry picked from commit 471ab4e6ff)
2016-06-25 01:22:41 +02:00
acc552c447 Made error when signal calls a method with the wrong number of parameters more detailed, closes #4893
(cherry picked from commit 4bb93c976c)
2016-06-25 01:22:41 +02:00
d411cbe1d9 rewrote LineEdit window repositioning code so it does not eat the last character, closes #4992
(cherry picked from commit 83bf8036de)
2016-06-25 01:22:41 +02:00
2212cc827c fix how some display values are shown, fixes #4953
(cherry picked from commit 1555608276)
2016-06-25 01:22:41 +02:00
cb37d1bb91 apply built-in scripts when running the game, closes #4987
(cherry picked from commit 482b21a5a4)
2016-06-25 01:22:41 +02:00
7987147502 gdscript tokenizer will dislike use of case, closes #4991
(cherry picked from commit ceeb5453a8)
2016-06-25 01:22:41 +02:00
c22ac11afb fix crash in SamplePlayer, closes #5005
(cherry picked from commit ef9720c8f0)
2016-06-25 01:22:41 +02:00
d945dbdd0f remove unnecesary found bug? print, closes #5028
(cherry picked from commit fea9511bc6)
2016-06-25 01:22:40 +02:00
b06cf23c1a make sure tab is not visible in RichTextLabel, closes #5079
(cherry picked from commit ef2f6a18d2)
2016-06-25 01:22:40 +02:00
51330b29ae do not allow picking in captured mode, closes #5134
(cherry picked from commit b75fb6674b)
2016-06-25 01:22:40 +02:00
8289760227 Show descriptive errors when look_at is improperly used, closes #5131
(cherry picked from commit 375fbe5c7c
and db1e9bac79)
2016-06-25 01:22:40 +02:00
dd7e7c94c1 property output unix seconds since epoch in windows get_system_time_secs, fixes #5155
(cherry picked from commit fc7adf0b4c)
2016-06-25 01:22:40 +02:00
25244e9843 * fix messages when modifying on switching the active axis
(cherry picked from commit a713188388)
2016-06-25 00:37:19 +02:00
6a83c87dda fixes wrong bool return, closes #5037
(cherry picked from commit c5a2aff6db)
2016-06-25 00:31:10 +02:00
64ac2272ce If a resource is delete from fs dialog, but the resource is currently loaded,
clear the path of the resource. Fixes #5110

(cherry picked from commit f4ff30dff0)
2016-06-25 00:30:06 +02:00
2998b7c486 add line spacing option to script and shader editor (#5105)
(cherry picked from commit 990956c4e0)
2016-06-25 00:29:25 +02:00
13d3d217b1 Fixed editor help focus issues and input propagation
(cherry picked from commit eb14373d69)
2016-06-25 00:27:49 +02:00
a94f6108a9 Filling in documentation
Documentation for BoneAttachment, KinematicBody, ParallaxBackground,
ParallaxLayer, and TestCube

(cherry picked from commit 50de99f050)
2016-06-25 00:26:18 +02:00
93616e41f9 Caret blink no longer updates when hidden, issue 5100
(cherry picked from commit e260e3872c)
2016-06-25 00:26:10 +02:00
1475f8d318 RtAudio: proper under/overflow warning
fix #5102

(cherry picked from commit 39260f9dca)
2016-06-25 00:25:50 +02:00
9bb6a0852b GLEW: Update to upstream version 1.13.0 (pristine)
This removes a custom redefinition of glewGetProcAddress,
which was apparently necessary for older Macs with buggy OpenGL
(see #5087).

The added source files are as provided in the upstream tarball.

(cherry picked from commit 5bed0af65e)
2016-06-25 00:24:18 +02:00
66ce012ca6 GLEW: Define static + enabled and includes via SCons
This allows us not to have to hack our definitions in the upstream files,
making it easier to upgrade to newer versions in the future.

For the include paths to work, the headers are moved to a GL subfolder to
match their upstream location.

(cherry picked from commit 768e925271)
2016-06-25 00:24:09 +02:00
64507f0085 Haiku: Do not define GLEW_ENABLED to undefine it later
Partial revert of f61eb5fd8e.

(cherry picked from commit 4c658dc523)
2016-06-25 00:24:02 +02:00
08c9e566bf Improved Blender/Collada shadeless->unshaded import
(cherry picked from commit 101e0c9ec6)
2016-06-25 00:23:48 +02:00
afbc9d550f Improved breakpoint marker position, and scales with font size
(cherry picked from commit d66b034bd1)
2016-06-25 00:22:36 +02:00
d16375d005 Classref for: ImageTexture, Image, LargeTexture
(cherry picked from commit ec96e36bc9)
2016-06-25 00:22:06 +02:00
74d0f8b65b Exposed Image.INTERPOLATE_*
(cherry picked from commit 8a4eca8aa8)
2016-06-25 00:21:56 +02:00
9791d2ef6d Fix indentation issues in last commits
Ping @reduz.

(cherry picked from commit 0729c852b4)
2016-06-25 00:19:27 +02:00
cb94271e9f properly pass events to parent controls, closes #4701
(cherry picked from commit aec5506414)
2016-06-25 00:16:35 +02:00
bb8b57cbae -Fix small bug regarding to canvas layer detection, closes #4381
(cherry picked from commit 2b9cab25c0)
2016-06-25 00:16:08 +02:00
5a45b295ae fixed interactive_loader() not returning a cached scene
(cherry picked from commit 47bd1e8688)
2016-06-25 00:15:28 +02:00
a39eaf4c66 Add missing license information (ogg/vorbis/opus)
(cherry picked from commit c0a8c4f6e4)
2016-06-25 00:12:01 +02:00
9ac954e2a4 Add missing license information (Theora)
(cherry picked from commit 18fc2ccbe1)
2016-06-25 00:11:33 +02:00
73e455c22f Keep the default environment variables as set by SCons
(cherry picked from commit ad0af9d273)
2016-06-25 00:11:26 +02:00
840ad26069 Add missing license information (WebP)
(cherry picked from commit f97f8971e3)
2016-06-25 00:11:05 +02:00
b18000349e Add missing license information (MiniZip)
(cherry picked from commit 04fc62c4e3)
2016-06-25 00:10:59 +02:00
7bff33ea92 fix ui_* input events in Editor
`input/` is the category for these in globals ^^
fixes #5050

(cherry picked from commit a9779efe82)
2016-06-25 00:09:26 +02:00
aad9cd3e22 Document Viewport and ViewportSprite classes
(cherry picked from commit 662e0cc411)
2016-06-25 00:06:48 +02:00
d5bed26e42 Make Input Actions config not affect the editor
(cherry picked from commit 64fd75d91a)
2016-06-25 00:05:40 +02:00
356c35954a change invalid characters when get user data dir on Windows & Unix
Can't create user data folder when project name has ``\ / : * ? " < > |`` characters on OS_Windows & OS_Unix.
So, change it to ``-`` to be able to make folder.

fixes #4928 and it's altanative to #4986.

(cherry picked from commit 9073dc9963)
2016-06-25 00:05:00 +02:00
ff91f409bf Merge pull request #5224 from zaps166/2.0-fix-theora-no-audio
Fix Theora video playback without a Vorbis stream
2016-06-17 19:58:39 +02:00
763b29f34e Fix Theora video playback without a Vorbis stream
- prevent audio resampler errors when number of channels is 0,
- don't check for 'audio_done' when there is no audio data.
2016-06-17 13:38:47 +02:00
d412cb65be Doc: Make rst files as UTF-8 2016-06-05 00:19:45 +02:00
da8fb5de7a classref: Sync with source 2016-06-05 00:11:15 +02:00
845a0e2566 Added InputMap.get_actions()
get_actions() lists all actions in the InputMap.

(cherry picked from commit 1a80b2a04a)
2016-06-05 00:03:48 +02:00
bed17e98c8 Right click->Quit on the godot icon will now close the application on OSX.
Fixed get_window_position that missed a return on OSX.

(cherry picked from commit 76ab7d3886)
2016-06-05 00:03:30 +02:00
c6ef223498 The create dialog starts collapsed now.
The original behavior can be reactivated in the editor settings.

(cherry picked from commit 987192775a)
2016-06-05 00:01:29 +02:00
8a7c4c017f Fix typo in http_client.h
(cherry picked from commit b4fb4a131d)
2016-06-05 00:00:28 +02:00
f22e13d24e deselect in help when click somewhere
(cherry picked from commit bf22e69822)
2016-06-05 00:00:17 +02:00
47f8da5409 Fix Color8 constructor using wrong value range
Fix #5015

(cherry picked from commit 43dad78209)
2016-06-05 00:00:08 +02:00
8ea940e99b Added classref for HTTPClient and HTTPRequest
(cherry picked from commit 4c5439f8cd)
2016-06-04 23:59:45 +02:00
f97cbdec8f Update to libpng 1.5.27
No security relevant fix as far as I can see, but the version bump
does not hurt either.

(cherry picked from commit bc25492e63)
2016-06-04 22:20:46 +02:00
fc15a842af Added classes' short descriptions as tooltips in the create dialog.
(cherry picked from commit fe3a68c4c2)
2016-06-04 22:20:33 +02:00
6d45fc0717 Remove Make-related flags from Android build
They were wrongly placed, creating a file named "-fpic" instead of
applying "-fpic" to the build. This file was in .gitignore, which made it
less noticiable.

This also adds build.gradle to .gitignore.

(cherry picked from commit 408c26ce0b)
2016-06-04 22:20:02 +02:00
298be3356f StaticBody documentation
Documented StaticBody. Also corrected an error in StaticBody2D
documentation

(cherry picked from commit 35cb75220d)
2016-06-04 22:20:02 +02:00
436e968b43 classref: Area documentation
One method was missing.

(cherry picked from commit 0325944ee4)
2016-06-04 22:20:02 +02:00
2b06d7e6f7 Make Color.{rgba}8 return int instead float
According to the class doc, these should be int.
Also fixed a little bug: the setter for 'r8' changed the green value

(cherry picked from commit da3247a500)
2016-06-04 22:20:02 +02:00
79e9917367 Area Documentation
Ported the Area2D documentation into its 3D counterpart. Also fixed some
typos

(cherry picked from commit 617530832b)
2016-06-04 22:20:02 +02:00
3efe43fb8b Switched the space shooter demo from none fixed process to fixed process
(cherry picked from commit a9d246ea6c)
2016-06-04 22:20:02 +02:00
331a0aed71 Key modifiers (Ctrl, Alt, Meta and Shift) may be used as Input keys now on OSX
(cherry picked from commit bb223869e0)
2016-06-04 22:20:02 +02:00
39773b6b9a Added classref for RigidBody, and finished classref for Resource
(cherry picked from commit 063d507a15)
2016-06-04 22:20:02 +02:00
566d751e39 Filling in documentation
VisibilityNotifier and VisibilityEnabler (2D and 3D).

(cherry picked from commit 3ba4e6b2ac)
2016-06-04 22:20:02 +02:00
7928b5fef6 Current line draws behind line numbers and breakpont gutter
(cherry picked from commit 6ae126ef9b)
2016-06-04 22:20:02 +02:00
8b8a1a0cbb Icon: Remove more grey capsules behind official logo
(cherry picked from commit e6e878e139)
2016-06-04 22:20:02 +02:00
5c52f4437a Documented Light2D and LightOccluder2D
(cherry picked from commit 9ac4b29322)
2016-06-04 22:20:02 +02:00
e8b1744325 Documented BackBufferCopy. Need validation for the different copy modes (constants)
(cherry picked from commit defe7f18c2)
2016-06-04 22:20:02 +02:00
24e5755e72 Fix MS Visual Studio build settings
NMake was not setup by the vsproj=yes compilation
parameter. After attempting other possible options,
this is the best fix for our current requirements.
Compiling via NMake is implementing an alternative
to SCons, so this fix escapes out of NMake
environment while also supporting different target
builds and IDE error list integration.

Also sets -j setting to 2 so that it's easy for
people to change it to a propper value and speed it
up a bit for those that do not.

Adds two missing .gitignore Visual Studio temp files
present in Visual Studio's .gitignore.

(cherry picked from commit ca876191e5)
2016-06-04 22:20:02 +02:00
1787ec12be Editor: Fix base dir when going back to project manager
This caused the PM to load with the parameters of the previously loaded project.
Was a regression from ea751724a2. Closes #4045.

(cherry picked from commit 6fefcfd46a)
2016-06-04 22:20:02 +02:00
c67b1888b5 Remove focus from Sprite Region Editor dialog. Fixes #4751
(cherry picked from commit e7b7dfefd3)
2016-06-04 22:20:02 +02:00
7029c96221 Added, goto next and previous breakpoint and remove all, issue 1690
(cherry picked from commit daf0ed646f)
2016-06-04 22:20:02 +02:00
178168aa8a Add spaces to macros in memory.h to make C++11 compilers happy
(cherry picked from commit 728ce570a5)
2016-06-04 22:20:02 +02:00
71487793df Fix crash when redoing backspace to clear selection
(cherry picked from commit 4a5997ec1c)
2016-06-04 22:20:02 +02:00
99c948ba56 Added breakpoint markers, issue 4750
(cherry picked from commit 72fda444d1)
2016-06-04 22:20:02 +02:00
211a6d01bc Debugger: show error message if description is not available
(cherry picked from commit ea9cde8842)
2016-06-04 22:20:02 +02:00
280899ee43 Added application/fat_bits property for EditorExportPlatformOSX::EditorExportPlatformOSX
(cherry picked from commit ba0fbe4f79)
2016-06-04 22:20:02 +02:00
652f82dae8 Fixed caret color not changing though properties
(cherry picked from commit 6dd538a7ae)
2016-06-04 22:20:02 +02:00
6844b580f6 Remove noisy print
(cherry picked from commit 7df5249779)
2016-06-04 22:20:02 +02:00
ef4ac86656 Modified damp ranges
(cherry picked from commit ba0baa3ca7)
2016-06-04 22:20:02 +02:00
f346733d80 Clamped some light2D ranges
(cherry picked from commit c9350d7897)
2016-06-04 22:20:02 +02:00
bbf08a48df fix unexpected char: '\' error on windows
error occurred when register additional directory for android module on windows.

### config.py ###
```
def can_build(plat):
 return plat=="android"

def configure(env):
 if (env['platform'] == 'android'):
  env.android_add_res_dir("android/res")
```

(cherry picked from commit 5eb14d3af0)
2016-06-04 22:20:02 +02:00
4478f8cfbb use node name as filename when save scene
fix #4723

(cherry picked from commit 9e1ee568a6)
2016-06-04 22:20:02 +02:00
5ad050be2b Change the default comment color to #676767 (#4763)
A neutral gray color, more readable than the old brown one.
(cherry picked from commit e75701e0b5)
2016-06-04 22:20:02 +02:00
a5007d0e7a README.md docs are not wiki (#4770)
(cherry picked from commit e56f05c690)
2016-06-04 22:20:02 +02:00
88e512547b README: use https links to main website
Thanks @akien-mga for having given me the idea:
926df79a7c

(cherry picked from commit da54a4d693)
2016-06-04 22:20:02 +02:00
85018e185a README: Improve Documentation section
The move was over three months ago, it is irritating
to still read "has been moved to".

(cherry picked from commit d3515a1ccb)
2016-06-04 22:20:02 +02:00
9b03b9e989 Change low processor usage mode to cap to 60 FPS rather than 40 FPS
This results in smoother operation in the editor, without needing to
resort to the "Update Always" method which uses more resources than
needed.

(cherry picked from commit cc5a020afe)
2016-06-04 22:20:02 +02:00
803438d448 SCons: using 1 env for all drivers
(cherry picked from commit 6cf2353305)
(cherry picked from commit 12bd9ee6f2)
(cherry picked from commit 4c4d79e3c9)
(cherry picked from commit dbb4c0c9b7)
2016-06-04 22:20:02 +02:00
4dc2d78d2e Added 'fat' option for bits param on scons for osx, this will produce a fat binary that contains both 32 bits and 64 bits binaries
(cherry picked from commit eeb83982e2)
2016-06-04 22:20:02 +02:00
c2f48421d1 Document the FileDialog and partial OS methods
(cherry picked from commit a92652d578)
2016-06-04 22:20:02 +02:00
08fa7a0ff1 Fix for tooltip blinking (#4713)
Moved where active tooltips are canceled to wait until the mouse actually moves off the control.
(cherry picked from commit 4b80895082)
2016-06-04 22:20:02 +02:00
bea5135518 Fix a XML error with the documentation
(cherry picked from commit d208572906)
2016-06-04 22:20:02 +02:00
e95eb4b1dc Multiline duplication, issue #4661
(cherry picked from commit 2eb4e7c103)
2016-06-04 22:20:02 +02:00
01bdfa4d22 Android buildsystem: Drop obsolete NDK_TOOLCHAIN argument
It was a duplicate of NDK_TARGET, and not used for anything.
(cherry picked from commit 5e0f0a962a)
2016-06-04 22:20:02 +02:00
16d38b199a Check the save path before importing a 3D Mesh
(cherry picked from commit f38473f65b)
2016-06-04 22:20:02 +02:00
1d85dcb1fa GDScript: Fix method info for is_nan and is_inf
As reported on https://godotengine.org/qa/4114/why-isnan-and-isinf-arent-implemented
(cherry picked from commit b58e261d41)
2016-06-04 22:20:02 +02:00
c6e2c0f01d Filling in documentation.
AABB, Color, Rect2, Transform, Vector2, and Vector3.

(cherry picked from commit 0749db2cf8)
2016-06-04 22:20:02 +02:00
481c076feb Fixed hex notation highlighting
(cherry picked from commit b2bf266ddc)
2016-06-04 22:20:02 +02:00
86c0438f9d Member variable syntax highlighting
(cherry picked from commit fc9f9adcb2)
2016-06-04 22:20:02 +02:00
d7e4fb4365 Save member information in docdata
Closes #4609

(cherry picked from commit 4cbf74da71)
2016-06-04 22:20:02 +02:00
a3979cc928 Add SpinBox to Lossy Quality on Image Groups
fixes #3653

(cherry picked from commit 82600944bd)
2016-06-04 22:20:02 +02:00
1864745e2a Documented @GlobalScope singletons and some keys
(cherry picked from commit cb0be4adaa)
2016-06-04 22:20:02 +02:00
0a64059937 Merge pull request #5021 from zaps166/2.0-last_sample_playing-fix
SampleLibraryEditor: Initialize "is_playing" variable
2016-06-03 20:02:46 +02:00
9acb666320 SampleLibraryEditor: Initialize "is_playing" variable
Fixes crash caused by jumping to wrong place due to uninitialized
variable.

Closes #4703
2016-06-03 19:54:25 +02:00
3a1e69f45c Travis: Install android *DKs in verbose mode
Builds tend to fail due to the 10 min limit for stalled builds.
Most likely because the download is done silently and takes more than
10 min depending on the Travis connection.
(cherry picked from commit 83913e86fe)
(cherry picked from commit dfb9ba877e)
(cherry picked from commit 1bdda9a922)
2016-05-18 08:22:21 +02:00
6a85acdffb Fix some errors in some rotation functions, also clarify that certain parameters are expressed in radians
(cherry picked from commit 70ec87ecd2)
2016-05-18 08:21:44 +02:00
094a9c3bcc open directory or file when double click
fixes #4607

(cherry picked from commit 81b4d38fa7)
2016-05-18 08:21:38 +02:00
5d2a23d99c Revert "Revert "-make sure single select after multi select works better""
This reverts commit 9ed2084b42.
Will then add the proper fix.
2016-05-18 08:21:16 +02:00
9ed2084b42 Revert "-make sure single select after multi select works better"
This reverts commit f909634832.
It caused various regressions (#4556 and #4607).
2016-05-13 08:06:31 +02:00
c0df7da2ca Version 2.0.3 2016-05-12 19:54:11 +02:00
49bf494eac classref: Readd String.strip_edges description 2016-05-12 19:47:26 +02:00
b8d8ec09ee Remove nocpuid.c from builtin OpenSSL
Since opensslconf.h no longer defines OPENSSL_CPUID_OBJ, OpenSSL defines
OPENSSL_cpuid_setup itself (with the same empty definition)

(cherry picked from commit 2392824dba)
2016-05-12 19:35:49 +02:00
f120514402 classref: Fixed return types in Area and Area2D (#4635)
(cherry picked from commit 91c85ff1f5)
2016-05-12 19:35:41 +02:00
77573a76d1 classref: Sync with current source 2016-05-12 09:16:37 +02:00
c734a508c3 classref: Directory and ConfigFile
(cherry picked from commit 22d1385caf)
2016-05-12 09:07:43 +02:00
d66b04921f Windows: Fix GCC/Clang argument being passed to MSVC
Fixes #4620

(cherry picked from commits 972b0f78b3
and c7292b1f3d)
2016-05-12 09:06:48 +02:00
f61f515872 Updated caret blink method documentation
(cherry picked from commit 997476777a)
2016-05-12 09:06:10 +02:00
c5e17d553e Bind caret blink to gdscript and properties
(cherry picked from commit dc90cba42e)
2016-05-12 09:05:46 +02:00
2bd6e2402b OS.get_screen_size now returns the correct value on OSX
(cherry picked from commit b697de92ef)
2016-05-12 09:05:32 +02:00
c575f31d5d Added possibility to strip left and right to strip_edges (#4594)
(cherry picked from commit 49c473bb36)
2016-05-12 09:04:59 +02:00
6d50ccfd32 Joystick demo script cleanup
Removes a leftover variable and uses constants instead of magic numbers.

(cherry picked from commit 86b46c0b7e)
2016-05-12 09:04:41 +02:00
bd51dea8f6 Added caret blink in text editor
(cherry picked from commit e03e7deb1b)
2016-05-12 09:04:03 +02:00
abc97d3bb4 Fixed autocomplete truncate, issue 4554
(cherry picked from commit accc2a195b)
2016-05-12 09:03:59 +02:00
a5e54b83ec Add ignore error flag to OpenSSL driver
(cherry picked from commit 2e44e255ed)
2016-05-12 09:00:39 +02:00
18782aec61 Fixed autocomlete strings not appearing for function arguments
(cherry picked from commit 9e6234201b)
2016-05-12 09:00:22 +02:00
f58cfaf585 fix percent decode utf8 error
(cherry picked from commit f86cffd8e6)
2016-05-12 08:59:30 +02:00
5d98718c28 Fixed animation player auto-queue duplication and undo/redo
(cherry picked from commit 488495852b)
2016-05-12 08:58:39 +02:00
7ab1c1ea3b Fixed code completion after opening bracket, issue 3977
(cherry picked from commit 0a2b341d0a)
2016-05-12 08:55:43 +02:00
f8debd8152 cloning env for builtin_openssl _and_ openssl :)
(cherry picked from commit baaa74f215)
2016-05-12 08:55:34 +02:00
ac06e3d4db clonning env for builtin ssl
(cherry picked from commit 62c17d65a8)
2016-05-12 08:55:28 +02:00
b6be2f503d Rotation APIs: Better exposure for degrees methods
Made public the various set/getters for rotations in degrees.
For consistency, renamed the exposed method names to remove the leading
underscore, and kept the old names with a deprecation warning.

Fixes #4511.

(cherry picked from commit 4eab767a6f)
2016-05-12 08:55:14 +02:00
b224407770 Partial documentation for OS methods
(cherry picked from commit ed7c0a6caf)
2016-05-06 11:14:59 +02:00
7556391d20 Fix build for Windows 64-bits with GCC
(cherry picked from commit 81297f0fa1)
2016-05-06 11:14:53 +02:00
23c659fc47 -make sure single select after multi select works better
-fixed some warnings for OSX

(cherry picked from commit f909634832)
2016-05-06 11:14:11 +02:00
4832731477 Fix memory leak
As pointed out by @sanikoyes in #4541.

(cherry picked from commit 5930408746)
2016-05-06 11:13:41 +02:00
19f08eaa5b Fix wrong return and argument types in documentation
(cherry picked from commit 1e752c0120)
2016-05-06 11:13:35 +02:00
975b4d2927 Add missing Vector2Array case to Variant::operator String()
- Correcly display Vector2Array default arguments in the documentation

(cherry picked from commit 2060e6616c)
2016-05-06 11:13:25 +02:00
913818a246 Fix ds3 gamepad mapping
(cherry picked from commit d6cd5108e3)
2016-05-06 11:12:44 +02:00
4a4999451b Changed barely visible PROPERTY_HINT_ALL_FLAGS buttons for checkboxes
(cherry picked from commit 723c0d730c)
2016-05-06 11:12:38 +02:00
4f57e532b8 Fix windows 64-bits build.
The change in `tools/doc/doc_data.cpp` is needed because the MSVC
compiler does not support variable length arrays.

Fix #4113

(cherry picked from commit 9424c6c58f)
2016-05-06 11:12:31 +02:00
3449c81bdb Fixes 64 bit MSVC builds, disables bits parameter
Also Enables automatic detection of architecture for the MSVC compilers.
Builds without assembly optimisations for x64
Closes issue #3098

Signed-off-by: Aleksandar Danilovic <greatgames.alexandar@gmail.com>
(cherry picked from commit 7762e1afe6)
2016-05-06 11:12:23 +02:00
05857a5472 Update OpenSSL to 1.0.2h
(cherry picked from commit ab623c923d)
2016-05-06 11:11:21 +02:00
ec3b50fd65 Autocomplete no longer shows duplicates, issue 1824
(cherry picked from commit 084d0bef96)
2016-05-06 11:11:14 +02:00
f95918e05a Input Documentation
Input Documentation

(cherry picked from commit f6ae5e41de)
2016-05-06 11:11:09 +02:00
b3404c8c44 Fixed behavior of OS.set_window_resizable
Should fix #4428.
 * Minimize button is not hidden anymore
(cherry picked from commit 8fb7280f39)
2016-05-06 11:10:57 +02:00
7e077258c5 Fixed documentation generator for polymorphic functions
(cherry picked from commit 57d0b78426)
2016-05-06 11:10:48 +02:00
fb3d10c579 Documented bool methods
(cherry picked from commit 3ca1d0f1d5)
2016-05-06 11:10:41 +02:00
0b75c39c2b Documented float
(cherry picked from commit 520e6f5b09)
2016-05-06 11:10:34 +02:00
e0a13981fc Documented int methods
(cherry picked from commit 4453284388)
2016-05-06 11:10:28 +02:00
bdbb831261 Finished AnimationPlayer Documentation
(cherry picked from commit abf5f8c586)
2016-05-06 11:09:51 +02:00
97e30f4cd7 Fix checking unsaved changes only in current scene
(cherry picked from commit 107e62be70)
2016-05-06 11:07:46 +02:00
78dc8e79c4 Documented YSort (#4515)
Documented YSort
(cherry picked from commit 957c265f11)
2016-05-06 11:07:25 +02:00
40681d90e5 Debugger: Fix breaked signal binding (#4508)
Closes #4270.
(cherry picked from commit 8ceab5ddaf)
2016-05-06 11:07:17 +02:00
fbb8a2170c Documented ColorRamp
(cherry picked from commit c2bdb3727b)
2016-05-06 11:07:03 +02:00
e8a972197c Partial documentation for Particles2D
(cherry picked from commit 3cd58fe0ba)
2016-05-06 11:06:56 +02:00
047767b824 Document Popup, PopupDialog, PopupMenu, and PopupPanel
(cherry picked from commit 5cdf4a6379)
2016-05-06 11:06:49 +02:00
ef2f1ae811 Tabs: Fix align issue with right/close buttons
The stylebox around the close button was badly centered.
There were also bad margins applied when using right buttons.

(cherry picked from commit 21c181bd3c)
2016-05-06 11:06:42 +02:00
7c419032c7 Tabs: cleanup code, no functional change
Some dead code removed, a few cosmetic changes.

(cherry picked from commit 8b32c80529)
2016-05-06 11:06:35 +02:00
9bdcc97e56 Tabs: Fix navigation buttons overlap when resizing
It was not taking into account the minimum width of the stylebox.
Fixed by factorizing some duplicate code.

(cherry picked from commit 8574489dd2)
2016-05-06 11:06:29 +02:00
7f80fce464 Tabs: Fix icon size not taken into account for offset
Fixes #4107.

(cherry picked from commit bbaf296948)
2016-05-06 11:06:22 +02:00
ea9b552e27 Variant: readd Dict.has_all
Erroneously removed in 4bc494ae2e.
2016-05-06 10:56:39 +02:00
21ab3a030e missing default value 2016-05-05 18:44:29 -03:00
a14ff27337 fix to avoid video texture scaling 2016-05-05 18:44:20 -03:00
d6e30256ad ability to shrink all images x2 on load
this is for extreme cases when running on devices with very low video
memory, so you can still retain compatibility.
2016-05-05 18:43:47 -03:00
4bc494ae2e export fix_alpha_edges 2016-05-05 18:42:55 -03:00
d49fff6246 FileDialog: reset mkdir label after use (#4500)
Closes #1686.
(cherry picked from commit ab7886ffc4)
2016-05-01 12:28:27 +02:00
d29087cc53 OSX: Fix lib suffix for Android lib (#4499)
Fixes #1452.
(cherry picked from commit 94274b9ab5)
2016-05-01 12:28:20 +02:00
27461a79dc GridMap: Fix backwards rotate hotkeys (#4498)
Fixes #1237
(cherry picked from commit 8259c46707)
2016-05-01 12:28:14 +02:00
a86cfc258e AnimationPlayer: Prevent resetting timeline when pinned (#4497)
Fixes #1019
(cherry picked from commit 0b4f277184)
2016-05-01 12:28:07 +02:00
26c2e0d09d math: Fix rounding error for 0 in Math::round (#4495)
Thus revert the previous workaround in commit b123bc4a2a.
Fixes #3221.
(cherry picked from commit 6883325f92)
2016-05-01 12:28:01 +02:00
0b49d78a3f Project manager: unescape project names (#4494)
Fixes #3609
(cherry picked from commit 78adbf4790)
2016-05-01 12:27:54 +02:00
40b546fb83 Allow any directory for custom character set and gradient image file when import font
fix #4486

(cherry picked from commit b172cb524d)
2016-05-01 12:27:43 +02:00
3c453b7bd2 Ignore invalid folders in platform
Fixes #4479

(cherry picked from commit f938793e78)
2016-05-01 12:27:14 +02:00
f033763700 Implement OS.get_process_ID for Windows
Based on code by @ratsdiov.
Closes #1733

(cherry picked from commit 2cd8e86aa0)
2016-05-01 12:27:04 +02:00
944ac2500a classref: Sync with source 2016-04-29 18:12:33 +02:00
b4adb0d338 Add more documentations for this classes:
* BoxContainer
* CenterContainer
* ScrollContainer
* SplitContainer
* Vector2
* StringArray
* FileDiloags

(cherry picked from commit a518792d89)
2016-04-29 18:06:09 +02:00
227604a566 Fix launching from .app on OSX
(cherry picked from commit 6962fd91c6)
2016-04-29 18:05:39 +02:00
70644301dd Allow dragging on only one (global) axis when holding down shift
Closes #1723

(cherry picked from commit d82ff4ed09)
2016-04-29 18:02:27 +02:00
4228505cf0 Shader editor now uses text editor settings
(cherry picked from commit 64751e0a75)
2016-04-29 18:02:19 +02:00
9086a929b2 Specify the demos license
It was already under the MIT as the rest of the engine,
but some users seemed not convinced about it.
(cherry picked from commit fa3240a8e9)
2016-04-29 18:02:10 +02:00
5365ae9212 Add more documentations and fix AcceptDialog::add_cancel
(cherry picked from commit 5c61e17c10)
2016-04-29 18:02:03 +02:00
a3fd381a4f Fill in the blank in the Array, CenterContainer and Dictionary class reference (#4476)
(cherry picked from commit 4de3f8944e)
2016-04-29 07:44:23 +02:00
d81ffaf2ab Documentation for Canvas Modulate, ColorPicker, ColorPickerButton
(cherry picked from commit faf21b81e8)
2016-04-29 07:43:43 +02:00
c77a5f910e Fixed shader editor syntax coloring
(cherry picked from commit bda5ea0871)
2016-04-29 07:43:30 +02:00
91461b588d Move export GUI debug toggle to export settings window
(cherry picked from commit ab4caa7953)
2016-04-29 07:43:23 +02:00
3a3f56689e More precise InputMap Axis descriptions in project settings.
Now it's "Left Stick {Up, Down, Left, Right}" instead of just "Left Stick" repeated 4x.

(cherry picked from commit 418049b741)
2016-04-29 07:43:16 +02:00
35e05b092c Partial documentation for Polygon2D and Raycast2D (#4467)
(cherry picked from commit 9f29b4b26a)
2016-04-29 07:43:09 +02:00
238bbb6539 Classref: Document Button and ButtonArray
Also bind relevant constants and define some object types and better
argument names for the docs.

(cherry picked from commit 3a4ec88b37)
2016-04-29 07:42:59 +02:00
946ef8d478 GridContainer, CheckBox documentation, descriptions for Vector2 and CenterContainer.set_use_top_left
(cherry picked from commit a5b4c1d64f)
2016-04-29 07:42:48 +02:00
d3ee8de754 fix - HTTPClient connection keep-alive duplicate Headers #4208
(cherry picked from commit 6ad226ac38)
2016-04-29 07:42:40 +02:00
517518ae9a Added scroll lines, issue 4243
(cherry picked from commit 54244e0e1d)
2016-04-29 07:42:08 +02:00
084ce221d7 NACL removal: fix leftover 2016-04-27 23:17:18 +02:00
e38666b76a fixed some mistakes in WeakRef documentation
(cherry picked from commit e301ca3544)
2016-04-27 20:19:52 +02:00
6f76eca883 Documented WeakRef and member functions
(cherry picked from commit edff81c214)
2016-04-27 20:19:46 +02:00
d183a5361f Documented Node2D
(cherry picked from commit 87aa128228)
2016-04-27 20:19:37 +02:00
11aa0d1405 Various improvements to doc_status.py
- Make comments opt-in (smaller table in width)
- Reduce length of Brief Description and Description (also smaller table as output)
- Make names cyan (blue is too dark on black terminal)
- Drop some redundant synonyms for the flags

(cherry picked from commit 034d6e811f)
2016-04-27 20:19:30 +02:00
6efe8818a7 Edited classes.xml : GraphEdit finished (#4450)
(cherry picked from commit 81e405545b)
2016-04-27 20:19:20 +02:00
9023a84a93 Remove last NACL references
(cherry picked from commit d3811b490d)
2016-04-27 20:19:12 +02:00
1bd2145e34 Drop NACL platform
It's no longer maintained and Chrome-specific, so it's not a viable solution
to deploy Godot games in browsers. The current prefered alternative is asm.js
(platform/javascript), and we're looking forward to WebAssembly.

(cherry picked from commit ec606f94dc)
2016-04-27 20:18:59 +02:00
382a8250ba Drop obsolete WIP for Flash platform
It was apparently never fully functional and has not been maintained.
Flash itself is nowadays clearly a deprecated technology, so there will
not be further work on it. platform/javascript and the upcoming
WebAssembly technologies should have a brighter future.

(cherry picked from commit f368d380e7)
2016-04-27 20:17:37 +02:00
73296a9a6d Trim trailing white space on save, issue 4383
(cherry picked from commit f3e6569e00)
2016-04-27 20:17:25 +02:00
93b1f60ca2 Encode axis_value in Variant for InputEvent::JOYSTICK_MOTION.
Fixes a bug that caused InputMap actions which have been set to joystick axes
not to work correctly on exported builds as the axis_value property wouldn't be serialized into engine.cfb.
See recent discussion in #49 (Post 121+)

(cherry picked from commit 9201b5a27c)
2016-04-27 20:17:13 +02:00
7f4387d21e Fix continious update with Camera2D
Closes #4406

(cherry picked from commit b2e0cedbf0)
2016-04-27 20:17:07 +02:00
c0748bad06 Add a python script to check the current doc status
(cherry picked from commit c9340cdcc6)
2016-04-27 20:17:00 +02:00
94b321822d add sign comparison for joystick axis events in InputMap::_find_event
fixes #4400

(cherry picked from commit 3b12f9ea82)
2016-04-27 20:16:51 +02:00
c523749662 Fix Camera2D ignoring zoom when checking limits
Closes #1912

(cherry picked from commit 7a8aea0be9)
2016-04-27 20:16:08 +02:00
0f47311610 Add fallback to legacy KeyboardEvent in web export
Fallback to KeyboardEvent property `charCode` is absence of both `key`
and `char` for retrieval of unicode value.

(cherry picked from commit 45b90f16ca)
2016-04-27 20:16:01 +02:00
4c358b7043 Add preview of the Camera2D's screen boundaries
Closes #3365

(cherry picked from commit e7f66a88d6)
2016-04-27 20:15:46 +02:00
98b30e3aff Reimplement key input events in Emscripten export
Scancodes work, but unicode values are now completely broken in some
browser/OS combinations.

(cherry picked from commit 0e9eefb7d4)
2016-04-27 19:42:31 +02:00
9f5c6cf950 remove unused resources and add korean locale for android
- remove unused resources in platform/android/java/res/values/strings.xml
- add korean language resource for apk expansion download screen

(cherry picked from commit e94e710893)
2016-04-27 19:42:22 +02:00
07fc330241 Fixed zero-length arrays in nrex. Fixes #4346
(cherry picked from commit 48b2dfab9f)
2016-04-27 08:50:36 +02:00
c712e54b63 tiny fix to loop restart (#4358)
Closes #4355
(cherry picked from commit e566b17f91)
2016-04-27 08:50:28 +02:00
6a2efc48c5 Fix 'Quit to Project Manager' not stopping the running application
(cherry picked from commit e48c07750f)
2016-04-27 08:50:09 +02:00
ff1d370b9f Fix File.get_csv_line not including quoted newlines in the output
Close #1232

(cherry picked from commit 7a18bb8ace)
2016-04-27 08:50:03 +02:00
e654184888 Always set default clear color
(cherry picked from commit 0ee8b74101)
2016-04-27 08:49:56 +02:00
cabb80ecf4 Add openssl=builtin to build command in .travis.yml
(cherry picked from commit 1db2759f5e)
2016-04-27 08:49:45 +02:00
3efa0f130d Update OpenSSL to version 1.0.2g
(cherry picked from commit e97922f220)
2016-04-27 08:49:39 +02:00
47c7b535d2 BoneAttachments now position themselves instantly during bind.
(cherry picked from commit bc5ee6c98f)
2016-04-27 08:49:30 +02:00
5fac497aa2 Fixed curve baking, now always start at origin point
(cherry picked from commit 08b93da28a)
2016-04-27 08:49:23 +02:00
4bfcd14a6a correct typo "overwrite"
(cherry picked from commit 86c6326057)
2016-04-27 08:48:43 +02:00
dbcf969fbf Keep editable instances data when replacing tree root node
(cherry picked from commit 3029f5ee02)
2016-04-27 08:48:34 +02:00
52bf4a76b2 x11: Flush the X output buffer after changing mouse mode
(cherry picked from commit 5907a007dc)
2016-04-27 08:48:23 +02:00
f32a4dc516 Made trackpad behaviour optional in 3D mode (issue #4265)
(cherry picked from commit 84d706cb35)
2016-04-27 08:44:40 +02:00
a0b6645858 Fixed #4163 (intersect_shape crashes on results limit)
(cherry picked from commit d239e6bc0e)
2016-04-27 08:44:31 +02:00
b24c3be564 Update OpenSSL to version 1.0.1s
(cherry picked from commit c860574d8b
and commit 2cbd850979)
2016-04-27 08:43:39 +02:00
b2b5c495e1 Subclasses can now extend from other subclasses contained in scripts derived from relative paths.
(cherry picked from commit d643a40f95)
2016-04-27 08:42:48 +02:00
e367c6cdd8 Fixed undo redo interaction with find replace
(cherry picked from commit 189b306722)
2016-04-27 08:42:23 +02:00
b5a438413a Setting to change line number color
(cherry picked from commit 8c328474f2)
2016-04-27 08:42:18 +02:00
f4ebba513a Updated nrex to v0.2
* Fixed capturing groups matching to invalid results
 * Fixed parents of recursive quantifiers not expanding properly
 * Fixed LookAhead sometimes adding to result

(cherry picked from commit 6207d56b95)
2016-04-27 08:42:12 +02:00
40d21117f9 Fix RayCast not updating when debugging collissions
(cherry picked from commit 6cf3bdcf76)
2016-04-27 08:42:01 +02:00
e120e2265b CanvasItemEditorPlugin: Avoid selecting items from instanced scenes
- This behaviour is only applied to click selection. Rect selection and List selection can still select these items

(cherry picked from commit fab57f2fbc)
2016-04-27 08:41:51 +02:00
8746966194 Doc: fix type of stream object
(cherry picked from commit 7820e590ea)
2016-04-27 08:40:49 +02:00
76eeb457d3 Fix warn print when hide an control does not inside_tree
(cherry picked from commit 5ec7d3f264)
2016-04-27 08:40:38 +02:00
02afea1e4e Fix crash when tween control object previous freed
(cherry picked from commit da28a2f062)
2016-04-27 08:40:19 +02:00
692878b7f4 Fix Ctrl+LaunchMedia showing up as a shortcut for "Make Bones"
Close #4044

(cherry picked from commit 4af1839073)
2016-04-27 08:38:28 +02:00
b7f5418f8d Ability to change the caret color
(cherry picked from commit c7519f091d)
2016-04-27 08:37:20 +02:00
d4d810faac dictionary has_all
(cherry picked from commit a8ebd43ab7)
2016-04-27 08:36:08 +02:00
3a390e9b44 Update vector.h
using non-templated neares_power_of_2
2016-04-11 03:34:10 -03:00
5d63f4e758 Sync classref with source 2016-04-07 21:30:22 +02:00
cbac9a2ca3 Remove duplicate
(cherry picked from commit 473de561f8)
2016-04-07 21:28:28 +02:00
837d50714a Version 2.0.2 2016-04-07 08:34:27 +02:00
bb6cfc130b Option to toggle syntax highlighting
(cherry picked from commit d78e98e2a4)
2016-04-06 19:39:36 +02:00
b3891246e5 Fixed block indent inconsistency, fixes issue 3803
(cherry picked from commit 93700676b5)
2016-04-06 19:39:30 +02:00
00566a8592 Revert "free Material 'shadow_material_double_sided' on ::finish()"
This reverts commit 43c74056b1.
2016-04-06 19:37:16 +02:00
63e33cfdd2 Add a sleeping_state_changed signal to RigidBody and RigidBody2D classes
Closes #3911

(cherry picked from commit 6dcd1354c2)
2016-04-06 18:49:51 +02:00
dea6671d58 Bind Z key (without modifiers) to toggle wireframe in 3D view
Fixed #4124

(cherry picked from commit 8ee8802cbe)
2016-04-06 18:49:26 +02:00
7c6d2e7062 Fixed text edit undo and redo operation interaction
(cherry picked from commit 646e089782)
2016-04-06 18:48:31 +02:00
eb927383f2 Fixes errors occurring when switching to a new scene with a spatial editor from a canvas editor.
(cherry picked from commit f303e3483d)
2016-04-06 18:48:25 +02:00
5c98674a8b Added rotation/panning support for trackpads in 3D mode #53
(cherry picked from commit 3ebde34d8f)
2016-04-06 18:48:05 +02:00
4bde902de1 Fixed 'complex' typo in method name
(cherry picked from commit 971c3be52d)
2016-04-06 18:47:34 +02:00
a5f07d18ec Fixed undoing twice when removing selection
(cherry picked from commit 15f43149e1)
2016-04-06 18:47:28 +02:00
71da9a1a23 Separate help pages from scripts by default
Fixes #4199
(cherry picked from commit 9c89d3e042)
2016-04-06 18:47:22 +02:00
44daccc861 Change toggle comment behaviour. Fixes #4198
(cherry picked from commit 1b6f14d810)
2016-04-06 18:47:18 +02:00
MSC
4220ffbd8e memdelete 'joy_thread' + 'joy_mutex' on ::~joystick_linux()
(cherry picked from commit 391095e0ef)
2016-04-06 18:46:53 +02:00
MSC
43c74056b1 free Material 'shadow_material_double_sided' on ::finish()
(cherry picked from commit 7a9998370f)
2016-04-06 18:46:46 +02:00
48438e4f3b Fixed insert mode interaction with auto complete
(cherry picked from commit a984adb5a6)
2016-04-06 18:46:36 +02:00
5f901e2b27 Fixed insert mode removing first unselected character
(cherry picked from commit fe779d4386)
2016-04-06 18:46:32 +02:00
22ef9673dd Added insert mode to text editor
(cherry picked from commit 2b57cb94da)
2016-04-06 18:45:56 +02:00
5b1aa3a5cd Progress bar minsize now checks percent_visible
Allows for really thin progress bars such as for pixel-art styles.

(cherry picked from commit 0bba09c4cb)
2016-04-06 18:45:33 +02:00
f06f574735 Fix building against 2.0 API
812de22 used a method from the new plugin API in master,
so it failed building.
2016-04-02 23:11:38 +02:00
aac3b9db5c Add support for gnu-libstc++-4.9 needed by recent NDK versions
The 4.9 version is the default one, people can still build using 4.8
with older NDK versions by setting the (optional) NDK_TARGET
and NDK_TARGET_X86 environment variables.

(cherry picked from commit a0fb5b5f95)
2016-04-02 23:05:18 +02:00
9fdc1279cc Make hardcoded Mac version 2.0.x
To avoid having to bump it up every time.
2016-04-02 22:22:38 +02:00
01471e4c09 Function syntax highlighting
(cherry picked from commit 50aa78210c)
2016-04-02 22:19:54 +02:00
bac8248316 Remove trailing spaces
(cherry picked from commit 0a5472e697)
2016-04-02 22:19:40 +02:00
69e67d51c7 Port 2D demos to TSCN/TRES formats
Part of #4196.

(cherry picked from commit 23cf6a85bd)
2016-04-02 22:19:30 +02:00
c6ccd05fed Fix last two bindings in input_mapping demo
Also connect the signal from script, as it makes it easier to understand
than by having to check the connected signals via the GUI.

(cherry picked from commit 4eb49cc732)
2016-04-02 22:15:58 +02:00
937a96b26b Option to toggle line numbers
(cherry picked from commit 474911c533)
2016-04-02 22:15:38 +02:00
a52b1e866d inherit PKG_CONFIG_PATH from environment
(cherry picked from commit 32391ffd73)
2016-04-02 22:15:32 +02:00
fed11a662a doc/base/classes.xml: String.match, Node.find_node
Clarify wildcard behavior.

(cherry picked from commit ef08fed277)
2016-04-02 22:15:20 +02:00
26f2b7415c Fixed numbers not highlighting after space
(cherry picked from commit cd07badee3)
2016-04-02 22:15:11 +02:00
729dc5da83 Stopped save scene flicker, issue 4118
(cherry picked from commit 9d74b76a69)
2016-04-02 22:15:06 +02:00
54625bb771 Fix GDScript crash when call show/hide in func _exit_tree
(cherry picked from commit 0c6f089ce4)
2016-04-02 22:14:49 +02:00
523625a3d1 Syntax highlighting for numbers
(cherry picked from commit c844c2d604)
2016-04-02 22:14:27 +02:00
5caf6ad8b9 Expose android/shutdown_adb_on_exit parameter and default to true
It was added in 30d0ca9 for the Steam build but only enabled
when parsing a ._sc_ file that would define it.
It is now available for all users to toggle, in and outside of Steam.

Fixes #4073.

(cherry picked from commit c584940387)
2016-04-02 22:14:20 +02:00
7ddc17b18e BoxContainer: Bind method add_spacer(bool)
(cherry picked from commit 0571f961a8)
2016-04-02 22:13:58 +02:00
cf0a586a3e TextEdit: Fix Shift+Delete shortcut not calling cut()
(cherry picked from commit abb720438f)
2016-04-02 22:13:26 +02:00
41cc4ffe98 Fixes #3942 - Throws an error when exporting for X11 with no filename
(cherry picked from commit fb58bafc54)
2016-04-02 22:13:14 +02:00
0ea354c12a Fix issues with tilemap covering child nodes and old quadrants
Closes #4070

(cherry picked from commit 2a581835ca)
2016-04-02 22:12:53 +02:00
2bc4049b9b Fix for #4014, changed to 2 instead of 3 chars to trigger search
(cherry picked from commit 4e59d1c51f)
2016-04-02 22:12:41 +02:00
64a8fe6ad7 Option to toggle tab drawing
(cherry picked from commit 0fc7be89d3)
2016-04-02 22:12:29 +02:00
05c620b7ad Add -r flag to adb install for keep app user data
(cherry picked from commit 9e026fecef)
2016-04-02 22:12:12 +02:00
ca1ca6c7df Fix cursor getting locked on tree control if tree is cleared while modifying numerical element.
(cherry picked from commit 44fe74bfc3)
2016-04-02 22:12:02 +02:00
1369b38d85 Fixed highlighting when word occurs as substring first
(cherry picked from commit 9c0e1524e5)
2016-04-02 22:11:37 +02:00
68b7f9d87a Fixed highliting with shift and mouse
(cherry picked from commit 4cc3fbeaff)
2016-04-02 22:11:30 +02:00
8a78112e5b Highlight all occurrences of selected word
(cherry picked from commit b0488cacf2)
2016-04-02 22:10:41 +02:00
41326781d2 Fix editors panels, of the bottom panel, not resizing in some cases
(cherry picked from commit 4a0f835ece)
2016-04-02 22:10:31 +02:00
cacf7d136f LineEdit/TextEdit: Add Shift+Delete shortcut for cut
(cherry picked from commit fac027cb14)
2016-04-02 22:10:20 +02:00
a701c6ff68 TextEdit: Fix inconsistent copy, cut and paste behaviour
(cherry picked from commit 4dfd0c1863)
2016-04-02 22:10:15 +02:00
812de22194 Fix file dialog, of Particles2D plugin, showing "Error" icons
(cherry picked from commit 8d2a957e36)
2016-04-02 22:09:33 +02:00
8de0405032 Automatically create input node when creating a ShaderGraph
(cherry picked from commit 5ee67ba498)
2016-04-02 22:09:26 +02:00
e59c0610ca Fix crash when importing sub-scenes
(cherry picked from commit cb7db2d430)
2016-04-02 22:09:01 +02:00
8fd4c78caf Added configuable tab size
(cherry picked from commit 9234bd3ff9)
2016-04-02 22:08:41 +02:00
85820434de Correct spot light size conversion in Blender exporter.
The collada falloff angle is the angle from the center of the spot
light projection, whereas Blender's point light size is the angle from
one side to the opposite, meaning it's twice as much.

(cherry picked from commit 1f4a214987)
2016-04-02 22:08:23 +02:00
d0151daa69 Undo and redo commands on text editor now affect internal version which fixes inconsistent file saving validation.
(cherry picked from commit b2e471fd7c)
2016-04-02 22:07:40 +02:00
763b29ed18 Remove redundant buttons
Now the Load button is alone on its line,
we probably need to find it a better place.

(cherry picked from commit d36333b648)
2016-04-02 22:06:37 +02:00
1d096471dc Add stop and delete buttons to sample library
Based on the work by @rdcklinux in #3339.
The play button becomes a stop button while playing.
A delete button is added in the last column.

(cherry picked from commit 533b9b7342)
2016-04-02 22:06:30 +02:00
7c44cbee67 Fix link error when disable_3d=yes
(cherry picked from commit a638af886e)
2016-04-02 22:05:49 +02:00
d950a13c10 TileSet Export: Avoid invalid error when merge is enabled but file does not exist
(cherry picked from commit 897b33ce77)
2016-04-02 22:05:36 +02:00
6ce273b329 Fix crash when resizing ConcavePolygonShape2D segments
(cherry picked from commit 3fc16d4025)
2016-04-02 22:04:41 +02:00
0635a639e9 TimeScale node: return +inf remaining for 0 scale.
(cherry picked from commit 65b7791263)
2016-04-02 22:04:35 +02:00
424a104666 remove trailing whitespace
(cherry picked from commit 4a4f247914)
2016-04-02 22:03:48 +02:00
830947feaf AnimationTreePlayer: distinguish value tracks.
If the node had a 3D Transform, the transform would always get written,
even if the tracks on that node were supposed to be value tracks.

(cherry picked from commit 2fa200ff53)
2016-04-02 22:00:40 +02:00
ee20365f7c Variant::blend: add Quat, fix Vector3.
(cherry picked from commit f7fad32188)
2016-04-02 22:00:18 +02:00
0a24f562fb Update version in Info.plist
Getting info on Godot.app still shows version 1.0.0.  Would be nice to have this reflect the real version number via the build system.
(cherry picked from commit 3d9e26bfce)
2016-04-02 21:59:49 +02:00
60e4cfbcb7 TimeScale node: scale return value (time remaining).
(cherry picked from commit 2e1b1234a3)
2016-04-02 21:59:07 +02:00
656aa0a501 fix InputMap::action_erase_event()
fixes #3976

(cherry picked from commit 9544042adb)
2016-04-02 21:58:26 +02:00
7ad50eaea8 This will disable png arm neon optimizing for android template if compile on windows, but make compiling successful.
And arm neon opt is enabled if not on windows.

(cherry picked from commit db89a47e28)
2016-04-02 21:58:09 +02:00
83887ae16d migrate to container-based Travis CI
(cherry picked from commit 1f83ae9b5a)
2016-04-02 21:57:38 +02:00
827f4a895a osx: fix inverted horizontal scrolling
(cherry picked from commit 02eddbf7da)
2016-04-02 21:57:26 +02:00
da356eca0f Enabled scrolling past end of file
(cherry picked from commit f19eea2f2d)
2016-04-02 21:57:10 +02:00
53aa9cd51a Release 2.0.1 2016-03-06 19:05:45 +01:00
706d576f7b Add support for patch versions (2.0.x) 2016-03-06 19:05:27 +01:00
226e0a7f4f Fix Project Settings dialog add/delete global variable
(cherry picked from commit 48524384d6)
2016-03-06 18:07:42 +01:00
c44060bb82 doc: fix joystick left/right trigger axis description (index 6/7 instead of 4/5)
(cherry picked from commit 1b806ef54e)
2016-03-06 18:06:47 +01:00
4fee5f3915 Add more verbose build-in functions descriptions
Add descriptions for some global constants

(cherry picked from commit ff7c89ebaf)
2016-03-06 10:39:21 +01:00
e69c9021b5 The help page now show the entire object hierarchy
(cherry picked from commit fdd1209276)
2016-03-06 09:48:26 +01:00
edb3716da7 Fix Sprite doesn't updating region_rect value in certain conditions
(cherry picked from commit 1d188c1c7b)
2016-03-06 09:48:20 +01:00
1bdd5d24cb Removed "__editor_plugin_screen__" metadata creation
(cherry picked from commit b79e83ad6f)
2016-03-06 09:48:15 +01:00
a1a1c0b9f6 Added search box in Class List dialog (Script Editor)
(cherry picked from commit cc6a6ef08c)
2016-03-06 09:48:06 +01:00
450a7a9120 Write GDScript documentation
(cherry picked from commit cd1184d56c)
2016-03-05 15:12:24 +01:00
c850fa7331 Added relative paths for DirAccess::remove()
Follows similar behaviour to DirAccess::rename()

(cherry picked from commit d7052ddba3)
2016-03-05 13:35:48 +01:00
afd75013f9 html5: workaround for echo key events.
(cherry picked from commit 352db6b17e)
2016-03-05 13:35:36 +01:00
848c7378fd Add editor settings for call hint placement
Added settings: text_editor/put_callhint_tooltip_below_current_line
and text_editor/callhint_tooltip_offset

(cherry picked from commit 47206b409d)
2016-03-05 12:58:01 +01:00
4b2fcabb74 Hide hint if completion is active
(cherry picked from commit 26cc14e839)
2016-03-05 12:57:56 +01:00
cb7693c533 Move the call hint under the current line
(cherry picked from commit 03025f60b6)
2016-03-05 12:57:52 +01:00
7fea990b1b set_time_scale docs
This is correct?

(cherry picked from commit 6b7ec5de69)
2016-03-05 12:56:27 +01:00
95e46e6eac fix gradle build on windows
(cherry picked from commit d6cc887627)
2016-03-05 12:56:19 +01:00
bea8e1654e AnimationTreePlayer (Blend3): process all inputs.
Always call _process_node on all three inputs so that looped animations
don't get out of sync.

(cherry picked from commit b79351aa45)
2016-03-05 12:55:54 +01:00
cafcdb015d AnimationTreePlayer: blend value tracks (closes #2299)
Variant:
- zero() sets a Variant to the appropriate type of zero value
- blend() blends part of one Variant on top of another.

(cherry picked from commit 391ce81c5e)
2016-03-05 12:55:43 +01:00
459b914d9c Quick fixes to tween documentation formatting
Maybe the reST parser should be improved instead though ;)

(cherry picked from commit a12c63ef9e)
2016-03-01 08:38:23 +01:00
9ed3d21d5a Sync classes 2016-03-01 08:25:04 +01:00
82d06b0027 use joystick name from mapping-db if available 2016-03-01 08:16:27 +01:00
e0a66b6e56 deleted files added accidentally
(cherry picked from commit 96b60c281f)
2016-02-29 09:03:31 +01:00
186b82c350 Document Tween class
(cherry picked from commit 49e1cc6fa9)
2016-02-29 09:03:06 +01:00
1af2e1101d Remove grey capsule on official logo
It had been added by a contributor without prior discussion
with the rest of the team, but the grey capsule did not look
so good. Closes #3848.

Also renamed godot_{icon,logo} to just {icon,logo}.

(cherry picked from commit eb5f9ed89b)
2016-02-29 09:01:02 +01:00
a55f41e3d9 screen_shaders: convert demo images to JPG
(cherry picked from commit a97c1ca8f9)
2016-02-29 09:00:55 +01:00
439e29ea95 normalmap demo: convert images to JPG
To make the demos lighter

(cherry picked from commit 2fd177b2a5)
2016-02-29 09:00:48 +01:00
f5e8e89f50 Remove Noto Sans font from translation demo (heavy!)
(cherry picked from commit 0f087755cc)
2016-02-29 09:00:43 +01:00
f619b05751 added [presets] to ._sc_ and "android/shutdown_adb_on_exit" to editor_settings
(cherry picked from commit 30d0ca9766)
2016-02-29 09:00:35 +01:00
aa94ff6dae fix transform localization event in mouse motion
(cherry picked from commit 08e0e64a19)
2016-02-29 09:00:14 +01:00
ee5c250b63 OUYA gamepad mappings fix
Fix gamepad mappings for OUYA revision 4
2016-02-27 15:28:34 +01:00
e4d367e7a1 theora on server build 2016-02-27 15:28:22 +01:00
45a0bbe56e adds -pm and -project_manager command line options to start project manager
fixes bug where the user has an engine.cfg on the executable directory so it runs the game instead of opening the project manager
2016-02-27 15:27:33 +01:00
d86b12a397 Fixed closing a scene tab when it was not the CURRENT tab. Fixes #3810 2016-02-27 15:27:25 +01:00
f0ba9c7e78 x11: fix joysticks not recognizing some buttons
dpad on x360 pads with kernel < 4.3 is working now
2016-02-27 15:27:15 +01:00
61f17fb1bb applied some typo fixes. see godotengine/godot-docs#18 2016-02-27 15:27:10 +01:00
a43af20f31 added more Android gamepad mappings 2016-02-27 15:26:59 +01:00
7ba92ae9eb Fix typo in error 2016-02-27 15:26:27 +01:00
b05c27a27f Fix allocation bug if compiled with modern clang or gcc
* Add overflow checked intrinsic abstractions that check on overflow.
* Use them for memory allocation code.
* Use size_t type for memory allocation code to support full platform dependent width.

Fixes #3756.
2016-02-27 15:26:18 +01:00
e30cbc3b36 added a couple more Linux mappings, tweaked Ouya Linux mapping 2016-02-27 15:25:51 +01:00
6638 changed files with 377312 additions and 431694 deletions

5
.gitattributes vendored
View File

@ -1,8 +1,3 @@
# Properly detect languages on Github
*.h linguist-language=cpp
*.inc linguist-language=cpp
drivers/* linguist-vendored
*.cpp eol=lf
*.h eol=lf
*.py eol=lf

24
.gitignore vendored
View File

@ -17,10 +17,10 @@ core/global_defaults.cpp
drivers/unix/os_unix_global_settings_path.cpp
tools/editor/register_exporters.cpp
tools/editor/doc_data_compressed.h
tools/editor/certs_compressed.h
tools/editor/editor_icons.cpp
tools/editor/translations.h
tools/editor/builtin_fonts.h
tools/editor/certs_compressed.h
tools/editor/translations.h
.fscache
make.bat
log.txt
@ -37,10 +37,17 @@ platform/android/java/.gradle
platform/android/java/.gradletasknamecache
platform/android/java/local.properties
platform/android/java/project.properties
platform/android/java/build.gradle
platform/android/java/AndroidManifest.xml
platform/android/java/bin/*
platform/android/java/libs/*
platform/android/java/gen/*
platform/android/java/assets
platform/android/libs/apk_expansion/bin/*
platform/android/libs/apk_expansion/gen/*
platform/android/libs/google_play_services/bin/*
platform/android/libs/google_play_services/gen/*
platform/android/libs/play_licensing/bin/*
platform/android/libs/play_licensing/gen/*
# General c++ generated files
*.lib
@ -53,14 +60,12 @@ platform/android/java/assets
*.os
*.Plo
*.lo
*.Po
# Libs generated files
.deps/*
.dirstamp
# Vim temp files
*.swo
*.swp
# QT project files
*.config
@ -240,9 +245,6 @@ node_modules/
# KDE
.directory
#Kdevelop project files
*.kdev4
# RIA/Silverlight projects
Generated_Code/
@ -299,7 +301,3 @@ godot.creator.*
projects/
platform/windows/godot_res.res
# Visual Studio Code folder (and files) that are created
# when the C/C++ extension (https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) is used
/.vscode

View File

@ -54,7 +54,7 @@ addons:
- libglu1-mesa-dev
- libssl-dev
- libxinerama-dev
- libxrandr-dev
- libudev-dev
# For cross-compiling to Windows.
- binutils-mingw-w64-i686
@ -69,8 +69,8 @@ addons:
before_script:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; brew install scons; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$GODOT_TARGET" = "android" ]; then
brew update; travis_wait 20 brew install -v android-sdk;
travis_wait 20 brew install -v android-ndk | grep -v "inflating:" | grep -v "creating:";
brew update; brew install -v android-sdk;
brew install -v android-ndk | grep -v "inflating:" | grep -v "creating:";
export ANDROID_HOME=/usr/local/opt/android-sdk; export ANDROID_NDK_ROOT=/usr/local/opt/android-ndk;
fi

View File

@ -1,4 +1,4 @@
**Operating system or device - Godot version:**
**Operating system or device:**
**Issue description** (what happened, and what was expected):

View File

@ -3,7 +3,7 @@
************************************************************************
Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur.
Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@ -1,66 +1,29 @@
[![GODOT](/logo.png)](https://godotengine.org)
![GODOT](/logo.png)
## Godot Engine
https://godotengine.org
Homepage: https://godotengine.org
### The Engine
#### 2D and 3D cross-platform game engine
Godot is a fully featured, open source, MIT licensed, game engine. It focuses on having great tools, and a visual oriented workflow that can export to PC, Mobile and Web platforms with no hassle.
The editor, language and APIs are feature rich, yet simple to learn, allowing you to become productive in a matter of hours.
Godot Engine is a feature-packed, cross-platform game engine to create 2D and
3D games from a unified interface. It provides a comprehensive set of common
tools, so that users can focus on making games without having to reinvent the
wheel. Games can be exported in one click to a number of platforms, including
the major desktop platforms (Linux, Mac OSX, Windows) as well as mobile
(Android, iOS) and web-based (HTML5) platforms.
### About
#### Free, open source and community-driven
Godot has been developed by Juan Linietsky and Ariel Manzur for several years, and was born as an in-house engine, used to publish several work-for-hire titles. Godot is a member project of the [Software Freedom Conservancy](https://sfconservancy.org)
Godot is completely free and open source under the very permissive MIT license.
No strings attached, no royalties, nothing. The users' games are theirs, down
to the last line of engine code. Godot's development is fully independent and
community-driven, empowering users to help shape their engine to match their
expectations. It is supported by the Software Freedom Conservancy
not-for-profit.
### Documentation
Before being open sourced in February 2014, Godot had been developed by Juan
Linietsky and Ariel Manzur (both still maintaining the project) for several
years as an in-house engine, used to publish several work-for-hire titles.
Documentation is hosted on [ReadTheDocs](http://docs.godotengine.org).
### Getting the engine
### Binary Downloads, Community, etc.
#### Binary downloads
Binary downloads, community, etc. can be found in Godot homepage:
Official binaries for the Godot editor and the export templates can be found
[on the homepage](https://godotengine.org/download).
https://godotengine.org
#### Compiling from source
### Compiling from Source
[See the official docs](http://docs.godotengine.org/en/latest/reference/_compiling.html)
for compilation instructions for every supported platform.
### Community
Godot is not only an engine but an ever-growing community of users and engine
developers. The main community channels are listed [on the homepage](https://godotengine.org/community).
To get in touch with the developers, the best way is to join the
[#godotengine IRC channel](https://webchat.freenode.net/?channels=godotengine)
on Freenode.
### Documentation and demos
The official documentation is hosted on [ReadTheDocs](http://docs.godotengine.org).
It is maintained by the Godot community in its own [GitHub repository](https://github.com/godotengine/godot-docs).
The [class reference](http://docs.godotengine.org/en/latest/classes/_classes.html)
is also accessible from within the engine.
The official demos are maintained in their own [GitHub repository](https://github.com/godotengine/godot-demo-projects)
as well.
There are also a number of other learning resources provided by the community,
such as text and video tutorials, demos, etc. Consult the [community channels](https://godotengine.org/community)
for more info.
See docs for compilation instructions for every platform:
http://docs.godotengine.org/en/latest/reference/_compiling.html
[![Build Status](https://travis-ci.org/godotengine/godot.svg?branch=master)](https://travis-ci.org/godotengine/godot)
[![Code Triagers Badge](http://www.codetriage.com/godotengine/godot/badges/users.svg)](http://www.codetriage.com/godotengine/godot)

View File

@ -1,7 +1,4 @@
#!/usr/bin/env python
EnsureSConsVersion(0, 14)
EnsureSConsVersion(0,14);
import string
@ -15,85 +12,82 @@ methods.update_version()
# scan possible build platforms
platform_list = [] # list of platforms
platform_opts = {} # options for each platform
platform_flags = {} # flags for each platform
platform_list = [] # list of platforms
platform_opts = {} # options for each platform
platform_flags = {} # flags for each platform
active_platforms = []
active_platform_ids = []
platform_exporters = []
global_defaults = []
active_platforms=[]
active_platform_ids=[]
platform_exporters=[]
global_defaults=[]
for x in glob.glob("platform/*"):
if (not os.path.isdir(x) or not os.path.exists(x + "/detect.py")):
continue
tmppath = "./" + x
if (not os.path.isdir(x) or not os.path.exists(x+"/detect.py")):
continue
tmppath="./"+x
sys.path.append(tmppath)
import detect
sys.path.append(tmppath)
import detect
if (os.path.exists(x + "/export/export.cpp")):
platform_exporters.append(x[9:])
if (os.path.exists(x + "/globals/global_defaults.cpp")):
global_defaults.append(x[9:])
if (detect.is_active()):
active_platforms.append(detect.get_name())
active_platform_ids.append(x)
if (detect.can_build()):
x = x.replace("platform/", "") # rest of world
x = x.replace("platform\\", "") # win32
platform_list += [x]
platform_opts[x] = detect.get_opts()
platform_flags[x] = detect.get_flags()
sys.path.remove(tmppath)
sys.modules.pop('detect')
if (os.path.exists(x+"/export/export.cpp")):
platform_exporters.append(x[9:])
if (os.path.exists(x+"/globals/global_defaults.cpp")):
global_defaults.append(x[9:])
if (detect.is_active()):
active_platforms.append( detect.get_name() )
active_platform_ids.append(x);
if (detect.can_build()):
x=x.replace("platform/","") # rest of world
x=x.replace("platform\\","") # win32
platform_list+=[x]
platform_opts[x]=detect.get_opts()
platform_flags[x]=detect.get_flags()
sys.path.remove(tmppath)
sys.modules.pop('detect')
module_list = methods.detect_modules()
module_list=methods.detect_modules()
# print "Detected Platforms: "+str(platform_list)
#print "Detected Platforms: "+str(platform_list)
methods.save_active_platforms(active_platforms, active_platform_ids)
methods.save_active_platforms(active_platforms,active_platform_ids)
custom_tools = ['default']
custom_tools=['default']
platform_arg = ARGUMENTS.get("platform", ARGUMENTS.get("p", False))
platform_arg = ARGUMENTS.get("platform", False)
if (os.name == "posix"):
pass
elif (os.name == "nt"):
if (os.getenv("VSINSTALLDIR") == None or platform_arg == "android"):
custom_tools = ['mingw']
if (os.name=="posix"):
pass
elif (os.name=="nt"):
if (os.getenv("VSINSTALLDIR")==None or platform_arg=="android"):
custom_tools=['mingw']
env_base = Environment(tools=custom_tools)
if 'TERM' in os.environ:
env_base['ENV']['TERM'] = os.environ['TERM']
env_base=Environment(tools=custom_tools);
env_base.AppendENVPath('PATH', os.getenv('PATH'))
env_base.AppendENVPath('PKG_CONFIG_PATH', os.getenv('PKG_CONFIG_PATH'))
env_base.global_defaults = global_defaults
env_base.android_maven_repos = []
env_base.android_dependencies = []
env_base.android_java_dirs = []
env_base.android_res_dirs = []
env_base.android_aidl_dirs = []
env_base.android_jni_dirs = []
env_base.android_default_config = []
env_base.android_manifest_chunk = ""
env_base.android_permission_chunk = ""
env_base.android_appattributes_chunk = ""
env_base.disabled_modules = []
env_base.use_ptrcall = False
env_base.split_drivers = False
env_base.global_defaults=global_defaults
env_base.android_maven_repos=[]
env_base.android_dependencies=[]
env_base.android_java_dirs=[]
env_base.android_res_dirs=[]
env_base.android_aidl_dirs=[]
env_base.android_jni_dirs=[]
env_base.android_manifest_chunk=""
env_base.android_permission_chunk=""
env_base.android_appattributes_chunk=""
env_base.disabled_modules=[]
env_base.split_drivers=False
env_base.__class__.android_add_maven_repository = methods.android_add_maven_repository
env_base.__class__.android_add_dependency = methods.android_add_dependency
env_base.__class__.android_add_java_dir = methods.android_add_java_dir
env_base.__class__.android_add_res_dir = methods.android_add_res_dir
env_base.__class__.android_add_aidl_dir = methods.android_add_aidl_dir
env_base.__class__.android_add_jni_dir = methods.android_add_jni_dir
env_base.__class__.android_add_default_config = methods.android_add_default_config
env_base.__class__.android_add_maven_repository=methods.android_add_maven_repository
env_base.__class__.android_add_dependency=methods.android_add_dependency
env_base.__class__.android_add_java_dir=methods.android_add_java_dir
env_base.__class__.android_add_res_dir=methods.android_add_res_dir
env_base.__class__.android_add_aidl_dir=methods.android_add_aidl_dir
env_base.__class__.android_add_jni_dir=methods.android_add_jni_dir
env_base.__class__.android_add_to_manifest = methods.android_add_to_manifest
env_base.__class__.android_add_to_permissions = methods.android_add_to_permissions
env_base.__class__.android_add_to_attributes = methods.android_add_to_attributes
@ -101,92 +95,77 @@ env_base.__class__.disable_module = methods.disable_module
env_base.__class__.add_source_files = methods.add_source_files
env_base.__class__.use_windows_spawn_fix = methods.use_windows_spawn_fix
env_base.__class__.split_lib = methods.split_lib
env_base["x86_libtheora_opt_gcc"] = False
env_base["x86_libtheora_opt_vc"] = False
# Build options
env_base["x86_opt_gcc"]=False
env_base["x86_opt_vc"]=False
env_base["armv7_opt_gcc"]=False
customs = ['custom.py']
profile = ARGUMENTS.get("profile", False)
if profile:
import os.path
if os.path.isfile(profile):
customs.append(profile)
elif os.path.isfile(profile + ".py"):
customs.append(profile + ".py")
opts = Variables(customs, ARGUMENTS)
# Target build options
opts.Add('arch', "Platform-dependent architecture (arm/arm64/x86/x64/mips/etc)", '')
opts.Add('bits', "Target platform bits (default/32/64/fat)", 'default')
opts.Add('p', "Platform (alias for 'platform')", '')
opts.Add('platform', "Target platform: any in " + str(platform_list), '')
opts.Add('target', "Compilation target (debug/release_debug/release)", 'debug')
opts.Add('tools', "Build the tools a.k.a. the Godot editor (yes/no)", 'yes')
# Components
opts.Add('deprecated', "Enable deprecated features (yes/no)", 'yes')
opts.Add('gdscript', "Build GDSCript support (yes/no)", 'yes')
opts.Add('minizip', "Build minizip archive support (yes/no)", 'yes')
opts.Add('xml', "XML format support for resources (yes/no)", 'yes')
# Advanced options
opts.Add('disable_3d', "Disable 3D nodes for smaller executable (yes/no)", 'no')
opts.Add('disable_advanced_gui', "Disable advance 3D gui nodes and behaviors (yes/no)", 'no')
opts.Add('extra_suffix', "Custom extra suffix added to the base filename of all generated binary files", '')
opts.Add('unix_global_settings_path', "UNIX-specific path to system-wide settings. Currently only used for templates", '')
opts.Add('verbose', "Enable verbose output for the compilation (yes/no)", 'yes')
opts.Add('vsproj', "Generate Visual Studio Project. (yes/no)", 'no')
# Thirdparty libraries
opts.Add('builtin_freetype', "Use the builtin freetype library (yes/no)", 'yes')
opts.Add('builtin_glew', "Use the builtin glew library (yes/no)", 'yes')
opts.Add('builtin_libmpcdec', "Use the builtin libmpcdec library (yes/no)", 'yes')
opts.Add('builtin_libogg', "Use the builtin libogg library (yes/no)", 'yes')
opts.Add('builtin_libpng', "Use the builtin libpng library (yes/no)", 'yes')
opts.Add('builtin_libtheora', "Use the builtin libtheora library (yes/no)", 'yes')
opts.Add('builtin_libvorbis', "Use the builtin libvorbis library (yes/no)", 'yes')
opts.Add('builtin_libwebp', "Use the builtin libwebp library (yes/no)", 'yes')
opts.Add('builtin_openssl', "Use the builtin openssl library (yes/no)", 'yes')
opts.Add('builtin_opus', "Use the builtin opus library (yes/no)", 'yes')
# (akien) Unbundling would require work in audio_stream_speex.{cpp,h}, but since speex was
# removed in 3.0+ and this is only to preserve compatibility in 2.1, I haven't worked on it.
# Patches welcome if anyone cares :)
opts.Add('builtin_speex', "Use the builtin speex library (yes/no)", 'yes')
opts.Add('builtin_squish', "Use the builtin squish library (yes/no)", 'yes')
opts.Add('builtin_zlib', "Use the builtin zlib library (yes/no)", 'yes')
# Environment setup
opts.Add("CXX", "C++ compiler")
opts.Add("CC", "C compiler")
opts.Add("CCFLAGS", "Custom flags for the C and C++ compilers")
opts.Add("CFLAGS", "Custom flags for the C compiler")
opts.Add("LINKFLAGS", "Custom flags for the linker")
import os.path
if os.path.isfile(profile):
customs.append(profile)
elif os.path.isfile(profile+".py"):
customs.append(profile+".py")
opts=Variables(customs, ARGUMENTS)
opts.Add('target', 'Compile Target (debug/release_debug/release).', "debug")
opts.Add('arch', 'Platform dependent architecture (arm/arm64/x86/x64/mips/etc)', "")
opts.Add('bits', 'Compile Target Bits (default/32/64/fat).', "default")
opts.Add('platform','Platform: '+str(platform_list)+'.',"")
opts.Add('p','Platform (same as platform=).',"")
opts.Add('tools','Build Tools (Including Editor): (yes/no)','yes')
opts.Add('gdscript','Build GDSCript support: (yes/no)','yes')
opts.Add('vorbis','Build Ogg Vorbis Support: (yes/no)','yes')
opts.Add('opus','Build Opus Audio Format Support: (yes/no)','yes')
opts.Add('minizip','Build Minizip Archive Support: (yes/no)','yes')
opts.Add('squish','Squish BC Texture Compression in editor (yes/no)','yes')
opts.Add('theora','Theora Video (yes/no)','yes')
opts.Add('theoralib','Theora Video (yes/no)','no')
opts.Add('freetype','Freetype support in editor','yes')
opts.Add('speex','Speex Audio (yes/no)','yes')
opts.Add('xml','XML Save/Load support (yes/no)','yes')
opts.Add('png','PNG Image loader support (yes/no)','yes')
opts.Add('jpg','JPG Image loader support (yes/no)','yes')
opts.Add('webp','WEBP Image loader support (yes/no)','yes')
opts.Add('dds','DDS Texture loader support (yes/no)','yes')
opts.Add('pvr','PVR (PowerVR) Texture loader support (yes/no)','yes')
opts.Add('etc1','etc1 Texture compression support (yes/no)','yes')
opts.Add('builtin_zlib','Use built-in zlib (yes/no)','yes')
opts.Add('openssl','Use OpenSSL (yes/no/builtin)','no')
opts.Add('musepack','Musepack Audio (yes/no)','yes')
opts.Add("CXX", "Compiler");
opts.Add("CCFLAGS", "Custom flags for the C++ compiler");
opts.Add("CFLAGS", "Custom flags for the C compiler");
opts.Add("LINKFLAGS", "Custom flags for the linker");
opts.Add('unix_global_settings_path', 'unix-specific path to system-wide settings. Currently only used by templates.','')
opts.Add('disable_3d', 'Disable 3D nodes for smaller executable (yes/no)', "no")
opts.Add('disable_advanced_gui', 'Disable advance 3D gui nodes and behaviors (yes/no)', "no")
opts.Add('colored', 'Enable colored output for the compilation (yes/no)', 'no')
opts.Add('extra_suffix', 'Custom extra suffix added to the base filename of all generated binary files.', '')
opts.Add('vsproj', 'Generate Visual Studio Project. (yes/no)', 'no')
# add platform specific options
for k in platform_opts.keys():
opt_list = platform_opts[k]
for o in opt_list:
opts.Add(o[0], o[1], o[2])
opt_list = platform_opts[k]
for o in opt_list:
opts.Add(o[0],o[1],o[2])
for x in module_list:
opts.Add('module_' + x + '_enabled', "Enable module '" + x + "' (yes/no)", "yes")
opts.Add('module_'+x+'_enabled', "Enable module '"+x+"'.", "yes")
opts.Update(env_base) # update environment
Help(opts.GenerateHelpText(env_base)) # generate help
opts.Update(env_base) # update environment
Help(opts.GenerateHelpText(env_base)) # generate help
# add default include paths
env_base.Append(CPPPATH=['#core', '#core/math', '#tools', '#drivers', '#'])
env_base.Append(CPPPATH=['#core','#core/math','#tools','#drivers','#'])
# configure ENV for platform
env_base.platform_exporters = platform_exporters
env_base.platform_exporters=platform_exporters
"""
sys.path.append("./platform/"+env_base["platform"])
@ -196,222 +175,261 @@ sys.path.remove("./platform/"+env_base["platform"])
sys.modules.pop('detect')
"""
if (env_base['target'] == 'debug'):
env_base.Append(CPPFLAGS=['-DDEBUG_MEMORY_ALLOC'])
env_base.Append(CPPFLAGS=['-DSCI_NAMESPACE'])
if (env_base['deprecated'] != 'no'):
env_base.Append(CPPFLAGS=['-DENABLE_DEPRECATED'])
if (env_base['target']=='debug'):
env_base.Append(CPPFLAGS=['-DDEBUG_MEMORY_ALLOC']);
env_base.Append(CPPFLAGS=['-DSCI_NAMESPACE'])
env_base.platforms = {}
selected_platform = ""
selected_platform =""
if env_base['platform'] != "":
selected_platform = env_base['platform']
selected_platform=env_base['platform']
elif env_base['p'] != "":
selected_platform = env_base['p']
env_base["platform"] = selected_platform
selected_platform=env_base['p']
env_base["platform"]=selected_platform
if selected_platform in platform_list:
sys.path.append("./platform/" + selected_platform)
import detect
if "create" in dir(detect):
env = detect.create(env_base)
else:
env = env_base.Clone()
sys.path.append("./platform/"+selected_platform)
import detect
if "create" in dir(detect):
env = detect.create(env_base)
else:
env = env_base.Clone()
if env['vsproj'] == "yes":
env.vs_incs = []
env.vs_srcs = []
if env['vsproj']=="yes":
env.vs_incs = []
env.vs_srcs = []
def AddToVSProject(sources):
for x in sources:
if type(x) == type(""):
fname = env.File(x).path
else:
fname = env.File(x)[0].path
pieces = fname.split(".")
if len(pieces) > 0:
basename = pieces[0]
basename = basename.replace('\\\\', '/')
env.vs_srcs = env.vs_srcs + [basename + ".cpp"]
env.vs_incs = env.vs_incs + [basename + ".h"]
# print basename
env.AddToVSProject = AddToVSProject
def AddToVSProject( sources ):
for x in sources:
if type(x) == type(""):
fname = env.File(x).path
else:
fname = env.File(x)[0].path
pieces = fname.split(".")
if len(pieces)>0:
basename = pieces[0]
basename = basename.replace('\\\\','/')
env.vs_srcs = env.vs_srcs + [basename + ".cpp"]
env.vs_incs = env.vs_incs + [basename + ".h"]
#print basename
env.AddToVSProject = AddToVSProject
env.extra_suffix = ""
env.extra_suffix=""
if env["extra_suffix"] != '':
env.extra_suffix += '.' + env["extra_suffix"]
if env["extra_suffix"] != '' :
env.extra_suffix += '.'+env["extra_suffix"]
CCFLAGS = env.get('CCFLAGS', '')
env['CCFLAGS'] = ''
CCFLAGS = env.get('CCFLAGS', '')
env['CCFLAGS'] = ''
env.Append(CCFLAGS=string.split(str(CCFLAGS)))
env.Append(CCFLAGS=string.split(str(CCFLAGS)))
CFLAGS = env.get('CFLAGS', '')
env['CFLAGS'] = ''
CFLAGS = env.get('CFLAGS', '')
env['CFLAGS'] = ''
env.Append(CFLAGS=string.split(str(CFLAGS)))
env.Append(CFLAGS=string.split(str(CFLAGS)))
LINKFLAGS = env.get('LINKFLAGS', '')
env['LINKFLAGS'] = ''
LINKFLAGS = env.get('LINKFLAGS', '')
env['LINKFLAGS'] = ''
env.Append(LINKFLAGS=string.split(str(LINKFLAGS)))
env.Append(LINKFLAGS=string.split(str(LINKFLAGS)))
flag_list = platform_flags[selected_platform]
for f in flag_list:
if not (f[0] in ARGUMENTS): # allow command line to override platform flags
env[f[0]] = f[1]
flag_list = platform_flags[selected_platform]
for f in flag_list:
if not (f[0] in ARGUMENTS): # allow command line to override platform flags
env[f[0]] = f[1]
# must happen after the flags, so when flags are used by configure, stuff happens (ie, ssl on x11)
detect.configure(env)
#must happen after the flags, so when flags are used by configure, stuff happens (ie, ssl on x11)
detect.configure(env)
#env['platform_libsuffix'] = env['LIBSUFFIX']
#env['platform_libsuffix'] = env['LIBSUFFIX']
suffix = "." + selected_platform
suffix="."+selected_platform
if (env["target"] == "release"):
if (env["tools"] == "yes"):
print("Tools can only be built with targets 'debug' and 'release_debug'.")
sys.exit(255)
suffix += ".opt"
if (env["target"]=="release"):
if (env["tools"]=="yes"):
print("Tools can only be built with targets 'debug' and 'release_debug'.")
sys.exit(255)
suffix+=".opt"
env.Append(CCFLAGS=['-DNDEBUG'])
elif (env["target"]=="release_debug"):
if (env["tools"]=="yes"):
suffix+=".opt.tools"
else:
suffix+=".opt.debug"
else:
if (env["tools"]=="yes"):
suffix+=".tools"
else:
suffix+=".debug"
elif (env["target"] == "release_debug"):
if (env["tools"] == "yes"):
suffix += ".opt.tools"
else:
suffix += ".opt.debug"
else:
if (env["tools"] == "yes"):
suffix += ".tools"
else:
suffix += ".debug"
if env["arch"] != "":
suffix += "."+env["arch"]
elif (env["bits"]=="32"):
suffix+=".32"
elif (env["bits"]=="64"):
suffix+=".64"
elif (env["bits"]=="fat"):
suffix+=".fat"
if env["arch"] != "":
suffix += "." + env["arch"]
elif (env["bits"] == "32"):
suffix += ".32"
elif (env["bits"] == "64"):
suffix += ".64"
elif (env["bits"] == "fat"):
suffix += ".fat"
suffix+=env.extra_suffix
suffix += env.extra_suffix
env["PROGSUFFIX"]=suffix+env["PROGSUFFIX"]
env["OBJSUFFIX"]=suffix+env["OBJSUFFIX"]
env["LIBSUFFIX"]=suffix+env["LIBSUFFIX"]
env["SHLIBSUFFIX"]=suffix+env["SHLIBSUFFIX"]
env["PROGSUFFIX"] = suffix + env["PROGSUFFIX"]
env["OBJSUFFIX"] = suffix + env["OBJSUFFIX"]
env["LIBSUFFIX"] = suffix + env["LIBSUFFIX"]
env["SHLIBSUFFIX"] = suffix + env["SHLIBSUFFIX"]
sys.path.remove("./platform/"+selected_platform)
sys.modules.pop('detect')
sys.path.remove("./platform/" + selected_platform)
sys.modules.pop('detect')
env.module_list = []
env.module_list=[]
for x in module_list:
if env['module_' + x + '_enabled'] != "yes":
continue
tmppath = "./modules/" + x
sys.path.append(tmppath)
env.current_module = x
import config
if (config.can_build(selected_platform)):
config.configure(env)
env.module_list.append(x)
sys.path.remove(tmppath)
sys.modules.pop('config')
for x in module_list:
if env['module_'+x+'_enabled'] != "yes":
continue
tmppath="./modules/"+x
sys.path.append(tmppath)
env.current_module=x
import config
if (config.can_build(selected_platform)):
config.configure(env)
env.module_list.append(x)
sys.path.remove(tmppath)
sys.modules.pop('config')
if (env.use_ptrcall):
env.Append(CPPFLAGS=['-DPTRCALL_ENABLED'])
# to test 64 bits compiltion
# env.Append(CPPFLAGS=['-m64'])
if (env['musepack']=='yes'):
env.Append(CPPFLAGS=['-DMUSEPACK_ENABLED']);
if (env['tools'] == 'yes'):
env.Append(CPPFLAGS=['-DTOOLS_ENABLED'])
if (env['disable_3d'] == 'yes'):
env.Append(CPPFLAGS=['-D_3D_DISABLED'])
if (env['gdscript'] == 'yes'):
env.Append(CPPFLAGS=['-DGDSCRIPT_ENABLED'])
if (env['disable_advanced_gui'] == 'yes'):
env.Append(CPPFLAGS=['-DADVANCED_GUI_DISABLED'])
#if (env['openssl']!='no'):
# env.Append(CPPFLAGS=['-DOPENSSL_ENABLED']);
# if (env['openssl']=="builtin"):
# env.Append(CPPPATH=['#drivers/builtin_openssl2'])
if (env['minizip'] == 'yes'):
env.Append(CPPFLAGS=['-DMINIZIP_ENABLED'])
if (env["builtin_zlib"]=='yes'):
env.Append(CPPPATH=['#drivers/builtin_zlib/zlib'])
if (env['xml'] == 'yes'):
env.Append(CPPFLAGS=['-DXML_ENABLED'])
# to test 64 bits compiltion
# env.Append(CPPFLAGS=['-m64'])
if (env['verbose'] == 'no'):
methods.no_verbose(sys, env)
if (env_base['squish']=='yes'):
env.Append(CPPFLAGS=['-DSQUISH_ENABLED']);
Export('env')
if (env['vorbis']=='yes'):
env.Append(CPPFLAGS=['-DVORBIS_ENABLED']);
if (env['opus']=='yes'):
env.Append(CPPFLAGS=['-DOPUS_ENABLED']);
# build subdirs, the build order is dependent on link order.
SConscript("core/SCsub")
SConscript("servers/SCsub")
SConscript("scene/SCsub")
SConscript("tools/SCsub")
SConscript("drivers/SCsub")
if (env['theora']=='yes'):
env['theoralib']='yes'
env.Append(CPPFLAGS=['-DTHEORA_ENABLED']);
if (env['theoralib']=='yes'):
env.Append(CPPFLAGS=['-DTHEORALIB_ENABLED']);
SConscript("modules/SCsub")
SConscript("main/SCsub")
if (env['png']=='yes'):
env.Append(CPPFLAGS=['-DPNG_ENABLED']);
if (env['dds']=='yes'):
env.Append(CPPFLAGS=['-DDDS_ENABLED']);
if (env['pvr']=='yes'):
env.Append(CPPFLAGS=['-DPVR_ENABLED']);
if (env['jpg']=='yes'):
env.Append(CPPFLAGS=['-DJPG_ENABLED']);
if (env['webp']=='yes'):
env.Append(CPPFLAGS=['-DWEBP_ENABLED']);
SConscript("platform/" + selected_platform + "/SCsub") # build selected platform
if (env['speex']=='yes'):
env.Append(CPPFLAGS=['-DSPEEX_ENABLED']);
# Microsoft Visual Studio Project Generation
if (env['vsproj']) == "yes":
if (env['tools']=='yes'):
env.Append(CPPFLAGS=['-DTOOLS_ENABLED'])
if (env['disable_3d']=='yes'):
env.Append(CPPFLAGS=['-D_3D_DISABLED'])
if (env['gdscript']=='yes'):
env.Append(CPPFLAGS=['-DGDSCRIPT_ENABLED'])
if (env['disable_advanced_gui']=='yes'):
env.Append(CPPFLAGS=['-DADVANCED_GUI_DISABLED'])
AddToVSProject(env.core_sources)
AddToVSProject(env.main_sources)
AddToVSProject(env.modules_sources)
AddToVSProject(env.scene_sources)
AddToVSProject(env.servers_sources)
AddToVSProject(env.tool_sources)
if (env['minizip'] == 'yes'):
env.Append(CPPFLAGS=['-DMINIZIP_ENABLED'])
# this env flag won't work, it needs to be set in env_base=Environment(MSVC_VERSION='9.0')
# Even then, SCons still seems to ignore it and builds with the latest MSVC...
# That said, it's not needed to be set so far but I'm leaving it here so that this comment
# has a purpose.
# env['MSVS_VERSION']='9.0'
if (env['xml']=='yes'):
env.Append(CPPFLAGS=['-DXML_ENABLED'])
# Calls a CMD with /C(lose) and /V(delayed environment variable expansion) options.
# And runs vcvarsall bat for the propper arhitecture and scons for propper configuration
env['MSVSBUILDCOM'] = 'cmd /V /C set "plat=$(PlatformTarget)" ^& (if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64")) ^& set "tools=yes" ^& (if "$(Configuration)"=="release" (set "tools=no")) ^& call "$(VCInstallDir)vcvarsall.bat" !plat! ^& scons platform=windows target=$(Configuration) tools=!tools! -j2'
env['MSVSREBUILDCOM'] = 'cmd /V /C set "plat=$(PlatformTarget)" ^& (if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64")) ^& set "tools=yes" ^& (if "$(Configuration)"=="release" (set "tools=no")) & call "$(VCInstallDir)vcvarsall.bat" !plat! ^& scons platform=windows target=$(Configuration) tools=!tools! vsproj=yes -j2'
env['MSVSCLEANCOM'] = 'cmd /V /C set "plat=$(PlatformTarget)" ^& (if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64")) ^& set "tools=yes" ^& (if "$(Configuration)"=="release" (set "tools=no")) ^& call "$(VCInstallDir)vcvarsall.bat" !plat! ^& scons --clean platform=windows target=$(Configuration) tools=!tools! -j2'
if (env['colored']=='yes'):
methods.colored(sys,env)
# This version information (Win32, x64, Debug, Release, Release_Debug seems to be
# required for Visual Studio to understand that it needs to generate an NMAKE
# project. Do not modify without knowing what you are doing.
debug_variants = ['debug|Win32'] + ['debug|x64']
release_variants = ['release|Win32'] + ['release|x64']
release_debug_variants = ['release_debug|Win32'] + ['release_debug|x64']
variants = debug_variants + release_variants + release_debug_variants
debug_targets = ['bin\\godot.windows.tools.32.exe'] + ['bin\\godot.windows.tools.64.exe']
release_targets = ['bin\\godot.windows.opt.32.exe'] + ['bin\\godot.windows.opt.64.exe']
release_debug_targets = ['bin\\godot.windows.opt.tools.32.exe'] + ['bin\\godot.windows.opt.tools.64.exe']
targets = debug_targets + release_targets + release_debug_targets
msvproj = env.MSVSProject(target=['#godot' + env['MSVSPROJECTSUFFIX']],
incs=env.vs_incs,
srcs=env.vs_srcs,
runfile=targets,
buildtarget=targets,
auto_build_solution=1,
variant=variants)
if (env['etc1']=='yes'):
env.Append(CPPFLAGS=['-DETC1_ENABLED'])
Export('env')
#build subdirs, the build order is dependent on link order.
SConscript("core/SCsub")
SConscript("servers/SCsub")
SConscript("scene/SCsub")
SConscript("tools/SCsub")
SConscript("drivers/SCsub")
SConscript("bin/SCsub")
SConscript("modules/SCsub")
SConscript("main/SCsub")
SConscript("platform/"+selected_platform+"/SCsub"); # build selected platform
# Microsoft Visual Studio Project Generation
if (env['vsproj'])=="yes":
AddToVSProject(env.core_sources)
AddToVSProject(env.main_sources)
AddToVSProject(env.modules_sources)
AddToVSProject(env.scene_sources)
AddToVSProject(env.servers_sources)
AddToVSProject(env.tool_sources)
# this env flag won't work, it needs to be set in env_base=Environment(MSVC_VERSION='9.0')
# Even then, SCons still seems to ignore it and builds with the latest MSVC...
# That said, it's not needed to be set so far but I'm leaving it here so that this comment
# has a purpose.
#env['MSVS_VERSION']='9.0'
# Calls a CMD with /C(lose) and /V(delayed environment variable expansion) options.
# And runs vcvarsall bat for the propper arhitecture and scons for propper configuration
env['MSVSBUILDCOM'] = 'cmd /V /C set "plat=$(PlatformTarget)" ^& (if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64")) ^& set "tools=yes" ^& (if "$(Configuration)"=="release" (set "tools=no")) ^& call "$(VCInstallDir)vcvarsall.bat" !plat! ^& scons platform=windows target=$(Configuration) tools=!tools! -j2'
env['MSVSREBUILDCOM'] = 'cmd /V /C set "plat=$(PlatformTarget)" ^& (if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64")) ^& set "tools=yes" ^& (if "$(Configuration)"=="release" (set "tools=no")) & call "$(VCInstallDir)vcvarsall.bat" !plat! ^& scons platform=windows target=$(Configuration) tools=!tools! vsproj=yes -j2'
env['MSVSCLEANCOM'] = 'cmd /V /C set "plat=$(PlatformTarget)" ^& (if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64")) ^& set "tools=yes" ^& (if "$(Configuration)"=="release" (set "tools=no")) ^& call "$(VCInstallDir)vcvarsall.bat" !plat! ^& scons --clean platform=windows target=$(Configuration) tools=!tools! -j2'
# This version information (Win32, x64, Debug, Release, Release_Debug seems to be
# required for Visual Studio to understand that it needs to generate an NMAKE
# project. Do not modify without knowing what you are doing.
debug_variants = ['debug|Win32']+['debug|x64']
release_variants = ['release|Win32']+['release|x64']
release_debug_variants = ['release_debug|Win32']+['release_debug|x64']
variants = debug_variants + release_variants + release_debug_variants
debug_targets = ['Debug']+['Debug']
release_targets = ['Release']+['Release']
release_debug_targets = ['ReleaseDebug']+['ReleaseDebug']
targets = debug_targets + release_targets + release_debug_targets
msvproj = env.MSVSProject(target = ['#godot' + env['MSVSPROJECTSUFFIX'] ],
incs = env.vs_incs,
srcs = env.vs_srcs,
runfile = targets,
buildtarget = targets,
auto_build_solution=1,
variant = variants)
else:
print("No valid target platform selected.")
print("The following were detected:")
for x in platform_list:
print("\t" + x)
print("\nPlease run scons again with argument: platform=<string>")
print("No valid target platform selected.")
print("The following were detected:")
for x in platform_list:
print("\t"+x)
print("\nPlease run scons again with argument: platform=<string>")

4
bin/SCsub Normal file
View File

@ -0,0 +1,4 @@
Import('env')
Export('env')
SConscript('tests/SCsub');

12
bin/tests/SCsub Normal file
View File

@ -0,0 +1,12 @@
Import('env')
env.tests_sources=[]
env.add_source_files(env.tests_sources,"*.cpp")
Export('env')
#SConscript('math/SCsub');
lib = env.Library("tests",env.tests_sources)
env.Prepend(LIBS=[lib])

View File

@ -487,12 +487,12 @@ static String _disassemble_addr(const Ref<GDScript>& p_script,const GDFunction&
static void _disassemble_class(const Ref<GDScript>& p_class,const Vector<String>& p_code) {
const Map<StringName,GDFunction*>& mf = p_class->debug_get_member_functions();
const Map<StringName,GDFunction>& mf = p_class->debug_get_member_functions();
for(const Map<StringName,GDFunction*>::Element *E=mf.front();E;E=E->next()) {
for(const Map<StringName,GDFunction>::Element *E=mf.front();E;E=E->next()) {
const GDFunction &func=*E->get();
const GDFunction &func=E->get();
const int *code = func.get_code();
int codelen=func.get_code_size();
String defargs;

View File

@ -40,9 +40,6 @@
#include "scene/resources/texture.h"
#include "vmap.h"
#include "os/os.h"
#include "method_ptrcall.h"
namespace TestMath {
@ -108,13 +105,8 @@ uint32_t ihash3( uint32_t a)
return a;
}
MainLoop* test() {
print_line(itos(Math::step_decimals( 0.0001 )));
return NULL;
{
@ -126,7 +118,10 @@ MainLoop* test() {
for (List<StringName>::Element *E=tl.front();E;E=E->next()) {
Vector<uint8_t> m5b = E->get().operator String().md5_buffer();
uint32_t *ub = (uint32_t*)m5b.ptr();
//hashes.push_back(ihash(ihash2(ihash3(*ub))));
hashes.push_back(hashes.size());
//hashes.push_back(E->get().hash());
}

View File

@ -53,4 +53,4 @@ void test() {
}
#endif
#endif

View File

@ -32,7 +32,6 @@
#include <stdio.h>
#include "os/os.h"
#include "drivers/nrex/regex.h"
#include "core/io/ip_address.h"
#include "test_string.h"
@ -844,62 +843,6 @@ bool test_28() {
return state;
}
bool test_29() {
bool error = false;
bool state = true;
bool success = false;
IP_Address ip0("2001:0db8:85a3:0000:0000:8a2e:0370:7334");
OS::get_singleton()->print("ip0 is %ls\n", String(ip0).c_str());
IP_Address ip(0x0123, 0x4567, 0x89ab, 0xcdef, true);
OS::get_singleton()->print("ip6 is %ls\n", String(ip).c_str());
IP_Address ip2("fe80::52e5:49ff:fe93:1baf");
OS::get_singleton()->print("ip6 is %ls\n", String(ip2).c_str());
IP_Address ip3("::ffff:192.168.0.1");
OS::get_singleton()->print("ip6 is %ls\n", String(ip3).c_str());
String ip4 = "192.168.0.1";
success = ip4.is_valid_ip_address();
OS::get_singleton()->print("Is valid ipv4: %ls, %s\n", ip4.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
ip4 = "192.368.0.1";
success = (!ip4.is_valid_ip_address());
OS::get_singleton()->print("Is invalid ipv4: %ls, %s\n", ip4.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
String ip6 = "2001:0db8:85a3:0000:0000:8a2e:0370:7334";
success = ip6.is_valid_ip_address();
OS::get_singleton()->print("Is valid ipv6: %ls, %s\n", ip6.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
ip6 = "2001:0db8:85j3:0000:0000:8a2e:0370:7334";
success = (!ip6.is_valid_ip_address());
OS::get_singleton()->print("Is invalid ipv6: %ls, %s\n", ip6.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
ip6 = "2001:0db8:85f345:0000:0000:8a2e:0370:7334";
success = (!ip6.is_valid_ip_address());
OS::get_singleton()->print("Is invalid ipv6: %ls, %s\n", ip6.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
ip6 = "2001:0db8::0:8a2e:370:7334";
success = (ip6.is_valid_ip_address());
OS::get_singleton()->print("Is valid ipv6: %ls, %s\n", ip6.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
ip6 = "::ffff:192.168.0.1";
success = (ip6.is_valid_ip_address());
OS::get_singleton()->print("Is valid ipv6: %ls, %s\n", ip6.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
return state;
};
typedef bool (*TestFunc)(void);
TestFunc test_funcs[] = {
@ -932,7 +875,6 @@ TestFunc test_funcs[] = {
test_26,
test_27,
test_28,
test_29,
0
};

View File

@ -1,67 +1,65 @@
#!/usr/bin/env python
Import('env')
env.core_sources = []
env.core_sources=[]
gd_call = ""
gd_inc = ""
gd_call=""
gd_inc=""
for x in env.global_defaults:
env.core_sources.append("#platform/" + x + "/globals/global_defaults.cpp")
gd_inc += '#include "platform/' + x + '/globals/global_defaults.h"\n'
gd_call += "\tregister_" + x + "_global_defaults();\n"
env.core_sources.append("#platform/"+x+"/globals/global_defaults.cpp")
gd_inc+='#include "platform/'+x+'/globals/global_defaults.h"\n'
gd_call+="\tregister_"+x+"_global_defaults();\n"
gd_cpp = '#include "globals.h"\n'
gd_cpp += gd_inc
gd_cpp += "void Globals::register_global_defaults() {\n" + gd_call + "\n}\n"
gd_cpp='#include "globals.h"\n'
gd_cpp+=gd_inc
gd_cpp+="void Globals::register_global_defaults() {\n"+gd_call+"\n}\n"
f = open("global_defaults.cpp", "wb")
f = open("global_defaults.cpp","wb")
f.write(gd_cpp)
f.close()
import os
txt = "0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0"
if ("SCRIPT_AES256_ENCRYPTION_KEY" in os.environ):
e = os.environ["SCRIPT_AES256_ENCRYPTION_KEY"]
txt = ""
ec_valid = True
if (len(e) != 64):
ec_valid = False
else:
e=os.environ["SCRIPT_AES256_ENCRYPTION_KEY"]
txt = ""
ec_valid=True
if (len(e)!=64):
ec_valid=False
else:
for i in range(len(e) >> 1):
if (i > 0):
txt += ","
txts = "0x" + e[i * 2:i * 2 + 2]
try:
int(txts, 16)
except:
ec_valid = False
txt += txts
if (not ec_valid):
txt = "0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0"
print("Invalid AES256 encryption key, not 64 bits hex: " + e)
for i in range(len(e)>>1):
if (i>0):
txt+=","
txts="0x"+e[i*2:i*2+2]
try:
int(txts,16)
except:
ec_valid=False
txt+=txts
if (not ec_valid):
txt = "0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0"
print("Invalid AES256 encryption key, not 64 bits hex: "+e)
f = open("script_encryption_key.cpp", "wb")
f.write("#include \"globals.h\"\nuint8_t script_encryption_key[32]={" + txt + "};\n")
f.close()
env.add_source_files(env.core_sources, "*.cpp")
env.add_source_files(env.core_sources,"*.cpp")
Export('env')
import make_binders
env.Command(['method_bind.inc', 'method_bind_ext.inc'], 'make_binders.py', make_binders.run)
env.Command(['method_bind.inc','method_bind_ext.inc'], 'make_binders.py', make_binders.run)
SConscript('os/SCsub')
SConscript('math/SCsub')
SConscript('io/SCsub')
SConscript('bind/SCsub')
SConscript('os/SCsub');
SConscript('math/SCsub');
SConscript('io/SCsub');
SConscript('bind/SCsub');
lib = env.Library("core", env.core_sources)
lib = env.Library("core",env.core_sources)
env.Prepend(LIBS=[lib])

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -150,68 +150,9 @@ void Array::erase(const Variant& p_value) {
_p->array.erase(p_value);
}
Variant Array::front() const {
ERR_FAIL_COND_V(_p->array.size() == 0, Variant());
return operator[](0);
}
int Array::find(const Variant& p_value) const {
Variant Array::back() const {
ERR_FAIL_COND_V(_p->array.size() == 0, Variant());
return operator[](_p->array.size() - 1);
}
int Array::find(const Variant& p_value, int p_from) const {
return _p->array.find(p_value, p_from);
}
int Array::rfind(const Variant& p_value, int p_from) const {
if (_p->array.size() == 0)
return -1;
if (p_from < 0) {
// Relative offset from the end
p_from = _p->array.size() + p_from;
}
if (p_from < 0 || p_from >= _p->array.size()) {
// Limit to array boundaries
p_from = _p->array.size() - 1;
}
for (int i=p_from; i>=0; i--) {
if(_p->array[i] == p_value){
return i;
};
};
return -1;
}
int Array::find_last(const Variant& p_value) const {
return rfind(p_value);
}
int Array::count(const Variant& p_value) const {
if(_p->array.size() == 0)
return 0;
int amount=0;
for (int i=0; i<_p->array.size(); i++) {
if(_p->array[i] == p_value){
amount++;
};
};
return amount;
}
bool Array::has(const Variant& p_value) const {
return _p->array.find(p_value, 0) != -1;
return _p->array.find(p_value);
}
void Array::remove(int p_pos) {

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -67,18 +67,11 @@ public:
void insert(int p_pos, const Variant& p_value);
void remove(int p_pos);
Variant front() const;
Variant back() const;
void sort();
void sort_custom(Object *p_obj,const StringName& p_function);
void invert();
int find(const Variant& p_value, int p_from=0) const;
int rfind(const Variant& p_value, int p_from=-1) const;
int find_last(const Variant& p_value) const;
int count(const Variant& p_value) const;
bool has(const Variant& p_value) const;
int find(const Variant& p_value) const;
void erase(const Variant& p_value);

35
core/balloon_allocator.h Normal file
View File

@ -0,0 +1,35 @@
/*************************************************************************/
/* balloon_allocator.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef BALLOON_ALLOCATOR_H
#define BALLOON_ALLOCATOR_H
#include "os/memory.h"
#include "allocators.h"
#endif // BALLOON_ALLOCATOR_H

View File

@ -1,7 +1,5 @@
#!/usr/bin/env python
Import('env')
env.add_source_files(env.core_sources, "*.cpp")
env.add_source_files(env.core_sources,"*.cpp")
Export('env')

View File

@ -1,31 +1,3 @@
/*************************************************************************/
/* core_bind.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "core_bind.h"
#include "os/os.h"
#include "geometry.h"
@ -34,29 +6,6 @@
#include "core/globals.h"
#include "io/file_access_encrypted.h"
#include "os/keyboard.h"
/**
* Time constants borrowed from loc_time.h
*/
#define EPOCH_YR 1970 /* EPOCH = Jan 1 1970 00:00:00 */
#define SECS_DAY (24L * 60L * 60L)
#define LEAPYEAR(year) (!((year) % 4) && (((year) % 100) || !((year) % 400)))
#define YEARSIZE(year) (LEAPYEAR(year) ? 366 : 365)
#define SECOND_KEY "second"
#define MINUTE_KEY "minute"
#define HOUR_KEY "hour"
#define DAY_KEY "day"
#define MONTH_KEY "month"
#define YEAR_KEY "year"
#define WEEKDAY_KEY "weekday"
#define DST_KEY "dst"
/// Table of number of days in each month (for regular year and leap year)
static const unsigned int MONTH_DAYS_TABLE[2][12] = {
{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
};
_ResourceLoader *_ResourceLoader::singleton=NULL;
Ref<ResourceInteractiveLoader> _ResourceLoader::load_interactive(const String& p_path,const String& p_type_hint) {
@ -106,17 +55,11 @@ bool _ResourceLoader::has(const String &p_path) {
return ResourceCache::has(local_path);
};
Ref<ResourceImportMetadata> _ResourceLoader::load_import_metadata(const String& p_path) {
return ResourceLoader::load_import_metadata(p_path);
}
void _ResourceLoader::_bind_methods() {
ObjectTypeDB::bind_method(_MD("load_interactive:ResourceInteractiveLoader","path","type_hint"),&_ResourceLoader::load_interactive,DEFVAL(""));
ObjectTypeDB::bind_method(_MD("load:Resource","path","type_hint", "p_no_cache"),&_ResourceLoader::load,DEFVAL(""), DEFVAL(false));
ObjectTypeDB::bind_method(_MD("load_import_metadata:ResourceImportMetadata","path"),&_ResourceLoader::load_import_metadata);
ObjectTypeDB::bind_method(_MD("get_recognized_extensions_for_type","type"),&_ResourceLoader::get_recognized_extensions_for_type);
ObjectTypeDB::bind_method(_MD("set_abort_on_missing_resources","abort"),&_ResourceLoader::set_abort_on_missing_resources);
ObjectTypeDB::bind_method(_MD("get_dependencies","path"),&_ResourceLoader::get_dependencies);
@ -254,11 +197,6 @@ Size2 _OS::get_screen_size(int p_screen) const {
return OS::get_singleton()->get_screen_size(p_screen);
}
int _OS::get_screen_dpi(int p_screen) const {
return OS::get_singleton()->get_screen_dpi(p_screen);
}
Point2 _OS::get_window_position() const {
return OS::get_singleton()->get_window_position();
}
@ -307,13 +245,6 @@ bool _OS::is_window_maximized() const {
return OS::get_singleton()->is_window_maximized();
}
void _OS::set_borderless_window(bool p_borderless) {
OS::get_singleton()->set_borderless_window(p_borderless);
}
bool _OS::get_borderless_window() const {
return OS::get_singleton()->get_borderless_window();
}
void _OS::set_use_file_access_save_and_swap(bool p_enable) {
@ -435,18 +366,6 @@ String _OS::get_locale() const {
return OS::get_singleton()->get_locale();
}
String _OS::get_latin_keyboard_variant() const {
switch( OS::get_singleton()->get_latin_keyboard_variant() ) {
case OS::LATIN_KEYBOARD_QWERTY: return "QWERTY";
case OS::LATIN_KEYBOARD_QWERTZ: return "QWERTZ";
case OS::LATIN_KEYBOARD_AZERTY: return "AZERTY";
case OS::LATIN_KEYBOARD_QZERTY: return "QZERTY";
case OS::LATIN_KEYBOARD_DVORAK: return "DVORAK";
case OS::LATIN_KEYBOARD_NEO : return "NEO";
default: return "ERROR";
}
}
String _OS::get_model_name() const {
return OS::get_singleton()->get_model_name();
@ -476,15 +395,6 @@ Error _OS::set_thread_name(const String& p_name) {
return Thread::set_name(p_name);
};
void _OS::set_use_vsync(bool p_enable) {
OS::get_singleton()->set_use_vsync(p_enable);
}
bool _OS::is_vsync_enabled() const {
return OS::get_singleton()->is_vsync_enabled();
}
/*
enum Weekday {
@ -553,208 +463,28 @@ void _OS::set_icon(const Image& p_icon) {
OS::get_singleton()->set_icon(p_icon);
}
int _OS::get_exit_code() const {
return OS::get_singleton()->get_exit_code();
}
void _OS::set_exit_code(int p_code) {
OS::get_singleton()->set_exit_code(p_code);
}
/**
* Get current datetime with consideration for utc and
* dst
*/
Dictionary _OS::get_datetime(bool utc) const {
Dictionary dated = get_date(utc);
Dictionary timed = get_time(utc);
List<Variant> keys;
timed.get_key_list(&keys);
for(int i = 0; i < keys.size(); i++) {
dated[keys[i]] = timed[keys[i]];
}
return dated;
}
Dictionary _OS::get_date(bool utc) const {
OS::Date date = OS::get_singleton()->get_date(utc);
Dictionary dated;
dated[YEAR_KEY]=date.year;
dated[MONTH_KEY]=date.month;
dated[DAY_KEY]=date.day;
dated[WEEKDAY_KEY]=date.weekday;
dated[DST_KEY]=date.dst;
dated["year"]=date.year;
dated["month"]=date.month;
dated["day"]=date.day;
dated["weekday"]=date.weekday;
dated["dst"]=date.dst;
return dated;
}
}
Dictionary _OS::get_time(bool utc) const {
OS::Time time = OS::get_singleton()->get_time(utc);
Dictionary timed;
timed[HOUR_KEY]=time.hour;
timed[MINUTE_KEY]=time.min;
timed[SECOND_KEY]=time.sec;
timed["hour"]=time.hour;
timed["minute"]=time.min;
timed["second"]=time.sec;
return timed;
}
/**
* Get a epoch time value from a dictionary of time values
* @p datetime must be populated with the following keys:
* day, hour, minute, month, second, year. (dst is ignored).
*
* You can pass the output from
* get_datetime_from_unix_time directly into this function
*
* @param datetime dictionary of date and time values to convert
*
* @return epoch calculated
*/
uint64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const {
// Bunch of conversion constants
static const unsigned int SECONDS_PER_MINUTE = 60;
static const unsigned int MINUTES_PER_HOUR = 60;
static const unsigned int HOURS_PER_DAY = 24;
static const unsigned int SECONDS_PER_HOUR = MINUTES_PER_HOUR *
SECONDS_PER_MINUTE;
static const unsigned int SECONDS_PER_DAY = SECONDS_PER_HOUR * HOURS_PER_DAY;
// Get all time values from the dictionary, set to zero if it doesn't exist.
// Risk incorrect calculation over throwing errors
unsigned int second = ((datetime.has(SECOND_KEY))?
static_cast<unsigned int>(datetime[SECOND_KEY]): 0);
unsigned int minute = ((datetime.has(MINUTE_KEY))?
static_cast<unsigned int>(datetime[MINUTE_KEY]): 0);
unsigned int hour = ((datetime.has(HOUR_KEY))?
static_cast<unsigned int>(datetime[HOUR_KEY]): 0);
unsigned int day = ((datetime.has(DAY_KEY))?
static_cast<unsigned int>(datetime[DAY_KEY]): 0);
unsigned int month = ((datetime.has(MONTH_KEY))?
static_cast<unsigned int>(datetime[MONTH_KEY]) -1: 0);
unsigned int year = ((datetime.has(YEAR_KEY))?
static_cast<unsigned int>(datetime[YEAR_KEY]):0);
/// How many days come before each month (0-12)
static const unsigned short int DAYS_PAST_THIS_YEAR_TABLE[2][13] =
{
/* Normal years. */
{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
/* Leap years. */
{ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
};
ERR_EXPLAIN("Invalid second value of: " + itos(second));
ERR_FAIL_COND_V( second > 59, 0);
ERR_EXPLAIN("Invalid minute value of: " + itos(minute));
ERR_FAIL_COND_V( minute > 59, 0);
ERR_EXPLAIN("Invalid hour value of: " + itos(hour));
ERR_FAIL_COND_V( hour > 23, 0);
ERR_EXPLAIN("Invalid month value of: " + itos(month+1));
ERR_FAIL_COND_V( month+1 > 12, 0);
// Do this check after month is tested as valid
ERR_EXPLAIN("Invalid day value of: " + itos(day) + " which is larger "
"than "+ itos(MONTH_DAYS_TABLE[LEAPYEAR(year)][month]));
ERR_FAIL_COND_V( day > MONTH_DAYS_TABLE[LEAPYEAR(year)][month], 0);
// Calculate all the seconds from months past in this year
uint64_t SECONDS_FROM_MONTHS_PAST_THIS_YEAR =
DAYS_PAST_THIS_YEAR_TABLE[LEAPYEAR(year)][month] * SECONDS_PER_DAY;
uint64_t SECONDS_FROM_YEARS_PAST = 0;
for(unsigned int iyear = EPOCH_YR; iyear < year; iyear++) {
SECONDS_FROM_YEARS_PAST += YEARSIZE(iyear) *
SECONDS_PER_DAY;
}
uint64_t epoch =
second +
minute * SECONDS_PER_MINUTE +
hour * SECONDS_PER_HOUR +
// Subtract 1 from day, since the current day isn't over yet
// and we cannot count all 24 hours.
(day-1) * SECONDS_PER_DAY +
SECONDS_FROM_MONTHS_PAST_THIS_YEAR +
SECONDS_FROM_YEARS_PAST;
return epoch;
}
/**
* Get a dictionary of time values when given epoch time
*
* Dictionary Time values will be a union if values from #get_time
* and #get_date dictionaries (with the exception of dst =
* day light standard time, as it cannot be determined from epoch)
*
* @param unix_time_val epoch time to convert
*
* @return dictionary of date and time values
*/
Dictionary _OS::get_datetime_from_unix_time( uint64_t unix_time_val) const {
// Just fail if unix time is negative (when interpreted as an int).
// This means the user passed in a negative value by accident
ERR_EXPLAIN("unix_time_val was really huge!"+ itos(unix_time_val) +
" You probably passed in a negative value!");
ERR_FAIL_COND_V( (int64_t)unix_time_val < 0, Dictionary());
OS::Date date;
OS::Time time;
unsigned long dayclock, dayno;
int year = EPOCH_YR;
dayclock = (unsigned long)unix_time_val % SECS_DAY;
dayno = (unsigned long)unix_time_val / SECS_DAY;
time.sec = dayclock % 60;
time.min = (dayclock % 3600) / 60;
time.hour = dayclock / 3600;
/* day 0 was a thursday */
date.weekday = static_cast<OS::Weekday>((dayno + 4) % 7);
while (dayno >= YEARSIZE(year)) {
dayno -= YEARSIZE(year);
year++;
}
date.year = year;
size_t imonth = 0;
while (dayno >= MONTH_DAYS_TABLE[LEAPYEAR(year)][imonth]) {
dayno -= MONTH_DAYS_TABLE[LEAPYEAR(year)][imonth];
imonth++;
}
/// Add 1 to month to make sure months are indexed starting at 1
date.month = static_cast<OS::Month>(imonth+1);
date.day = dayno + 1;
Dictionary timed;
timed[HOUR_KEY]=time.hour;
timed[MINUTE_KEY]=time.min;
timed[SECOND_KEY]=time.sec;
timed[YEAR_KEY]=date.year;
timed[MONTH_KEY]=date.month;
timed[DAY_KEY]=date.day;
timed[WEEKDAY_KEY]=date.weekday;
return timed;
}
Dictionary _OS::get_time_zone_info() const {
@ -768,7 +498,7 @@ Dictionary _OS::get_time_zone_info() const {
uint64_t _OS::get_unix_time() const {
return OS::get_singleton()->get_unix_time();
}
};
uint64_t _OS::get_system_time_secs() const {
return OS::get_singleton()->get_system_time_secs();
@ -867,6 +597,7 @@ void _OS::print_all_textures_by_size() {
for(List<_OSCoreBindImg>::Element *E=imgs.front();E;E=E->next()) {
print_line(E->get().path+" - "+String::humanize_size(E->get().vram)+" ("+E->get().size+") - total:"+String::humanize_size(total) );
total-=E->get().vram;
}
}
@ -900,21 +631,23 @@ void _OS::print_resources_by_type(const Vector<String>& p_types) {
type_count[r->get_type()]++;
print_line(r->get_type()+": "+r->get_path());
List<String> metas;
r->get_meta_list(&metas);
for (List<String>::Element* me = metas.front(); me; me = me->next()) {
print_line(" "+String(me->get()) + ": " + r->get_meta(me->get()));
};
}
for(Map<String,int>::Element *E=type_count.front();E;E=E->next()) {
print_line(E->key()+" count: "+itos(E->get()));
}
};
bool _OS::has_virtual_keyboard() const {
return OS::get_singleton()->has_virtual_keyboard();
}
void _OS::show_virtual_keyboard(const String& p_existing_text) {
OS::get_singleton()->show_virtual_keyboard(p_existing_text, Rect2());
}
void _OS::hide_virtual_keyboard() {
OS::get_singleton()->hide_virtual_keyboard();
}
void _OS::print_all_resources(const String& p_to_file ) {
@ -965,11 +698,6 @@ void _OS::native_video_stop() {
OS::get_singleton()->native_video_stop();
};
void _OS::request_attention() {
OS::get_singleton()->request_attention();
}
bool _OS::is_debug_build() const {
#ifdef DEBUG_ENABLED
@ -1028,11 +756,6 @@ void _OS::alert(const String& p_alert,const String& p_title) {
OS::get_singleton()->alert(p_alert,p_title);
}
Dictionary _OS::get_engine_version() const {
return OS::get_singleton()->get_engine_version();
}
_OS *_OS::singleton=NULL;
void _OS::_bind_methods() {
@ -1055,7 +778,6 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_current_screen","screen"),&_OS::set_current_screen);
ObjectTypeDB::bind_method(_MD("get_screen_position","screen"),&_OS::get_screen_position,DEFVAL(0));
ObjectTypeDB::bind_method(_MD("get_screen_size","screen"),&_OS::get_screen_size,DEFVAL(0));
ObjectTypeDB::bind_method(_MD("get_screen_dpi","screen"),&_OS::get_screen_dpi,DEFVAL(0));
ObjectTypeDB::bind_method(_MD("get_window_position"),&_OS::get_window_position);
ObjectTypeDB::bind_method(_MD("set_window_position","position"),&_OS::set_window_position);
ObjectTypeDB::bind_method(_MD("get_window_size"),&_OS::get_window_size);
@ -1068,10 +790,6 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("is_window_minimized"),&_OS::is_window_minimized);
ObjectTypeDB::bind_method(_MD("set_window_maximized", "enabled"),&_OS::set_window_maximized);
ObjectTypeDB::bind_method(_MD("is_window_maximized"),&_OS::is_window_maximized);
ObjectTypeDB::bind_method(_MD("request_attention"), &_OS::request_attention);
ObjectTypeDB::bind_method(_MD("set_borderless_window", "borderless"), &_OS::set_borderless_window);
ObjectTypeDB::bind_method(_MD("get_borderless_window"), &_OS::get_borderless_window);
ObjectTypeDB::bind_method(_MD("set_screen_orientation","orientation"),&_OS::set_screen_orientation);
ObjectTypeDB::bind_method(_MD("get_screen_orientation"),&_OS::get_screen_orientation);
@ -1109,28 +827,19 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_cmdline_args"),&_OS::get_cmdline_args);
ObjectTypeDB::bind_method(_MD("get_main_loop"),&_OS::get_main_loop);
ObjectTypeDB::bind_method(_MD("get_datetime","utc"),&_OS::get_datetime,DEFVAL(false));
ObjectTypeDB::bind_method(_MD("get_date","utc"),&_OS::get_date,DEFVAL(false));
ObjectTypeDB::bind_method(_MD("get_time","utc"),&_OS::get_time,DEFVAL(false));
ObjectTypeDB::bind_method(_MD("get_time_zone_info"),&_OS::get_time_zone_info);
ObjectTypeDB::bind_method(_MD("get_unix_time"),&_OS::get_unix_time);
ObjectTypeDB::bind_method(_MD("get_datetime_from_unix_time", "unix_time_val"),
&_OS::get_datetime_from_unix_time);
ObjectTypeDB::bind_method(_MD("get_unix_time_from_datetime", "datetime"),
&_OS::get_unix_time_from_datetime);
ObjectTypeDB::bind_method(_MD("get_system_time_secs"), &_OS::get_system_time_secs);
ObjectTypeDB::bind_method(_MD("set_icon","icon"),&_OS::set_icon);
ObjectTypeDB::bind_method(_MD("get_exit_code"),&_OS::get_exit_code);
ObjectTypeDB::bind_method(_MD("set_exit_code","code"),&_OS::set_exit_code);
ObjectTypeDB::bind_method(_MD("delay_usec","usec"),&_OS::delay_usec);
ObjectTypeDB::bind_method(_MD("delay_msec","msec"),&_OS::delay_msec);
ObjectTypeDB::bind_method(_MD("get_ticks_msec"),&_OS::get_ticks_msec);
ObjectTypeDB::bind_method(_MD("get_splash_tick_msec"),&_OS::get_splash_tick_msec);
ObjectTypeDB::bind_method(_MD("get_locale"),&_OS::get_locale);
ObjectTypeDB::bind_method(_MD("get_latin_keyboard_variant"),&_OS::get_latin_keyboard_variant);
ObjectTypeDB::bind_method(_MD("get_model_name"),&_OS::get_model_name);
ObjectTypeDB::bind_method(_MD("get_custom_level"),&_OS::get_custom_level);
@ -1147,9 +856,6 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("dump_memory_to_file","file"),&_OS::dump_memory_to_file);
ObjectTypeDB::bind_method(_MD("dump_resources_to_file","file"),&_OS::dump_resources_to_file);
ObjectTypeDB::bind_method(_MD("has_virtual_keyboard"),&_OS::has_virtual_keyboard);
ObjectTypeDB::bind_method(_MD("show_virtual_keyboard", "existing_text"),&_OS::show_virtual_keyboard,DEFVAL(""));
ObjectTypeDB::bind_method(_MD("hide_virtual_keyboard"),&_OS::hide_virtual_keyboard);
ObjectTypeDB::bind_method(_MD("print_resources_in_use","short"),&_OS::print_resources_in_use,DEFVAL(false));
ObjectTypeDB::bind_method(_MD("print_all_resources","tofile"),&_OS::print_all_resources,DEFVAL(""));
@ -1184,10 +890,6 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_thread_name","name"),&_OS::set_thread_name);
ObjectTypeDB::bind_method(_MD("set_use_vsync","enable"),&_OS::set_use_vsync);
ObjectTypeDB::bind_method(_MD("is_vsync_enabled"),&_OS::is_vsync_enabled);
ObjectTypeDB::bind_method(_MD("get_engine_version"),&_OS::get_engine_version);
BIND_CONSTANT( DAY_SUNDAY );
BIND_CONSTANT( DAY_MONDAY );
@ -1624,21 +1326,6 @@ String _File::get_as_text() const {
}
String _File::get_md5(const String& p_path) const {
return FileAccess::get_md5(p_path);
}
String _File::get_sha256(const String& p_path) const {
return FileAccess::get_sha256(p_path);
}
String _File::get_line() const{
ERR_FAIL_COND_V(!f,String());
@ -1827,8 +1514,6 @@ void _File::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_buffer","len"),&_File::get_buffer);
ObjectTypeDB::bind_method(_MD("get_line"),&_File::get_line);
ObjectTypeDB::bind_method(_MD("get_as_text"),&_File::get_as_text);
ObjectTypeDB::bind_method(_MD("get_md5","path"),&_File::get_md5);
ObjectTypeDB::bind_method(_MD("get_sha256","path"),&_File::get_sha256);
ObjectTypeDB::bind_method(_MD("get_endian_swap"),&_File::get_endian_swap);
ObjectTypeDB::bind_method(_MD("set_endian_swap","enable"),&_File::set_endian_swap);
ObjectTypeDB::bind_method(_MD("get_error:Error"),&_File::get_error);
@ -1937,57 +1622,29 @@ String _Directory::get_current_dir() {
Error _Directory::make_dir(String p_dir){
ERR_FAIL_COND_V(!d,ERR_UNCONFIGURED);
if (!p_dir.is_rel_path()) {
DirAccess *d = DirAccess::create_for_path(p_dir);
Error err = d->make_dir(p_dir);
memdelete(d);
return err;
}
return d->make_dir(p_dir);
}
Error _Directory::make_dir_recursive(String p_dir){
ERR_FAIL_COND_V(!d,ERR_UNCONFIGURED);
if (!p_dir.is_rel_path()) {
DirAccess *d = DirAccess::create_for_path(p_dir);
Error err = d->make_dir_recursive(p_dir);
memdelete(d);
return err;
}
return d->make_dir_recursive(p_dir);
}
bool _Directory::file_exists(String p_file){
ERR_FAIL_COND_V(!d,false);
if (!p_file.is_rel_path()) {
return FileAccess::exists(p_file);
}
return d->file_exists(p_file);
}
bool _Directory::dir_exists(String p_dir) {
ERR_FAIL_COND_V(!d,false);
if (!p_dir.is_rel_path()) {
DirAccess *d = DirAccess::create_for_path(p_dir);
bool exists = d->dir_exists(p_dir);
memdelete(d);
return exists;
} else {
return d->dir_exists(p_dir);
}
return d->dir_exists(p_dir);
}
int _Directory::get_space_left(){
ERR_FAIL_COND_V(!d,0);
return d->get_space_left()/1024*1024; //return value in megabytes, given binding is int
return d->get_space_left();
}
Error _Directory::copy(String p_from,String p_to){
@ -1998,26 +1655,12 @@ Error _Directory::copy(String p_from,String p_to){
Error _Directory::rename(String p_from, String p_to){
ERR_FAIL_COND_V(!d,ERR_UNCONFIGURED);
if (!p_from.is_rel_path()) {
DirAccess *d = DirAccess::create_for_path(p_from);
Error err = d->rename(p_from,p_to);
memdelete(d);
return err;
}
return d->rename(p_from,p_to);
}
Error _Directory::remove(String p_name){
ERR_FAIL_COND_V(!d,ERR_UNCONFIGURED);
if (!p_name.is_rel_path()) {
DirAccess *d = DirAccess::create_for_path(p_name);
Error err = d->remove(p_name);
memdelete(d);
return err;
}
return d->remove(p_name);
}
@ -2343,6 +1986,7 @@ String _Thread::get_id() const {
return itos(thread->get_ID());
}
bool _Thread::is_active() const {
return active;

View File

@ -1,31 +1,3 @@
/*************************************************************************/
/* core_bind.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef CORE_BIND_H
#define CORE_BIND_H
@ -54,7 +26,6 @@ public:
void set_abort_on_missing_resources(bool p_abort);
StringArray get_dependencies(const String& p_path);
bool has(const String& p_path);
Ref<ResourceImportMetadata> load_import_metadata(const String& p_path);
_ResourceLoader();
};
@ -109,9 +80,7 @@ public:
};
enum Month {
/// Start at 1 to follow Windows SYSTEMTIME structure
/// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724950(v=vs.85).aspx
MONTH_JANUARY = 1,
MONTH_JANUARY,
MONTH_FEBRUARY,
MONTH_MARCH,
MONTH_APRIL,
@ -145,7 +114,6 @@ public:
virtual void set_current_screen(int p_screen);
virtual Point2 get_screen_position(int p_screen=0) const;
virtual Size2 get_screen_size(int p_screen=0) const;
virtual int get_screen_dpi(int p_screen=0) const;
virtual Point2 get_window_position() const;
virtual void set_window_position(const Point2& p_position);
virtual Size2 get_window_size() const;
@ -158,10 +126,7 @@ public:
virtual bool is_window_minimized() const;
virtual void set_window_maximized(bool p_enabled);
virtual bool is_window_maximized() const;
virtual void request_attention();
virtual void set_borderless_window(bool p_borderless);
virtual bool get_borderless_window() const;
Error native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track);
bool native_video_is_playing();
@ -193,8 +158,6 @@ public:
Vector<String> get_cmdline_args();
String get_locale() const;
String get_latin_keyboard_variant() const;
String get_model_name() const;
MainLoop *get_main_loop() const;
@ -205,10 +168,6 @@ public:
void dump_memory_to_file(const String& p_file);
void dump_resources_to_file(const String& p_file);
bool has_virtual_keyboard() const;
void show_virtual_keyboard(const String& p_existing_text="");
void hide_virtual_keyboard();
void print_resources_in_use(bool p_short=false);
void print_all_resources(const String& p_to_file);
void print_all_textures_by_size();
@ -246,14 +205,8 @@ public:
void set_use_file_access_save_and_swap(bool p_enable);
void set_icon(const Image& p_icon);
int get_exit_code() const;
void set_exit_code(int p_code);
Dictionary get_date(bool utc) const;
Dictionary get_time(bool utc) const;
Dictionary get_datetime(bool utc) const;
Dictionary get_datetime_from_unix_time(uint64_t unix_time_val) const;
uint64_t get_unix_time_from_datetime(Dictionary datetime) const;
Dictionary get_time_zone_info() const;
uint64_t get_unix_time() const;
uint64_t get_system_time_secs() const;
@ -320,11 +273,6 @@ public:
Error set_thread_name(const String& p_name);
void set_use_vsync(bool p_enable);
bool is_vsync_enabled() const;
Dictionary get_engine_version() const;
static _OS *get_singleton() { return singleton; }
_OS();
@ -419,8 +367,6 @@ public:
DVector<uint8_t> get_buffer(int p_length) const; ///< get an array of bytes
String get_line() const;
String get_as_text() const;
String get_md5(const String& p_path) const;
String get_sha256(const String& p_path) const;
/**< use this for files WRITTEN in _big_ endian machines (ie, amiga/mac)
* It's not about the current CPU type but file formats.

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -29,8 +29,6 @@
#include "color.h"
#include "math_funcs.h"
#include "print_string.h"
#include "map.h"
#include "color_names.inc"
uint32_t Color::to_ARGB32() const {
@ -329,25 +327,7 @@ bool Color::html_is_valid(const String& p_color) {
}
Color Color::named(const String &p_name) {
if (_named_colors.empty()) _populate_named_colors(); // from color_names.inc
String name = p_name;
// Normalize name
name = name.replace(" ", "");
name = name.replace("-", "");
name = name.replace("_", "");
name = name.replace("'", "");
name = name.replace(".", "");
name = name.to_lower();
const Map<String, Color>::Element* color = _named_colors.find(name);
if(color) {
return color->value();
} else {
ERR_EXPLAIN("Invalid Color Name: "+p_name);
ERR_FAIL_V(Color());
}
}
String _to_hex(float p_val) {

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -111,7 +111,6 @@ struct Color {
static Color hex(uint32_t p_hex);
static Color html(const String& p_color);
static bool html_is_valid(const String& p_color);
static Color named(const String& p_name);
String to_html(bool p_alpha=true) const;
_FORCE_INLINE_ bool operator<(const Color& p_color) const; //used in set keys

View File

@ -1,150 +0,0 @@
// Names from https://en.wikipedia.org/wiki/List_of_colors (through https://raw.githubusercontent.com/SuperUserNameMan/color_to_name/616a7cddafefda91478b7bc26167de97fb5badb1/godot_version.gd), slightly edited and normalized
static Map<String, Color> _named_colors;
static void _populate_named_colors() {
if(!_named_colors.empty()) return;
_named_colors.insert("aliceblue", Color(0.94, 0.97, 1.00));
_named_colors.insert("antiquewhite", Color(0.98, 0.92, 0.84));
_named_colors.insert("aqua", Color(0.00, 1.00, 1.00));
_named_colors.insert("aquamarine", Color(0.50, 1.00, 0.83));
_named_colors.insert("azure", Color(0.94, 1.00, 1.00));
_named_colors.insert("beige", Color(0.96, 0.96, 0.86));
_named_colors.insert("bisque", Color(1.00, 0.89, 0.77));
_named_colors.insert("black", Color(0.00, 0.00, 0.00));
_named_colors.insert("blanchedalmond", Color(1.00, 0.92, 0.80));
_named_colors.insert("blue", Color(0.00, 0.00, 1.00));
_named_colors.insert("blueviolet", Color(0.54, 0.17, 0.89));
_named_colors.insert("brown", Color(0.65, 0.16, 0.16));
_named_colors.insert("burlywood", Color(0.87, 0.72, 0.53));
_named_colors.insert("cadetblue", Color(0.37, 0.62, 0.63));
_named_colors.insert("chartreuse", Color(0.50, 1.00, 0.00));
_named_colors.insert("chocolate", Color(0.82, 0.41, 0.12));
_named_colors.insert("coral", Color(1.00, 0.50, 0.31));
_named_colors.insert("cornflower", Color(0.39, 0.58, 0.93));
_named_colors.insert("cornsilk", Color(1.00, 0.97, 0.86));
_named_colors.insert("crimson", Color(0.86, 0.08, 0.24));
_named_colors.insert("cyan", Color(0.00, 1.00, 1.00));
_named_colors.insert("darkblue", Color(0.00, 0.00, 0.55));
_named_colors.insert("darkcyan", Color(0.00, 0.55, 0.55));
_named_colors.insert("darkgoldenrod", Color(0.72, 0.53, 0.04));
_named_colors.insert("darkgray", Color(0.66, 0.66, 0.66));
_named_colors.insert("darkgreen", Color(0.00, 0.39, 0.00));
_named_colors.insert("darkkhaki", Color(0.74, 0.72, 0.42));
_named_colors.insert("darkmagenta", Color(0.55, 0.00, 0.55));
_named_colors.insert("darkolivegreen", Color(0.33, 0.42, 0.18));
_named_colors.insert("darkorange", Color(1.00, 0.55, 0.00));
_named_colors.insert("darkorchid", Color(0.60, 0.20, 0.80));
_named_colors.insert("darkred", Color(0.55, 0.00, 0.00));
_named_colors.insert("darksalmon", Color(0.91, 0.59, 0.48));
_named_colors.insert("darkseagreen", Color(0.56, 0.74, 0.56));
_named_colors.insert("darkslateblue", Color(0.28, 0.24, 0.55));
_named_colors.insert("darkslategray", Color(0.18, 0.31, 0.31));
_named_colors.insert("darkturquoise", Color(0.00, 0.81, 0.82));
_named_colors.insert("darkviolet", Color(0.58, 0.00, 0.83));
_named_colors.insert("deeppink", Color(1.00, 0.08, 0.58));
_named_colors.insert("deepskyblue", Color(0.00, 0.75, 1.00));
_named_colors.insert("dimgray", Color(0.41, 0.41, 0.41));
_named_colors.insert("dodgerblue", Color(0.12, 0.56, 1.00));
_named_colors.insert("firebrick", Color(0.70, 0.13, 0.13));
_named_colors.insert("floralwhite", Color(1.00, 0.98, 0.94));
_named_colors.insert("forestgreen", Color(0.13, 0.55, 0.13));
_named_colors.insert("fuchsia", Color(1.00, 0.00, 1.00));
_named_colors.insert("gainsboro", Color(0.86, 0.86, 0.86));
_named_colors.insert("ghostwhite", Color(0.97, 0.97, 1.00));
_named_colors.insert("gold", Color(1.00, 0.84, 0.00));
_named_colors.insert("goldenrod", Color(0.85, 0.65, 0.13));
_named_colors.insert("gray", Color(0.75, 0.75, 0.75));
_named_colors.insert("webgray", Color(0.50, 0.50, 0.50));
_named_colors.insert("green", Color(0.00, 1.00, 0.00));
_named_colors.insert("webgreen", Color(0.00, 0.50, 0.00));
_named_colors.insert("greenyellow", Color(0.68, 1.00, 0.18));
_named_colors.insert("honeydew", Color(0.94, 1.00, 0.94));
_named_colors.insert("hotpink", Color(1.00, 0.41, 0.71));
_named_colors.insert("indianred", Color(0.80, 0.36, 0.36));
_named_colors.insert("indigo", Color(0.29, 0.00, 0.51));
_named_colors.insert("ivory", Color(1.00, 1.00, 0.94));
_named_colors.insert("khaki", Color(0.94, 0.90, 0.55));
_named_colors.insert("lavender", Color(0.90, 0.90, 0.98));
_named_colors.insert("lavenderblush", Color(1.00, 0.94, 0.96));
_named_colors.insert("lawngreen", Color(0.49, 0.99, 0.00));
_named_colors.insert("lemonchiffon", Color(1.00, 0.98, 0.80));
_named_colors.insert("lightblue", Color(0.68, 0.85, 0.90));
_named_colors.insert("lightcoral", Color(0.94, 0.50, 0.50));
_named_colors.insert("lightcyan", Color(0.88, 1.00, 1.00));
_named_colors.insert("lightgoldenrod", Color(0.98, 0.98, 0.82));
_named_colors.insert("lightgray", Color(0.83, 0.83, 0.83));
_named_colors.insert("lightgreen", Color(0.56, 0.93, 0.56));
_named_colors.insert("lightpink", Color(1.00, 0.71, 0.76));
_named_colors.insert("lightsalmon", Color(1.00, 0.63, 0.48));
_named_colors.insert("lightseagreen", Color(0.13, 0.70, 0.67));
_named_colors.insert("lightskyblue", Color(0.53, 0.81, 0.98));
_named_colors.insert("lightslategray", Color(0.47, 0.53, 0.60));
_named_colors.insert("lightsteelblue", Color(0.69, 0.77, 0.87));
_named_colors.insert("lightyellow", Color(1.00, 1.00, 0.88));
_named_colors.insert("lime", Color(0.00, 1.00, 0.00));
_named_colors.insert("limegreen", Color(0.20, 0.80, 0.20));
_named_colors.insert("linen", Color(0.98, 0.94, 0.90));
_named_colors.insert("magenta", Color(1.00, 0.00, 1.00));
_named_colors.insert("maroon", Color(0.69, 0.19, 0.38));
_named_colors.insert("webmaroon", Color(0.50, 0.00, 0.00));
_named_colors.insert("mediumaquamarine", Color(0.40, 0.80, 0.67));
_named_colors.insert("mediumblue", Color(0.00, 0.00, 0.80));
_named_colors.insert("mediumorchid", Color(0.73, 0.33, 0.83));
_named_colors.insert("mediumpurple", Color(0.58, 0.44, 0.86));
_named_colors.insert("mediumseagreen", Color(0.24, 0.70, 0.44));
_named_colors.insert("mediumslateblue", Color(0.48, 0.41, 0.93));
_named_colors.insert("mediumspringgreen", Color(0.00, 0.98, 0.60));
_named_colors.insert("mediumturquoise", Color(0.28, 0.82, 0.80));
_named_colors.insert("mediumvioletred", Color(0.78, 0.08, 0.52));
_named_colors.insert("midnightblue", Color(0.10, 0.10, 0.44));
_named_colors.insert("mintcream", Color(0.96, 1.00, 0.98));
_named_colors.insert("mistyrose", Color(1.00, 0.89, 0.88));
_named_colors.insert("moccasin", Color(1.00, 0.89, 0.71));
_named_colors.insert("navajowhite", Color(1.00, 0.87, 0.68));
_named_colors.insert("navyblue", Color(0.00, 0.00, 0.50));
_named_colors.insert("oldlace", Color(0.99, 0.96, 0.90));
_named_colors.insert("olive", Color(0.50, 0.50, 0.00));
_named_colors.insert("olivedrab", Color(0.42, 0.56, 0.14));
_named_colors.insert("orange", Color(1.00, 0.65, 0.00));
_named_colors.insert("orangered", Color(1.00, 0.27, 0.00));
_named_colors.insert("orchid", Color(0.85, 0.44, 0.84));
_named_colors.insert("palegoldenrod", Color(0.93, 0.91, 0.67));
_named_colors.insert("palegreen", Color(0.60, 0.98, 0.60));
_named_colors.insert("paleturquoise", Color(0.69, 0.93, 0.93));
_named_colors.insert("palevioletred", Color(0.86, 0.44, 0.58));
_named_colors.insert("papayawhip", Color(1.00, 0.94, 0.84));
_named_colors.insert("peachpuff", Color(1.00, 0.85, 0.73));
_named_colors.insert("peru", Color(0.80, 0.52, 0.25));
_named_colors.insert("pink", Color(1.00, 0.75, 0.80));
_named_colors.insert("plum", Color(0.87, 0.63, 0.87));
_named_colors.insert("powderblue", Color(0.69, 0.88, 0.90));
_named_colors.insert("purple", Color(0.63, 0.13, 0.94));
_named_colors.insert("webpurple", Color(0.50, 0.00, 0.50));
_named_colors.insert("rebeccapurple", Color(0.40, 0.20, 0.60));
_named_colors.insert("red", Color(1.00, 0.00, 0.00));
_named_colors.insert("rosybrown", Color(0.74, 0.56, 0.56));
_named_colors.insert("royalblue", Color(0.25, 0.41, 0.88));
_named_colors.insert("saddlebrown", Color(0.55, 0.27, 0.07));
_named_colors.insert("salmon", Color(0.98, 0.50, 0.45));
_named_colors.insert("sandybrown", Color(0.96, 0.64, 0.38));
_named_colors.insert("seagreen", Color(0.18, 0.55, 0.34));
_named_colors.insert("seashell", Color(1.00, 0.96, 0.93));
_named_colors.insert("sienna", Color(0.63, 0.32, 0.18));
_named_colors.insert("silver", Color(0.75, 0.75, 0.75));
_named_colors.insert("skyblue", Color(0.53, 0.81, 0.92));
_named_colors.insert("slateblue", Color(0.42, 0.35, 0.80));
_named_colors.insert("slategray", Color(0.44, 0.50, 0.56));
_named_colors.insert("snow", Color(1.00, 0.98, 0.98));
_named_colors.insert("springgreen", Color(0.00, 1.00, 0.50));
_named_colors.insert("steelblue", Color(0.27, 0.51, 0.71));
_named_colors.insert("tan", Color(0.82, 0.71, 0.55));
_named_colors.insert("teal", Color(0.00, 0.50, 0.50));
_named_colors.insert("thistle", Color(0.85, 0.75, 0.85));
_named_colors.insert("tomato", Color(1.00, 0.39, 0.28));
_named_colors.insert("turquoise", Color(0.25, 0.88, 0.82));
_named_colors.insert("violet", Color(0.93, 0.51, 0.93));
_named_colors.insert("wheat", Color(0.96, 0.87, 0.70));
_named_colors.insert("white", Color(1.00, 1.00, 1.00));
_named_colors.insert("whitesmoke", Color(0.96, 0.96, 0.96));
_named_colors.insert("yellow", Color(1.00, 1.00, 0.00));
_named_colors.insert("yellowgreen", Color(0.60, 0.80, 0.20));
}

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -152,23 +152,6 @@ class CommandQueueMT {
virtual void call() { (instance->*method)(p1,p2,p3,p4,p5,p6,p7); }
};
template<class T,class M,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8>
struct Command8 : public CommandBase {
T*instance;
M method;
typename GetSimpleTypeT<P1>::type_t p1;
typename GetSimpleTypeT<P2>::type_t p2;
typename GetSimpleTypeT<P3>::type_t p3;
typename GetSimpleTypeT<P4>::type_t p4;
typename GetSimpleTypeT<P5>::type_t p5;
typename GetSimpleTypeT<P6>::type_t p6;
typename GetSimpleTypeT<P7>::type_t p7;
typename GetSimpleTypeT<P8>::type_t p8;
virtual void call() { (instance->*method)(p1,p2,p3,p4,p5,p6,p7,p8); }
};
/* comands that return */
template<class T,class M,class R>
@ -287,25 +270,6 @@ class CommandQueueMT {
virtual void call() { *ret = (instance->*method)(p1,p2,p3,p4,p5,p6,p7); sync->sem->post(); sync->in_use=false; ; }
};
template<class T,class M,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8,class R>
struct CommandRet8 : public CommandBase {
T*instance;
M method;
typename GetSimpleTypeT<P1>::type_t p1;
typename GetSimpleTypeT<P2>::type_t p2;
typename GetSimpleTypeT<P3>::type_t p3;
typename GetSimpleTypeT<P4>::type_t p4;
typename GetSimpleTypeT<P5>::type_t p5;
typename GetSimpleTypeT<P6>::type_t p6;
typename GetSimpleTypeT<P7>::type_t p7;
typename GetSimpleTypeT<P8>::type_t p8;
R* ret;
SyncSemaphore *sync;
virtual void call() { *ret = (instance->*method)(p1,p2,p3,p4,p5,p6,p7,p8); sync->sem->post(); sync->in_use=false; ; }
};
/** commands that don't return but sync */
/* comands that return */
@ -426,25 +390,6 @@ class CommandQueueMT {
virtual void call() { (instance->*method)(p1,p2,p3,p4,p5,p6,p7); sync->sem->post(); sync->in_use=false; ; }
};
template<class T,class M,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8>
struct CommandSync8 : public CommandBase {
T*instance;
M method;
typename GetSimpleTypeT<P1>::type_t p1;
typename GetSimpleTypeT<P2>::type_t p2;
typename GetSimpleTypeT<P3>::type_t p3;
typename GetSimpleTypeT<P4>::type_t p4;
typename GetSimpleTypeT<P5>::type_t p5;
typename GetSimpleTypeT<P6>::type_t p6;
typename GetSimpleTypeT<P7>::type_t p7;
typename GetSimpleTypeT<P8>::type_t p8;
SyncSemaphore *sync;
virtual void call() { (instance->*method)(p1,p2,p3,p4,p5,p6,p7,p8); sync->sem->post(); sync->in_use=false; ; }
};
/***** BASE *******/
enum {
@ -694,27 +639,6 @@ public:
if (sync) sync->post();
}
template<class T, class M, class P1, class P2, class P3, class P4, class P5, class P6, class P7,class P8>
void push( T * p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8 ) {
Command8<T,M,P1,P2,P3,P4,P5,P6,P7,P8> * cmd = allocate_and_lock< Command8<T,M,P1,P2,P3,P4,P5,P6,P7,P8> >();
cmd->instance=p_instance;
cmd->method=p_method;
cmd->p1=p1;
cmd->p2=p2;
cmd->p3=p3;
cmd->p4=p4;
cmd->p5=p5;
cmd->p6=p6;
cmd->p7=p7;
cmd->p8=p8;
unlock();
if (sync) sync->post();
}
/*** PUSH AND RET COMMANDS ***/
@ -882,31 +806,6 @@ public:
ss->sem->wait();
}
template<class T, class M, class P1, class P2, class P3, class P4, class P5, class P6,class P7,class P8,class R>
void push_and_ret( T * p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6,P7 p7,P8 p8, R* r_ret ) {
CommandRet8<T,M,P1,P2,P3,P4,P5,P6,P7,P8,R> * cmd = allocate_and_lock< CommandRet8<T,M,P1,P2,P3,P4,P5,P6,P7,P8,R> >();
cmd->instance=p_instance;
cmd->method=p_method;
cmd->p1=p1;
cmd->p2=p2;
cmd->p3=p3;
cmd->p4=p4;
cmd->p5=p5;
cmd->p6=p6;
cmd->p7=p7;
cmd->p8=p8;
cmd->ret=r_ret;
SyncSemaphore *ss=_alloc_sync_sem();
cmd->sync=ss;
unlock();
if (sync) sync->post();
ss->sem->wait();
}
template<class T, class M>
void push_and_sync( T * p_instance, M p_method) {
@ -1072,31 +971,6 @@ public:
ss->sem->wait();
}
template<class T, class M, class P1, class P2, class P3, class P4, class P5, class P6,class P7,class P8>
void push_and_sync( T * p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6,P7 p7,P8 p8) {
CommandSync8<T,M,P1,P2,P3,P4,P5,P6,P7,P8> * cmd = allocate_and_lock< CommandSync8<T,M,P1,P2,P3,P4,P5,P6,P7,P8> >();
cmd->instance=p_instance;
cmd->method=p_method;
cmd->p1=p1;
cmd->p2=p2;
cmd->p3=p3;
cmd->p4=p4;
cmd->p5=p5;
cmd->p6=p6;
cmd->p7=p7;
cmd->p8=p8;
SyncSemaphore *ss=_alloc_sync_sem();
cmd->sync=ss;
unlock();
if (sync) sync->post();
ss->sem->wait();
}
void wait_and_flush_one() {
ERR_FAIL_COND(!sync);
sync->wait();

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -199,18 +199,6 @@ Array Dictionary::keys() const {
}
Array Dictionary::values() const {
Array varr;
varr.resize(size());
const Variant *key=NULL;
int i=0;
while((key=next(key))){
varr[i++] = _p->variant_map[*key];
}
return varr;
}
const Variant* Dictionary::next(const Variant* p_key) const {
return _p->variant_map.next(p_key);
@ -262,3 +250,5 @@ Dictionary::~Dictionary() {
_unref();
}

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -81,7 +81,6 @@ public:
const Variant* next(const Variant* p_key=NULL) const;
Array keys() const;
Array values() const;
Dictionary(const Dictionary& p_from);
Dictionary(bool p_shared=false);

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -285,7 +285,6 @@ public:
Error resize(int p_size);
void invert();
void operator=(const DVector& p_dvector) { reference(p_dvector); }
DVector() {}
@ -425,18 +424,6 @@ Error DVector<T>::resize(int p_size) {
return OK;
}
template<class T>
void DVector<T>::invert() {
T temp;
Write w = write();
int s = size();
int half_s = s/2;
for(int i=0;i<half_s;i++) {
temp = w[i];
w[i] = w[s-i-1];
w[s-i-1] = temp;
}
}
#endif

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -57,33 +57,33 @@ enum Error {
ERR_FILE_MISSING_DEPENDENCIES,
ERR_FILE_EOF,
ERR_CANT_OPEN, ///< Can't open a resource/socket/file
ERR_CANT_CREATE, // (20)
ERROR_QUERY_FAILED,
ERR_CANT_CREATE,
ERROR_QUERY_FAILED, // (20)
ERR_ALREADY_IN_USE,
ERR_LOCKED, ///< resource is locked
ERR_TIMEOUT,
ERR_CANT_CONNECT, // (25)
ERR_CANT_RESOLVE,
ERR_CANT_CONNECT,
ERR_CANT_RESOLVE, // (25)
ERR_CONNECTION_ERROR,
ERR_CANT_AQUIRE_RESOURCE,
ERR_CANT_FORK,
ERR_INVALID_DATA, ///< Data passed is invalid (30)
ERR_INVALID_PARAMETER, ///< Parameter passed is invalid
ERR_INVALID_DATA, ///< Data passed is invalid
ERR_INVALID_PARAMETER, ///< Parameter passed is invalid (30)
ERR_ALREADY_EXISTS, ///< When adding, item already exists
ERR_DOES_NOT_EXIST, ///< When retrieving/erasing, it item does not exist
ERR_DATABASE_CANT_READ, ///< database is full
ERR_DATABASE_CANT_WRITE, ///< database is full (35)
ERR_COMPILATION_FAILED,
ERR_DATABASE_CANT_WRITE, ///< database is full
ERR_COMPILATION_FAILED, // (35)
ERR_METHOD_NOT_FOUND,
ERR_LINK_FAILED,
ERR_SCRIPT_FAILED,
ERR_CYCLIC_LINK, // (40)
ERR_INVALID_DECLARATION,
ERR_CYCLIC_LINK,
ERR_INVALID_DECLARATION, // (40)
ERR_DUPLICATE_SYMBOL,
ERR_PARSE_ERROR,
ERR_BUSY,
ERR_SKIP, // (45)
ERR_HELP, ///< user requested help!!
ERR_SKIP,
ERR_HELP, ///< user requested help!! (45)
ERR_BUG, ///< a bug in the software certainly happened, due to a double check failing or unexpected behavior.
ERR_PRINTER_ON_FIRE, /// the parallel port printer is engulfed in flames
ERR_OMFG_THIS_IS_VERY_VERY_BAD, ///< shit happens, has never been used, though

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -223,10 +223,5 @@ extern bool _err_error_exists;
} \
#define WARN_PRINTS(m_string) \
{ \
_err_print_error(FUNCTION_STR,__FILE__,__LINE__,String(m_string).utf8().get_data(),ERR_HANDLER_WARNING); \
_err_error_exists=false;\
} \
#endif

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

28
core/fpstr.cpp Normal file
View File

@ -0,0 +1,28 @@
/*************************************************************************/
/* fpstr.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/

28
core/fpstr.h Normal file
View File

@ -0,0 +1,28 @@
/*************************************************************************/
/* fpstr.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/

View File

@ -1,31 +1,3 @@
/*************************************************************************/
/* func_ref.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "func_ref.h"
Variant FuncRef::call_func(const Variant** p_args, int p_argcount, Variant::CallError& r_error) {

View File

@ -1,31 +1,3 @@
/*************************************************************************/
/* func_ref.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef FUNC_REF_H
#define FUNC_REF_H

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -432,7 +432,6 @@ static _GlobalConstant _global_constants[]={
BIND_GLOBAL_CONSTANT( ERR_FILE_EOF ),
BIND_GLOBAL_CONSTANT( ERR_CANT_OPEN ), ///< Can't open a resource/socket/file
BIND_GLOBAL_CONSTANT( ERR_CANT_CREATE ),
BIND_GLOBAL_CONSTANT( ERR_PARSE_ERROR ),
BIND_GLOBAL_CONSTANT( ERROR_QUERY_FAILED ),
BIND_GLOBAL_CONSTANT( ERR_ALREADY_IN_USE ),
BIND_GLOBAL_CONSTANT( ERR_LOCKED ), ///< resource is locked
@ -478,22 +477,7 @@ static _GlobalConstant _global_constants[]={
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_STORAGE ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_EDITOR ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_NETWORK ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_EDITOR_HELPER ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_CHECKABLE ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_CHECKED ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_INTERNATIONALIZED ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_BUNDLE ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_CATEGORY ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_STORE_IF_NONZERO ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_STORE_IF_NONONE ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_NO_INSTANCE_STATE ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_RESTART_IF_CHANGED ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_SCRIPT_VARIABLE ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_DEFAULT ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_DEFAULT_INTL ),
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_NOEDITOR ),
BIND_GLOBAL_CONSTANT( METHOD_FLAG_NORMAL ),
BIND_GLOBAL_CONSTANT( METHOD_FLAG_EDITOR ),

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -54,8 +54,7 @@ String Globals::localize_path(const String& p_path) const {
if (resource_path=="")
return p_path; //not initialied yet
if (p_path.begins_with("res://") || p_path.begins_with("user://") ||
(p_path.is_abs_path() && !p_path.begins_with(resource_path)))
if (p_path.find(":/") != -1)
return p_path.simplify_path();
@ -83,8 +82,6 @@ String Globals::localize_path(const String& p_path) const {
if (sep == -1) {
return "res://"+path;
};
String parent = path.substr(0, sep);
String plocal = localize_path(parent);
@ -1376,25 +1373,6 @@ Vector<String> Globals::get_optimizer_presets() const {
}
void Globals::_add_property_info_bind(const Dictionary& p_info) {
ERR_FAIL_COND(!p_info.has("name"));
ERR_FAIL_COND(!p_info.has("type"));
PropertyInfo pinfo;
pinfo.name = p_info["name"];
ERR_FAIL_COND(!props.has(pinfo.name));
pinfo.type = Variant::Type(p_info["type"].operator int());
ERR_FAIL_INDEX(pinfo.type, Variant::VARIANT_MAX);
if (p_info.has("hint"))
pinfo.hint = PropertyHint(p_info["hint"].operator int());
if (p_info.has("hint_string"))
pinfo.hint_string = p_info["hint_string"];
set_custom_property_info(pinfo.name, pinfo);
}
void Globals::set_custom_property_info(const String& p_prop,const PropertyInfo& p_info) {
ERR_FAIL_COND(!props.has(p_prop));
@ -1419,7 +1397,6 @@ void Globals::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_order","name"),&Globals::get_order);
ObjectTypeDB::bind_method(_MD("set_persisting","name","enable"),&Globals::set_persisting);
ObjectTypeDB::bind_method(_MD("is_persisting","name"),&Globals::is_persisting);
ObjectTypeDB::bind_method(_MD("add_property_info", "hint"),&Globals::_add_property_info_bind);
ObjectTypeDB::bind_method(_MD("clear","name"),&Globals::clear);
ObjectTypeDB::bind_method(_MD("localize_path","path"),&Globals::localize_path);
ObjectTypeDB::bind_method(_MD("globalize_path","path"),&Globals::globalize_path);
@ -1450,7 +1427,7 @@ Globals::Globals() {
set("application/name","" );
set("application/main_scene","");
custom_prop_info["application/main_scene"]=PropertyInfo(Variant::STRING,"application/main_scene",PROPERTY_HINT_FILE,"tscn,scn,xscn,xml,res");
custom_prop_info["application/main_scene"]=PropertyInfo(Variant::STRING,"application/main_scene",PROPERTY_HINT_FILE,"scn,res,xscn,xml,tscn");
set("application/disable_stdout",false);
set("application/use_shared_user_dir",true);
@ -1549,7 +1526,6 @@ Globals::Globals() {
custom_prop_info["render/thread_model"]=PropertyInfo(Variant::INT,"render/thread_model",PROPERTY_HINT_ENUM,"Single-Unsafe,Single-Safe,Multi-Threaded");
custom_prop_info["physics_2d/thread_model"]=PropertyInfo(Variant::INT,"physics_2d/thread_model",PROPERTY_HINT_ENUM,"Single-Unsafe,Single-Safe,Multi-Threaded");
set("debug/profiler_max_functions",16384);
using_datapack=false;
}

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -96,8 +96,6 @@ protected:
bool _load_resource_pack(const String& p_pack);
void _add_property_info_bind(const Dictionary& p_info);
protected:
static void _bind_methods();

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -74,10 +74,7 @@ static inline uint32_t hash_djb2_one_float(float p_in,uint32_t p_prev=5381) {
float f;
uint32_t i;
} u;
// handle -0 case
if (p_in==0.0f) u.f=0.0f;
else u.f=p_in;
u.f=p_in;
return ((p_prev<<5)+p_prev)+u.i;
}

View File

@ -1,43 +0,0 @@
/*************************************************************************/
/* value_evaluator.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef VALUE_EVALUATOR_H
#define VALUE_EVALUATOR_H
#include "core/object.h"
class ValueEvaluator : public Object {
OBJ_TYPE(ValueEvaluator, Object);
public:
virtual double eval(const String& p_text) {
return p_text.to_double();
}
};
#endif // VALUE_EVALUATOR_H

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +0,0 @@
#ifndef HQ2X_H
#define HQ2X_H
#include "typedefs.h"
uint32_t *hq2x_resize(
const uint32_t *image,
uint32_t width,
uint32_t height,
uint32_t *output,
uint32_t trY = 0x30,
uint32_t trU = 0x07,
uint32_t trV = 0x06,
uint32_t trA = 0x50,
bool wrapX = false,
bool wrapY = false );
#endif // HQ2X_H

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -30,7 +30,7 @@
#include "hash_map.h"
#include "core/io/image_loader.h"
#include "core/os/copymem.h"
#include "hq2x.h"
#include "print_string.h"
#include <stdio.h>
@ -901,44 +901,6 @@ static void _generate_po2_mipmap(const uint8_t* p_src, uint8_t* p_dst, uint32_t
}
void Image::expand_x2_hq2x() {
ERR_FAIL_COND(format>=FORMAT_INDEXED);
Format current = format;
bool mipmaps=get_mipmaps();
if (mipmaps) {
clear_mipmaps();
}
if (current!=FORMAT_RGBA)
convert(FORMAT_RGBA);
DVector<uint8_t> dest;
dest.resize(width*2*height*2*4);
{
DVector<uint8_t>::Read r = data.read();
DVector<uint8_t>::Write w = dest.write();
hq2x_resize((const uint32_t*)r.ptr(),width,height,(uint32_t*)w.ptr());
}
width*=2;
height*=2;
data=dest;
if (current!=FORMAT_RGBA)
convert(current);
if (mipmaps) {
generate_mipmaps();
}
}
void Image::shrink_x2() {
ERR_FAIL_COND(format==FORMAT_INDEXED || format==FORMAT_INDEXED_ALPHA);
@ -2327,8 +2289,6 @@ void Image::blit_rect(const Image& p_src, const Rect2& p_src_rect,const Point2&
Image (*Image::_png_mem_loader_func)(const uint8_t*,int)=NULL;
Image (*Image::_jpg_mem_loader_func)(const uint8_t*,int)=NULL;
void (*Image::_image_compress_bc_func)(Image *)=NULL;
void (*Image::_image_compress_pvrtc2_func)(Image *)=NULL;
void (*Image::_image_compress_pvrtc4_func)(Image *)=NULL;
@ -2503,7 +2463,7 @@ String Image::get_format_name(Format p_format) {
return format_names[p_format];
}
Image::Image(const uint8_t* p_mem_png_jpg, int p_len) {
Image::Image(const uint8_t* p_png,int p_len) {
width=0;
height=0;
@ -2511,13 +2471,8 @@ Image::Image(const uint8_t* p_mem_png_jpg, int p_len) {
format=FORMAT_GRAYSCALE;
if (_png_mem_loader_func) {
*this = _png_mem_loader_func(p_mem_png_jpg,p_len);
*this = _png_mem_loader_func(p_png,p_len);
}
if (empty() && _jpg_mem_loader_func) {
*this = _jpg_mem_loader_func(p_mem_png_jpg,p_len);
}
}
Image::Image() {

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -97,7 +97,6 @@ public:
};
static Image (*_png_mem_loader_func)(const uint8_t* p_png,int p_size);
static Image (*_jpg_mem_loader_func)(const uint8_t* p_png,int p_size);
static void (*_image_compress_bc_func)(Image *);
static void (*_image_compress_pvrtc2_func)(Image *);
static void (*_image_compress_pvrtc4_func)(Image *);
@ -250,7 +249,6 @@ public:
void resize( int p_width, int p_height, Interpolation p_interpolation=INTERPOLATE_BILINEAR );
Image resized( int p_width, int p_height, int p_interpolation=INTERPOLATE_BILINEAR );
void shrink_x2();
void expand_x2_hq2x();
/**
* Crop the image to a specific size, if larger, then the image is filled by black
*/
@ -358,7 +356,7 @@ public:
static void set_compress_bc_func(void (*p_compress_func)(Image *));
static String get_format_name(Format p_format);
Image(const uint8_t* p_mem_png_jpg, int p_len=-1);
Image(const uint8_t* p_mem_png, int p_len=-1);
Image(const char **p_xpm);
~Image();

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -59,6 +59,7 @@ int Image::MCBlock::get_longest_axis_index() const {
for(int i=0;i<4;i++) {
int d = max_color.color.col[i]-min_color.color.col[i];
//printf(" ai:%i - %i\n",i,d);
if (d>max_dist) {
max_index=i;
max_dist=d;
@ -70,11 +71,13 @@ int Image::MCBlock::get_longest_axis_index() const {
int Image::MCBlock::get_longest_axis_length() const {
int max_dist=-1;
int max_index=0;
for(int i=0;i<4;i++) {
int d = max_color.color.col[i]-min_color.color.col[i];
if (d>max_dist) {
max_index=i;
max_dist=d;
}
}
@ -114,6 +117,8 @@ void Image::MCBlock::shrink() {
void Image::quantize() {
Image::Format orig_format=format;
bool has_alpha = detect_alpha()!=ALPHA_NONE;
bool quantize_fast=OS::get_singleton()->has_environment("QUANTIZE_FAST");

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -232,6 +232,64 @@ bool InputMap::event_is_action(const InputEvent& p_event, const StringName& p_ac
return _find_event(E->get().inputs,p_event)!=NULL;
}
bool InputMap::event_is_joy_motion_action_pressed(const InputEvent& p_event) const {
ERR_FAIL_COND_V(p_event.type!=InputEvent::JOYSTICK_MOTION,false);
bool pressed=false;
//this could be optimized by having a separate list of joymotions?
for (Map<StringName, Action>::Element *A=input_map.front();A;A=A->next()) {
for (List<InputEvent>::Element *E=A->get().inputs.front();E;E=E->next()) {
const InputEvent& e=E->get();
if(e.type!=p_event.type)
continue;
if (e.type!=InputEvent::KEY && e.device!=p_event.device)
continue;
switch(p_event.type) {
case InputEvent::KEY: {
if (e.key.scancode==p_event.key.scancode && e.key.mod == p_event.key.mod)
return e.key.pressed;
} break;
case InputEvent::JOYSTICK_BUTTON: {
if (e.joy_button.button_index==p_event.joy_button.button_index) {
return e.joy_button.pressed;
}
} break;
case InputEvent::MOUSE_BUTTON: {
if (e.mouse_button.button_index==p_event.mouse_button.button_index) {
return e.mouse_button.pressed;
}
} break;
case InputEvent::JOYSTICK_MOTION: {
if (e.joy_motion.axis==p_event.joy_motion.axis) {
if (
(e.joy_motion.axis_value * p_event.joy_motion.axis_value >0) && //same axis
ABS(e.joy_motion.axis_value)>0.5 && ABS(p_event.joy_motion.axis_value)>0.5 )
pressed=true;
}
} break;
}
}
}
return pressed;
}
void InputMap::load_from_globals() {
input_map.clear();;

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@ -70,6 +70,7 @@ public:
const List<InputEvent> *get_action_list(const StringName& p_action);
bool event_is_action(const InputEvent& p_event, const StringName& p_action) const;
bool event_is_joy_motion_action_pressed(const InputEvent& p_event) const;
void load_from_globals();

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -1,9 +1,7 @@
#!/usr/bin/env python
Import('env')
env.add_source_files(env.core_sources, "*.cpp")
env.add_source_files(env.core_sources, "*.c")
# env.core_sources.append("io/fastlz.c")
env.add_source_files(env.core_sources,"*.cpp")
env.add_source_files(env.core_sources,"*.c")
#env.core_sources.append("io/fastlz.c")
Export('env')

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */

View File

@ -1,31 +1,3 @@
/*************************************************************************/
/* file_access_encrypted.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "file_access_encrypted.h"
#include "aes256.h"
#include "md5.h"

View File

@ -1,31 +1,3 @@
/*************************************************************************/
/* file_access_encrypted.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef FILE_ACCESS_ENCRYPTED_H
#define FILE_ACCESS_ENCRYPTED_H

Some files were not shown because too many files have changed in this diff Show More