Commit graph

170 commits

Author SHA1 Message Date
Juan Linietsky 2ab83e1abb Memory pool vectors (DVector) have been enormously simplified in code, and renamed to PoolVector 2017-01-07 18:26:38 -03:00
Juan Linietsky 53ce643e52 -Changed memory functions, Memory::alloc_static*, simplified them, made them aligned to 16
-Changed Vector<> template to fit this.
2017-01-06 10:15:44 -03:00
Juan Linietsky 0f7af4ea51 -Changed most project settings in the engine, so they have major and minor categories.
-Changed SectionedPropertyEditor to support this
-Renamed Globals singleton to GlobalConfig, makes more sense.
-Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
2017-01-05 09:16:00 -03:00
Juan Linietsky 118eed485e ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant.
All usages of "type" to refer to classes were renamed to "class"
ClassDB has been exposed to GDScript.
OBJ_TYPE() macro is now GDCLASS()
2017-01-02 23:03:46 -03:00
Rémi Verschelde 3f3f5a5359 Merge remote-tracking branch 'origin/gles3' into gles3-on-master
Various merge conflicts have been fixed manually and some mistakes
might have been made - time will tell :)
2017-01-02 21:52:26 +01:00
Rémi Verschelde 0b2771bd65 Merge pull request #7271 from Faless/ipv6_cleanup
Fixes and improvementes for IPv6 implementation.
2017-01-02 15:51:45 +01:00
Rémi Verschelde c7bc44d5ad Welcome in 2017, dear changelog reader!
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer
with state-of-the-art rendering techniques tuned to work as low as middle
end handheld devices - without compromising with the possibilities given
for higher end desktop games of course. Great times ahead for the Godot
community and the gamers that will play our games!
2017-01-01 22:03:33 +01:00
Fabio Alessandrelli de23ce11b5 Remove old unused AI_V4MAPPED flag to getaddrinfo 2016-12-09 23:38:14 +01:00
Fabio Alessandrelli 1aff508dd9 IP_Address now handle IPv4 and IPv6 transparently
IP_Address changes:
- Converts to and from String transparently while handling IPv4 as IPv6
  mapped (::ffff:[IP]) address internally.
- Completely remove AddrType enum.
- Setting/Getting of ip array is now only possible through dedicated functions
  (ie. set_ipv4, get_ipv4, set_ipv6, get_ipv6)
- Add function to know if the address is a valid IPv4 (for IP implementation and enet)
2016-12-09 18:24:59 +01:00
Fabio Alessandrelli c18c5013f8 Migrate int.IP_TYPE_ constants to IP.TYPE_ 2016-12-09 18:24:59 +01:00
Fabio Alessandrelli 4d90a4fcd5 Move V6ONLY flag selection inside helpers 2016-12-09 18:24:59 +01:00
Fabio Alessandrelli 9200da58e4 Automatically map IPv4 address to IPv6 when needed 2016-12-09 18:24:59 +01:00
Fabio Alessandrelli 95bdd97768 Use an instance variable for ip_type in raw sockets
PacketPeerUDP/StreamPeerTCP/TCP_Server now uses an instance variable
to store the selected ip_type (IPv4/IPv6/ANY, where ANY = dual stack).
All calls to resolve addresses, sending/receving data, connecting/listening
will use that socket type.
2016-12-09 18:24:59 +01:00
Fabio Alessandrelli 311f1f165b Fix getaddrinfo failing on android 2016-12-09 18:24:58 +01:00
Fabio Alessandrelli 4f07b595a1 Properly handle tcp connection failure 2016-12-09 18:24:58 +01:00
Fabio Alessandrelli cdc1ca0f13 Fix _set_ip_addr_port not setting the address. 2016-12-09 18:24:58 +01:00
eska a6ae3204fb OS additions and fixes for WebAssembly/asm.js
- Implement alert, shell_open, set_window_title
 - Add locale lookup, fixes #2477
 - Print without color control sequences
 - Move get_executable_path implementation to OS_JavaScript
2016-11-30 22:01:55 +01:00
George Marques b113c7b7a3
Rename WINRT_ENABLED to UWP_ENABLED 2016-11-03 14:51:08 -02:00
George Marques 3958171a7a Merge pull request #7006 from vnen/fix-ipv6-uwp
Fix IPv6 linking for UWP
2016-11-01 12:39:45 -02:00
George Marques 4160b3c9fe
Fix IPv6 linking for UWP 2016-10-31 21:39:45 -02:00
Rémi Verschelde d4c17700aa style: Fix PEP8 whitespace issues in Python files
Done with `autopep8 --select=E2,W2`, fixes:

- E201 - Remove extraneous whitespace.
- E202 - Remove extraneous whitespace.
- E203 - Remove extraneous whitespace.
- E211 - Remove extraneous whitespace.
- E221 - Fix extraneous whitespace around keywords.
- E222 - Fix extraneous whitespace around keywords.
- E223 - Fix extraneous whitespace around keywords.
- E224 - Remove extraneous whitespace around operator.
- E225 - Fix missing whitespace around operator.
- E226 - Fix missing whitespace around operator.
- E227 - Fix missing whitespace around operator.
- E228 - Fix missing whitespace around operator.
- E231 - Add missing whitespace.
- E231 - Fix various deprecated code (via lib2to3).
- E241 - Fix extraneous whitespace around keywords.
- E242 - Remove extraneous whitespace around operator.
- E251 - Remove whitespace around parameter '=' sign.
- E261 - Fix spacing after comment hash.
- E262 - Fix spacing after comment hash.
- E265 - Format block comments.
- E271 - Fix extraneous whitespace around keywords.
- E272 - Fix extraneous whitespace around keywords.
- E273 - Fix extraneous whitespace around keywords.
- E274 - Fix extraneous whitespace around keywords.
- W291 - Remove trailing whitespace.
- W293 - Remove trailing whitespace.
2016-11-01 00:35:16 +01:00
Fabio Alessandrelli bdc7ca84ca Define IPV6_V6ONLY flag if not defined on windows (old mingw versions) 2016-10-30 22:58:15 +01:00
Fabio Alessandrelli eb27e993f0 TCP/UDP Listen sockets can now be set to IPv6 only 2016-10-30 17:46:05 +01:00
Fabio Alessandrelli 812908e236 Fix windows debugger connection problems.
Unify network socket creation between platform.
Ensure IPV6_V6ONLY flag is not set on sockets (allow IPv4 connection in IPv6 socket, dual-stack).
2016-10-30 17:46:05 +01:00
Fabio Alessandrelli ee69bd81cf TCPServer listen now default to IP type ANY (v6 socket with v4 support) 2016-10-30 17:46:05 +01:00
Fabio Alessandrelli 25e29972a9 Fix PacketPeerUDP get_packet_port()
Properly convert port field from network to system ordering on incoming packets.
2016-10-26 18:27:01 +02:00
Rémi Verschelde c67e3a485d Merge pull request #6925 from godotengine/ipv6
Adding IPv6 support
2016-10-26 14:32:51 +02:00
Fabio Alessandrelli 80e911647c Pass correct address size (ipv4,ipv6) to socket connect, bind, sendto
The address size passed to network system calls now reflects the the actual IP type (v4 or v6).
Fix Windows and OSX ipv6 sockets
2016-10-26 08:20:31 +02:00
Ariel Manzur 672225b710 added windows support for ipv6, cleaned up unix code 2016-10-20 07:04:10 -03:00
Ariel Manzur 1d45f35a4a fixed some byte order and parsing problems 2016-10-19 18:32:36 -03:00
Ariel Manzur 887a897c02 adding ipv6 2016-10-18 18:53:18 -03:00
Rémi Verschelde fc8ccd5b8c SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.
2016-10-17 20:10:46 +02:00
Rémi Verschelde 248bc9159c drivers: Refactor SCsub and drop redundant env_drivers clone
The reordering of the SConscript includes allows to ensure that
stuff like the builtin zlib headers will be available for libpng.

Also moved glew back into global env, otherwise windows seems
not to find it... Kind of shooting in the dark with this multi-env
setup.
2016-10-15 18:10:18 +02:00
Juan Linietsky 1527cf8c0d 2D Shaders are working again using the new syntax, though all is buggy in general 2016-10-10 18:31:01 -03:00
Juan Linietsky fc61eb37ce Merge pull request #5920 from 29jm/fix-warnings
Fix some more warnings
2016-09-10 12:21:02 -03:00
George Marques c9b82498b4
Fix drivers coding for WinRT
- Add a proper function to retrieve IP addresses.
- Solve issues with Windows FileAccess and DirAccess to use the same code
  for WinRT.
- Add patches to the GLES2 rasterizer to workaround ANGLE issues.
2016-09-03 19:36:44 -03:00
Johan Manuel 046f94d3ac Remove some unused variables 2016-08-13 13:21:35 +02:00
Rémi Verschelde 22419082d9 Remove some noisy debug prints
Part of #5031
2016-07-17 18:25:21 +02:00
Juan Linietsky f9bd038ca7 Removed no longer needed check 2016-07-02 13:32:07 -03:00
Juan Linietsky ffbc2e56c9 Fix some bugs in diraccess, closes #5288 2016-06-30 18:23:39 -03:00
Juan Linietsky 8dac3bf3b1 Added function to notify ScriptLanguage when a thread is created/freed, allows scripts to allocate a stack there via TLS 2016-06-25 10:41:23 -03:00
Daniel J. Ramirez 422fac5066 Removed lots of prints 2016-06-18 18:01:06 -05:00
Juan Linietsky e3905a084e -made get_space_left() return values more homogenous, also for script, converted to mb, closes #4617 2016-06-18 11:32:45 -03:00
Juan Linietsky 61655d6dc2 Fixed make_dir and make_dir_recursive erros, closes #1680 closes #1872 2016-06-18 11:13:03 -03:00
Rémi Verschelde a7fc04626a Add missing license headers in our source files (#5255)
Also removes a couple wrong Godot headers from third-party source files.
2016-06-18 14:46:12 +02:00
Juan Linietsky 7f02627290 -Add visible IO errors when closing a file fails due to it being locked (most likely on windows), closes #4760 2016-06-13 10:10:50 -03:00
volzhs 9073dc9963 change invalid characters when get user data dir on Windows & Unix
Can't create user data folder when project name has ``\ / : * ? " < > |`` characters on OS_Windows & OS_Unix.
So, change it to ``-`` to be able to make folder.

fixes #4928 and it's altanative to #4986.
2016-06-03 03:39:37 +09:00
Aren Villanueva e5c1a2c3f7 Implements get_executable_path for OS X should proc_pidpath in os_osx.mm doesn't succeed. Silences the warning for javascript as the function currently appears superfluous. 2016-04-20 17:49:48 +10:00
Kyle Luce 674c6f2f2d Add function to convert Date time from a dictionary to Epoch
- Also changed get_time_from_unix_time to get_date_time_from_unix_time to be
  consistent.

Ticket:
https://github.com/godotengine/godot/issues/4038
2016-03-16 23:13:39 -07:00
Kyle Luce feef563f3f Fixes the month consistency issue in enums and get_date etc
- Also updated the docs to reflect this.
- Added some vim temp files to gitignore
- Changed NaCL to be consistent with the other OS_Unix::get_date implementation
   (added 1 to month to map to 1-12)

Ticket:
https://github.com/godotengine/godot/issues/4025
2016-03-13 15:27:39 -07:00
Zher Huei Lee d7052ddba3 Added relative paths for DirAccess::remove()
Follows similar behaviour to DirAccess::rename()
2016-03-01 10:40:31 +00:00
est31 fb1e52f4d8 Fix allocation bug if compiled with modern clang or gcc
* Add overflow checked intrinsic abstractions that check on overflow.
* Use them for memory allocation code.
* Use size_t type for memory allocation code to support full platform dependent width.

Fixes #3756.
2016-02-19 07:58:42 +01:00
Ariel Manzur 0cd8c054a2 thread renaming 2016-01-31 20:23:24 -03:00
Ariel Manzur b406aae790 total pointers 2016-01-31 20:23:24 -03:00
Juan Linietsky c633a29a39 improve reporting of error in wrong inheritance for autoload script 2016-01-13 09:42:03 -03:00
Rémi Verschelde 7f82c8d7c5 Merge pull request #3230 from touilleMan/issue-55
Remove unnecessary null pointer checks
2016-01-11 12:00:44 +01:00
Juan Linietsky a120c66f98 -Removed OS.get_system_time_msec(), this is undoable on Windows and also unusable from GDscript due to precision.
-Added, instead an OS.get_system_time_secs(), which is 32 bits friendly, fixes #3143
2016-01-10 18:24:55 -03:00
Juan Linietsky 52e53d4513 -Added a new mode, WRITE_READ to File, to recover compatibility with old projects but also achieve desired functionality. Closes #3272 2016-01-10 15:15:04 -03:00
eska a6c1a5c6d0 Fix pthread renaming in Open/FreeBSD 2016-01-09 15:56:31 +01:00
Emmanuel Leblond cabf923484 Remove unnecessary null pointer checks 2016-01-04 11:46:16 +01:00
Juan Linietsky 908f75c23f having active items is pointless in input map 2016-01-03 18:52:42 -03:00
Juan Linietsky 5769f8aaae Change rb+ to wb+ on file access READ_WRITE to allow more use cases, closes #2278 2016-01-02 12:03:33 -03:00
George Marques 5be9ff7b67 Update copyright to 2016 in headers 2016-01-01 11:50:53 -02:00
Ariel Manzur 02d6669a38 threads 2015-12-22 10:08:20 -03:00
Ariel Manzur 4a7e5fafb1 thread rename for ios and osx (if called from the thread to be renamed) 2015-12-18 02:58:30 -03:00
Ariel Manzur 10298b9534 thread set name 2015-12-17 06:24:27 -03:00
Juan Linietsky 95a469ad28 added binary API to StreamPeer, fixes #2863 2015-12-13 12:53:29 -03:00
est31 3dbf7dd7fa Fix windows build 2015-12-09 16:06:00 +01:00
est31 e1d02e4831 Make the setting unix-only.
For this, put the detection into the OS class and its subclass.
2015-11-30 02:35:59 +01:00
Juan Linietsky 6127f17368 Merge pull request #2756 from trond/bugfix_udp
UDP fixes
2015-11-19 19:33:04 -03:00
Trond Abusdal a8a2458f0b Fixed mistake where available buffer size would not be updated for each recvfrom-call in PacketPeerUDPWinsockPposix. 2015-11-19 19:06:01 +01:00
Juan Linietsky 0c3386b2ed Merge pull request #2707 from akien-mga/master
Cosmetic fixes to SCons buildsystem
2015-11-18 19:43:28 -03:00
Rémi Verschelde 9ab7de243f Fix error messages forcing a white font for subsequent messages
This is achieved using the "no specific formatting" \E[0m tag.
Fixes #2566.

Also remove the hardcoded black background colour and use default bolded terminal font for error message.
Error logs should now look good both on terminals with a dark and light background colour.
2015-11-10 18:30:40 +01:00
Rémi Verschelde 6334895088 Display error type (error, warning, script error) in OS::print_error
Previously all types of errors would be shown as ERROR, thus making for example warnings (WARN_PRINT) somewhat aggressive.
ERROR is displayed in red, WARNING in yellow and SCRIPT ERROR in magenta (though the latter does not seem used so far).
Fixes #1127.
2015-11-10 18:29:34 +01:00
Trond Abusdal 41a161647d * Winsock UDP messages sent to an unavailable target causing WSAECONNRESET will no longer close the socket.
* Ensured that unsigned<->signed conversion would not cause wrong buffer size values sent to recvfrom.
2015-11-09 01:33:16 +01:00
Trond Abusdal f809cd44ea Fixed PacketPeerUDP getting wrongly closed due to recvfrom using rb.data_left instead of rb.space_left. 2015-11-09 00:22:05 +01:00
Rémi Verschelde 399b1b0474 Cosmetic fixes to SCons buildsystem
- Removed trailing spaces
- Made sure all indentation is done using tabs (fixes #39)
- Potentially fixed an identation issue for openssl check
2015-11-01 20:53:26 +01:00
Juan Linietsky 277a339cf0 Merge pull request #2365 from Mavhod/patch-1
get_date on Linux
2015-10-17 10:49:46 -03:00
Kostadin Damyanov 29caf2bb5b Merge remote-tracking branch 'upstream/master' 2015-10-13 05:01:54 +03:00
Juan Linietsky a88f67821c HTML5 exporter seems to be fully functional
-user:// filesystem implemented
-default template page could look prettier, help appreciated
2015-09-12 10:54:47 -03:00
Juan Linietsky fad1faddae Removing locatime so this function compiles again.
I don't think it has any practical use anyway.
2015-09-10 13:10:23 -03:00
Ariel Manzur e3e93da6b9 fixed localtime thing for ios, not tested anywhere else 2015-09-09 20:24:38 +00:00
Mavhod 3942117bbf add ()
Sorry, firt time I put it but had no compiled for check.
2015-08-13 18:56:13 +07:00
Mavhod 69710055f0 get_date on Linux
tm_mon is 0-11
2015-08-13 14:09:21 +07:00
Kostadin Damyanov cdf1ac7d58 Merge remote-tracking branch 'upstream/master' 2015-08-09 12:45:21 +03:00
xodene 6b25e83ba7 tested and fixed unix os_system_time_msec() 2015-08-06 11:08:48 -07:00
Maximillian 6f9a084ac8 Add OS.get_system_time_msec 2015-08-06 10:29:33 -07:00
Juan Linietsky 55b34e05b3 -some changes by okam 2015-06-30 11:28:43 -03:00
Kostadin Damyanov 0038e27fc3 Merge remote-tracking branch 'upstream/master' 2015-06-18 22:48:29 +03:00
Kostadin Damyanov f99b72c04f Haiku: remove an #ifdef as the platform now supports MSG_NOSIGNAL 2015-06-10 21:18:39 +03:00
est31 c5338fd6c4 Add OS.get_time_zone_info function
The returned dictionary maps "name" to the
name of the current time zone, and "bias" to
a bias from UTC in minutes.
2015-06-06 05:57:33 +02:00
est31 803069886e Add utc param to get_time and get_date methods
If utc == false, we return the local time, like before.
Otherwise, we return UTC time.
utc defaults to false to not break behaviour.
2015-06-06 05:55:28 +02:00
Kostadin Damyanov a553327043 Haiku: some small fixes 2015-05-25 06:34:16 +03:00
Kostadin Damyanov 826f8af1ef Haiku: link with the haiku libs, stub the OS_Haiku class. 2015-05-25 06:02:55 +03:00
Kostadin Damyanov 4e07a2dea8 Haiku: fix building with UNIX_ENABLED. 2015-05-25 03:49:24 +03:00
Juan Linietsky 4804462ee0 -Fixes from source code analyzizer, closes #1768 2015-05-01 10:44:08 -03:00
Juan Linietsky 1de1a04b78 -fix local and global usage for DirAccess, fixes #791
please test anyway..
2015-04-18 20:11:33 -03:00
Juan Linietsky fdaa2920eb Updated copyright year in all headers 2015-04-18 14:38:54 -03:00
Juan Linietsky ca30c87019 Merge pull request #1438 from Spooner/fix_isometric_demo
Fix isometric demo
2015-03-22 14:59:58 -03:00
rollenrolm db0a71fc58 New option to show/hide hidden files 2015-03-21 18:33:32 +01:00