Commit Graph

276 Commits

Author SHA1 Message Date
Rémi Verschelde da4a870bc4 opus: Move public headers to match system install
(cherry picked from commit 611a94e3a6)
2016-11-03 21:22:56 +01:00
Rémi Verschelde ce54b6ea8b scons: Reorder options for clarity
Also prefix all thirdparty-related toggles with `builtin`.

(cherry picked from commit cc95d4448c)
2016-11-03 08:41:10 +01:00
Rémi Verschelde a7389217f8 style: Fix PEP8 blank lines issues in Python files
Done with `autopep8 --select=E3,W3`, fixes:

- E301 - Add missing blank line.
- E302 - Add missing 2 blank lines.
- E303 - Remove extra blank lines.
- E304 - Remove blank line following function decorator.
- E309 - Add missing blank line.
- W391 - Remove trailing blank lines.
2016-11-02 22:29:36 +01:00
Rémi Verschelde e259bf8bbb 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-02 22:28:28 +01:00
Rémi Verschelde 561c1f17a1 style: Start applying PEP8 to Python files, indentation issues
Done with `autopep8 --select=E1`, fixes:

- E101 - Reindent all lines.
- E112 - Fix under-indented comments.
- E113 - Fix over-indented comments.
- E115 - Fix under-indented comments.
- E116 - Fix over-indented comments.
- E121 - Fix a badly indented line.
- E122 - Fix a badly indented line.
- E123 - Fix a badly indented line.
- E124 - Fix a badly indented line.
- E125 - Fix indentation undistinguish from the next logical line.
- E126 - Fix a badly indented line.
- E127 - Fix a badly indented line.
- E128 - Fix a badly indented line.
- E129 - Fix a badly indented line.
2016-11-02 22:26:55 +01:00
Rémi Verschelde 8087be05c7 scons: msvc_is_detected not available in 2.1 2016-10-31 07:52:40 +01:00
yg2f caf42f77d2 Fixes #6487, GDscript compiler ignores OPCODE_LINE and OPCODE_BREAKPOINT in Release mode
When godot is in release mode, GDscript compiler does not generate
bytecodes for OPCODE_LINE and OPCODE_BREAKPOINT anymore.

This optimizes GDscript execution speed when the script contains a lot
of comments in blocs executed in loops.

Fixes #6487

(cherry picked from commit 217e09c79d)
2016-10-31 00:00:46 +01:00
Rémi Verschelde 5a49e45d21 SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.

(cherry picked from commit fc8ccd5b8c)
2016-10-30 14:51:34 +01:00
Błażej Szczygieł 7143401e25 Theora: Don't compile unnecessary files, rename "x86_opt_*"
(cherry picked from commit 4ffa8f224d)
2016-10-30 14:51:34 +01:00
Rémi Verschelde d96842b80e freetype: Make it a module and split thirdparty library
Comment out the weird workaround for building on Windows at it might
not be needed anymore. Testing needed to confirm.

(cherry picked from commit edbc0c0d0b)
2016-10-30 14:51:33 +01:00
Rémi Verschelde 8bf3bc3449 chibi: Move to a module
(cherry picked from commit e6dc51a0f7)
2016-10-30 14:51:33 +01:00
Rémi Verschelde 1022705707 squish: Move to a module and split thirdparty lib
(cherry picked from commit 8311a78df5)
2016-10-30 14:51:33 +01:00
Rémi Verschelde c8a97c3678 mpc: Move to a module and split thirdparty libmpcdec
(cherry picked from commit 5c12c9e69b)
2016-10-30 14:51:33 +01:00
Rémi Verschelde 82e8721715 theora: Move to a module and split thirdparty lib
Same rationale as the previous commits.

(cherry picked from commit cfcc8a20e8)
2016-10-30 14:51:32 +01:00
Rémi Verschelde bfea3f1d9a modules: Clone env in each module
This allows to pass include paths and flags only to a given thirdparty
library, thus preventing conflicts between their files (e.g. between
opus and openssl which both provide modes.h.

This also has the nice effect of making the compilation command smaller
for each module as it no longer related to all other modules, only the
final linking brings them together.

This however requires adding manually the ogg include path in opus
and vorbis when building against the builtin ogg, since it is no longer
in the global env.

Also simplified template 'thirdparty_<module>_sources' to
'thirdparty_sources'.

"Core" modules like cscript, gdscript, gridmap, ik and virtual_script
still use the main env_modules, but it could be changed if need be.

(cherry picked from commit da09c6131b)

Obviously removed the parts about enet and visual_script.
2016-10-30 14:51:32 +01:00
Rémi Verschelde 4cd640f684 openssl: Move to a module and split thirdparty lib
Same rationale as the previous commits.

(cherry picked from commit 422196759f)

Removed the winrt-specific parts.
2016-10-30 14:51:32 +01:00
Rémi Verschelde 995dcb610c ogg/vorbis/opus/speex: Make them modules and unbundle thirdparty libs
Took the opportunity to undo the Godot changed made to the
opus source. The opus module should eventually be built in its
own environment to avoid polluting others with too many include
dirs and defines.

TODO: Fix the platform/ stuff for opus.
(cherry picked from commit d9a291f641)

speex module was only added while cherry-picking, as speex is removed
in the master branch but we don't want to break compatibility in 2.1.x.
Unbundling wasn't done as the module uses the internal speex_free,
so it would require some more work.
2016-10-30 14:51:31 +01:00
Rémi Verschelde 55414bc573 webp: Make it a module and unbundle libwebp thirdparty files
Note that there are two Godot-specific changes made to libwebp
for the javascript/HTML5 platform. They are documented in the
README.md.

(cherry picked from commit ee3cf211c6)
2016-10-30 14:51:30 +01:00
Rémi Verschelde 819ccdd340 dds/etc1/pbm/pvr: Make those modules and split thirdparty files
They are not particularly packaged in Linux distros so we do not
facilitate unbundling via SCons. There could be done if/when there
is interest.

Also s/pnm/pbm/, long-lived typo :)

(cherry picked from commit b1e8889d96)
2016-10-30 14:51:30 +01:00
Rémi Verschelde ea1e180e4a jpg: Make it a module and split jpgd thirdparty files
Similar rationale as in previous commit.

(cherry picked from commit 16ba665db6)
2016-10-30 14:51:30 +01:00
Pedro J. Estébanez 2261c65f19 Adapt overlooked instances of zero-based column numbers
(cherry picked from commit 1b3dcac281)
2016-10-17 20:49:28 +02:00
Fabio Alessandrelli d5ee98bb2c Revert "Add warning when (pre)loading paths with leading / (#4280 - #3106)"
Also closes: #6801

This reverts commit e59820ac94.

(cherry picked from commit 11349a786b)
2016-10-17 20:48:52 +02:00
Pedro J. Estébanez 99d82f3033 Make text column numbers one-based
Make one-based the column number on the code editor

Make one-based the column number for GDScript error messages

Make one-based the column number for shader code error messages

(cherry picked from commit 2f80965845)
2016-10-17 20:44:47 +02:00
Rémi Verschelde b3bf3c392a i18n: Fix string that broke msgmerge
(cherry picked from commit 2fb5a00305)
2016-10-09 18:21:59 +02:00
Fabio Alessandrelli e51cd3d454 Throw an error when exporting a resource class
"export var tex = Texture"
will now throw an error to avoid crashing the editor:
"Exported constant not a type or resource"

Fixes #6719 . Closes #6729

(cherry picked from commit ee7df2c89a)
2016-10-09 17:40:19 +02:00
Fabio Alessandrelli ba095b8dcc Add warning when (pre)loading paths with leading / (#4280 - #3106)
(cherry picked from commit e59820ac94)
2016-10-09 17:34:23 +02:00
Juan Linietsky a72945f4e3 Added constants from types in code completion, somehow this was never added.
Stuff like Label.ALIGN_CENTER or Mesh.PRIMITIVE_TRIANGLES did not complete..

(cherry picked from commit b83350f4b2)
2016-09-18 23:19:04 +02:00
Răzvan Cosmin Rădulescu c4f79716d3 Clean up GDScript template
(cherry picked from commit 00e743b76a)
2016-09-18 23:05:45 +02:00
Pedro J. Estébanez cccc35e427 Improve/fix GridMap editor
Fix cursor/palette update on tile eyedropping
Fix editor not cleaning its state when becoming inactive, which leaves indicators behind among other issues
Fix/improve menu/keyboard shortcuts
Merge 'Gridmap Editor' and 'Grid Map' settings into the latter

(cherry picked from commit 7d35973486)
2016-09-01 08:41:31 +02:00
Bojidar Marinov f25e9a08e1 Fix #5891 by not expecting the script instance to be a GDInstance
It could be a placeholder instance as well

(cherry picked from commit 76ea995228)
2016-08-08 18:14:44 +02:00
eska b80c42ef4e Document FuncRef, GDFunctionState, InstancePlaceholder, RID, World2D 2016-07-30 21:27:58 +02:00
Juan Linietsky 9151eb591d Changed the way the step decimals are computed to a safer way, fixes many issues. 2016-07-26 17:25:10 -03:00
Juan Linietsky f51a816253 Set proper line into operators when parsing GDScript, fixes #5822 2016-07-22 09:23:26 -03:00
Juan Linietsky 33cc480350 Fixed reloading of tool scripts within editor, they should work much better now, closes #3194 2016-07-20 22:37:48 -03:00
Juan Linietsky 5218f35b7f Forgot to clear signals on recompile, closes #5729 2016-07-17 13:49:59 -03:00
George Marques 8113ba8bef
Allow semicolon after 'pass' keyword 2016-07-10 12:20:53 -03:00
George Marques 4bf31b3f3d
Revert removing of function call in gd_parser
The function call was removed in #5538 because of the unused return value,
but the function itself has side effects and the absence of the call was
causing crashes.
2016-07-08 22:12:59 -03:00
Rémi Verschelde b6ac91c0e6 Removed unused variables (first pass)
Fixes various gcc 5.4.0 warnings for -Wunused-variable and -Wunused-but-set-variable
2016-07-07 23:15:03 +02:00
Juan Linietsky 48959f0590 Merge pull request #5407 from RandomShaper/opt-self-indexing
Optimize member access with self
2016-07-01 12:25:26 -03:00
Juan Linietsky e49b73e93a Only check for constants when parsing constants, should close #5497 2016-06-30 10:40:13 -03:00
Juan Linietsky cf0fbe493f Ability to put constants in constant expressions, closes #5264 2016-06-29 22:17:55 -03:00
Juan Linietsky 36e754457f Warn instad of crashing when class instance is gone after yield. Closes #5247 , probably closes other yield related crashes 2016-06-29 21:06:16 -03:00
Juan Linietsky 3754f6cd75 Properly show the source:line even in inner clases, closes #3766 2016-06-28 11:49:57 -03:00
Juan Linietsky cf6450043d Fix bug in inner class reference, closes #1411 2016-06-28 11:15:55 -03:00
Juan Linietsky f4c6640827 Fixed bug related to resolving constants in a class, closes #1110 2016-06-28 11:02:53 -03:00
Juan Linietsky 565bb3afcc Fix extends issue, closes #4026 2016-06-28 10:44:38 -03:00
George Marques dc2ec3140a
Fix cscript module syntax errors for MSVC compiler 2016-06-26 14:19:46 -03:00
Juan Linietsky f31a6d26f1 missing files 2016-06-26 11:02:15 -03:00
Juan Linietsky 3813160ea0 -Fix crashes with thread_exit()
-Added draft of C script API (still disabled and unused)
2016-06-26 10:54:45 -03:00
Pedro J. Estébanez d306b9bea5 Optimize member access with self
Let the compiler take the fast path when a member is superfluously accessed with `self.`.
2016-06-25 15:59:39 +02:00