Compare commits

..

807 Commits
1.0 ... 1.1

Author SHA1 Message Date
eb26ca7ae1 Merge pull request #101177 from akien-mga/1.1
[1.1] Build fixes for modern toolchains + new portable 1.1-stable Linux binaries
2025-11-21 11:32:06 +01:00
c47810c33b SCons: Ensure written files are properly flushed/closed
Also add `core/method_bind_ext.inc` to `.gitignore`.

(cherry picked from commit ad2fb7d93b)
2025-01-06 07:58:05 +01:00
8ee6e3848e OSX: Add support for building with osxcross
(cherry picked from commit eb111c1d39)
2025-01-06 07:57:56 +01:00
7ae44a055b Linux: Default to builtin openssl, freetype, and zlib
Fix support for cross-compilation, and fix handling of builtin libraries,
which would still attempt to link system libs and use system headers.

Also patch out GLU includes from GLEW, we don't need it, so that removes
another mandatory dependency.

(cherry picked from commit abf6a0919b)
2025-01-06 07:57:00 +01:00
a3a3cafbc8 SCons: Set explicit standards to C++98 and C11
Godot 1.0 was developed at a time where compilers defaulted to C++98.

Also disable `-Wall` on debug builds, there are now hundreds of warnings
from newer compilers that would need to be fixed.

This would best be done by adding a new `warnings` SCons option, which would
also affect non-debug builds, but I have no intention to fix warnings in the
1.0 branch, the goal here is just to get it to compile for archival and game
preservation.

(cherry picked from commit a68e96b8c2)
2025-01-06 07:45:24 +01:00
d3b42e41b0 version bump to stable 2015-05-21 15:03:21 -03:00
bb5d46bb11 Merge branch 'master' of https://github.com/okamstudio/godot 2015-05-21 15:02:49 -03:00
6049479a99 Merge pull request #1951 from akien-mga/master
Add input mapping GUI demo
2015-05-20 13:32:34 -03:00
d9e8cd4dde Add input mapping GUI demo 2015-05-20 17:38:41 +02:00
1e50677594 fixes on sample importing 2015-05-19 23:37:04 -03:00
fec6aaffd8 more fixes
fix ctrl-a for some cases, mentioned in #1704
fix toggling visibility not updating, fixes #1923
2015-05-19 23:07:11 -03:00
9f686563d0 fixed latin separation in label, broke it? for cjk
changed non-separatable character detection so latin works properly.
This is probably incorrect. If you speak chinese, korean or japanese,
please help me fix it.  closes #1935
2015-05-19 22:26:25 -03:00
221443c5a2 more fixes
-only refuse to load an older file if version major is different, fixes
#1944
-fix drive letter default value, fixes #1939
2015-05-19 21:36:35 -03:00
f220183e40 fix a crash situation when starting a thread and other small fixes 2015-05-18 12:45:53 -03:00
5900e7f589 fix a compile error 2015-05-18 11:14:02 -03:00
e323cc0505 -Rename unexisting by nonexistant, closes #1940
-Added function to retrieve list of actions fron InputMap
2015-05-18 10:20:54 -03:00
5272853cdc -changed some copyrights to 2015 2015-05-17 18:19:24 -03:00
a44dd89c55 version bump to rc3 2015-05-17 17:35:44 -03:00
12bd89a39c small description improvement 2015-05-17 17:19:12 -03:00
b6b346e8ae added a built-in scene changer API, closes #1928 2015-05-17 16:33:35 -03:00
2696ecb769 reinstante focus into textedit after menu used in code editor 2015-05-17 15:38:24 -03:00
6e85ee3a43 fix crash on help, closes #1873 2015-05-17 14:17:57 -03:00
e72717e373 properly save external resources, fixes #1924
added API to get scancode names to OS
2015-05-17 13:15:23 -03:00
0faaa729e7 Merge pull request #1927 from antonyjones67/RevertReadmeChange
Put this back to fix web page.Will have to figure something else for …
2015-05-17 11:38:07 -03:00
a98236fe5e Put this back to fix web page.Will have to figure something else for mainpage in doxygen. 2015-05-17 06:40:08 -06:00
adb709aa91 -Integers and Float should interpolate on animation, maybe fixes #1891, please test 2015-05-16 18:16:11 -03:00
bbe9a37f1d sleeping property now should work properly, fixes #1892 2015-05-16 17:54:36 -03:00
8482611f81 Merge branch 'master' of https://github.com/okamstudio/godot 2015-05-16 17:13:25 -03:00
1e382dbb18 -small motion demo, to better troubleshoot 2015-05-16 17:05:56 -03:00
27cb75112e -bit slower execution in debug, but proper error reporting for get index and operators, fixes #1911 2015-05-16 16:32:46 -03:00
219dcaaa75 Merge pull request #1901 from guilhermefelipecgs/add_ignore_tags
Ignore etags, ctags, gtags and cscope.
2015-05-16 16:20:38 -03:00
70c2c7a3f9 Merge pull request #1900 from guilhermefelipecgs/fix_#1898
Fix find option in Help tab. #1898
2015-05-16 16:18:17 -03:00
2882ff1b7e Merge pull request #1881 from NateWardawg/master
Removed redundant code in the kinematic 3D demo.
2015-05-16 13:47:04 -03:00
4a523e22e0 Merge pull request #1880 from antonyjones67/DoxyFIle
Added Doxyfile for Doxygen documentation. Had to modify codec.h becau…
2015-05-16 13:46:10 -03:00
744f778707 Merge pull request #1761 from est31/master
Fix headless exporting bugs
2015-05-16 13:43:38 -03:00
3a1d8375f7 Merge pull request #1908 from vipsbpig/master
fix multitouch release problem
2015-05-16 12:27:08 -03:00
bc3afc8ed8 fix multitouch release problem 2015-05-15 12:40:34 +08:00
c41ef699bc Ignore etags, ctags, gtags and cscope. 2015-05-13 23:54:31 -03:00
96a86fdf75 Fix #1898 2015-05-13 23:27:13 -03:00
40c0e1993a Fixes problem parsing config files using ConfigFile 2015-05-12 09:12:18 -03:00
3936ed882c -Added lookat/get_angle_to functions in 2D, and a demo, closes #1843
-Added get_viewport().get_mouse_pos() to replace Input.get_mouse_pos(), closes #1838
2015-05-12 08:17:09 -03:00
4363798608 -Fixed bug in translation remaps, also added proper demo, maybe fixes #1729 2015-05-12 07:31:15 -03:00
dc3d0bdf38 Translation Demo 2015-05-11 22:34:29 -03:00
17ccd8d9b7 fixs particles on 3d platformer demo, closes #1588 2015-05-11 21:39:42 -03:00
bcb184766f -shadergraph now saved when on external file and modified, fixes #1832 2015-05-11 21:36:29 -03:00
bc0ef64bed fixed crash on make resources unique menu option, fixes #1874 2015-05-11 21:23:29 -03:00
4b8745ad63 Merge branch 'master' of https://github.com/okamstudio/godot 2015-05-11 15:49:41 -03:00
b777bf5ff5 -Updated isometric 2d demo to work using the new isometric support, fixes #1849 2015-05-11 00:40:23 -03:00
67bf14bbbb Removed redundant code in the kinematic 3D demo. 2015-05-10 17:39:38 -05:00
32b1b472af -improved one-way collision handling in both dynamic and character bodies for 2D, fixes #1854 2015-05-10 19:24:09 -03:00
a2b8b92a6e -fixed some glitches in isometric light demo, closes #1858 2015-05-10 18:14:38 -03:00
d0d9e9ee1c Forgot this. It points Doxyfile to the logo without text. 2015-05-10 14:41:35 -06:00
5ceec67add Added Doxyfile for Doxygen documentation. Had to modify codec.h because it already had set up the mainpage. Added a logo without text for the Doxygen pages upper top left corner. Pointed Doxyfile to README.md. Thinking of adding Markup in c files pointing to Wiki links. That way we have current source markup but it points to Wiki for major documentation effort. 2015-05-10 14:36:58 -06:00
421b4fec3e -compatibility option for physicsbody layers, fixes #1842 2015-05-10 15:58:08 -03:00
18251997dd Merge branch 'master' of https://github.com/okamstudio/godot 2015-05-10 15:46:34 -03:00
9b692b174b -convert to subscene keeps signal connections, fixes #1863 2015-05-10 15:45:33 -03:00
11defcbe21 Merge pull request #1875 from Zamaroht/patch-1
Delete unused variable
2015-05-10 11:33:16 -03:00
ac1b72a49c Merge pull request #1876 from antonyjones67/FixCFlagInDebug
Change windows build to use CFlag /Od so that you get the full debug …
2015-05-10 11:32:50 -03:00
42ef5d823d Merge pull request #1878 from Zamaroht/patch-2
Remove focus from restart button, fixes #1850
2015-05-10 11:32:36 -03:00
1c5ebcecd3 Merge pull request #1879 from HeartoLazor/master
Support for fixed process on timer (Idle/Fixed mode) and a small change for more uniform ticks
2015-05-10 11:32:03 -03:00
bd1e54a8b7 - Implemented support for fixed process on timer. Useful for cooldowns without the influence from framerate
similar to animation player (idle/fixed mode), where idle mode = old timer, fixed mode = fixed process implementation:
Example of the behaviour with a stream of bullets with timers on different frame rates:
https://gfycat.com/HeartyImpressiveIndiancow

- A change for more uniform ticks on fixed/idle

without this fix:
http://i.imgur.com/0TMQ6CG.png
with this fix:
http://i.imgur.com/3zYx16c.png
2015-05-10 10:00:26 -04:00
ef8a402f71 Remove focus from restart button, fixes #1850
Fixes a problem where the restart button would keep focus after being pressed, making the tetris' pieces impossible to rotate without activating the button again.
2015-05-10 00:46:16 -03:00
8f4b6ff870 Deleted unused variable
Deleted the var GRAVITY because it is unused. The gravity is used at line 237, but it's gotten from the Physics2DDirectBodyState parameter.
2015-05-09 19:09:30 -03:00
9e14f971bc Change windows build to use CFlag /Od so that you get the full debug experience. Without this flag set, Visual Studio lets you use breakpoints, but the watch and locals is pretty much useless. 2015-05-09 15:46:59 -06:00
d1e4d6e997 -fix clip+center alignment on Button, fixes #1865 2015-05-09 18:29:55 -03:00
e090c06ae2 particles in navmesh demo are nice again 2015-05-09 18:17:43 -03:00
65d48d6d39 -Added prints() function, fixes #1132, #1859
-Tabs work inside built-in log window, fixes #1867
2015-05-09 18:09:58 -03:00
1310e09c73 corrected copyright date in project manager, fixes #1870 2015-05-09 13:11:59 -03:00
1fd1b7a91b Merge branch 'master' of https://github.com/okamstudio/godot 2015-05-09 13:09:20 -03:00
1a7d370fcf -Corrected DirAccessWindows functions, fixes #1872, properly fixes #791. 2015-05-09 13:05:34 -03:00
158785636c Merge pull request #1852 from SuperUserNameMan/fixes_platformer_3d_particles
fixes_3d_platformer_demo_missing_particles_textures
2015-05-07 20:06:20 -03:00
1e545fc9df Merge pull request #1851 from SuperUserNameMan/fixes_3d_shaders_materials_demo
fixes_demo3d_shaders_materials_missing_light
2015-05-07 20:06:07 -03:00
5f51623547 Merge pull request #1846 from hurikhan/pr_wm_demo_input_fix
window_management demo --  input fix
2015-05-07 20:05:55 -03:00
2a3ded86de Merge pull request #1845 from Zamaroht/patch-1
Delete line without functionality
2015-05-07 20:05:17 -03:00
7c4a35496a Merge pull request #1844 from daltomi/SIGSEGV
Fix segment violation MINIZIP_ENABLED
2015-05-07 20:03:25 -03:00
deba45ebf7 Merge pull request #1841 from SuperUserNameMan/updated_rtaudio
update rtaudio to latest version
2015-05-07 20:03:00 -03:00
c99813dc38 Merge pull request #1826 from eehrich/master
Reviewed compiler warnings: fixed some bugs and formal stuff. (2nd try)
2015-05-07 20:02:54 -03:00
32c0a96249 add_missing_textures_to_particles 2015-05-07 18:29:38 +02:00
786b5e3545 fixes_demo3d_shaders_materials_missing_light
add the missing animated light to the demo 3d "shaders materials"
2015-05-07 18:10:30 +02:00
48afa1d284 window_management input fix 2015-05-06 23:07:11 -04:00
ead2dd3db5 Delete line without functionality 2015-05-06 23:53:20 -03:00
93095014fd Fix segment violation MINIZIP_ENABLED 2015-05-06 20:37:25 -03:00
2f4c435bfa update rtaudio to latest version
update rtaudio from latest version availbale on github
2015-05-06 23:08:06 +02:00
7156aff160 Merge pull request #1822 from guilhermefelipecgs/filter_order
Change the order of the filter
2015-05-06 09:48:13 -03:00
6565751d0f Merge branch 'master' of https://github.com/okamstudio/godot 2015-05-06 09:46:29 -03:00
9de37817bc -removed dynamic_cast on CheckBox, fixes #1830 2015-05-06 09:45:25 -03:00
83fe66d968 Merge pull request #1834 from ricpelo/ricpelo-patch-6
Better OS X fullscreen support, without the nasty startup effect
2015-05-06 09:32:17 -03:00
979b931995 Better OS X fullscreen support, without the nasty startup effect 2015-05-06 12:53:55 +02:00
1ae03fd39d Merge pull request #7 from okamstudio/master
Sync
2015-05-06 12:50:39 +02:00
fbd9839131 Merge pull request #1818 from ricpelo/ricpelo-patch-5
Really fixes fullscreen mode in OS X, even during startup
2015-05-06 04:36:57 -03:00
e2419f74d9 Merge pull request #1823 from daltomi/SIGSEGV
fix double delete packed data
2015-05-05 23:13:32 -03:00
ac9263c680 clearified parenthesis of if construct 2015-05-06 01:39:42 +02:00
b89cd136a9 fixed ColorRgb attribute init order of struct 2015-05-06 01:22:38 +02:00
897a1aade5 optional formal changes 2015-05-06 01:22:31 +02:00
fe13c728fd added notes to resolve undefined behavior of calculations in tweening
interpolators in future.
2015-05-06 00:51:49 +02:00
dcc93a33fd fixed SpatialEditor::_init_indications. loopcounter "i" used ambiguous 2015-05-06 00:49:00 +02:00
d177e0f64a fixed issue with format string in PCKPacker::flush 2015-05-06 00:46:02 +02:00
edce27fc03 minor fixes in drivers mpc and vorbis. 2015-05-06 00:43:24 +02:00
670d77813f PhysicsServerSW::body_is_shape_set_as_trigger - missing return statement 2015-05-06 00:41:41 +02:00
605b783708 fix delete packed data 2015-05-05 18:21:43 -03:00
7bb53831d8 Merge pull request #6 from okamstudio/master
Sync
2015-05-05 22:27:05 +02:00
734d539a7d Change the order of the filter 2015-05-05 15:34:40 -03:00
584f4470c8 Abort when exporting fails 2015-05-05 18:19:14 +02:00
1268e65aa5 Set settings directory variable when loading settings fails
This makes export work when you are first running godot for your user.
2015-05-05 18:19:14 +02:00
bc3c14a76b Made type-checking for arguments less trict between bool, int real. Fixes #1816 2015-05-05 09:53:37 -03:00
1d619fad86 Really fixes fullscreen mode in OS X, even during startup 2015-05-05 12:02:47 +02:00
0995a230f6 up version to rc2 2015-05-05 00:39:14 -03:00
36932a0065 avoid crash on some cases of richtextlabel fill, but odd behavior persists, #1803 2015-05-05 00:37:06 -03:00
9b03ea903e Merge pull request #1814 from sanikoyes/Pr-Tween-fix
Pr-Tween-fix
2015-05-05 00:19:22 -03:00
d19e49a969 Merge branch 'master' of https://github.com/okamstudio/godot 2015-05-05 00:17:58 -03:00
74b0e0c296 fix crash in editor when using alt+arrows to indent, thanks adolson and romulox_x 2015-05-05 00:17:22 -03:00
6d0914dfc5 Spine: add feature to insert/remove interpolates while updating 2015-05-05 11:12:17 +08:00
2b4f0be3ee Merge pull request #1807 from SuperUserNameMan/fix_windows_unicode_path2
fixes issue #1693 winmain and main unicode
2015-05-04 23:59:17 -03:00
cb93e064a9 Merge branch 'master' of https://github.com/okamstudio/godot 2015-05-04 23:38:10 -03:00
68700ee3a9 Proper support for code editor autosaving (disabled by default) 2015-05-04 23:32:40 -03:00
dce8a6c251 Merge pull request #1804 from ricpelo/ricpelo-patch-2
Wrong use of | instead of ||
2015-05-04 21:49:12 -03:00
639f7e0016 Merge pull request #1810 from ricpelo/ricpelo-patch-3
Fixes Theora build
2015-05-04 20:42:26 -03:00
ba61a1dfd3 Fixes Theora build
Changes memcpy() -> copymem()
2015-05-04 23:57:55 +02:00
a6e6c5b878 Merge branch 'master' of https://github.com/okamstudio/godot 2015-05-04 18:32:18 -03:00
2d396fb710 -More strict argument type-checking, will make many bugs visible, fixes #1809
-added NOTIFICATION_INSTANCED
2015-05-04 18:30:57 -03:00
43c41fc9f9 fixes issue #1693 winmain and main unicode
makes WinMain() and main() accepts unicode characters into arguments
2015-05-04 20:26:49 +02:00
2a02d3f96f fix font import path on windows, closes #1675 2015-05-04 15:06:41 -03:00
f3542ff838 Wrong use of | instead of || 2015-05-04 19:54:17 +02:00
fbbe7dcdfb Merge remote-tracking branch 'origin/master'
Conflicts:
	drivers/windows/dir_access_windows.cpp
2015-05-04 13:24:02 -03:00
7f5b744b92 small unicode fixes 2015-05-04 13:12:05 -03:00
6f8bd89931 -invalidated string -> int automatic conversion, fixes #1788 2015-05-04 11:17:11 -03:00
f4caddbc23 -corrected frac() and hyperbolic sin,cos,tan when running on PC (GLSL120), fixes #1775 2015-05-04 10:53:54 -03:00
a76709d240 -vec3 uniforms should now work, fixes #1773 2015-05-04 10:17:24 -03:00
9b01f5954a solve invalid pointer, fixes #1793 2015-05-04 00:55:21 -03:00
4b6225586c Merge branch 'master' of https://github.com/okamstudio/godot 2015-05-04 00:53:52 -03:00
442febd2ae added return keyword, fixes #1797 2015-05-04 00:53:33 -03:00
30f652998d Merge pull request #1738 from jackmakesthings/master
Updating demo engine.cfgs where name is missing
2015-05-03 23:00:26 -03:00
d6d29f6d79 Merge pull request #1755 from dbsGen/master
Fixed some bugs in Label.
2015-05-03 22:55:58 -03:00
f64fcc42ef Merge pull request #1772 from Biliogadafr/Tripleclick
Tripleclick now doesn't select line if clicks was done on different lines. Fix #1727
2015-05-03 22:54:16 -03:00
f850f0d9ec Merge pull request #1784 from NateWardawg/sa_fixes
Fixed some items caught in cppcheck
2015-05-03 22:54:02 -03:00
c631d597ad Merge pull request #1792 from swenner/static_analysis_fixes
Static analysis fixes
2015-05-03 22:53:30 -03:00
913cb443fc Merge pull request #1798 from ricpelo/ricpelo-patch-1
Missing return statement
2015-05-03 22:52:42 -03:00
795ccf0e14 Merge pull request #1800 from antonyjones67/VSGenerator
Added Visual Studio project generation. Use "vsproj=yes" in command line...
2015-05-03 22:52:20 -03:00
e7aa37fe75 improved kinematic motion, improved demos for kinematic motion 2015-05-03 22:37:10 -03:00
04fb3402c5 -Make sure properties are exported the way they should in xml, fixes #1799 2015-05-03 20:31:50 -03:00
2a4da03f10 Added Visual Studio project generation. Use "vsproj=yes" in command line. This does not set up NMAKE properly. 2015-05-03 15:18:56 -06:00
767f71a35e -Made one way collision work with 2D physics (rigidbody) 2015-05-03 18:18:21 -03:00
256a9fd1df Missing return statement 2015-05-03 22:09:42 +02:00
af06843982 -new collision layer & mask system for 2D, for more flexible collision masking 2015-05-03 16:47:21 -03:00
3f1826866b fixed uninitialized name pointers (cppcheck) 2015-05-03 02:16:26 +02:00
332d9af81b fixed memory leak: triangulated (cppcheck) 2015-05-03 02:11:43 +02:00
bd08cd7fd2 fixed broken comment block 2015-05-03 02:04:30 +02:00
a0e985c6c1 removed unnecessary semicolons 2015-05-03 01:48:20 +02:00
2830f85b05 fixed uninitialized variable (cppcheck) 2015-05-03 01:45:55 +02:00
5f2aac4bbe same fixes to 3D navmesh.. 2015-05-02 17:39:29 -03:00
2296b0508e 2D pathfinder fixes, should now always find the best path. 2015-05-02 16:35:43 -03:00
6212946927 Fixed some items caught in cppcheck 2015-05-02 12:17:59 -05:00
524d9fad59 -fixed godot icon for android
-added a genname option to generate the name of android app
2015-05-01 23:21:27 -03:00
dda60296d8 Merge branch 'master' of https://github.com/okamstudio/godot 2015-05-01 23:20:41 -03:00
fb8b740fcb -fixed default godot logo
-made the packagename generated from name by default
2015-05-01 23:20:05 -03:00
61e90385f6 -option to select arm and x86 architectures on android export (will not work with current templates, you have to make new and include both x86 and arm support) 2015-05-01 22:45:32 -03:00
1e422941c8 -Fixed android export options (screen sizes, orientation should work)
-added functions to get mouse position in CanvasItem
2015-05-01 21:13:20 -03:00
8e7973d660 Triple click doesn't select line if click was done on different lines. Fix #1727 2015-05-02 00:03:49 +03:00
88d078df1e bumped version to rc1 2015-05-01 12:30:13 -03:00
c1eee112f4 fixed bullet in 3d platformer demo 2015-05-01 12:24:20 -03:00
ee8f8add4e -removed get_mouse_pos from Input, as it only caused problems 2015-05-01 12:19:24 -03:00
c45ffc2ca9 -fixed old condition in TextureFrame that caused bugs in materials, closes #1742 2015-05-01 12:16:51 -03:00
bf53b7789a -fix timer behavior described, closes #1455 2015-05-01 11:44:02 -03:00
c08597aa64 -fix a bug in extra cull margin, closes #1760 2015-05-01 11:26:23 -03:00
4804462ee0 -Fixes from source code analyzizer, closes #1768 2015-05-01 10:44:08 -03:00
af42e244e0 Merge pull request #1769 from est31/xml-order
Sort xml files, so order is constant
2015-05-01 10:02:58 -03:00
Gen
0bc5b7a146 Optimize the code. 2015-05-01 18:47:34 +08:00
b2b5143678 Sort xml files, so order is constant
Makes xml format work better with version control systems.
2015-05-01 03:41:45 +02:00
5c6b31c024 -fixed broken lighting in release version of godot for isometric light demo, fixes #1697 2015-04-30 11:34:24 -03:00
21939ce08b -some cleanups
-added tesselation function to curve and curve2d
2015-04-30 10:06:18 -03:00
Gen
c322eddffb fixed a autowrap bug when word is too length. 2015-04-30 12:47:05 +08:00
Gen
57d571a1c4 Update label.cpp 2015-04-30 00:03:19 +08:00
Gen
02d672753f space is only skipped when autowrap. 2015-04-29 23:43:39 +08:00
Gen
6fa342a1b0 record the number of space before a word. 2015-04-29 16:34:56 +08:00
Gen
ad358562e5 record the number of space before a words. 2015-04-29 16:34:25 +08:00
7773d70f44 bad lookup in grid container corrected, cells are properly aligned again. Fixes #1462 2015-04-28 23:10:06 -03:00
fa83cf3c96 label properly adjusted to size when inserting key, fixes #1607 2015-04-28 22:46:05 -03:00
16a73bccd2 Merge branch 'master' of https://github.com/okamstudio/godot 2015-04-28 22:06:06 -03:00
98c086edaf -fix forced texture repeat in Polygon2D, now depends on texture.
-added a new function, Camera::is_position_behind to aid to unproject(), fixes #1725
2015-04-28 22:05:01 -03:00
870d3c8cc7 Merge pull request #1750 from romulox-x/colorarray
fixed ColorArray constructor when taking array as parameter
2015-04-28 20:24:32 -03:00
Gen
dfc59d1e00 Update label.h 2015-04-28 23:07:41 +08:00
Gen
1a6012aff5 Update label.cpp 2015-04-28 23:06:34 +08:00
c6dce44dd8 fixes in handling of DirAccess for resource path on Android, fixes #1447 2015-04-28 09:38:07 -03:00
79c36ea5f7 fixed ColorArray constructor when taking array as parameter 2015-04-27 14:45:54 -07:00
0adca0a7c9 -made normalmaps easier in 2D, fixes #1467 2015-04-27 08:11:54 -03:00
82cbee2d2d -added set_master_player binding, fixes #1477 2015-04-27 00:23:16 -03:00
b312df0561 -disabled thread model 2 for the time being, crashes on linux without reason, fixes #1482 2015-04-27 00:19:07 -03:00
f54ad9e086 made parser accept EOF after "pass", fixes #1488 2015-04-26 20:28:41 -03:00
eeb0fcfb41 fix quit bug on linux when using alt-f4, fixes #1677 2015-04-26 19:02:32 -03:00
79d5b7f258 -fixed bodyenter/bodyexit callback of physics bodies, fixes #1739 2015-04-26 17:46:20 -03:00
3bcb930e8a properly wake up bodies when a parameter changes, fixes #1740 2015-04-26 16:20:00 -03:00
65c96a71bd fix crash on exit for popup, fixes #1676 2015-04-26 15:42:02 -03:00
81f36b768d fixes crash related to empty concavecollisionshape, fixes #1709 2015-04-26 13:03:01 -03:00
972af0b0cb -Fixed shader commets, /* */ works well and crash is solved, fixes #1711 2015-04-26 12:34:42 -03:00
3203a03414 Fixed bug in array comparison, fixes #1712 2015-04-26 12:12:53 -03:00
d3cbabba3d missing file for bbcode demo 2015-04-26 09:48:17 -03:00
d22a13e2e8 issue #1715 - menu separator
There was a request for a separator between Open Scene and Save Scene to avoid accidental mis-clicks. So here's that!
2015-04-25 22:45:49 -04:00
ffbe3eeff9 Set name on window management demo's engine.cfg 2015-04-25 22:22:04 -04:00
d066c06e36 Set name on rich text bbcode demo's engine.cfg 2015-04-25 22:21:09 -04:00
f62e09150e Set name on truck-town demo's engine.cfg 2015-04-25 22:20:06 -04:00
891db1e112 Set name on isometric-light demo's engine.cfg 2015-04-25 22:18:57 -04:00
330351c613 properly update emitting property when emit timeot is used, fixes #1716 2015-04-25 10:36:37 -03:00
ec00cd5c41 -Resolved light clipping issue due to wrong global rect cache, fixes #1722 2015-04-25 10:32:34 -03:00
52e2f4606f -Objects with BlendMode!=MIX do not get affected by CanvasModulate, fixes #1724 2015-04-24 23:46:42 -03:00
f971ae32e1 casting line into physics on negative space now works properly, fixes #1726 2015-04-24 22:41:31 -03:00
1f8e3117dd Ability to convert from nodes or other non resource with a get_rid() function to a rid 2015-04-24 20:45:07 -03:00
807a811fad changed some shortcuts in text editor, maybe fixes #1732 2015-04-24 16:25:27 -03:00
7006fe3cc4 Corrected rectangle intersection, fixes #1731 2015-04-24 16:08:05 -03:00
4fb905ed29 Merge branch 'master' of https://github.com/okamstudio/godot 2015-04-24 15:09:47 -03:00
115f55e972 local changes 2015-04-24 15:09:35 -03:00
b09a8bd32f fix to collada import crash 2015-04-23 22:42:52 -03:00
5e03874571 Merge branch 'master' of https://github.com/okamstudio/godot 2015-04-22 23:31:09 -03:00
c43dfddb65 Changed collada importer to properly handle ALL blend shape arrays, fixes problems with animated normals, uvs, etc. 2015-04-22 23:29:03 -03:00
1721ef17d6 disable apply modifiers by default in export flag 2015-04-22 18:20:29 -03:00
66c71c21df resolved some cases wehre built-in doc is not properlt generated, fixes #1719 2015-04-22 00:25:13 -03:00
8aab677906 corrected project manager popup, fixes #1721 2015-04-21 21:30:00 -03:00
7648088fca ability to get closest owner to point, for navigation and navigation2d 2015-04-21 16:47:49 -03:00
93ce7d92c1 -Many fixes and demo for RichTexLabel
-Proper ability to edit BBCode in RTL.
2015-04-21 16:01:58 -03:00
70752f3e4b -oops, duplicated text issue fix.. 2015-04-20 20:51:52 -03:00
1e52e0352f Merge branch 'master' of https://github.com/okamstudio/godot 2015-04-20 19:40:50 -03:00
59154cccf9 -Changed Godot exit to be clean.
-Added more debug information on memory cleanliness on exit (if run with -v)
-Fixed several memory leaks, fixes #1731, fixes #755
2015-04-20 19:38:02 -03:00
ed7666151b Merge pull request #1718 from swenner/documentation_fixes
Documentation fixes
2015-04-20 18:47:51 -03:00
8156db1623 updated outdated or missing Plane class documentation 2015-04-20 23:31:53 +02:00
03fd8a80c1 fixed incorrect constructor descriptions in Matrix3 2015-04-20 22:38:26 +02:00
87da209f14 fixed typos in the documentation 2015-04-20 22:36:28 +02:00
28c4afeb57 -Rewritten KinematicBody2D::move to MUCH more efficient code.
-KinematicBody2D::move now properly recognizes collision exceptions and masks, fixes #1649
-Removed object type masking for KinematicBody2D
-Added a test_motion() function to RigidBody2D, allowing simlar behavior to KinematicBody2D::move there.
2015-04-19 20:50:55 -03:00
1de1a04b78 -fix local and global usage for DirAccess, fixes #791
please test anyway..
2015-04-18 20:11:33 -03:00
b66b86b05e -Fixed post-import script-reload buf, fixes #1683 2015-04-18 19:06:58 -03:00
701335e845 -Throw error if setter and getter reference their member variable with self. , fixes #1685 2015-04-18 17:55:04 -03:00
389d6ca0c7 disable undo properly after ctrl-i, fixes #1688 2015-04-18 16:57:01 -03:00
a5cbfbbcbb -fixed relative path saving to file, fixes #1694 2015-04-18 16:33:31 -03:00
170a9349d2 Merge branch 'master' of https://github.com/okamstudio/godot 2015-04-18 16:18:59 -03:00
4661a6e126 -try to avoid errors when path using ".." is present in script include, fixes #1703 2015-04-18 16:17:33 -03:00
bedb4f1ab2 Merge pull request #1662 from TheHX/fix_plugins
Fix toolbar menu position(RichText and MultiMesh plugins)
2015-04-18 14:45:29 -03:00
e388d551b7 Merge pull request #1667 from TheHX/fix_multiline_strings
Now the script editor highlight all lines of a multiline string
2015-04-18 14:45:15 -03:00
f92a1fd646 Merge pull request #1691 from Faless/area_combine_2d
Implement Area2D space_override_mode = COMBINE
2015-04-18 14:44:59 -03:00
fdaa2920eb Updated copyright year in all headers 2015-04-18 14:38:54 -03:00
6b3cd13c8d -fix vector rotation, fixes #1705 2015-04-18 14:19:33 -03:00
2592f0da9f Merge branch 'master' of https://github.com/okamstudio/godot 2015-04-18 14:17:27 -03:00
be46be7801 -renamed function to get object from instance id
-added function to get list of tiles used
2015-04-18 14:00:15 -03:00
b56badf77b -Added android immersive mode, fixes #303 2015-04-17 16:18:46 -03:00
3b434eacde Fix clipping when used in viewport or inside another viewport, fixes #1661 2015-04-14 22:05:14 -03:00
e1bfbcfd42 Fix operator definition for AreaCMP 2015-04-14 16:46:52 +00:00
bad445066c Implement Area2D space_override_mode combine 2015-04-14 16:33:52 +00:00
28304bc330 -Changed the cubic interpolator, improves situation with PathFollow in #1659 2015-04-13 09:47:03 -03:00
2998515442 -Fix issue of scene import script path being broken on reimport, fixes #1668 2015-04-13 09:21:34 -03:00
8fa4f1cf82 -Made sure that "free" function appears in documentation and code completion, fixes #1664 2015-04-12 22:22:44 -03:00
ed5b939077 scene switcher demo changed to reflect tutorial, fixes #1673 2015-04-12 20:57:26 -03:00
e573d3a945 fixed broken lighting, closes #1671 2015-04-12 20:41:25 -03:00
61ab20a0bb fixed UV2 source in shader graph, closes #1633 2015-04-12 19:36:35 -03:00
f9906eeac8 -Fixed screen capture for viewports, added a screen capture demo, fixes #1529 2015-04-12 18:58:05 -03:00
3e20391bf6 -Changed bootsplash option to use a file, fixes #1539
-Added OS.get_splash_tick_msec() to query when splash appeared
2015-04-12 17:55:01 -03:00
2dfa1279ea improved save path error messages for scene, textures and audio, fixes #1514 2015-04-12 16:45:59 -03:00
87c51b6fc0 Modified OSX11 to try alternative audio drivers if pulseaudio does not work or user dislikes lennart potering , fixes #1511 2015-04-12 16:11:26 -03:00
ab6eaa3de4 renamed scrts to scripts, fixes #1525 2015-04-12 15:40:08 -03:00
562bc22dd4 Now the script editor highlight all lines of a multiline string 2015-04-09 18:24:38 -03:00
5cb4ba24d3 Fix toolbar menu position(RichText and MultiMesh plugins) 2015-04-09 09:48:46 -03:00
3fddc9e55a fixed navigation tile issue, fixes #1581 2015-04-09 01:18:01 -03:00
e7ba4eca9f -function remove_and_delete_child removed. Just use child.free() or child.queue_free() instead. Fixes #1603 2015-04-09 00:49:48 -03:00
b967bb73c2 Merge branch 'master' of https://github.com/okamstudio/godot 2015-04-09 00:31:07 -03:00
d148a03848 -Fixes bug in ShaderGraph material, when uniform property is not used, fixes #1634 and #1610 2015-04-09 00:29:21 -03:00
dd12bd406e Merge pull request #1654 from TheHX/fix_editor_dialog
Changed popup_centered by popup_centered_minsize in editor dialogs
2015-04-08 20:34:06 -03:00
59692d9012 Changed popup_centered by popup_centered_minsize in editor dialogs 2015-04-08 14:02:13 -03:00
e18c6ef63b -Better Collada now keeps mesh names properly from blender, makes the "overwrite existing, keep materials" import mode work properly. 2015-04-08 01:46:55 -03:00
b016f3898b fixed re-import of scene when new nodes are added, fixes #1620 2015-04-08 01:11:50 -03:00
3b35bcc955 -fix resolver erase query to avoid running out of slots, fixes #1621 2015-04-07 22:45:33 -03:00
54ed432913 fix crash when deleting shader from material, fixes #1631 2015-04-07 22:30:36 -03:00
7852be816a fixed shader graph length node, fixes #1632 2015-04-07 22:22:46 -03:00
6227058098 added assert to disassembly, fixes #1641 2015-04-07 21:48:03 -03:00
963845eea9 Merge branch 'master' of https://github.com/okamstudio/godot 2015-04-07 21:21:06 -03:00
22997294fa -Concatenating arrays keeps the shared property if any of the arrays is shared. Fixes #1646 2015-04-07 21:18:46 -03:00
ef222aea89 Merge pull request #836 from adolson/new-default-project-icon
new default project icon
2015-04-07 20:25:33 -03:00
b135cdbf05 Merge pull request #1531 from vkbsb/h5_canvas_polygon_fix
H5 canvas polygon fix
2015-04-07 20:22:58 -03:00
e336306e91 Merge pull request #1554 from NateWardawg/inspectorupdate
Camel casing being capitalized only happens in the inspector now.
2015-04-07 20:22:09 -03:00
219fce737c Merge pull request #1564 from Faless/area_combine-1
Implement combine mode for area
2015-04-07 20:21:11 -03:00
8619cb64ba Merge pull request #1567 from sanikoyes/Pr-GDScript-seed-get-inst
Pr-GDScript-seed-get-inst
2015-04-07 20:19:07 -03:00
b989498004 Merge pull request #1568 from sanikoyes/Pr-missing-WM_RBUTTONDBLCLK
Pr-missing-WM_RBUTTONDBLCLK
2015-04-07 20:17:32 -03:00
d1567636f4 Merge pull request #1569 from sanikoyes/Pr-sort-sample-library
Pr-sort-sample-library
2015-04-07 20:17:16 -03:00
b307ee79a1 Merge pull request #1574 from UsernameIsAReservedWord/fix_3d_spot_attenuation
fixes_3d_spot_attenuation
2015-04-07 20:16:00 -03:00
5ed2600279 Merge pull request #1580 from UsernameIsAReservedWord/fixes_help_background_color_theme
fixes #332 : makes EditorHelp uses EditorSettings bg color
2015-04-07 20:15:06 -03:00
7b75658bb2 Merge pull request #1585 from UsernameIsAReservedWord/add_is_queued_for_deletion_in_objects
add : bool Object.is_queued_for_deletion()
2015-04-07 20:14:51 -03:00
b1bf4fcef2 Merge pull request #1591 from MostafaHassan/pr_FixCrashInVisualShader
(Fix crash) in visual shader for curve remap node
2015-04-07 20:14:10 -03:00
8f07919a5f Merge pull request #1597 from UsernameIsAReservedWord/add_scons_custom_extra_suffix
add scons extra suffix option
2015-04-07 20:12:58 -03:00
9c1fef866f Merge pull request #1602 from TheHX/fix_issue_#1594
Fix Issue #1594
2015-04-07 20:12:39 -03:00
49ca7b5f12 Merge pull request #1609 from TheoXD/_fix_crash_in_viewport_picking
Fixed crash in viewport object picking.
2015-04-07 20:12:19 -03:00
7978245784 Merge pull request #1614 from hurikhan/pr_parameter_names
wm api -- set screen parameter names for gdscript
2015-04-07 20:11:53 -03:00
b60d41bb5d Merge pull request #1627 from Martho42/patch-1
Fixes issue #1604 (accelerometer malfunctioning on some devices)
2015-04-07 20:11:35 -03:00
888dfcb02e Merge pull request #1639 from UsernameIsAReservedWord/fix_printraw
PR : fixes printraw to make it actually print raw
2015-04-07 20:09:42 -03:00
b36e41cb71 Added a PVRTC encoder for iOS 2015-04-06 21:48:20 -03:00
fcbf473d0d fix printraw to make it actually print raw 2015-04-06 13:57:31 +02:00
7a2698bb44 Fixes the accelerometer
Resolves the issue of the accelerometer behaving differently across devices with landscape as default and devices with portrait as default.
2015-04-04 17:03:56 -07:00
af368b7e1a set screen parameter names for gdscript 2015-04-03 15:00:55 -04:00
5d99e15e43 fix shadow issue with lights in mix mode, i think fixes #1611 2015-04-03 14:36:10 -03:00
f77349a4c2 Better fix 2015-04-03 10:28:30 -03:00
68c2a959dd Bullet shower demo crashed because of dynamic casting in the code for object picking. Making sure the object has an ID greater than 0 before typecasting solves it. 2015-04-03 14:42:05 +02:00
9fa1698c74 Changes to Light
-=-=-=-=-=-=-=-=

-Changed material unshaded property for an enum, which supports light-only shading
-Added a "Mix" shading mode, useful for using lights as masks
-Added energy parameter to Light2D
2015-04-03 01:43:37 -03:00
aa929bc1f1 fix_issue_#1594 2015-04-02 15:32:37 -03:00
42d41a3fbc wrong function, changing.. 2015-04-02 15:03:14 -03:00
8ea7e3e2b1 javascript build fix 2015-04-02 14:54:36 -03:00
68e42f53ba Beta1 Attempt #1
-=-==-=-=-=-=-=-

-Small fixes in canvas item light shader
-Fixed compilation in server target
-Export for Android makes 32 bits display as default
-changed version to 1.1beta1
2015-04-02 12:59:23 -03:00
1572238adb merging okam changes 2015-04-02 07:22:17 -03:00
ebd743f7c2 Merge branch 'master' of https://github.com/okamstudio/godot 2015-04-02 01:35:12 -03:00
7c1d516c01 fullscreen thing 2015-04-02 01:32:02 -03:00
ed2a24ef21 solved color depth issues on osx 2015-04-01 12:39:54 -03:00
76c2b9d812 fix shadow attenuation 2015-04-01 12:23:13 -03:00
7ea3482c38 add scons extra suffix option
makes it possible to add a custom extra suffix to the base filename of
all generated binary files.

example :
scons p=windows extra_suffix=yourBranchName
or
scons p=windows bits=32 extra_suffix=v20150401_1642
or
scons p=windows extra_suffix=msvc2010_git20150401
2015-04-01 17:04:41 +02:00
3920c497b3 Option in Android export to use 32 bits buffer. 2015-03-31 19:02:40 -03:00
33f24df786 Merge branch 'master' of https://github.com/okamstudio/godot 2015-03-31 17:57:43 -03:00
7fc4059b13 read depth fixes 2015-03-31 17:57:16 -03:00
78d734873d Fixed crash when trying to add keypoints and deleting them while holding mouse button down. 2015-03-31 22:49:11 +02:00
ec1aea5b3b Merge branch 'pr_PreventScriptFromExtendingItself' 2015-03-31 21:59:39 +02:00
73ff3ac218 (Fix) script will not be able to extend itself 2015-03-31 21:34:50 +02:00
4883e2e887 Merge pull request #1589 from MostafaHassan/pr_NoSelection_AddNodeToRoot
New node will be added to root node if nothing is selected
2015-03-31 15:38:50 -03:00
3d4cc27bad New node will be added to root node if nothing is selected 2015-03-31 20:26:38 +02:00
ad634876b5 fixes for light2d in androids that do not support
read depth
2015-03-31 14:59:28 -03:00
9cca88eb92 Update object.h 2015-03-28 18:42:01 +01:00
3c67e22c3d add : bool Object.is_queued_for_deletion()
`object.is_queued_for_deletion()` return true if the object was
`object.queue_free()` or `SceneTree.queue_delete(object)`.
2015-03-28 18:34:28 +01:00
303ce0ea32 makes_editorhelp_uses_editor_settings_bg_color
This fixes issue #332 by using the "text_editor/background_color" editor
setting as background color for the EditorHelp.
2015-03-26 15:45:53 +01:00
7f8a0cddcf fixes to shader to get most new demos working on mobile 2015-03-25 22:56:35 -03:00
103ab3bd1a fixes_3d_spot_attenuation 2015-03-25 16:27:55 +01:00
97f34a1dd6 Add seed/get_inst function for GDScript
seed -> Math::seed
get_inst -> ObjectDB::get_instance
2015-03-25 11:01:12 +08:00
042ead0e5d add missing WM_RBUTTONDBLCLK message 2015-03-25 10:58:22 +08:00
1515de217e Sort sample lists by name(more readable) 2015-03-25 10:57:35 +08:00
cbad0440ab 2D normal mapping and lighting simple demos 2015-03-24 16:17:49 -03:00
600bae34bd Re-sort Area array during integration step 2015-03-24 18:46:26 +00:00
18a1403fcf Implement combine mode for area 2015-03-24 18:46:26 +00:00
4b3b5eba86 Use Vector for storing areas 2015-03-24 18:46:26 +00:00
ba194115bc Merge pull request #1565 from romulox-x/osx_wm_fix
fixed build error on OSX from new WM code
2015-03-24 09:49:03 -03:00
a6f6bd85f9 fixed build error on OSX from new WM code 2015-03-23 22:07:03 -07:00
f35315fee2 Merge pull request #1563 from romulox-x/ios_wm_fixes
fixed iphone build with new window management changes
2015-03-23 23:09:03 -03:00
e3957e32de fixed iphone build with new window manamenet changes 2015-03-23 18:55:45 -07:00
3cf9490c46 window managements functions work
but still side-functions, all API needs to be migrated to them
2015-03-23 20:47:53 -03:00
0245d4a2b0 oops, fucntion was there twice 2015-03-23 16:12:59 -03:00
8db3922f56 small android fix 2015-03-23 14:15:11 -03:00
92905075d3 crash bug solved, fixes #1560 2015-03-23 13:44:03 -03:00
7ad7f2f6a9 android fixes, please test
(can' t build android atm)
2015-03-23 11:31:23 -03:00
393e5605c9 Merge pull request #1367 from not-surt/snapping2
Better 2D Snapping
2015-03-23 11:02:45 -03:00
21eb3b2a83 Camel casing being capitalized only happens in the inspector now. 2015-03-23 00:08:07 -05:00
09e6e29d67 Merge branch 'master' into snapping2 2015-03-23 14:58:56 +10:00
a12c364489 Merge pull request #1549 from rollenrolm/new_api_x11_fixes
New API: build fixes for x11
2015-03-23 01:34:32 -03:00
a017686689 Merge pull request #1552 from hurikhan/wm_demo_fix
new_wm_api -- window_management-demo fix
2015-03-23 01:34:22 -03:00
001a16064f adjust the window_management demo to the new function names 2015-03-23 00:09:12 -04:00
ca0b3ce1f6 New API: build fixes for x11 2015-03-23 01:31:38 +01:00
b9bd83e178 Merge branch 'master' of https://github.com/not-surt/godot into snapping2 2015-03-23 08:31:54 +10:00
817f9debe7 Add iostream include to collada plugin and change to light occluder to use canvas item snap function. 2015-03-23 08:24:52 +10:00
fb2cdfe7ed Merge branch 'master' of https://github.com/not-surt/godot into snapping2
Conflicts:
	tools/editor/plugins/canvas_item_editor_plugin.cpp
	tools/editor/plugins/canvas_item_editor_plugin.h
2015-03-23 08:19:20 +10:00
c68563aeb4 Merge pull request #1542 from jotson/wmclass
Reverted change to classHint
2015-03-22 19:18:44 -03:00
95c18c2fad Merge pull request #1545 from okamstudio/revert-1401-inspectorupdate
Revert "Camelcased script variables will now capitalize in the inspector...
2015-03-22 19:06:24 -03:00
0dcca688d2 Revert "Camelcased script variables will now capitalize in the inspector." 2015-03-22 19:06:13 -03:00
23e13ce3c2 fixes to new window management API
-needs testing on Linux
-needs testing on Windows
-NEED SOMEONE TO IMPLEMENT IT ON OSX!! PLEASE HELP!
2015-03-22 19:00:50 -03:00
182c86de3f Reverted change to classHint
Using `char wmclass[] = "Godot"` causes `xprop` to report the
following for WM_CLASS:

`WM_CLASS(STRING) = "\200\326\322\365\377\177", "\200\326\322\365\377\177"`

This makes the Unity window manager fail to connect the running app
with the icon on the launcher.
2015-03-22 14:05:24 -07:00
e9f94ce8d2 fix area center of gravity 2015-03-22 15:11:36 -03:00
15bee515e6 Merge pull request #1487 from hurikhan/x11-window-management
X11 window management
2015-03-22 15:10:50 -03:00
eefcf93e55 Merge pull request #1331 from fry-/master
Add 2D fog of war demo
2015-03-22 15:08:21 -03:00
c16276b414 Merge pull request #1378 from erbridge/settings_not_checkbox
Make View > Settings a non check item
2015-03-22 15:06:01 -03:00
f706e3e5d1 Merge pull request #1380 from ElectricSolstice/wparentheses_removal
Changed code to remove gcc -Wparentheses warnings.
2015-03-22 15:05:47 -03:00
0302ea5b82 Merge pull request #1396 from Spooner/fix_sprintf_errors
Fix sprintf errors
2015-03-22 15:03:32 -03:00
7436f0bb37 Merge pull request #1401 from NateWardawg/inspectorupdate
Camelcased script variables will now capitalize in the inspector.
2015-03-22 15:02:42 -03:00
ffa556aeea Merge pull request #1402 from ElectricSolstice/editor_match_fix
Fixed issue #1377 about script editor parenthesis matching.
2015-03-22 15:02:15 -03:00
da7698073f Merge pull request #1407 from NateWardawg/documentation
Updated the internal documention for the GDScript class.
2015-03-22 15:02:00 -03:00
f6e537b08f Merge pull request #1432 from UsernameIsAReservedWord/fixes_platform_windows_detect_py
Fixes platform/windows/detect.py
2015-03-22 15:01:27 -03:00
68c3e82f7a Merge pull request #1433 from cheece/patch-1
COLLADA load morph target normals
2015-03-22 15:01:01 -03:00
ca30c87019 Merge pull request #1438 from Spooner/fix_isometric_demo
Fix isometric demo
2015-03-22 14:59:58 -03:00
3aed92e5b1 Merge pull request #1450 from theuserbl/master
Making ToolButton and KEY_MASK_CMD accessable in GDScript and the IDE
2015-03-22 14:58:42 -03:00
c2d975582c Merge pull request #1446 from UsernameIsAReservedWord/fixes_kinematicbody_move_crash
should fixes #1284 (KinematicBody .move() crash)
2015-03-22 14:56:30 -03:00
6d813c81b8 Merge pull request #1460 from MarianoGnu/master
Create Checkbox class with support for Radio Buttons
2015-03-22 14:55:36 -03:00
a8f55d11d3 Merge pull request #1480 from theuserbl/patch-2
Changed *_scene() to *_tree() in the time-example
2015-03-22 14:54:06 -03:00
3a96937e93 Merge pull request #1512 from the-mech/master
[Fix] make_dir_recursive on Windows
2015-03-22 14:53:10 -03:00
4069dc7891 Merge pull request #1521 from codx/master
Fix for InputEvent::set_as_action
2015-03-22 14:48:54 -03:00
47efcff8bb Merge pull request #1535 from rollenrolm/hidden_files
New option to show/hide hidden files
2015-03-22 14:46:09 -03:00
1aaaee99e9 Merge pull request #1537 from rollenrolm/issue_#931
Fix issue #931: display current view name into editor's 3d scene viewpor...
2015-03-22 14:44:29 -03:00
230739c762 Merge pull request #1538 from rollenrolm/issue_#1484
Fix for Issue #1484: Don't strip whitespace on line comment
2015-03-22 14:42:53 -03:00
8c91dadff7 minor comments 2015-03-22 13:01:34 -03:00
1e4841dc52 drag & drop demo (GUI) 2015-03-22 12:52:47 -03:00
78694d8542 gui in 3D demo now uses area for input 2015-03-22 11:52:07 -03:00
92ab362afa avoid function naming conflict on light scale 2015-03-22 10:39:32 -03:00
a93e33f5c8 added spatial and node2d helper methods
to perform operations such as translaiton, rotation, etc directly on
nodes.
2015-03-22 10:33:58 -03:00
dac2017dee fixes/cleans up
-input now correctly works when using viewport scaling
-added function to get areas/bodies in given point
-added function to get space state directly from world
2015-03-22 09:40:26 -03:00
cde55bee91 Fix for Issue #1484: Don't strip whitespace on line comment 2015-03-22 10:25:18 +01:00
c6c72a3c37 input events on Area2D is now supported
also added a demo showing how this works
2015-03-22 01:46:18 -03:00
4d30bb7241 Fix issue #931: display current view name into editor's 3d scene viewports 2015-03-21 21:47:21 +01:00
db0a71fc58 New option to show/hide hidden files 2015-03-21 18:33:32 +01:00
4fa71a6ee0 Removing Print statement effects perf. 2015-03-21 22:25:48 +05:30
40496dd76a signed distance field fonts demo 2015-03-21 10:15:30 -03:00
372fa5277c Fix for canvas_draw_polygon on webgl. 2015-03-21 10:12:25 +05:30
acc6f3b285 signed distance field font support 2015-03-21 00:43:33 -03:00
beab10ab9b Revert "Revert "Missed some things in prev commit.""
This reverts commit 2e59788aa9.
2015-03-20 11:48:21 +05:30
eb3c88b3dd Revert "Revert "Removing etc1 from build for javascript platform.""
This reverts commit 9965e93f7e.
2015-03-20 11:47:56 +05:30
2e59788aa9 Revert "Missed some things in prev commit."
This reverts commit d3280f91a1.
2015-03-20 11:12:59 +05:30
9965e93f7e Revert "Removing etc1 from build for javascript platform."
This reverts commit 41b729ccff.
2015-03-20 11:12:13 +05:30
d3280f91a1 Missed some things in prev commit. 2015-03-20 11:06:28 +05:30
41b729ccff Removing etc1 from build for javascript platform.
Based on inputs from reduz
1) Made etc1 optional driver and default yes.
2) Reverted the hack in rg_etc1.cpp
3) Disabled etc1 for javascript plaform.
2015-03-20 10:18:13 +05:30
90a84b4ddb wip distance field font import
font import may not work if using distance field, this is WIP
2015-03-20 00:26:01 -03:00
72895ddecf Replacing spaces with tabs 2015-03-20 07:47:06 +05:30
743b3157bc Fix for newer gcc. Picked from GoogleCode 2015-03-19 10:35:24 +05:30
1d45cd0ff1 Fix Javascript build. 2015-03-19 10:31:36 +05:30
9dd0d8277d add overlap test function, remove a semicolon 2015-03-18 21:03:11 -03:00
4cac1e0cb6 add functions to test overlap with another body or area 2015-03-17 09:25:35 -03:00
a969e2e6f1 Area2D can now detect overlap with other areas
this should make everything simpler, specially for newcomers to Godot
2015-03-17 00:45:25 -03:00
53e1694e1e New option to send canvas to render buffer
allows to use 3D environment effects for post processing such as Glow,
Bloom, HDR, etc. in 2D.
2015-03-16 01:14:59 -03:00
2d4cad7057 Fix for InputEvent::set_as_action 2015-03-15 23:17:48 -03:00
5b54361daf Merge pull request #1518 from argylelabcoat/patch-1
Update file_access_windows.cpp for mingw cross-compile
2015-03-15 11:56:38 -03:00
1200689245 Update file_access_windows.cpp for mingw cross-compile
Cross compiling on linux failed on this file. Changing case of the windows.h and shlwapi.h allows mingw to find these headers but setting WINVER 0x0500 is needed for the compiler to find ReplaceFileW
2015-03-15 09:43:13 -05:00
e646fc5b5d [Fix] make_dir_recursive on Windows
function normally tries to create c: which isn't possible, because the access is denied, handling ERROR_ACCESS_DENIED as ERR_ALREADY_EXISTS lets the function skip the creation of c: .
2015-03-14 12:35:18 +01:00
51b8102f14 Merge pull request #1510 from sanikoyes/Pr-fix-particles2d-bind
Pr-fix-particles2d-bind
2015-03-13 23:46:30 -03:00
7cdd3c86c4 Add missing particles_2d macro bind 2015-03-14 10:40:58 +08:00
0d3b2ea1fd Merge pull request #1504 from marynate/PR-fix-backbuffer-compile
Fix compile error in back_buffer_copy.h
2015-03-12 08:27:21 -03:00
86eedaec21 Fix compile error in back_buffer_copy.h 2015-03-12 14:23:36 +08:00
650e13f3cd back buffer copy node, to improve on texscreen()
back buffer copy node and respective demo
2015-03-12 01:05:50 -03:00
9f88a40e9f simple shader effects library for 2D
ready to use in any project
2015-03-11 01:44:52 -03:00
a6f96f46b7 small optimizations to isometric light demo
should work faster, and even faster if exported.. as textures have been
optimized.
2015-03-10 21:05:49 -03:00
57380f9aba increase minimum range in property editor a bit 2015-03-10 09:53:22 -03:00
91744e9ed3 New Demo, Screen Space Shaders
-Fixes to screen space shaders.
-Fixes to isometric light demo.
2015-03-10 00:53:50 -03:00
3fc9017fbb Merge pull request #1491 from marynate/PR-fix-tilemap-compile
Fix compie error in TileMap::_fix_cell_transform(...)
2015-03-09 10:00:40 -03:00
7957709cb1 Fix compie error in TileMap::_fix_cell_transform(...) 2015-03-09 16:28:08 +08:00
09489e3a78 lot of work on 2D lighting and isometric maps
added a new demo, isometric_light that does full isometric sorting,
lights, shadows, etc.
2015-03-09 02:34:56 -03:00
f7621810a2 removed up, down, left, right keys from the demo.
were used before for fast multiscreen setup testing.
2015-03-08 09:26:58 -05:00
0bc7eb1d91 Fix C++11 compilation 2015-03-08 10:39:27 -03:00
52a4e8495c fix introduced bug 2015-03-08 04:24:21 -05:00
5241626dee fixing a typo in the demo 2015-03-08 03:32:13 -05:00
ba74e45027 added Label_MouseGrab_KeyInfo 2015-03-08 01:27:36 -06:00
87be945d49 Merge remote-tracking branch 'upstream/master' into x11-window-management 2015-03-08 15:10:48 +08:00
31e6c6ca8f Changed *_scene() to *_tree()
Changed _enter_scene and _exit_scene() to _enter_tree() and _exit_tree() in the time-example, because the *_scene no longer work.
2015-03-05 23:05:30 +01:00
2c2894ceb6 Merge branch 'master' of https://github.com/okamstudio/godot
Conflicts:
	modules/gdscript/gd_tokenizer.cpp
	scene/resources/shader_graph.h
2015-03-03 14:41:36 -03:00
4d2198110b merges from okam repo 2015-03-03 14:39:13 -03:00
63006f6f6f Register CheckBox class to create it using editor. 2015-03-02 22:12:51 -03:00
a0ee5cc353 time was not being set properly with the rest of the uniforms. 2015-03-02 19:21:46 -03:00
440cc5e4b6 Merge pull request #1437 from Hinsbart/fix_win_joy
fix get joystick name from registry on some systems
2015-03-02 01:00:56 -03:00
a1f715a4da support for 2D shadow casters
Added support for 2D shadow casters.

*DANGER* Shaders in CanvasItem CHANGED, if you are using shader in a
CanvasItem and pull this, you will lose them. Shaders now work through a
2D material system similar to 3D. If you don't want to lose the 2D
shader code, save the shader as a .shd, then create a material in
CanvasItem and re-assign the shader.
2015-03-02 00:54:43 -03:00
0e732637d0 Merge pull request #1459 from romulox-x/blend_with_transparent_background
changed the blending function when using a transparent render target so ...
2015-03-01 20:52:20 -03:00
320700fc92 changed the blending function when using a transparent render target so that it blends properly 2015-03-01 15:44:02 -08:00
e15157f289 Merge pull request #1414 from romulox-x/viewport_clear_alpha
changed viewport clearing to use the alpha value of the clear color, and...
2015-03-01 18:58:50 -03:00
205ed6c9f5 Improve mechanism and fix radio icon rendering. 2015-03-01 16:45:13 -03:00
e8e9f100e5 Add CheckBox control with theme edition and radio icon avaible. 2015-03-01 11:23:05 -03:00
e2c0caf41e Update global_constants.cpp
Making KEY_MASK_CMD usable in GDScript
2015-02-27 11:19:55 +01:00
525f2fe995 Update register_scene_types.cpp
Makes ToolButton usable for GDScript
2015-02-27 11:09:57 +01:00
69cf996ce6 should fixes #1284
I could reproduce the crash described in #1284 only with 32bits versions of godot.

The test scene contains a Plane collision shape, and a kinematicsbody with a Sphere collision shape.
 
The crash occurs into `CollisionSolverSW::solve_distance_plane()` on line 299 when `p_shape_A` is a `PlaneShapeSW` object and when `p_shape_B` is a `MotionShapeSW` object, because `int support_count;` is not initialized by default, and because `MotionShapeSW::get_supports()` does not change `support_count` once passed as referenced parameter, and if the default value of `support_count` is greater than the length of `supports[16]`.

I don't know if it is the good way to fix it because i'm not skilled ennough with the physics server inner working, but this fix prevents the crash and the test-scene seems to work correctly.
2015-02-26 19:27:32 +01:00
e7024259e1 Fixed columns to have integer positions, so that they don't "jiggle" when moving the camera. 2015-02-25 17:24:32 +00:00
9229d9d1bb fix get joystick name from registry on some systems 2015-02-25 16:33:08 +01:00
1444946006 COLLADA load normals from morph target
if the file has normals use them!
2015-02-24 20:13:21 -04:30
b3976ec14c Update detect.py 2015-02-24 22:38:49 +01:00
fde7f11a55 Update detect.py 2015-02-24 22:31:18 +01:00
84905809a1 fixes platform/windows/detect.py
- fixes issue #1298 : under windows, too long `ar` command lines are split into several smaller command lines.
- fixes issue #1285 : under linux, cross compiling with Mingw-w64 now generates actual 64bits EXE.
- `MINGW32_PREFIX` and `MINGW64_PREFIX` environment variables are also available for Windows.
- started to clean-up the remains of previous hacks and workarounds.
- added some documentation into the script.
2015-02-24 22:28:51 +01:00
c85b2e3fb3 Merge branch 'master' of https://github.com/okamstudio/godot 2015-02-22 14:08:59 +00:00
2ac767b1f5 changed viewport clearing to use the alpha value of the clear color, and made the transparent bg option of viewport force a clear color of 0,0,0,0 2015-02-21 13:57:12 -08:00
41686d5fdd Merge branch 'master' of https://github.com/okamstudio/godot into snapping2 2015-02-22 07:38:06 +10:00
1d7337ba10 Merge pull request #1369 from not-surt/tile_rotation
Tile Rotation
2015-02-21 15:37:02 -03:00
57183a7783 Merge pull request #1410 from romulox-x/viewport_clear
added option to disable automatic clearing of viewport render buffer
2015-02-21 10:41:53 -03:00
f4312a5076 added option to disable automatic clearing of viewport render buffer 2015-02-21 01:35:06 -08:00
bfad392387 Updated the variable in the lerp function to be weight instead of percent. 2015-02-20 16:28:48 -05:00
071b2ea4f2 Updated the internal documention for the GDScript class. 2015-02-20 13:05:21 -05:00
402db5bd79 Renamed "snap to offset" to "snap relative". Better conveys meaning. 2015-02-20 22:21:59 +10:00
8f5bf2a2ef Camelcased script variables will now capitalize in the inspector. 2015-02-19 19:35:04 -05:00
11a5949ec4 Fixed issue 1377 about script editor parenthesis matching. 2015-02-19 16:34:04 -08:00
31e076d16a Merge branch 'master' of https://github.com/okamstudio/godot 2015-02-19 18:13:15 -03:00
daeac73c54 restored @ for nodepaths/stringnames 2015-02-19 18:12:45 -03:00
15d97c1e08 Merge pull request #1398 from NateWardawg/rewording
Changed the tooltip message for instancing a scene.
2015-02-19 14:29:38 -03:00
748311ec42 Added info about operator after bespoke error message. 2015-02-19 16:59:37 +00:00
c6a87d3a50 Changed the tooltip message for instancing a scene.
- Old wording was misleading as it gave the impression that you could select any node from another scene.
- New wording matches the functionality that you instance the entire scene as a single node.
2015-02-19 11:15:13 -05:00
db2381de7a Correctly halt on error in sprintf parsing (fixes #1393) 2015-02-19 15:45:49 +00:00
e3bf8ab02d Merge branch 'master' of https://github.com/okamstudio/godot into fix_sprintf_errors 2015-02-19 14:55:21 +00:00
3fdf3d8eab -fix compilation of godot server 2015-02-19 11:54:03 -03:00
6353734bfb Merge branch 'master' of https://github.com/okamstudio/godot 2015-02-19 13:29:44 +00:00
cf75bf842d -improved pathfinding accuracy
(i hope?)
2015-02-19 00:27:02 -03:00
3241b0181e Merge branch 'master' of https://github.com/okamstudio/godot 2015-02-19 02:00:50 +00:00
5ef3f7392f support for light and normal mapping in 2D 2015-02-18 19:40:02 -03:00
33ed0efeef Merge branch 'master' of https://github.com/okamstudio/godot 2015-02-18 13:53:40 +00:00
c0efa3fb5b Merge branch 'master' into wparentheses_removal 2015-02-17 23:10:56 -08:00
63165d80d5 Merge pull request #1389 from greay/osx_build
fix a small build error on OS X
2015-02-18 00:51:28 -03:00
ef565b9778 fix for “no viable conversion from 'NSPoint' (aka '_NSPoint') to 'CGPoint'” build error on OS X 2015-02-17 19:19:29 -08:00
335cd90441 Merge branch 'master' of https://github.com/okamstudio/godot 2015-02-18 01:07:33 +00:00
0e1f34b49d Changed code to remove gcc -Wparentheses warnings. 2015-02-16 18:58:41 -08:00
56402900ff View > Settings isn't a check item. 2015-02-17 02:51:17 +00:00
fba2d121b4 Corrected behaviour of File.READ_WRITE mode (fixes #378) 2015-02-16 20:59:16 +00:00
2bea642583 -Some more work on 2D Lights (NOT FUNCTIONAL YET!) 2015-02-16 14:45:11 -03:00
b3dc4f8550 Merge branch 'master' of https://github.com/okamstudio/godot into snapping2 2015-02-16 05:08:47 +10:00
0fa1153ea7 Merge branch 'master' of https://github.com/okamstudio/godot into tile_rotation 2015-02-16 05:07:13 +10:00
d7ea20c166 Merge pull request #1371 from erbridge/fix_shadow_declaration
Fix a shadow declaration
2015-02-15 16:03:18 -03:00
2478935f96 Fix a shadow declaration. 2015-02-15 18:09:11 +00:00
4333aa240c Godot UI is quick and snappy again!
Changed linked listed sort to use auxiliary memory
this fixes user interface performance issues.
2015-02-15 12:38:25 -03:00
2d4cec0cb6 fix return value of slide and reflect
closes #1311
2015-02-15 11:26:31 -03:00
f5d2e1f42c Renamed EXPERIMENTAL_WM_API to NEW_WM_API 2015-02-15 18:26:49 +08:00
ee81d4b359 Merge remote-tracking branch 'upstream/master' into x11-window-management 2015-02-15 17:49:34 +08:00
196185d0be Merge branch 'master' of https://github.com/okamstudio/godot
Conflicts:
	scene/2d/tile_map.cpp
2015-02-15 18:21:35 +10:00
e2c8aecb3d Better 2D Snapping
Consolidated duplicate snapping functions into CanvasItemEditor.
Allow non-square grids.
Add grid origin offsets.
Allow seperate toggling of grid display.
Add rotation snapping.
Add offset snapping.
2015-02-15 18:00:55 +10:00
2185c018f6 begin new serialization framework
also got rid of STL dependency on triangulator
2015-02-15 01:21:26 -03:00
7ebb224ec1 Merge pull request #1362 from not-surt/tile_map_body_mode
Added body mode property for TileMap as kinematic body
2015-02-14 19:25:35 -03:00
d2f86cc09b fixes to mouse warp
-can warp now from viewport and control, in their respective coordinate
systems
-warp is now local to the window on Windows and OSX.

IF YOU RUN OSX, PLEASE TEST THIS! And make sure it works!, new code is
in OS_OSX::warp_mouse_pos. I don't have OSX so i can't test!
2015-02-14 19:22:06 -03:00
a49802ae33 -resolved shader set parameter bug, closes #1361 2015-02-14 14:54:58 -03:00
c5f509f238 New Navigation & Pathfinding support for 2D
-Added Navigation & NavigationPolygon nodes
-Added corresponding visual editor
-New pathfinding algorithm is modern and fast!
-Similar API to 3D Pathfinding (more coherent)
2015-02-14 12:10:15 -03:00
8bb1e19d73 Replace body_mode property with use_kinematic flag.
Revert 2D Platformer demo's moving platforms to sprite plus body.
2015-02-14 06:43:50 +10:00
9d182e93a3 Added body mode property to TileMap to select between static and kinematic physics bodies. Kinematic allow use of TileMaps for moving platforms for example.
Updated 2D Platformer demo to use kinematic TileMaps for moving platforms, in doing so discovered that the tileset was messed up and not converting properly, so fixed that too.
And in order to fix the tileset I need to activate snapping for collision polygon vertices.
2015-02-13 20:49:21 +10:00
6a38ab1b43 Reorder tile transforms so transpose occurs before flips. Much more intuitive for flipping transposed tiles. 2015-02-13 10:56:53 +10:00
5c3c730bad Merge branch 'master' of https://github.com/okamstudio/godot 2015-02-13 06:26:53 +10:00
d0ea475405 Merge pull request #1359 from Hinsbart/fix_win_joy
fix get_joy_name() on windows
2015-02-12 16:04:03 +01:00
a13e180052 Merge remote-tracking branch 'upstream/master' into x11-window-management 2015-02-12 15:58:29 +01:00
df7d26ff5b cleanup + MouseGrab 2015-02-12 15:58:00 +01:00
97e46194f4 fix get_joy_name() on windows 2015-02-12 04:17:29 +01:00
9de87ef7e3 Merge branch 'master' of https://github.com/okamstudio/godot 2015-02-11 21:41:52 +10:00
c613fb121b Moved wrapper function to TileMapEditor. 2015-02-11 21:40:50 +10:00
b3a6cc097d Merge pull request #1356 from rraallvv/iOS_add_CADisplayLink_support
add support for CADisplayLink
2015-02-11 12:33:16 +01:00
573ae5dd92 Merge branch 'master' of https://github.com/okamstudio/godot
Conflicts:
	demos/2d/polygon_path_finder_demo/.fscache
2015-02-11 21:15:49 +10:00
9171f71ff5 Revert variant arg length to 5 and add 5 arg wrapper function for TileMap set_cell. 2015-02-11 21:11:14 +10:00
78a268c2eb fixes to HTTPClient
-small unchunked files should work properly
-blocking mode should work properly
2015-02-11 07:57:51 -03:00
b4e1c1d717 Merge pull request #1327 from romulox-x/polygonPathFinderClosestPoint
changed PolygonPathFinder::get_closest_point to return the closest posit...
2015-02-11 07:12:15 -03:00
7f88df73be Merge pull request #1346 from Nulifier/import-plugin
Added the ability to add and remove editor import plugins.
2015-02-11 07:07:59 -03:00
1d54c2dd1c added missing set_shader_param functions
also added code completion hint for shader params
2015-02-11 06:51:20 -03:00
d22b256f08 customizable content margin in styleboxes 2015-02-10 23:53:04 -03:00
d67e866788 add support for CADisplayLink 2015-02-10 22:10:10 -04:30
8678658875 remove make.bat 2015-02-10 19:19:11 -03:00
878e805665 ignore make.bat 2015-02-10 19:18:00 -03:00
e74982e55e fixes to skinned buffer
should avoid targets with large objects using morphs
also skinned buffer size is properly customizable on project settings.
2015-02-10 19:14:22 -03:00
84be16758e Added the default arguments to the binding for ResourceImportMetadata::add_source to match the c++ version 2015-02-10 14:23:49 -07:00
dfb94de041 Merge pull request #1352 from Hinsbart/master
fix typo in script template
2015-02-10 15:48:32 -03:00
cbade4daf6 fix typo in script template 2015-02-10 19:39:52 +01:00
6e54fa3d47 Added get_gui_base to the EditorNode class to allow for import plugins to create centered Popups.
This is the function used by all the built-in import plugins. Without this, the only alternative is to add it to the EditorNode itself which messes up auto-centering and sizing.
2015-02-10 11:17:48 -07:00
13dc6f53ca Added the ability to add and remove editor import plugins. 2015-02-09 23:36:16 -07:00
66d32b75b3 Merge pull request #1176 from Spooner/add_sprintf
Add sprintf
2015-02-09 22:21:43 -03:00
a34d27438c ability to customize max render elements
should close #1339
2015-02-09 22:18:44 -03:00
58d7678947 Merge branch 'master' of https://github.com/okamstudio/godot into add_sprintf
Conflicts:
	.gitignore
2015-02-10 00:42:28 +00:00
f53b27dca3 Merge pull request #1300 from umxprime/fix/ios-init-crash
Fix init crash on iPad 1st gen device with iOS 5.1.1
2015-02-09 21:38:43 -03:00
b1ec72a799 Merge pull request #1299 from umxprime/fix/isim-sdk-path
Fix iOS Simulator SDK path for isim platform.
2015-02-09 21:38:38 -03:00
3b4fd0f24d Merge pull request #1170 from UsernameIsAReservedWord/fix_cubemap_ressource_editor
fixes cubemap ressource editor bug, fixes issue #908
2015-02-09 21:37:01 -03:00
80d0117b83 Merge pull request #1174 from adolson/autoreload-edited-scripts
add option to automatically reload changed scripts
2015-02-09 21:35:52 -03:00
85edf05343 Merge pull request #1179 from marynate/PR-fix-compile-win
Fix compile compile error on windows platform
2015-02-09 21:32:42 -03:00
a1ff40100e Merge pull request #1243 from NateWardawg/ChangeRunSceneToRunProject
Changed the "Start the scene (F5)." tooltip to say "Play the project (F5)."
2015-02-09 21:32:20 -03:00
b3ab07ecd8 Merge pull request #1251 from adolson/fscache-stuff
ignore and remove .fscache files. closes #1249
2015-02-09 21:32:07 -03:00
3b3829e002 Merge pull request #1259 from laganojunior/feature/fix_modifier_key_unpress
Modifiers are unset on events for the modifier key itself
2015-02-09 21:31:39 -03:00
63a4faac3a Merge pull request #1271 from NateWardawg/NestedSceneFix
Pr - Fixed a bug where a user could add a cyclical dependency, causing a crash.
2015-02-09 21:24:58 -03:00
e7918ebbf2 Merge pull request #1281 from sanikoyes/Pr-fix-rtt-filters
Pr-fix-rtt-filters
2015-02-09 21:24:09 -03:00
d45a227e25 Merge pull request #1303 from erbridge/revert_menu_item
Add a revert menu item
2015-02-09 21:21:48 -03:00
31d0c65298 Merge pull request #1306 from sambler/freebsd_fixes
fix build on freebsd
2015-02-09 21:20:22 -03:00
a8c492fb07 Merge pull request #1307 from sambler/scons_changes
Adjustment to x11/detect.py
2015-02-09 21:18:25 -03:00
cf96855e3f Merge pull request #1325 from hrib/master
fixed math in Camera::project_position
2015-02-09 21:16:15 -03:00
f24fca70ab Merge pull request #1336 from slapin/exporter2
io_scene_dae: fixed invalid variable name
2015-02-09 21:09:17 -03:00
2c8cc632d2 io_scene_dae: fixed invalid variable name 2015-02-04 04:40:09 +03:00
afa13bf868 Forgot to update tile transform buttons when picking tiles. 2015-02-03 19:51:21 +10:00
c21227a636 added preview picture 2015-02-02 23:29:19 +01:00
2db55ef6fc added a demo for 2D fog of war 2015-02-02 23:08:57 +01:00
52700563bc Finish GUI for tile transform. 2015-02-02 22:28:10 +10:00
ee44664b2a Merge branch 'master' of https://github.com/okamstudio/godot 2015-02-02 21:34:47 +10:00
c5bf43f6eb Working TileMap tile transpose transform. 2015-02-02 21:27:48 +10:00
2c1a3dfed6 Merge branch 'master' of https://github.com/okamstudio/godot into add_sprintf 2015-02-01 20:29:11 +00:00
af7c8bdf23 Completed more complex formatting. 2015-02-01 20:18:38 +00:00
6306254d37 Completed implementing standard formatting. 2015-02-01 18:42:36 +00:00
8db3c0a4db changed PolygonPathFinder::get_closest_point to return the closest position inside, rather then the closest vertex 2015-02-01 09:23:31 -08:00
79e330c33e fixed math in Camera::project_position 2015-01-31 18:02:49 +01:00
8baa00a6e4 Adjust x11/detect.py
Test if clang is defined in CC/CXX/LD - this allows a specific version of clang to be defined
move appending -DTYPED_METHOD_BIND to keep clang options together
move sanitize option out of use_llvm test, gcc48+ also supports sanitize=address
2015-01-27 20:40:17 +10:30
73ca870c81 fix build on freebsd
Add some needed includes
Provide freebsd variation of get_executable_path
Provide variation of execv so that either full path
or appname to be found within $PATH can be used
2015-01-27 19:31:37 +10:30
5e1e78b257 Show a confirmation for the revert action. 2015-01-27 00:00:07 +00:00
ce488e1f93 Move the Revert Scene menu item to be less intrusive. 2015-01-26 23:51:13 +00:00
977b190a2d Add a revert menu item. 2015-01-25 00:14:06 +00:00
f9d63a7683 Fix init crash on iPad 1st gen device with iOS 5.1.1 2015-01-23 11:27:53 +01:00
f7b00960dd Fix iOS Simulator SDK path for isim platform. 2015-01-22 22:19:45 +01:00
f9489b7ff4 Merge remote-tracking branch 'upstream/master' into x11-window-management 2015-01-23 00:19:40 +09:00
67d357191f begin work on lighting system for 2D
nothing functional yet, just experimenting with API
2015-01-22 11:07:16 -03:00
03c453ac7d * Cleanup for PR
* Demo shows a Dialog with not implemented methods at startup
2015-01-22 05:35:39 +09:00
2204914abf * observer scene for the demo 2015-01-22 01:54:17 +09:00
94d94a0855 * fix compilation without scons experimental_wm_api=yes
* Extended the demo with an addional MouseGrab Test
2015-01-22 01:14:50 +09:00
6dd1a21fb7 Merge remote-tracking branch 'upstream/master' into x11-window-management 2015-01-22 00:12:53 +09:00
c6eabbbec5 fixed world vertex issues in canvas item shader 2015-01-21 00:57:37 -03:00
14ade5500f Fixed bug in 3D material
textures that failed to load should now load again properly
2015-01-20 23:58:47 -03:00
da0d4e4dea Fixes to texscreen, fixes to white testcube 2015-01-20 22:31:32 -03:00
11c1756257 Visual Shader Editing for 2D
Editing 2D shaders with visual editor seems to work now.
2015-01-20 20:36:25 -03:00
c5080e23b8 Merge remote-tracking branch 'upstream/master' into x11-window-management 2015-01-20 23:39:53 +09:00
0e8987abaf Fixed a bug where if a scene hadn't been saved it would find a cyclical dependency. 2015-01-20 09:05:22 -05:00
79af805710 Merge pull request #1280 from sanikoyes/Pr-InputEvent-Fix
Pr-InputEvent-Fix
2015-01-20 09:44:09 -03:00
75be78b370 Fix filter options not works in render target texture 2015-01-20 20:01:58 +08:00
317c496f5c Add InputEvent::ACTION get/set support for variant
Add action_press/action_release method bind
2015-01-20 20:01:02 +08:00
92cc7b840e Fixed a bug where a user could add a cyclical dependency, causing a crash. 2015-01-19 15:47:50 -05:00
a8b318871c Prep for tile transpose transform. 2015-01-19 23:07:25 +10:00
d878b3205a Merge remote-tracking branch 'upstream/master' into x11-window-management 2015-01-19 21:46:03 +09:00
a0511ed59a Color Ramp and Curve Map added to visual shader editing.
Added Color Ramp and Curve Map to shader nodes.
Fixed an issue that crashed Godot Editor right when opened.
2015-01-19 02:39:58 -03:00
e0c0aef615 Merge branch 'master' of https://github.com/okamstudio/godot 2015-01-18 09:52:10 -03:00
6f3c09047e -intentional breakage of shader graph to fix issues, existing graphs will be broken, sorry :( 2015-01-18 09:51:11 -03:00
a4f40ec3be Fix whitespace on previous commit
Choose tabs or spaces, not both!
2015-01-17 23:06:20 -08:00
fa62125e05 Modifiers are unset on events for the modifier key itself
This patch removes modifiers when processing key events for the
particular modifier key. For example, previously a Shift keypress
would register as a Shift + Shift modifier event.

This would cause issues when a modifier key as the action key in
the input map, because unpresses of the modifier key don't match as
matching inputs for that action. E.g. if Shift is used as an action,
the stored action event is Shift + Shift modifier (as indicated
in the editor as "Shift + Shift". The unpress event does not have the
Shift modifier set, so the event of unpressing Shift + no modifier
doesn't match the action which has the modifier set.

This patch removes the shift modifier on just pressing the Shift
key down, so the action event is registered as just Shift with
no modifier (as indicated in the editor as "Shift"), which matches
the unpress event.
2015-01-17 22:40:01 -08:00
eac0de398f ignore and remove .fscache files. closes #1249 2015-01-17 14:19:57 -05:00
5a4ef1c2cc fixes 2015-01-17 14:05:26 -05:00
2b22aba39e Merge pull request #1250 from marynate/PR-fix-mingw-win-build
Fix mingw windows build error
2015-01-17 15:41:25 -03:00
9f61a4881e Fix mingw windows build error 2015-01-18 02:08:26 +08:00
dfb5a1d5e1 * multi_screen testing + bugfixes
* ALT-TAB is working
* tested on Ubuntu 14.10 Unity + LXDE
* minor cleanup
2015-01-18 00:28:04 +09:00
dee27ce991 Merge remote-tracking branch 'upstream/master' into x11-window-management 2015-01-17 22:19:57 +09:00
91faf8e218 Merge pull request #1138 from sanikoyes/Pr-tween-call-deferred
Pr-tween-call-deferred
2015-01-17 09:58:57 -03:00
7a1307f96a Merge pull request #1172 from UsernameIsAReservedWord/fix_environment_ressource_interface_to_handle_cubemap_ressource
fix_environment_ressource_cubemap_support, complete PR #1170
2015-01-17 09:56:20 -03:00
cdf3c5b0eb Merge pull request #1181 from adolson/duplicate-node-naming-prefs
fix naming of duplicated nodes, closes #1161
2015-01-17 09:48:11 -03:00
7ac7956baf Merge pull request #1188 from hurikhan/scons_colored
Scons colored
2015-01-17 09:47:02 -03:00
938c6d0df3 Merge pull request #1204 from marynate/PR-new-default-theme
new default theme
2015-01-17 09:45:19 -03:00
8075512bc5 Merge pull request #1206 from ScyDev/feature/polygonpathfinder_demo
- how to use PolygonPathFinder from GD Script
2015-01-17 09:44:49 -03:00
cce0d50516 Merge pull request #1217 from sanikoyes/Pr-canvas-shader-disable-3d
Pr-canvas-shader-disable-3d
2015-01-17 09:44:22 -03:00
8df47f59d5 Merge pull request #1221 from wvdschel/patch-1
Cleaned up formatting in gd_compiler.h
2015-01-17 09:43:34 -03:00
07e63c3dc1 Merge pull request #1223 from NateWardawg/master
1: File path in save dialog automatically appended with correct extension if not manually added by the user.  2: Removed .bin as default extension for Linux exports as it causes problems for common file managers.
2015-01-17 09:43:00 -03:00
be7d8a182c Merge pull request #1225 from marynate/PR-script-editor-close-tab
Only show Close Tab confirmation when script has unsaved change
2015-01-17 09:42:06 -03:00
9ce885ccd8 Merge pull request #1227 from marynate/PR-editor-line-color
Add current_line_color editor setting for script and shader editor
2015-01-17 09:41:47 -03:00
bf4f439ae1 Merge pull request #1230 from ndee85/export_manager_additions
Export Manager Fixes
2015-01-17 09:41:24 -03:00
53b952f351 Merge pull request #1231 from quabug/commit
Fix bug in curve.cpp
2015-01-17 09:40:51 -03:00
06738f9286 Merge pull request #1244 from not-surt/master
Wrapped CellOp generation code in a function and added TileMap tile picking
2015-01-17 09:32:40 -03:00
f1dc00e380 * cleanup window state handling
* first attemps in handling ALT+TABa (WIP)
2015-01-17 19:43:12 +09:00
9bfb08830b Wrapped duplicated CellOp generation code in a function and added TileMap tile picking with Ctrl+LMB. 2015-01-17 16:48:21 +10:00
2fd9292b12 Changed the "Start the scene (F5)." tooltip to say "Play the project (F5)." 2015-01-16 23:17:12 -05:00
3e7d475b59 Merge pull request #1241 from the-mech/master
added nvidia optimus enablement Issue #1120
2015-01-16 23:02:13 -03:00
726d379775 added nvidia optimus enablement 2015-01-17 02:48:35 +01:00
6185949f6a Make it set_minimized() + set_maximized() work in both worlds: Unity and LXDE 2015-01-17 02:36:07 +09:00
716971655e added the following methods:
* set_minimized(bool)
 * bool is_minimized()
 * set_maximized(bool)
 * bool is_maximized()
2015-01-17 00:18:45 +09:00
cac555dc78 When overwriting a file with an auto added extension the file name is now set correctly. 2015-01-16 07:48:28 -05:00
341ea429db remove useless code 2015-01-16 15:16:58 +08:00
5823f90c53 fix bug
running into infinite loop if distance between two adjacent points in curve are too short.
2015-01-16 15:16:41 +08:00
f1b9953d0b fixing the warnings in os_x11.cpp 2015-01-16 14:44:41 +09:00
d42fa511a5 rearrange the demo 2015-01-16 13:49:46 +09:00
904770fb91 Export Manager Fixes
- fixed a bug where it could happen that objects did not get exported
- fixed some script errors
- added the feature to export particle dupliobjects. Now you can add objects with the particle system and get them directly exported.
2015-01-15 22:22:12 +01:00
c2ffdb05d4 Set the default Linux extension to nothing. 2015-01-15 13:00:33 -05:00
d269344bbd WIP -- set_resizable() + is_resizable added 2015-01-15 22:50:23 +09:00
d0055a751b Add current_line_color ediotr setting for script and shader editor 2015-01-15 16:59:07 +08:00
d2a0f86d9f Only show Close Tab confirmation when script has unsaved change;Update Close Tab message to emphasize the fact script will be saved when closing tab;Stop dumping 'applying code' message to console 2015-01-15 15:55:18 +08:00
7c430d52e9 Restore checkbutton margin to origin value, fixed issue in code search dialog 2015-01-15 13:30:00 +08:00
2ca8b2683e Minor code formatting 2015-01-15 13:30:00 +08:00
7f20b864cd Tweak Button margins & small fix for ToolButton 2015-01-15 13:29:59 +08:00
e7893b404e fix background alpha in dropdown arrows 2015-01-15 13:29:58 +08:00
5fc787abd8 Fixed the progressbar to only require 16px in height 2015-01-15 13:29:58 +08:00
6983cb80ea More desaturated icons 2015-01-15 13:29:57 +08:00
d8f453cb39 Missing files and Tab changes 2015-01-15 13:29:56 +08:00
df41418677 More Theme fixes
- some color tweaks
- many margin fixes
- overall nicer look

Conflicts:
	scene/resources/default_theme/default_theme.cpp
2015-01-15 13:29:56 +08:00
4b70bc1f35 Fix visual glitch in Progressbar 2015-01-15 13:29:55 +08:00
ae70108883 New iteration of the theme
- try to implement ndee's mockup from the forum
- new color palette
- get rid of most gradients

probably needs some more tweaks
2015-01-15 13:29:54 +08:00
7b9f5e65c9 New neutral default theme
- desaturated UI elements to grey
- desaturated all near-white icons to grey
- changed some hardcoded colors
2015-01-15 13:29:53 +08:00
7d2f359a0c File path in save dialog automatically appended with correct extension if not manually added by the user. 2015-01-14 18:05:57 -05:00
3d3b1937dd Cleaned up formating in gd_compiler.h 2015-01-14 16:37:24 +01:00
04af74596d -fix shader param names broken issue on code completion
-fix z order issue in new 2D engine
2015-01-14 09:05:33 -03:00
250188e1aa Merge pull request #1215 from Qwertie-/PR-GUI
Fixed typo in error message
2015-01-14 08:25:18 -03:00
07b8d9136a demo window set to resizeable (need a bugfix her) 2015-01-14 15:44:47 +08:00
b882836184 Fix canvas shader not registered when disabled_3d=yes 2015-01-14 14:49:54 +08:00
cc49c86516 Merge branch 'x11-window-management' of https://github.com/hurikhan/godot into x11-window-management 2015-01-14 14:41:56 +08:00
MSC
1576dc5215 Update README.md 2015-01-14 13:49:10 +08:00
8a30feebbe Merge remote-tracking branch 'upstream/master' into x11-window-management
Conflicts:
	platform/x11/detect.py
2015-01-14 13:31:16 +08:00
2203ba5fe3 don't start demo in fullscreen mode 2015-01-14 13:27:03 +08:00
7222e195e5 minor cleanup 2015-01-14 13:19:27 +08:00
790d8ecbb9 get_screen() + set_screen() added 2015-01-14 12:02:59 +08:00
b734c838db Fixed typo in message 2015-01-14 12:02:55 +10:30
9012cd408e -Add support for one-way collision in 2D (only works for kinematic body so far)
-Solve drawing order bug introduced in previous commit: solves #1214
2015-01-13 21:19:11 -03:00
a327eee762 Merge pull request #1210 from sanikoyes/Pr-shader-refract
Pr-shader-add-missing-function-refract
2015-01-13 13:49:18 -03:00
ffe53061cd Add missing shader function: refract 2015-01-14 00:28:18 +08:00
823d7ae3b5 Merge branch 'master' of https://github.com/okamstudio/godot 2015-01-13 11:23:05 -03:00
7c7ab30c4e fixes 2015-01-13 11:22:56 -03:00
869f400179 Merge branch 'master' of https://github.com/okamstudio/godot 2015-01-13 10:50:33 -03:00
2ef5a342e3 -begin work on unidirectional collision detection
-fixed performance issue in new 2D engine
-texscreen() working in shader 2D
2015-01-13 10:49:26 -03:00
aa242beb73 - how to use PolygonPathFinder from GD Script 2015-01-13 14:17:51 +01:00
f55c0e9285 Using Xinerama extension for getting screen info 2015-01-13 21:01:24 +08:00
ab0c79aaf1 Merge pull request #1203 from marynate/PR-fix-textedit-totalrows
Total rows of text edit was calculated wrong, fixed issue #842
2015-01-13 08:13:21 -03:00
ce7c7a862e get_screen_position() added 2015-01-13 17:25:50 +08:00
3a0f665c90 Total rows of text edit was calculated wrong, fixed issue #842 2015-01-13 17:16:56 +08:00
1445b6806b Merge branch 'master' into x11-window-management 2015-01-13 15:56:27 +08:00
c0d3632667 introduced the scons experimental_wm_api switch:
================================================

Usage:
    scons p=x11 experimental_wm_api=yes
2015-01-13 15:44:39 +08:00
928e068f71 -try fixing LLVM color diagnostic on osx 2015-01-13 12:54:23 +08:00
30d3658110 -fixed issue with shader not being reset on layers, closes #1199
-ability for shader to use parent shader and params, closes #1198
2015-01-12 20:44:02 -03:00
544ce2a1db -Initial working(?) implementation of shaders for 2D. Lighting still not there though.
Check for reference:
https://github.com/okamstudio/godot/wiki/shader
2015-01-12 10:19:09 -03:00
067a0d0e64 osx support for llvm coloring added 2015-01-12 14:04:25 +08:00
f9a4e6890b SCons: colored compilation 2015-01-12 12:54:17 +08:00
6b6c526048 Merge branch 'master' into x11-window-management 2015-01-12 11:30:19 +08:00
f3dc51fc69 2D shader progress 2015-01-11 20:52:42 -03:00
66afddb3e8 -Initial (untested) implementation of 2D shaders. Probably broken, will be fixed later.
-fixed issue of opacity not working
2015-01-11 11:43:31 -03:00
c464cd4460 Merge branch 'master' into x11-window-management 2015-01-11 22:22:30 +08:00
16cf16da7e Update README.md 2015-01-11 22:02:18 +08:00
107d2a373a Demo misc/window_management added 2015-01-11 20:30:57 +08:00
336d9ce5d7 Merge pull request #1184 from sketchyfun/master
Fixes #1160 - Path2D curve handle drag issue
2015-01-11 09:30:52 -03:00
fc4d6765f1 Fixes #1160
Fixed curve handles not taking current zoom level into consideration
when being dragged
2015-01-11 12:18:10 +00:00
f9d0de0d2a get_screen_size() added 2015-01-11 19:35:53 +08:00
3c8b047b11 get_screen_count() added 2015-01-11 18:52:42 +08:00
466e251abe get_window_size() + set_window_size() added 2015-01-11 17:36:56 +08:00
ac558c15ea get_window_position() + set_window_position() added 2015-01-11 15:47:27 +08:00
9bbc3f0c94 fix naming of duplicated nodes, closes #1161, adds separator character preferences 2015-01-11 00:08:32 -05:00
bb6daaa02e Fix compile compile error on windows platform 2015-01-11 11:05:45 +08:00
291d7992ce Merge branch 'master' into x11-fullscreen 2015-01-11 08:06:31 +08:00
7a41f8c604 Added basic sprintf functionality (e.g. "fish %d %s" % [12, Vector2(1, 2)]) 2015-01-10 20:44:20 +00:00
d6d85a23c9 Ignored more generated files. 2015-01-10 20:42:28 +00:00
d30f4e52f6 Merge branch 'master' of https://github.com/okamstudio/godot 2015-01-10 17:37:56 -03:00
8997084831 2D Rewrite Step [1]
-=-=-=-=-=-=-=-=-=-

-Moved drawing code to a single function that takes linked list (should make it easier to optimize in the future).
-Implemented Z ordering of 2D nodes. Node2D and those that inherit have a visibility/Z property that affects drawing order (besides the tree order)
-Removed OpenGL ES 1.x support. Good riddance!
2015-01-10 17:35:26 -03:00
6c4e1650fb add option to automatically reload changed scripts 2015-01-10 12:55:12 -05:00
a8e3c5c0b7 First attempt of restoring the window at the old position 2015-01-11 01:07:23 +08:00
75c3090e9f fix_environment_ressource_cubemap_support
this fix goes hands in hands with #1170.
Cubemap ressources can be loaded and created into an Environment
ressource.
2015-01-10 15:50:27 +01:00
5e3a4c13da fixes cubemap ressource editor bug
this fixes the cubemap ressource editor bug described in issue #908.

some other littles fixes will be required to allow the Environment
ressource to create and load Cubemap Ressources more easily
2015-01-10 15:11:44 +01:00
5d9de48d8d Make fullscreen-switching is working with LXDE/Openbox 2015-01-10 21:50:31 +08:00
f97582b5e9 Merge pull request #1166 from adolson/fix-texture-flag-bug
fix saving texture flags to *.png.flags file, closes #399
2015-01-10 07:47:00 -03:00
0d2ec19082 API change to set_fullscreen(enabled,screen) 2015-01-10 18:38:30 +08:00
cd90215cec Make GDScript-Function ( bool OS.is_fullscreen() ) work 2015-01-10 16:01:01 +08:00
97d290e466 x11-fullscreen support through GDScript( OS.set_fullscreen(bool) ) 2015-01-10 15:47:34 +08:00
88591af4ac fix saving texture flags to *.png.flags file, closes #399 2015-01-10 02:37:00 -05:00
0a6f409323 Merge pull request #1156 from marynate/PR-fix-compile-tools-no
Fix compile error when tools=no
2015-01-09 08:40:07 -03:00
bfd0d1448e Merge pull request #1159 from adolson/ndee-blender-exporter
Better Collada fixes & ndee's Blender Export Manager
2015-01-09 08:34:44 -03:00
66a2adbf4b mergable version of ndee's pull request 2015-01-09 01:36:38 -05:00
e2f5cf3ef0 Fix compile error when tools=no 2015-01-09 11:20:02 +08:00
0c2222188e Merge pull request #945 from adolson/color-contrasted-fix
avoid potential stack overflow by recursive function call
2015-01-08 21:59:39 -03:00
a6c2400b24 Merge pull request #946 from adolson/uint64-fix
wrong typedef - closes #270
2015-01-08 21:59:25 -03:00
fe63e6a0a8 Merge pull request #958 from adolson/bind-set_window_title
added GDScript binding for OS.set_window_title()
2015-01-08 21:58:43 -03:00
3b5fcebeb7 Merge pull request #1114 from rraallvv/vanilla
Fix issue #1113
2015-01-08 21:58:09 -03:00
2e33c4c02b Merge pull request #1129 from xodene/master
Some polishes to editor UI
2015-01-08 21:57:30 -03:00
8131891695 Merge pull request #1151 from rraallvv/master
OS X: Add keyboard layout detection and fix build
2015-01-08 21:56:28 -03:00
5b7b817c9b Merge branch 'fix_debug_process_exited_alert' 2015-01-08 09:33:40 -07:00
41b3a1fea3 Merge branch 'master' of https://github.com/okamstudio/godot 2015-01-08 09:30:13 -07:00
f1b9994cbc Fix process being debugged has exited pop up #1128 2015-01-08 09:14:56 -07:00
08cfad00dd Create the test string to detect kb layouts directly from the unicode chars 2015-01-08 10:31:10 -04:30
d046bd88ad OS X: Add keyboard layout detection and fix build 2015-01-08 02:56:27 -04:30
78f4b93703 Fixes to GraphEdit:
-Working area is bigger now, solves #1148
-Using Position now works, fixes #1141
-RGB ops now work, fixes #1139
-Missing bindings to GraphEdit and GraphNode added
-Shader Graph Editor Shows errors on cyclic links and missing connections
2015-01-08 00:41:34 -03:00
3f1dd9c57f -Fixed matrix and vec+scalar multiplication issues, fixes #1143 2015-01-07 20:29:05 -03:00
1659f82e7e -changed type of C component of vec interp, fixes #1144 2015-01-07 19:48:38 -03:00
5c5519e2c8 Merge remote-tracking branch 'upstream/master' 2015-01-07 10:23:00 -07:00
b260bfab63 Add call deferred support for Tween 2015-01-07 19:46:01 +08:00
978769cdf1 Merge branch 'master' of https://github.com/okamstudio/godot 2015-01-07 01:46:28 -03:00
7a0e4c822c -Visual Shader Editing Finished, PLEASE TEST! 2015-01-07 01:45:46 -03:00
5d86f845d7 fix little mistake that made the project run each save 2015-01-06 20:35:52 -07:00
cf616e5845 Prompt save dialog if running a unsaved scene. Solution for #966 2015-01-06 15:28:25 -07:00
d8c14af546 Fix invaild path error text in project manager when no path is entered 2015-01-06 11:46:47 -07:00
6b106b319b Merge pull request #1124 from UsernameIsAReservedWord/master
fixes CurveXD::interpolatef()
2015-01-06 12:35:31 -03:00
996d93f972 fixes CurveXD::interpolatef()
fixes Curve2D::interpolatef() and Curve3D::interpolatef() methods
2015-01-06 15:31:41 +01:00
bd03562076 -Resolved bug that made yield() not work in some situations, fixes #884 2015-01-06 00:39:35 -03:00
f75ae815d5 -CCD in 3D physics was not working (code was not even there!) re-added, fixes 1067 2015-01-05 23:00:35 -03:00
b51f645711 Changes to 2D physics engine
-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-Removed "density" property
-Added instead more flexible "angular damp" and "linear damp"
-Added ability to override angular and linear damp in rigidbody
-Added gravity scale option rigidbody

Test well and iron out bugs, when it works the same will be moved to 3D
2015-01-05 18:37:12 -03:00
1ff0d5c4e5 -attempt to be friendlier on non english keyboards 2015-01-04 22:39:21 -03:00
8c4dd8de39 -WIP to add proper key swapping according to keyboard layout
-fix with non working removal of collision exception in 3D physics
2015-01-04 21:16:40 -03:00
20142fed28 Remove compiler flag LIBYUV_NEON from iOS release build 2015-01-04 13:41:31 -04:30
bd184adfeb Fix issue #1113 2015-01-04 13:00:32 -04:30
a8bcb96ad4 -Fix shortcuts for OSX code completion, fixes #1111
-Fixed how translation fallbacks works, fixes #1011
2015-01-04 11:03:31 -03:00
f39473ae7a -Obscure bug in popups solved, fixes #1008 2015-01-03 23:27:11 -03:00
dc7ac86b79 -Completely removed EmptyControl (but added fallback), closes #1017 2015-01-03 17:24:16 -03:00
0e1d70f637 -removed empty control 2015-01-03 16:55:07 -03:00
ddf7457894 Merge branch 'master' of https://github.com/okamstudio/godot 2015-01-03 16:53:39 -03:00
fbdd925d9b -Work in progress visual shader editor *DOES NOT WORK YET* 2015-01-03 16:52:37 -03:00
507736690d removed print 2015-01-03 16:00:37 -03:00
167c1027be -fixed bug on focus capture, now respets line/text edit
-when playing animations, property editor is now refreshed properly, fixes #1046
2015-01-03 15:39:01 -03:00
ffd4b22e09 -add *.flags as a filter automatically when exporting, solves #1029 2015-01-03 13:10:00 -03:00
6b5b95bb4e -added new code completion guess locations, closes #1032
-moved commandline fix to mingw-only, should fix #1064
2015-01-03 13:03:13 -03:00
85c084c770 Merge branch 'master' of https://github.com/okamstudio/godot 2015-01-03 11:09:17 -03:00
cef3bd026f -fixed issue with denormals in half precission, closes #1073
-added h_offset and v_offset to 3D Camera, should allow to do the same as in #1102
2015-01-03 11:06:53 -03:00
eb1f978b1c Merge pull request #1101 from romulox-x/texturebutton_scale_2d
Changed texturebutton scale from float to Size2
2015-01-03 01:26:22 -03:00
c83a00c603 Changed texturebutton scale from float to Size2 2015-01-02 20:23:52 -08:00
60afd79a6e -added a check for setget while running the game , closes #1009
-fixed issues in tilemap editor (swap arrows not showing/hiding properly)
2015-01-03 00:57:02 -03:00
fa7a3ac0d3 removed deadcode 2015-01-03 00:25:21 -03:00
0df45672e7 -ability to scale and modulate texturebutton, closes #818
-fixed bug in ordering of modal subwindows, closes #1001
2015-01-03 00:23:14 -03:00
d722537154 -proper minimum size computation for TabContainer 2015-01-02 22:34:22 -03:00
7a5a4d135e Merge pull request #998 from sanikoyes/Pr-fix-gles2-canvas_draw_polygon
Fix RasterizerGLES2::canvas_draw_polygon can't work correct at some devi...
2015-01-02 18:07:49 -03:00
58a67a1e0f -fixed key insert from editor window (#976) 2015-01-02 17:31:43 -03:00
2144648a3d -fix assignment to vector types in script using integer indices crash (#978) 2015-01-02 15:53:02 -03:00
8a28af024e -fix TextEdit shift-click functionality past begin and end of selection (#1004) 2015-01-02 15:08:40 -03:00
fbfb87ec4f -accelerometer precission changed to "GAME" (#1015) 2015-01-02 14:34:57 -03:00
ed8e70243f -refresh play options in property when setting samplelibrary (#1016) 2015-01-02 14:32:05 -03:00
d88e192ae4 -fix readonly issues (#1018) 2015-01-02 14:27:21 -03:00
e0bcec4fb8 -make sure selected font is applied on load (#1050) 2015-01-02 13:38:31 -03:00
bbaddfa70f -fixed silly bug in trigger check (#1051) 2015-01-02 13:30:59 -03:00
aa36be3c9a -typo fixed in ImmediateGeometry (#1066) 2015-01-02 13:21:07 -03:00
28daf19744 -assignment of ord to string index made valid #1072 2015-01-02 13:17:46 -03:00
2e08e11120 -fixed signal in #1075 2015-01-02 13:08:28 -03:00
aeee764971 Merge branch 'master' of https://github.com/okamstudio/godot 2015-01-02 12:55:18 -03:00
0378e1109b -fixed NODE_OUT error in animtreeplayer #1078
-fixed randon button when editing menubutton #1079
2015-01-02 12:52:51 -03:00
bf0862907f Merge pull request #1048 from sanikoyes/Pr-reduce-android-build-size
Pr-reduce-android-build-size
2015-01-02 12:01:45 -03:00
dfa34a66cd Merge pull request #1064 from leezh/mingw-fixes
MinGW linker command too long
2015-01-02 11:59:57 -03:00
3d4cf87671 Merge pull request #1065 from marynate/PR-pause-mode-stop
Add Stop pause mode implementation
2015-01-02 11:58:01 -03:00
d34f1da861 Merge pull request #1068 from jaromirhribal/master
Blender/Maya zoom style.
2015-01-02 11:56:32 -03:00
cda249c6ad Merge pull request #1069 from tommy3/typo-fix
fixed a typo
2015-01-02 11:56:11 -03:00
ffe970daf6 Merge pull request #1074 from not-surt/master
Replace TileMapEditor floating tile palette with HSplitContainer.
2015-01-02 11:55:51 -03:00
bc492c0bca Merge pull request #1087 from adolson/connect-fix
change parameter name from ip to port
2015-01-02 11:54:10 -03:00
1714828b54 Merge pull request #1090 from Murii/patch-2
Fix for bug 1088
2015-01-02 11:50:47 -03:00
9ee218ac9b Fix for bug 1088 2015-01-02 13:31:25 +02:00
b0509bf8f0 change parameter name from ip to port 2015-01-01 22:22:24 -05:00
4faf47eb50 Replace TileMapEditor floating tile palette with HSplitContainer. 2014-12-29 08:37:25 +10:00
079f1b1642 fixed a typo 2014-12-28 14:34:37 +01:00
d128ec9263 added blender/maya like zoom style 2014-12-28 14:01:08 +01:00
645a038568 Fix for MinGW compilation 2014-12-27 16:42:37 +00:00
61fcca7111 Add Stop pause mode implementation 2014-12-28 00:29:12 +08:00
3108517406 Reduce android build size(-fvisibility=hidden)
Fix gridmap link error when disable_3d=Yes
2014-12-25 13:05:57 +08:00
530d717a67 -fix get_as_text (#1022 ) 2014-12-21 12:12:59 -03:00
78e7777cf5 Merge branch 'master' of https://github.com/okamstudio/godot
Conflicts:
	modules/gdscript/gd_editor.cpp

Improved code completion for InputEvent (shows members by type)
2014-12-21 11:46:28 -03:00
f7f197c409 -ability to set default textures in shader (needed for visual shader editing)
-work in progress new graph system (will replace current one)
-crash fix in s3m loader (out of bounds acess)
-fixed vbox overriding of separation (fixes empty line between section tabs)
2014-12-21 11:42:44 -03:00
e7c1137d92 Merge pull request #1014 from romulox-x/pathFinderBugs
fixed bugs in polygon_path_finder for finding nearest points
2014-12-20 21:39:46 -02:00
8ff61b4d0e fixed bugs in polygon_path_finder for finding nearest points 2014-12-20 15:28:08 -08:00
a36a774897 Fixes
-=-=-=

-Added missing quaternion constructor
-code completion fixes
-winrt fixes
2014-12-20 15:30:06 -03:00
9783f6fc96 Merge branch 'master' of https://github.com/okamstudio/godot 2014-12-20 12:32:32 -03:00
cf0a419efa WIP work on graph nodes and editing 2014-12-20 12:32:14 -03:00
7dbc19f32d Merge pull request #1000 from sanikoyes/Pr-tween-fix
Pr-tween-fix
2014-12-19 11:59:26 -02:00
f2417b7a59 Merge pull request #1002 from astillich/pulseaudio
PulseAudio backend
2014-12-19 10:57:08 -02:00
f2843209a5 Implemented PulseAudio backend and fixed audio driver selection on X11 2014-12-19 13:44:34 +01:00
64f77aa8f3 1.Change interpolate_callback:p_times_in_sec argument before p_callback argument(more readable)
2.NodePath replace to instance_ID(can control object doe's not in scene tree)
3.Change interpolate types from Node to Object, can control more types(etc script class object)
4.Add pending_update counter, avoid insert/remove interpolates-list while traversal it
2014-12-19 17:13:20 +08:00
0b7a5b8425 Fix RasterizerGLES2::canvas_draw_polygon can't work correct at some devices(like Sumsung Note2)
in some devices, gpu doe's not support uint(32bit) indies
2014-12-19 13:08:48 +08:00
04362defe7 Merge pull request #985 from adolson/toggle-comment-shortcut-fix
change shortcut for toggle-comment to Ctrl+K
2014-12-18 09:58:13 -02:00
35b0b3bc1d Merge pull request #986 from TheoXD/_tree_multiselect_move
Selected node(s) can now be moved up and down in scene tree dock.
2014-12-18 03:13:55 -02:00
36414e91c9 Merge pull request #987 from sanikoyes/Pr-crash-in-scrip-init
Fix crash when gd-script _init fail
2014-12-18 02:54:50 -02:00
b3d8a72be9 Small clean-up.. 2014-12-18 05:52:27 +01:00
4ccdbde845 Fix crash when gd-script _init fail 2014-12-18 12:50:47 +08:00
f27282e087 Restricted to same parent, seem to work better now. 2014-12-18 05:46:03 +01:00
9f5bbfc322 -improved completion options for InputEvent, shows all event types now 2014-12-18 00:56:33 -03:00
4bf86bdd43 Selected node(s) can now be moved up and down in scene tree dock. 2014-12-18 03:38:24 +01:00
1a6628f5a3 change shortcut for toggle-comment to Ctrl+K 2014-12-17 15:57:39 -05:00
bed3b7f092 Merge branch 'master' of https://github.com/okamstudio/godot 2014-12-17 10:51:45 -03:00
92f28a5028 oops, C++11 makes me screw up 2014-12-17 10:45:02 -03:00
0c3f14087c Merge pull request #984 from orbitcowboy/master
xml_parser: check array length index before accessing the array.
2014-12-17 10:18:08 -02:00
8347e008c2 -removed annoying pragma 2014-12-17 09:14:25 -03:00
c8b2a5f64a -added brace matching to go with the new code completion 2014-12-17 01:53:34 -03:00
fd4648c081 -fixed crash reported by n-pigeon 2014-12-16 23:46:55 -03:00
2dd302ff90 -fix compilation issue
-fix missing built-ins in completion
-fix parse error
2014-12-16 23:17:35 -03:00
d55f95e0d2 Merge branch 'master' of https://github.com/okamstudio/godot 2014-12-16 22:33:35 -03:00
bcf27feb98 New Code Completion
-=-=-=-=-=-=-=-=-=-

-Massive improvement to code completion
-Argument hinting for functions

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

 Please enter the commit message for your changes. Lines starting
2014-12-16 22:31:57 -03:00
378fb0bace xml_parser: check array length index before accessing the array. 2014-12-16 21:16:48 +01:00
1664cd6710 Merge pull request #980 from UsernameIsAReservedWord/fix-demo-3d-mousepick
fix demo 3d mousepick test
2014-12-16 12:55:14 -02:00
ef02ef2867 fix demo 3d mousepick test
add the missing camera parameter to the _input_event()
2014-12-16 15:17:29 +01:00
99cf6c0dc4 Update README.md 2014-12-15 22:41:50 -03:00
e168d43b4a added GDScript binding for set_window_title 2014-12-10 16:50:43 -05:00
792d675d81 wrong typedef - closes #270 2014-12-08 23:53:55 -05:00
b874205119 closes #163 2014-12-08 23:26:19 -05:00
f9ee42e7e6 new default project icon 2014-10-23 12:47:13 -04:00
1859 changed files with 47968 additions and 21228 deletions

23
.gitignore vendored
View File

@ -19,6 +19,12 @@ tools/editor/register_exporters.cpp
tools/editor/doc_data_compressed.h
tools/editor/editor_icons.cpp
-fpic
.fscache
make.bat
log.txt
# Javascript specific
*.bc
# Android specific
platform/android/java/local.properties
@ -258,3 +264,20 @@ Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
logo.h
*.autosave
# https://github.com/github/gitignore/blob/master/Global/Tags.gitignore
# Ignore tags created by etags, ctags, gtags (GNU global) and cscope
TAGS
!TAGS/
tags
!tags/
gtags.files
GTAGS
GRTAGS
GPATH
cscope.files
cscope.out
cscope.in.out
cscope.po.out
godot.creator.user.wd3476

2432
Doxyfile Normal file

File diff suppressed because it is too large Load Diff

View File

@ -21,3 +21,7 @@
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

@ -10,11 +10,6 @@ The editor, language and APIs are feature rich, yet simple to learn, allowing yo
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.
Development is sponsored by OKAM Studio (http://www.okamstudio.com).
### Godot is BETA. Collaborate!!
Having been developed as in-house means that the user experience may still not be ideal for everyone. The features needed to make a great game are there, but we really need your help to fix all the rough edges and improve usability (via feedback and/or code contributions).
We know we are close to having an awesome, open source, game engine with nothing to envy from the best commercial offerings, but we can't do this alone. This is why Godot is now open source, so everyone can help us reach this goal.
### Documentation
Documentation has been moved to the [GitHub Wiki](https://github.com/okamstudio/godot/wiki).

View File

@ -67,12 +67,16 @@ env_base.android_source_modules=[]
env_base.android_source_files=[]
env_base.android_module_libraries=[]
env_base.android_manifest_chunk=""
env_base.android_permission_chunk=""
env_base.android_appattributes_chunk=""
env_base.disabled_modules=[]
env_base.__class__.android_module_source = methods.android_module_source
env_base.__class__.android_module_library = methods.android_module_library
env_base.__class__.android_module_file = methods.android_module_file
env_base.__class__.android_module_manifest = methods.android_module_manifest
env_base.__class__.android_module_permission = methods.android_module_permission
env_base.__class__.android_module_attribute = methods.android_module_attribute
env_base.__class__.disable_module = methods.disable_module
env_base.__class__.add_source_files = methods.add_source_files
@ -107,6 +111,7 @@ 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')
@ -116,6 +121,9 @@ opts.Add("CFLAGS", "Custom flags for the C compiler");
opts.Add("LINKFLAGS", "Custom flags for the linker");
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
@ -133,8 +141,8 @@ Help(opts.GenerateHelpText(env_base)) # generate help
# add default include paths
env_base.Append(CPPPATH=['#core','#core/math','#tools','#drivers','#'])
# configure ENV for platform
# configure ENV for platform
env_base.platform_exporters=platform_exporters
"""
@ -170,7 +178,29 @@ if selected_platform in platform_list:
else:
env = env_base.Clone()
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
env.extra_suffix=""
if env["extra_suffix"] != '' :
env.extra_suffix += '.'+env["extra_suffix"]
CCFLAGS = env.get('CCFLAGS', '')
env['CCFLAGS'] = ''
@ -314,6 +344,11 @@ if selected_platform in platform_list:
if (env['xml']=='yes'):
env.Append(CPPFLAGS=['-DXML_ENABLED'])
if (env['colored']=='yes'):
methods.colored(sys,env)
if (env['etc1']=='yes'):
env.Append(CPPFLAGS=['-DETC1_ENABLED'])
Export('env')
@ -330,6 +365,32 @@ if selected_platform in platform_list:
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)
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:

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -478,6 +478,7 @@ static String _disassemble_addr(const Ref<GDScript>& p_script,const GDFunction&
case GDFunction::ADDR_TYPE_NIL: {
return "nil";
} break;
}
return "<err>";
@ -738,6 +739,26 @@ static void _disassemble_class(const Ref<GDScript>& p_class,const Vector<String>
incr=4+argc;
} break;
case GDFunction::OPCODE_YIELD: {
txt+=" yield ";
incr=1;
} break;
case GDFunction::OPCODE_YIELD_SIGNAL: {
txt+=" yield_signal ";
txt+=DADDR(1);
txt+=",";
txt+=DADDR(2);
incr=3;
} break;
case GDFunction::OPCODE_YIELD_RESUME: {
txt+=" yield resume: ";
txt+=DADDR(1);
incr=2;
} break;
case GDFunction::OPCODE_JUMP: {
txt+=" jump ";
@ -808,6 +829,13 @@ static void _disassemble_class(const Ref<GDScript>& p_class,const Vector<String>
txt+=" end";
incr+=1;
} break;
case GDFunction::OPCODE_ASSERT: {
txt+=" assert ";
txt+=DADDR(1);
incr+=2;
} break;
}

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -140,10 +140,10 @@ public:
img.resize(512,512);
img.generate_mipmaps();
img.compress();
Ref<Texture> text = memnew( Texture );
text->create_from_image(img);
tf->set_texture(text);
img.compress(Image::COMPRESS_PVRTC4);
Ref<ImageTexture> tt = memnew( ImageTexture );
tt->create_from_image(img);
tf->set_texture(tt);
tf->set_pos(Point2(50,50));
//tf->set_scale(Point2(0.3,0.3));

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -80,6 +80,7 @@ MainLoop* test() {
{
// print_line("NUM: "+itos(237641278346127));
print_line("NUM: "+itos(-128));
return NULL;

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -191,7 +191,7 @@ class TestPhysics2DMainLoop : public MainLoop {
Image image(convex_png);
body_shape_data[Physics2DServer::SHAPE_CONVEX_POLYGON].image=vs->texture_create_from_image(image);
body_shape_data[Physics2DServer::SHAPE_CUSTOM+1].image=vs->texture_create_from_image(image);
RID convex_polygon_shape = ps->shape_create(Physics2DServer::SHAPE_CONVEX_POLYGON);
@ -206,7 +206,7 @@ class TestPhysics2DMainLoop : public MainLoop {
arr.push_back(Point2(11,7)-sb);
ps->shape_set_data(convex_polygon_shape,arr);
body_shape_data[Physics2DServer::SHAPE_CONVEX_POLYGON].shape = convex_polygon_shape;
body_shape_data[Physics2DServer::SHAPE_CUSTOM+1].shape = convex_polygon_shape;
}

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -33,6 +33,8 @@
#include "print_string.h"
#include "os/os.h"
#include "quick_hull.h"
#include "os/keyboard.h"
#define OBJECT_COUNT 50
namespace TestRender {
@ -59,10 +61,14 @@ class TestMainLoop : public MainLoop {
float ofs;
bool quit;
protected:
public:
virtual void input_event(const InputEvent& p_event) {
if (p_event.type==InputEvent::KEY && p_event.key.pressed)
quit=true;
}
virtual void init() {

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -26,15 +26,15 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef TEST_SOUND_H
#define TEST_SOUND_H
#include "os/main_loop.h"
namespace TestSound {
MainLoop* test();
}
#endif // TEST_SOUND_H
#ifndef TEST_SOUND_H
#define TEST_SOUND_H
#include "os/main_loop.h"
namespace TestSound {
MainLoop* test();
}
#endif // TEST_SOUND_H

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -487,7 +487,7 @@ struct test_27_data {
bool test_27() {
OS::get_singleton()->print("\n\nTest 26: begins_with\n");
OS::get_singleton()->print("\n\nTest 27: begins_with\n");
test_27_data tc[] = {
{"res://foobar", "res://", true},
{"res", "res://", false},
@ -504,11 +504,349 @@ bool test_27() {
}
if (!state) {
OS::get_singleton()->print("\n\t Failure on:\n\t\tstring: ", tc[i].data, "\n\t\tbegin: ", tc[i].begin, "\n\t\texpected: ", tc[i].expected ? "true" : "false", "\n");
break;
}
};
return state;
};
bool test_28() {
OS::get_singleton()->print("\n\nTest 28: sprintf\n");
bool success, state = true;
char output_format[] = "\tTest:\t%ls => %ls (%s)\n";
String format, output;
Array args;
bool error;
// %%
format = "fish %% frog";
args.clear();
output = format.sprintf(args, &error);
success = (output == String("fish % frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
//////// INTS
// Int
format = "fish %d frog";
args.clear();
args.push_back(5);
output = format.sprintf(args, &error);
success = (output == String("fish 5 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Int left padded with zeroes.
format = "fish %05d frog";
args.clear();
args.push_back(5);
output = format.sprintf(args, &error);
success = (output == String("fish 00005 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Int left padded with spaces.
format = "fish %5d frog";
args.clear();
args.push_back(5);
output = format.sprintf(args, &error);
success = (output == String("fish 5 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Int right padded with spaces.
format = "fish %-5d frog";
args.clear();
args.push_back(5);
output = format.sprintf(args, &error);
success = (output == String("fish 5 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Int with sign (positive).
format = "fish %+d frog";
args.clear();
args.push_back(5);
output = format.sprintf(args, &error);
success = (output == String("fish +5 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Negative int.
format = "fish %d frog";
args.clear();
args.push_back(-5);
output = format.sprintf(args, &error);
success = (output == String("fish -5 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Hex (lower)
format = "fish %x frog";
args.clear();
args.push_back(45);
output = format.sprintf(args, &error);
success = (output == String("fish 2d frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Hex (upper)
format = "fish %X frog";
args.clear();
args.push_back(45);
output = format.sprintf(args, &error);
success = (output == String("fish 2D frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Octal
format = "fish %o frog";
args.clear();
args.push_back(99);
output = format.sprintf(args, &error);
success = (output == String("fish 143 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
////// REALS
// Real
format = "fish %f frog";
args.clear();
args.push_back(99.99);
output = format.sprintf(args, &error);
success = (output == String("fish 99.990000 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Real left-padded
format = "fish %11f frog";
args.clear();
args.push_back(99.99);
output = format.sprintf(args, &error);
success = (output == String("fish 99.990000 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Real right-padded
format = "fish %-11f frog";
args.clear();
args.push_back(99.99);
output = format.sprintf(args, &error);
success = (output == String("fish 99.990000 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Real given int.
format = "fish %f frog";
args.clear();
args.push_back(99);
output = format.sprintf(args, &error);
success = (output == String("fish 99.000000 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Real with sign (positive).
format = "fish %+f frog";
args.clear();
args.push_back(99.99);
output = format.sprintf(args, &error);
success = (output == String("fish +99.990000 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Real with 1 decimals.
format = "fish %.1f frog";
args.clear();
args.push_back(99.99);
output = format.sprintf(args, &error);
success = (output == String("fish 100.0 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Real with 12 decimals.
format = "fish %.12f frog";
args.clear();
args.push_back(99.99);
output = format.sprintf(args, &error);
success = (output == String("fish 99.990000000000 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Real with no decimals.
format = "fish %.f frog";
args.clear();
args.push_back(99.99);
output = format.sprintf(args, &error);
success = (output == String("fish 100 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
/////// Strings.
// String
format = "fish %s frog";
args.clear();
args.push_back("cheese");
output = format.sprintf(args, &error);
success = (output == String("fish cheese frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// String left-padded
format = "fish %10s frog";
args.clear();
args.push_back("cheese");
output = format.sprintf(args, &error);
success = (output == String("fish cheese frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// String right-padded
format = "fish %-10s frog";
args.clear();
args.push_back("cheese");
output = format.sprintf(args, &error);
success = (output == String("fish cheese frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
///// Characters
// Character as string.
format = "fish %c frog";
args.clear();
args.push_back("A");
output = format.sprintf(args, &error);
success = (output == String("fish A frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Character as int.
format = "fish %c frog";
args.clear();
args.push_back(65);
output = format.sprintf(args, &error);
success = (output == String("fish A frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
///// Dynamic width
// String dynamic width
format = "fish %*s frog";
args.clear();
args.push_back(10);
args.push_back("cheese");
output = format.sprintf(args, &error);
success = (output == String("fish cheese frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Int dynamic width
format = "fish %*d frog";
args.clear();
args.push_back(10);
args.push_back(99);
output = format.sprintf(args, &error);
success = (output == String("fish 99 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Float dynamic width
format = "fish %*.*f frog";
args.clear();
args.push_back(10);
args.push_back(3);
args.push_back(99.99);
output = format.sprintf(args, &error);
success = (output == String("fish 99.990 frog") && !error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
///// Errors
// More formats than arguments.
format = "fish %s %s frog";
args.clear();
args.push_back("cheese");
output = format.sprintf(args, &error);
success = (output == "not enough arguments for format string" && error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// More arguments than formats.
format = "fish %s frog";
args.clear();
args.push_back("hello");
args.push_back("cheese");
output = format.sprintf(args, &error);
success = (output == "not all arguments converted during string formatting" && error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Incomplete format.
format = "fish %10";
args.clear();
args.push_back("cheese");
output = format.sprintf(args, &error);
success = (output == "incomplete format" && error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Bad character in format string
format = "fish %&f frog";
args.clear();
args.push_back("cheese");
output = format.sprintf(args, &error);
success = (output == "unsupported format character" && error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Too many decimals.
format = "fish %2.2.2f frog";
args.clear();
args.push_back(99.99);
output = format.sprintf(args, &error);
success = (output == "too many decimal points in format" && error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// * not a number
format = "fish %*f frog";
args.clear();
args.push_back("cheese");
args.push_back(99.99);
output = format.sprintf(args, &error);
success = (output == "* wants number" && error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Character too long.
format = "fish %c frog";
args.clear();
args.push_back("sc");
output = format.sprintf(args, &error);
success = (output == "%c requires number or single-character string" && error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
// Character bad type.
format = "fish %c frog";
args.clear();
args.push_back(Array());
output = format.sprintf(args, &error);
success = (output == "%c requires number or single-character string" && error);
OS::get_singleton()->print(output_format, format.c_str(), output.c_str(), success ? "OK" : "FAIL");
if (!success) state = false;
return state;
}
typedef bool (*TestFunc)(void);
TestFunc test_funcs[] = {
@ -540,6 +878,7 @@ TestFunc test_funcs[] = {
test_25,
test_26,
test_27,
test_28,
0
};

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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,16 +5,16 @@
#include "io/base64.h"
#include "core/globals.h"
#include "io/file_access_encrypted.h"
#include "os/keyboard.h"
_ResourceLoader *_ResourceLoader::singleton=NULL;
Ref<ResourceInteractiveLoader> _ResourceLoader::load_interactive(const String& p_path,const String& p_type_hint) {
return ResourceLoader::load_interactive(p_path,p_type_hint);
}
RES _ResourceLoader::load(const String &p_path,const String& p_type_hint) {
RES _ResourceLoader::load(const String &p_path,const String& p_type_hint, bool p_no_cache) {
RES ret = ResourceLoader::load(p_path,p_type_hint);
RES ret = ResourceLoader::load(p_path,p_type_hint, p_no_cache);
return ret;
}
@ -59,7 +59,7 @@ 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"),&_ResourceLoader::load,DEFVAL(""));
ObjectTypeDB::bind_method(_MD("load:Resource","path","type_hint", "p_no_cache"),&_ResourceLoader::load,DEFVAL(""), DEFVAL(false));
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"),&_ResourceLoader::get_dependencies);
@ -176,6 +176,76 @@ bool _OS::is_video_mode_fullscreen(int p_screen) const {
}
int _OS::get_screen_count() const {
return OS::get_singleton()->get_screen_count();
}
int _OS::get_current_screen() const {
return OS::get_singleton()->get_current_screen();
}
void _OS::set_current_screen(int p_screen) {
OS::get_singleton()->set_current_screen(p_screen);
}
Point2 _OS::get_screen_position(int p_screen) const {
return OS::get_singleton()->get_screen_position(p_screen);
}
Size2 _OS::get_screen_size(int p_screen) const {
return OS::get_singleton()->get_screen_size(p_screen);
}
Point2 _OS::get_window_position() const {
return OS::get_singleton()->get_window_position();
}
void _OS::set_window_position(const Point2& p_position) {
OS::get_singleton()->set_window_position(p_position);
}
Size2 _OS::get_window_size() const {
return OS::get_singleton()->get_window_size();
}
void _OS::set_window_size(const Size2& p_size) {
OS::get_singleton()->set_window_size(p_size);
}
void _OS::set_window_fullscreen(bool p_enabled) {
OS::get_singleton()->set_window_fullscreen(p_enabled);
}
bool _OS::is_window_fullscreen() const {
return OS::get_singleton()->is_window_fullscreen();
}
void _OS::set_window_resizable(bool p_enabled) {
OS::get_singleton()->set_window_resizable(p_enabled);
}
bool _OS::is_window_resizable() const {
return OS::get_singleton()->is_window_resizable();
}
void _OS::set_window_minimized(bool p_enabled) {
OS::get_singleton()->set_window_minimized(p_enabled);
}
bool _OS::is_window_minimized() const {
return OS::get_singleton()->is_window_minimized();
}
void _OS::set_window_maximized(bool p_enabled) {
OS::get_singleton()->set_window_maximized(p_enabled);
}
bool _OS::is_window_maximized() const {
return OS::get_singleton()->is_window_maximized();
}
void _OS::set_use_file_access_save_and_swap(bool p_enable) {
FileAccess::set_backup_save(p_enable);
@ -186,7 +256,6 @@ bool _OS::is_video_mode_resizable(int p_screen) const {
OS::VideoMode vm;
vm = OS::get_singleton()->get_video_mode(p_screen);
return vm.resizable;
}
Array _OS::get_fullscreen_mode_list(int p_screen) const {
@ -316,6 +385,11 @@ float _OS::get_time_scale() {
return OS::get_singleton()->get_time_scale();
}
bool _OS::is_ok_left_and_cancel_right() const {
return OS::get_singleton()->get_swap_ok_cancel();
}
/*
enum Weekday {
DAY_SUNDAY,
@ -426,6 +500,10 @@ uint32_t _OS::get_ticks_msec() const {
return OS::get_singleton()->get_ticks_msec();
}
uint32_t _OS::get_splash_tick_msec() const {
return OS::get_singleton()->get_splash_tick_msec();
}
bool _OS::can_use_threads() const {
@ -616,6 +694,20 @@ String _OS::get_custom_level() const {
return OS::get_singleton()->get_custom_level();
}
String _OS::get_scancode_string(uint32_t p_code) const {
return keycode_get_string(p_code);
}
bool _OS::is_scancode_unicode(uint32_t p_unicode) const {
return keycode_has_unicode(p_unicode);
}
int _OS::find_scancode_from_string(const String& p_code) const {
return find_keycode(p_code);
}
_OS *_OS::singleton=NULL;
void _OS::_bind_methods() {
@ -632,6 +724,26 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("is_video_mode_resizable","screen"),&_OS::is_video_mode_resizable,DEFVAL(0));
ObjectTypeDB::bind_method(_MD("get_fullscreen_mode_list","screen"),&_OS::get_fullscreen_mode_list,DEFVAL(0));
ObjectTypeDB::bind_method(_MD("get_screen_count"),&_OS::get_screen_count);
ObjectTypeDB::bind_method(_MD("get_current_screen"),&_OS::get_current_screen);
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_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);
ObjectTypeDB::bind_method(_MD("set_window_size","size"),&_OS::set_window_size);
ObjectTypeDB::bind_method(_MD("set_window_fullscreen","enabled"),&_OS::set_window_fullscreen);
ObjectTypeDB::bind_method(_MD("is_window_fullscreen"),&_OS::is_window_fullscreen);
ObjectTypeDB::bind_method(_MD("set_window_resizable","enabled"),&_OS::set_window_resizable);
ObjectTypeDB::bind_method(_MD("is_window_resizable"),&_OS::is_window_resizable);
ObjectTypeDB::bind_method(_MD("set_window_minimized", "enabled"),&_OS::set_window_minimized);
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("set_iterations_per_second","iterations_per_second"),&_OS::set_iterations_per_second);
ObjectTypeDB::bind_method(_MD("get_iterations_per_second"),&_OS::get_iterations_per_second);
ObjectTypeDB::bind_method(_MD("set_target_fps","target_fps"),&_OS::set_target_fps);
@ -642,7 +754,7 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("has_touchscreen_ui_hint"),&_OS::has_touchscreen_ui_hint);
ObjectTypeDB::bind_method(_MD("set_window_title","title"),&_OS::set_window_title);
ObjectTypeDB::bind_method(_MD("set_low_processor_usage_mode","enable"),&_OS::set_low_processor_usage_mode);
ObjectTypeDB::bind_method(_MD("is_in_low_processor_usage_mode"),&_OS::is_in_low_processor_usage_mode);
@ -671,6 +783,7 @@ void _OS::_bind_methods() {
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_model_name"),&_OS::get_model_name);
@ -699,6 +812,8 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_system_dir","dir"),&_OS::get_system_dir);
ObjectTypeDB::bind_method(_MD("get_unique_ID"),&_OS::get_unique_ID);
ObjectTypeDB::bind_method(_MD("is_ok_left_and_cancel_right"),&_OS::is_ok_left_and_cancel_right);
ObjectTypeDB::bind_method(_MD("get_frames_per_second"),&_OS::get_frames_per_second);
ObjectTypeDB::bind_method(_MD("print_all_textures_by_size"),&_OS::print_all_textures_by_size);
@ -709,6 +824,9 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("native_video_stop"),&_OS::native_video_stop);
ObjectTypeDB::bind_method(_MD("native_video_pause"),&_OS::native_video_pause);
ObjectTypeDB::bind_method(_MD("get_scancode_string","code"),&_OS::get_scancode_string);
ObjectTypeDB::bind_method(_MD("is_scancode_unicode","code"),&_OS::is_scancode_unicode);
ObjectTypeDB::bind_method(_MD("find_scancode_from_string","string"),&_OS::find_scancode_from_string);
ObjectTypeDB::bind_method(_MD("set_use_file_access_save_and_swap","enabled"),&_OS::set_use_file_access_save_and_swap);
@ -838,6 +956,12 @@ Variant _Geometry::segment_intersects_triangle( const Vector3& p_from, const Vec
return Variant();
}
bool _Geometry::point_is_inside_triangle(const Vector2& s, const Vector2& a, const Vector2& b, const Vector2& c) const {
return Geometry::is_point_in_triangle(s,a,b,c);
}
DVector<Vector3> _Geometry::segment_intersects_sphere( const Vector3& p_from, const Vector3& p_to, const Vector3& p_sphere_pos,real_t p_sphere_radius) {
DVector<Vector3> r;
@ -938,6 +1062,7 @@ void _Geometry::_bind_methods() {
ObjectTypeDB::bind_method(_MD("segment_intersects_sphere","from","to","spos","sradius"),&_Geometry::segment_intersects_sphere);
ObjectTypeDB::bind_method(_MD("segment_intersects_cylinder","from","to","height","radius"),&_Geometry::segment_intersects_cylinder);
ObjectTypeDB::bind_method(_MD("segment_intersects_convex","from","to","planes"),&_Geometry::segment_intersects_convex);
ObjectTypeDB::bind_method(_MD("point_is_inside_triangle","point","a","b","c"),&_Geometry::point_is_inside_triangle);
ObjectTypeDB::bind_method(_MD("triangulate_polygon","polygon"),&_Geometry::triangulate_polygon);
@ -1121,6 +1246,7 @@ String _File::get_as_text() const {
text+=l+"\n";
l = get_line();
}
text+=l;
return text;
@ -1631,7 +1757,9 @@ _Mutex::~_Mutex(){
void _Thread::_start_func(void *ud) {
_Thread *t=(_Thread*)ud;
Ref<_Thread>* tud=(Ref<_Thread>*)ud;
Ref<_Thread> t=*tud;
memdelete(tud);
Variant::CallError ce;
const Variant* arg[1]={&t->userdata};
t->ret=t->target_instance->call(t->target_method,arg,1,ce);
@ -1678,9 +1806,11 @@ Error _Thread::start(Object *p_instance,const StringName& p_method,const Variant
userdata=p_userdata;
active=true;
Ref<_Thread> *ud = memnew( Ref<_Thread>(this) );
Thread::Settings s;
s.priority=(Thread::Priority)p_priority;
thread = Thread::create(_start_func,this,s);
thread = Thread::create(_start_func,ud,s);
if (!thread) {
active=false;
target_method=StringName();
@ -1741,5 +1871,8 @@ _Thread::_Thread() {
_Thread::~_Thread() {
if (active) {
ERR_EXPLAIN("Reference to a Thread object object was lost while the thread is still running..");
}
ERR_FAIL_COND(active==true);
}

View File

@ -21,7 +21,7 @@ public:
static _ResourceLoader *get_singleton() { return singleton; }
Ref<ResourceInteractiveLoader> load_interactive(const String& p_path,const String& p_type_hint="");
RES load(const String &p_path,const String& p_type_hint="");
RES load(const String &p_path,const String& p_type_hint="", bool p_no_cache = false);
DVector<String> get_recognized_extensions_for_type(const String& p_type);
void set_abort_on_missing_resources(bool p_abort);
StringArray get_dependencies(const String& p_path);
@ -108,6 +108,26 @@ public:
bool is_video_mode_resizable(int p_screen=0) const;
Array get_fullscreen_mode_list(int p_screen=0) const;
virtual int get_screen_count() const;
virtual int get_current_screen() const;
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 Point2 get_window_position() const;
virtual void set_window_position(const Point2& p_position);
virtual Size2 get_window_size() const;
virtual void set_window_size(const Size2& p_size);
virtual void set_window_fullscreen(bool p_enabled);
virtual bool is_window_fullscreen() const;
virtual void set_window_resizable(bool p_enabled);
virtual bool is_window_resizable() const;
virtual void set_window_minimized(bool p_enabled);
virtual bool is_window_minimized() const;
virtual void set_window_maximized(bool p_enabled);
virtual bool is_window_maximized() const;
Error native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track);
bool native_video_is_playing();
void native_video_pause();
@ -158,6 +178,11 @@ public:
String get_unique_ID() const;
String get_scancode_string(uint32_t p_code) const;
bool is_scancode_unicode(uint32_t p_unicode) const;
int find_scancode_from_string(const String& p_code) const;
/*
struct Date {
@ -190,6 +215,7 @@ public:
void delay_usec(uint32_t p_usec) const;
void delay_msec(uint32_t p_msec) const;
uint32_t get_ticks_msec() const;
uint32_t get_splash_tick_msec() const;
bool can_use_threads() const;
@ -220,6 +246,8 @@ public:
void set_time_scale(float p_scale);
float get_time_scale();
bool is_ok_left_and_cancel_right() const;
static _OS *get_singleton() { return singleton; }
_OS();
@ -248,6 +276,8 @@ public:
Vector3 get_closest_point_to_segment(const Vector3& p_point, const Vector3& p_a,const Vector3& p_b);
Variant ray_intersects_triangle( const Vector3& p_from, const Vector3& p_dir, const Vector3& p_v0,const Vector3& p_v1,const Vector3& p_v2);
Variant segment_intersects_triangle( const Vector3& p_from, const Vector3& p_to, const Vector3& p_v0,const Vector3& p_v1,const Vector3& p_v2);
bool point_is_inside_triangle(const Vector2& s, const Vector2& a, const Vector2& b, const Vector2& c) const;
DVector<Vector3> segment_intersects_sphere( const Vector3& p_from, const Vector3& p_to, const Vector3& p_sphere_pos,real_t p_sphere_radius);
DVector<Vector3> segment_intersects_cylinder( const Vector3& p_from, const Vector3& p_to, float p_height,float p_radius);
DVector<Vector3> segment_intersects_convex(const Vector3& p_from, const Vector3& p_to,const Vector<Plane>& p_planes);

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -225,7 +225,7 @@ Color Color::inverted() const {
Color Color::contrasted() const {
Color c=*this;
c.contrasted();
c.contrast();
return c;
}

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -42,6 +42,7 @@ CoreStringNames::CoreStringNames() {
_iter_init=StaticCString::create("_iter_init");
_iter_next=StaticCString::create("_iter_next");
_iter_get=StaticCString::create("_iter_get");
get_rid=StaticCString::create("get_rid");
}

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -56,6 +56,7 @@ public:
StringName _iter_init;
StringName _iter_next;
StringName _iter_get;
StringName get_rid;
};

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -186,10 +186,12 @@ Error Dictionary::parse_json(const String& p_json) {
String errstr;
int errline=0;
if (p_json != ""){
Error err = JSON::parse(p_json,*this,errstr,errline);
if (err!=OK) {
ERR_EXPLAIN("Error parsing JSON: "+errstr+" at line: "+itos(errline));
ERR_FAIL_COND_V(err!=OK,err);
}
}
return OK;

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -262,6 +262,23 @@ public:
w[bs+i]=r[i];
}
Error insert(int p_pos,const T& p_val) {
int s=size();
ERR_FAIL_INDEX_V(p_pos,s+1,ERR_INVALID_PARAMETER);
resize(s+1);
{
Write w = write();
for (int i=s;i>p_pos;i--)
w[i]=w[i-1];
w[p_pos]=p_val;
}
return OK;
}
bool is_locked() const { return mem.is_locked(); }
inline const T operator[](int p_index) const;

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -56,28 +56,36 @@ Error EventQueue::push_call(uint32_t p_instance_ID, const StringName& p_method,
buffer_end+=sizeof(Event);
if (args==1) {
if (args>=1) {
Variant * v = memnew_placement( &event_buffer[ buffer_end ], Variant );
buffer_end+=sizeof(Variant);
*v=p_arg1;
} else if (args==2) {
}
if (args>=2) {
Variant * v = memnew_placement( &event_buffer[ buffer_end ], Variant );
buffer_end+=sizeof(Variant);
*v=p_arg2;
} else if (args==3) {
}
if (args>=3) {
Variant * v = memnew_placement( &event_buffer[ buffer_end ], Variant );
buffer_end+=sizeof(Variant);
*v=p_arg3;
} else if (args==4) {
}
if (args>=4) {
Variant * v = memnew_placement( &event_buffer[ buffer_end ], Variant );
buffer_end+=sizeof(Variant);
*v=p_arg4;
} else if (args==5) {
}
if (args>=5) {
Variant * v = memnew_placement( &event_buffer[ buffer_end ], Variant );
buffer_end+=sizeof(Variant);

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -313,6 +313,7 @@ static _GlobalConstant _global_constants[]={
BIND_GLOBAL_CONSTANT( KEY_MASK_ALT ),
BIND_GLOBAL_CONSTANT( KEY_MASK_META ),
BIND_GLOBAL_CONSTANT( KEY_MASK_CTRL ),
BIND_GLOBAL_CONSTANT( KEY_MASK_CMD ),
BIND_GLOBAL_CONSTANT( KEY_MASK_KPAD ),
BIND_GLOBAL_CONSTANT( KEY_MASK_GROUP_SWITCH ),

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -1381,7 +1381,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,"xml,res,scn,xscn");
custom_prop_info["application/main_scene"]=PropertyInfo(Variant::STRING,"application/main_scene",PROPERTY_HINT_FILE,"scn,res,xscn,xml");
set("application/disable_stdout",false);
set("application/use_shared_user_dir",true);

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -134,6 +134,18 @@ void Image::get_mipmap_offset_and_size(int p_mipmap,int &r_ofs, int &r_size) con
}
void Image::get_mipmap_offset_size_and_dimensions(int p_mipmap,int &r_ofs, int &r_size,int &w, int& h) const {
int ofs;
_get_mipmap_offset_and_size(p_mipmap,ofs,w,h);
int ofs2,w2,h2;
_get_mipmap_offset_and_size(p_mipmap+1,ofs2,w2,h2);
r_ofs=ofs;
r_size=ofs2-ofs;
}
void Image::put_pixel(int p_x,int p_y, const Color& p_color,int p_mipmap){
ERR_FAIL_INDEX(p_mipmap,mipmaps+1);

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -236,6 +236,7 @@ public:
int get_mipmap_offset(int p_mipmap) const; //get where the mipmap begins in data
void get_mipmap_offset_and_size(int p_mipmap,int &r_ofs, int &r_size) const; //get where the mipmap begins in data
void get_mipmap_offset_size_and_dimensions(int p_mipmap,int &r_ofs, int &r_size,int &w, int& h) const; //get where the mipmap begins in data
/**
* Resize the image, using the prefered interpolation method.

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -42,7 +42,7 @@ void InputMap::_bind_methods() {
ObjectTypeDB::bind_method(_MD("action_add_event","action","event"),&InputMap::action_add_event);
ObjectTypeDB::bind_method(_MD("action_has_event","action","event"),&InputMap::action_has_event);
ObjectTypeDB::bind_method(_MD("action_erase_event","action","event"),&InputMap::action_erase_event);
ObjectTypeDB::bind_method(_MD("get_action_list","action"),&InputMap::get_action_list);
ObjectTypeDB::bind_method(_MD("get_action_list","action"),&InputMap::_get_action_list);
ObjectTypeDB::bind_method(_MD("event_is_action","event","action"),&InputMap::event_is_action);
ObjectTypeDB::bind_method(_MD("load_from_globals"),&InputMap::load_from_globals);
@ -162,6 +162,22 @@ void InputMap::action_erase_event(const StringName& p_action,const InputEvent& p
}
Array InputMap::_get_action_list(const StringName& p_action) {
Array ret;
const List<InputEvent> *al = get_action_list(p_action);
if (al) {
for(const List<InputEvent>::Element *E=al->front();E;E=E->next()) {
ret.push_back(E->get());;
}
}
return ret;
}
const List<InputEvent> *InputMap::get_action_list(const StringName& p_action) {
const Map<StringName, Action>::Element *E=input_map.find(p_action);
@ -176,7 +192,7 @@ bool InputMap::event_is_action(const InputEvent& p_event, const StringName& p_ac
Map<StringName,Action >::Element *E=input_map.find(p_action);
if(!E) {
ERR_EXPLAIN("Request for unexisting InputMap action: "+String(p_action));
ERR_EXPLAIN("Request for nonexistent InputMap action: "+String(p_action));
ERR_FAIL_COND_V(!E,false);
}

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -46,6 +46,8 @@ class InputMap : public Object {
List<InputEvent>::Element *_find_event(List<InputEvent> &p_list,const InputEvent& p_event) const;
Array _get_action_list(const StringName& p_action);
protected:
static void _bind_methods();

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -48,7 +48,7 @@ typedef signed short int16_t;
typedef unsigned int uint32_t;
typedef signed int int32_t;
typedef long long int64_t;
typedef unsigned long long int64_t;
typedef unsigned long long uint64_t;
#else
#include <stdint.h>
#endif

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -26,28 +26,28 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef COMPRESSION_H
#define COMPRESSION_H
#include "typedefs.h"
class Compression
{
public:
enum Mode {
MODE_FASTLZ,
MODE_DEFLATE
};
static int compress(uint8_t *p_dst, const uint8_t *p_src, int p_src_size,Mode p_mode=MODE_FASTLZ);
static int get_max_compressed_buffer_size(int p_src_size,Mode p_mode=MODE_FASTLZ);
static void decompress(uint8_t *p_dst, int p_dst_max_size, const uint8_t *p_src, int p_src_size,Mode p_mode=MODE_FASTLZ);
Compression();
};
#endif // COMPRESSION_H
#ifndef COMPRESSION_H
#define COMPRESSION_H
#include "typedefs.h"
class Compression
{
public:
enum Mode {
MODE_FASTLZ,
MODE_DEFLATE
};
static int compress(uint8_t *p_dst, const uint8_t *p_src, int p_src_size,Mode p_mode=MODE_FASTLZ);
static int get_max_compressed_buffer_size(int p_src_size,Mode p_mode=MODE_FASTLZ);
static void decompress(uint8_t *p_dst, int p_dst_max_size, const uint8_t *p_src, int p_src_size,Mode p_mode=MODE_FASTLZ);
Compression();
};
#endif // COMPRESSION_H

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -357,6 +357,7 @@ if (res!=-1 && res < min_pos) {\
} break;
case MIN_OPEN: {
int level=1;
end++;
while(end<close_pos) {
if (str[end]=='[')
@ -373,6 +374,7 @@ if (res!=-1 && res < min_pos) {\
} break;
case MIN_CURLY_OPEN: {
int level=1;
end++;
while(end<close_pos) {
if (str[end]=='{')

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -26,76 +26,76 @@
/* 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_COMPRESSED_H
#define FILE_ACCESS_COMPRESSED_H
#include "io/compression.h"
#include "os/file_access.h"
class FileAccessCompressed : public FileAccess {
Compression::Mode cmode;
bool writing;
int write_pos;
uint8_t*write_ptr;
int write_buffer_size;
int write_max;
int block_size;
mutable bool read_eof;
mutable bool at_end;
struct ReadBlock {
int csize;
int offset;
};
mutable Vector<uint8_t> comp_buffer;
uint8_t *read_ptr;
mutable int read_block;
int read_block_count;
mutable int read_block_size;
mutable int read_pos;
Vector<ReadBlock> read_blocks;
int read_total;
String magic;
mutable Vector<uint8_t> buffer;
FileAccess *f;
public:
void configure(const String& p_magic, Compression::Mode p_mode=Compression::MODE_FASTLZ, int p_block_size=4096);
Error open_after_magic(FileAccess *p_base);
virtual Error _open(const String& p_path, int p_mode_flags); ///< open a file
virtual void close(); ///< close a file
virtual bool is_open() const; ///< true when file is open
virtual void seek(size_t p_position); ///< seek to a given position
virtual void seek_end(int64_t p_position=0); ///< seek from the end of file
virtual size_t get_pos() const; ///< get position in the file
virtual size_t get_len() const; ///< get size of the file
virtual bool eof_reached() const; ///< reading passed EOF
virtual uint8_t get_8() const; ///< get a byte
virtual int get_buffer(uint8_t *p_dst, int p_length) const;
virtual Error get_error() const; ///< get last error
virtual void store_8(uint8_t p_dest); ///< store a byte
virtual bool file_exists(const String& p_name); ///< return true if a file exists
virtual uint64_t _get_modified_time(const String& p_file);
FileAccessCompressed();
virtual ~FileAccessCompressed();
};
#endif // FILE_ACCESS_COMPRESSED_H
#ifndef FILE_ACCESS_COMPRESSED_H
#define FILE_ACCESS_COMPRESSED_H
#include "io/compression.h"
#include "os/file_access.h"
class FileAccessCompressed : public FileAccess {
Compression::Mode cmode;
bool writing;
int write_pos;
uint8_t*write_ptr;
int write_buffer_size;
int write_max;
int block_size;
mutable bool read_eof;
mutable bool at_end;
struct ReadBlock {
int csize;
int offset;
};
mutable Vector<uint8_t> comp_buffer;
uint8_t *read_ptr;
mutable int read_block;
int read_block_count;
mutable int read_block_size;
mutable int read_pos;
Vector<ReadBlock> read_blocks;
int read_total;
String magic;
mutable Vector<uint8_t> buffer;
FileAccess *f;
public:
void configure(const String& p_magic, Compression::Mode p_mode=Compression::MODE_FASTLZ, int p_block_size=4096);
Error open_after_magic(FileAccess *p_base);
virtual Error _open(const String& p_path, int p_mode_flags); ///< open a file
virtual void close(); ///< close a file
virtual bool is_open() const; ///< true when file is open
virtual void seek(size_t p_position); ///< seek to a given position
virtual void seek_end(int64_t p_position=0); ///< seek from the end of file
virtual size_t get_pos() const; ///< get position in the file
virtual size_t get_len() const; ///< get size of the file
virtual bool eof_reached() const; ///< reading passed EOF
virtual uint8_t get_8() const; ///< get a byte
virtual int get_buffer(uint8_t *p_dst, int p_length) const;
virtual Error get_error() const; ///< get last error
virtual void store_8(uint8_t p_dest); ///< store a byte
virtual bool file_exists(const String& p_name); ///< return true if a file exists
virtual uint64_t _get_modified_time(const String& p_file);
FileAccessCompressed();
virtual ~FileAccessCompressed();
};
#endif // FILE_ACCESS_COMPRESSED_H

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -39,7 +39,7 @@ void FileAccessMemory::register_file(String p_name, Vector<uint8_t> p_data) {
if (!files) {
files = memnew((Map<String, Vector<uint8_t> >));
};
}
String name;
if (Globals::get_singleton())
@ -49,7 +49,7 @@ void FileAccessMemory::register_file(String p_name, Vector<uint8_t> p_data) {
name = DirAccess::normalize_path(name);
(*files)[name] = p_data;
};
}
void FileAccessMemory::cleanup() {
@ -57,13 +57,13 @@ void FileAccessMemory::cleanup() {
return;
memdelete(files);
};
}
FileAccess* FileAccessMemory::create() {
return memnew(FileAccessMemory);
};
}
bool FileAccessMemory::file_exists(const String& p_name) {
@ -71,7 +71,7 @@ bool FileAccessMemory::file_exists(const String& p_name) {
name = DirAccess::normalize_path(name);
return files && (files->find(name) != NULL);
};
}
Error FileAccessMemory::_open(const String& p_path, int p_mode_flags) {
@ -89,57 +89,57 @@ Error FileAccessMemory::_open(const String& p_path, int p_mode_flags) {
pos = 0;
return OK;
};
}
void FileAccessMemory::close() {
data = NULL;
};
}
bool FileAccessMemory::is_open() const {
return data != NULL;
};
}
void FileAccessMemory::seek(size_t p_position) {
ERR_FAIL_COND(!data);
pos = p_position;
};
}
void FileAccessMemory::seek_end(int64_t p_position) {
ERR_FAIL_COND(!data);
pos = length + p_position;
};
}
size_t FileAccessMemory::get_pos() const {
ERR_FAIL_COND_V(!data, 0);
return pos;
};
}
size_t FileAccessMemory::get_len() const {
ERR_FAIL_COND_V(!data, 0);
return length;
};
}
bool FileAccessMemory::eof_reached() const {
return pos >= length;
};
}
uint8_t FileAccessMemory::get_8() const {
uint8_t ret;
uint8_t ret = 0;
if (pos < length) {
ret = data[pos];
};
}
++pos;
return ret;
};
}
int FileAccessMemory::get_buffer(uint8_t *p_dst,int p_length) const {
@ -156,19 +156,19 @@ int FileAccessMemory::get_buffer(uint8_t *p_dst,int p_length) const {
pos += p_length;
return read;
};
}
Error FileAccessMemory::get_error() const {
return pos >= length ? ERR_FILE_EOF : OK;
};
}
void FileAccessMemory::store_8(uint8_t p_byte) {
ERR_FAIL_COND(!data);
ERR_FAIL_COND(pos >= length);
data[pos++] = p_byte;
};
}
void FileAccessMemory::store_buffer(const uint8_t *p_src,int p_length) {
@ -176,11 +176,11 @@ void FileAccessMemory::store_buffer(const uint8_t *p_src,int p_length) {
int write = MIN(p_length, left);
if (write < p_length) {
WARN_PRINT("Writing less data than requested");
};
}
copymem(&data[pos], p_src, write);
pos += p_length;
};
}
FileAccessMemory::FileAccessMemory() {

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -254,6 +254,7 @@ FileAccessNetworkClient::~FileAccessNetworkClient() {
quit=true;
sem->post();
Thread::wait_to_finish(thread);
memdelete(thread);
}
memdelete(blockrequest_mutex);

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -92,7 +92,9 @@ void PackedData::add_path(const String& pkg_path, const String& path, uint64_t o
void PackedData::add_pack_source(PackSource *p_source) {
sources.push_back(p_source);
if (p_source != NULL) {
sources.push_back(p_source);
}
};
PackedData *PackedData::singleton=NULL;
@ -107,6 +109,21 @@ PackedData::PackedData() {
add_pack_source(memnew(PackedSourcePCK));
}
void PackedData::_free_packed_dirs(PackedDir *p_dir) {
for (Map<String,PackedDir*>::Element *E=p_dir->subdirs.front();E;E=E->next())
_free_packed_dirs(E->get());
memdelete(p_dir);
}
PackedData::~PackedData() {
for(int i=0;i<sources.size();i++) {
memdelete(sources[i]);
}
_free_packed_dirs(root);
}
//////////////////////////////////////////////////////////////////
@ -362,6 +379,10 @@ bool DirAccessPack::current_is_dir() const{
return cdir;
}
bool DirAccessPack::current_is_hidden() const{
return false;
}
void DirAccessPack::list_dir_end() {
list_dirs.clear();

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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,6 +96,8 @@ private:
static PackedData *singleton;
bool disabled;
void _free_packed_dirs(PackedDir *p_dir);
public:
void add_pack_source(PackSource* p_source);
@ -111,6 +113,7 @@ public:
_FORCE_INLINE_ bool has_path(const String& p_path);
PackedData();
~PackedData();
};
class PackSource {
@ -119,6 +122,7 @@ public:
virtual bool try_open_pack(const String& p_path)=0;
virtual FileAccess* get_file(const String& p_path, PackedData::PackedFile* p_file)=0;
virtual ~PackSource() {}
};
class PackedSourcePCK : public PackSource {
@ -208,6 +212,7 @@ public:
virtual bool list_dir_begin();
virtual String get_next();
virtual bool current_is_dir() const;
virtual bool current_is_hidden() const;
virtual void list_dir_end();
virtual int get_drive_count();

View File

@ -150,7 +150,7 @@ unzFile ZipArchive::get_file_handle(String p_file) const {
bool ZipArchive::try_open_pack(const String& p_name) {
printf("opening pack %ls, %i, %i\n", p_name.c_str(), p_name.extension().nocasecmp_to("zip"), p_name.extension().nocasecmp_to("pcz"));
//printf("opening pack %ls, %i, %i\n", p_name.c_str(), p_name.extension().nocasecmp_to("zip"), p_name.extension().nocasecmp_to("pcz"));
if (p_name.extension().nocasecmp_to("zip") != 0 && p_name.extension().nocasecmp_to("pcz") != 0)
return false;

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -273,7 +273,7 @@ Error HTTPClient::poll(){
while(true) {
uint8_t byte;
int rec=0;
Error err = connection->get_partial_data(&byte,1,rec);
Error err = _get_http_data(&byte,1,rec);
if (err!=OK) {
close();
status=STATUS_CONNECTION_ERROR;
@ -417,7 +417,7 @@ ByteArray HTTPClient::read_response_body_chunk() {
//reading len
uint8_t b;
int rec=0;
err = connection->get_partial_data(&b,1,rec);
err = _get_http_data(&b,1,rec);
if (rec==0)
break;
@ -471,7 +471,7 @@ ByteArray HTTPClient::read_response_body_chunk() {
} else {
int rec=0;
err = connection->get_partial_data(&chunk[chunk.size()-chunk_left],chunk_left,rec);
err = _get_http_data(&chunk[chunk.size()-chunk_left],chunk_left,rec);
if (rec==0) {
break;
}
@ -502,18 +502,23 @@ ByteArray HTTPClient::read_response_body_chunk() {
}
} else {
int to_read = MIN(body_left,read_chunk_size);
ByteArray ret;
ret.resize(MAX(body_left,tmp_read.size()));
ret.resize(to_read);
ByteArray::Write w = ret.write();
int _offset = 0;
while (body_left > 0) {
ByteArray::Write r = tmp_read.write();
while (to_read > 0) {
int rec=0;
err = connection->get_partial_data(r.ptr(),MIN(body_left,tmp_read.size()),rec);
err = _get_http_data(w.ptr()+_offset,to_read,rec);
if (rec>0) {
copymem(w.ptr()+_offset,r.ptr(),rec);
body_left-=rec;
to_read-=rec;
_offset += rec;
} else {
if (to_read>0) //ended up reading less
ret.resize(_offset);
break;
}
}
if (body_left==0) {
@ -557,6 +562,20 @@ bool HTTPClient::is_blocking_mode_enabled() const{
return blocking;
}
Error HTTPClient::_get_http_data(uint8_t* p_buffer, int p_bytes,int &r_received) {
if (blocking) {
Error err = connection->get_data(p_buffer,p_bytes);
if (err==OK)
r_received=p_bytes;
else
r_received=0;
return err;
} else {
return connection->get_partial_data(p_buffer,p_bytes,r_received);
}
}
void HTTPClient::_bind_methods() {
@ -574,6 +593,7 @@ void HTTPClient::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_response_headers_as_dictionary"),&HTTPClient::_get_response_headers_as_dictionary);
ObjectTypeDB::bind_method(_MD("get_response_body_length"),&HTTPClient::get_response_body_length);
ObjectTypeDB::bind_method(_MD("read_response_body_chunk"),&HTTPClient::read_response_body_chunk);
ObjectTypeDB::bind_method(_MD("set_read_chunk_size","bytes"),&HTTPClient::set_read_chunk_size);
ObjectTypeDB::bind_method(_MD("set_blocking_mode","enabled"),&HTTPClient::set_blocking_mode);
ObjectTypeDB::bind_method(_MD("is_blocking_mode_enabled"),&HTTPClient::is_blocking_mode_enabled);
@ -664,6 +684,11 @@ void HTTPClient::_bind_methods() {
}
void HTTPClient::set_read_chunk_size(int p_size) {
ERR_FAIL_COND(p_size<256 || p_size>(1<<24));
read_chunk_size=p_size;
}
HTTPClient::HTTPClient(){
tcp_connection = StreamPeerTCP::create_ref();
@ -677,7 +702,7 @@ HTTPClient::HTTPClient(){
response_num=0;
ssl=false;
blocking=false;
tmp_read.resize(4096);
read_chunk_size=4096;
}
HTTPClient::~HTTPClient(){

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -157,7 +157,10 @@ private:
static void _bind_methods();
StringArray _get_response_headers();
Dictionary _get_response_headers_as_dictionary();
ByteArray tmp_read;
int read_chunk_size;
Error _get_http_data(uint8_t* p_buffer, int p_bytes,int &r_received);
public:
@ -185,6 +188,7 @@ public:
void set_blocking_mode(bool p_enable); //useful mostly if running in a thread
bool is_blocking_mode_enabled() const;
void set_read_chunk_size(int p_size);
Error poll();

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */
@ -183,7 +183,7 @@ void IP::erase_resolve_item(ResolverID p_id) {
GLOBAL_LOCK_FUNCTION;
resolver->queue[p_id].status=IP::RESOLVER_STATUS_DONE;
resolver->queue[p_id].status=IP::RESOLVER_STATUS_NONE;
}

View File

@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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-2014 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2007-2015 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 */

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