Commit graph

85 commits

Author SHA1 Message Date
Robin Hübner 8aeade74db Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in rest of 'modules/' 2019-08-12 10:15:54 +02:00
Rémi Verschelde 5dae2ea777 SCons: Enable C++11 on the whole codebase
**Important:** This does not mean *yet* that C++11 features should be used
in contributions to Godot's codebase.

For now this change is done solely for feature branches working on Vulkan
support and GDScript typed instruction sets for Godot 4.0, which will both
use C++11 features and are based on the master branch.

The plan is to start porting the codebase to C++11 after Godot 3.2 is
released, following upcoming guidelines on the subset of new features that
should be used, and when/how to use them.

We will advertise clearly when C++11 contributions are open, especially
once we start a coordinated effort to port Godot's massive codebase. In the
meantime, please bear with us and good ol' C++03. :)
2019-07-22 17:17:30 +02:00
Rémi Verschelde b0d41847ed SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor defines
It's the recommended way to set those, and is more portable
(automatically prepends -D for GCC/Clang and /D for MSVC).

We still use CPPFLAGS for some pre-processor flags which are not
defines.
2019-07-03 09:59:04 +02:00
Rémi Verschelde d61bce1b75
Merge pull request #29910 from m4gr3d/dev_deprecate_armv6
Deprecate support for Android armv6 architecture
2019-06-20 10:22:23 +02:00
fhuya f7200d6960 Deprecate armv6 support for Android 2019-06-19 12:05:58 -07:00
JohnJLight 38d3bfe971 Made use of semicolons more consitent, fixed formatting 2019-06-19 15:24:31 +02:00
Rémi Verschelde d6176db271 Unexpose subclasses of ResourceFormatLoader and -Saver
ResourceFormatLoader and ResourceFormatSaver are meant to be overridden
to add support for different formats in ResourceLoader and ResourceSaver.
Those should be exposed as they can be overridden in plugins.

On the other hand, all predefined subclasses of those two base classes
are only meant to register support for new file and resource types, but
should not and cannot be used directly from script, so they should not
be exposed.

Also unexposed ResourceImporterOGGVorbis (and thus its base class
ResourceImporter) which are editor-only.
2019-06-18 17:56:23 +02:00
qarmin 8245db869f Small fixes to unrechable code, possibly overflows, using NULL pointers 2019-06-03 21:52:50 +02:00
Rémi Verschelde a7f00f3bac
Merge pull request #28530 from akien-mga/scons-prepend-cpppath
SCons: Always use env.Prepend for CPPPATH
2019-04-30 18:23:38 +02:00
Rémi Verschelde 9da3d736ad Fix sign-compare error from #26051 2019-04-30 14:12:46 +02:00
Rémi Verschelde 12cc760538
Merge pull request #26051 from 20kdc/videofix
webm/theora/yuv2rgb/libsimplewebm: Fix colour issues I could find.
2019-04-30 13:38:44 +02:00
Rémi Verschelde d52b70fb5e SCons: Always use env.Prepend for CPPPATH
Include paths are processed from left to right, so we use Prepend to
ensure that paths to bundled thirdparty files will have precedence over
system paths (e.g. `/usr/include` should have lowest priority).
2019-04-30 13:12:06 +02:00
Juan Linietsky af9bb0ea15 Clean up latency related functions 2019-04-27 12:23:05 -03:00
Rémi Verschelde c2a669a9f0 SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGS
Many contributors (me included) did not fully understand what CCFLAGS,
CXXFLAGS and CPPFLAGS refer to exactly, and were thus not using them
in the way they are intended to be.

As per the SCons manual: https://www.scons.org/doc/HTML/scons-user/apa.html

- CCFLAGS: General options that are passed to the C and C++ compilers.
- CFLAGS: General options that are passed to the C compiler (C only;
  not C++).
- CXXFLAGS: General options that are passed to the C++ compiler. By
  default, this includes the value of $CCFLAGS, so that setting
  $CCFLAGS affects both C and C++ compilation.
- CPPFLAGS: User-specified C preprocessor options. These will be
  included in any command that uses the C preprocessor, including not
  just compilation of C and C++ source files [...], but also [...]
  Fortran [...] and [...] assembly language source file[s].

TL;DR: Compiler options go to CCFLAGS, unless they must be restricted
to either C (CFLAGS) or C++ (CXXFLAGS). Preprocessor defines go to
CPPFLAGS.
2019-04-24 16:57:58 +02:00
Rémi Verschelde 6af69f851a doc: Drop unused <demos> tag 2019-04-19 11:03:46 +02:00
Rémi Verschelde 39c868171e doc: Bump version to 3.2 2019-04-01 12:33:56 +02:00
20kdc b1f5cee7d9 webm/theora/yuv2rgb: Fix YUV conversion issues and add BGRP WEBM handling. (Now clang-format friendly.)
This should fix the various issues with colours in Ogg Theora and WEBM playback.
(A reference project is attached to PR #26051, which this commit should be part of.)

This version of the commit, rather than moving x->RGBA handling into libsimplewebm, uses a colourspace field added to libsimplewebm by a PR there.
Thus, the commit that precedes this should be the synchronization & cleanup commit for that.

Also, this version is now clang-format friendly. I hope.
2019-02-21 22:33:43 +00:00
Rémi Verschelde 7f4ee36469 Android: Add support for x86_64 architecture
Like arm64v8, this is only supported by API 21 and later,
so we enforce 21 as min API for x86_64.

Part of #25030.
2019-01-16 11:39:39 +01:00
Rémi Verschelde e5f1d19352 Consistency in resource format saver/loader de-registration
Some used 'is_valid()' checks, others not. Validity is already checked in 'unref()',
and 'remove_resource_format_*()' has an ERR_FAIL condition on 'is_null()' already
(which shouldn't happen since we're only unregistering things that we previously
registered.

Also add missing GDCLASS statement in ResourceFormatLoaderVideoStreamGDNative,
missed in #20552 which was last amended before #19501 was merged.
2019-01-10 12:45:57 +01:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde dcc7f2b54b
Merge pull request #24545 from akien-mga/osxcross-mono
SCons: Allow building Mono module with OSXCross
2018-12-30 15:07:18 +01:00
Rémi Verschelde 95e96947f6 SCons: Drop ios_sim option forcing x86, simulator needs x86_64 2018-12-27 14:11:13 +01:00
Rémi Verschelde d52100f4ff SCons: Allow building Mono module with OSXCross
Improve the test logic to only assume that we're building for macOS
if OSXCROSS_ROOT is defined *and* we requested p=osx.

Supersedes #24480.
2018-12-22 12:36:19 +01:00
Rémi Verschelde 6770357e47 Android: Better identify thirdparty C/C++ code
- The `cpu-features.{c,h}` code was only used by chance by the webm
  (libvpx) code, so I moved it there. It was actually introduced before
  that and wasn't in use, and libvpx just happened to be able to
  compile thanks to it being bundled.
  It could potentially be compiled on the fly from the Android NDK, but
  since we plan to replace the webm module by a GDNative plugin in the
  near future, I went the bundling route.

- `ifaddrs_android.h` is already provided in the Android NDK as
  `ifaddrs.h`, same as on other Unixes. Yet we cannot use it until we
  up the min API level to 24, where `getifaddrs` is first defined.
  I moved the files to `thirdparty/misc` and synced them with upstream
  WebRTC (only indentation changes and removal of `static` qualifiers).

Also removes dropped thirdparty files from COPYRIGHT.txt after changes
in #24105 and #24145.
2018-12-20 13:07:54 +01:00
Marc Gilleron 065e2670af Added basic support for custom resource savers and loaders 2018-12-15 05:34:53 +00:00
Marc Gilleron c1bba054e6 Don't delete FileAccess when it is null 2018-10-05 20:24:28 +01:00
Rémi Verschelde 3a2ca68af3 SCons: Build thirdparty code in own env, disable warnings
Also remove unnecessary `Export('env')` in other SCsubs,
Export should only be used when exporting *new* objects.
2018-09-28 14:07:39 +02:00
Rémi Verschelde 5adf7aa6b7 SCons: Fix checks for clang in env['CXX']
They would match the whole path instead of only the filename.
2018-09-25 11:15:25 +02:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Leon Krause 92b259ccf1 Fix WebM module for HTML5 platform 2018-08-27 04:08:04 +02:00
Rémi Verschelde 333999c24f Fix Theora/Webm loaders declaring binary extension
RES_BASE_EXTENSION is only to declare our proprietary binary formats
(e.g. "scn", "res", etc.).

Fixes #20395.
2018-08-16 19:17:24 +02:00
Rémi Verschelde 6dc20adadd Fix loading and exporting of Theora and WebM video streams
Theora and WebM video streams were mistakenly imported with a ResourceImporter,
but those imported ogvstr and webmstr were simply links to the local resource.
While that works fine in the editor, it no longer works when exporting a game
as the "source" ogv and webm files are ommitted and only the ogvstr and webmstr
references were exported.

As discussed with @reduz, it doesn't make sense to import videos, as we only
intend to play them back and not modify them/access their raw data. As such we
use a ResourceFormatLoader instead of an importer, to load the file on the fly.
ogv and webm files linked to this loader are now considered as resources, and
thus exported.

Note: The Theora and WebM loaders lack any kind of validity check beyond the
existence of the target file, but it was already the case with the importer.
Better checks and error reports could be added, but those loaders will eventually
be obsoleted by GDNative plugins anyway.

Fixes #14954.
2018-07-03 20:21:46 +02:00
Rémi Verschelde 3334209a73 SCons: Pass env to modules can_build method
This allows to disable modules based on the environment,
in particular `env[tools]` which tells us if we are
building the editor or not.
2018-05-30 19:11:36 +02:00
bruvzg ce64c2a32e
Fix Linux/X11 build on ARMs. 2018-05-11 17:34:43 +03:00
Fabio Alessandrelli e7b9e2f970 Fix IPhone and OSX cross compilation 2018-03-28 19:08:20 +02:00
ShyRed e71f109910 Update libwebm
Update of libwebm.

Up-to-date version of libwebm contains several bugfixes that allow playback of files that would crash Godot otherwise.
2018-03-09 18:18:30 +01:00
Rémi Verschelde 3fa77b3172 doc: Remove status from hardcoded version string
It has no practical use case and just generates noise for each alpha, beta, etc.
2018-02-27 13:40:49 +01:00
Rémi Verschelde 1602e0cdb9 SCons: Remove references to obsolete "fat" bits 2018-02-19 23:39:56 +01:00
Rémi Verschelde 3c7a39b40c doc: Update version string in header 2018-02-19 10:46:33 +01:00
Rémi Verschelde 717e388e19
Merge pull request #14804 from ColinKinloch/master
Fixed android arm64v8
2018-02-14 11:55:28 +01:00
Rémi Verschelde d516aab8fa doc: Sync with current source
Also enhance RigidBody docs as per https://github.com/godotengine/godot-docs/pull/1018
and fix the version tag in all files (not really stable yet, but it makes no sense
to hardcode rc3 at this stage).
2018-01-25 08:50:56 +01:00
Rémi Verschelde e28cdc4654 doc: Update version string in XML 2018-01-13 11:43:42 +01:00
Bojidar Marinov 9b8e8b2220
Bind many more properties to scripts
Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
2018-01-12 00:58:14 +02:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Colin Kinloch 853b1daa49 Fixed android arm64v8 2017-12-23 16:49:04 +00:00
Rémi Verschelde 96dbf19093
Merge pull request #14332 from akien-mga/clang-format
Update style for clang-format 5.0.0, new min required version
2017-12-07 09:18:11 +01:00
Rémi Verschelde 624a2b08f3 doc: Sync classref after a496dd4d, removing NOEDITOR properties from doc 2017-12-07 08:29:38 +01:00
Rémi Verschelde 13c2ff9320 Style: Apply new clang-format 5.0 style to all files 2017-12-07 08:02:00 +01:00
Rémi Verschelde 92f07fefcd doc: Remove setters and getters now exposed via properties/members 2017-11-24 18:10:32 +01:00