summaryrefslogtreecommitdiff
path: root/modules/bmp
AgeCommit message (Collapse)Author
2020-08-18Add more error explanations in the BMP image loaderHugo Locurcio
This closes #32166 and closes #30629.
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-14Enforce use of bool literals instead of integersRémi Verschelde
Using clang-tidy's `modernize-use-bool-literals`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-30SCons: Format buildsystem files with psf/blackRémi Verschelde
Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
2020-03-23Adding missing include guards to header files identified by LGTM.Rajat Goswami
This addresses the issue godotengine/godot#37143
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-09-22Changed some code found by Clang Tidy and Coverityqarmin
2019-08-12Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in rest of 'modules/'Robin Hübner
2019-07-17Fix BMP loader to distinguish between compression typesAndrii Doroshenko (Xrayez)
Some of the values in compression enumeration represent uncompressed formats: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/4e588f70-bd92-4a6f-b77f-35d0feaf7a57 This allows the loader to proceed with uncompressed formats. Note that loading compressed BMP's is still not supported.
2019-07-17Fix BMP loader incorrectly interpreting color table sizeAndrii Doroshenko (Xrayez)
Color table should exist for images with bit count <= 8. Importing 16-bit BMP images could also likely have a color table but they're not currently supported in Godot.
2019-06-26Some code changed with Clang-Tidyqarmin
2019-06-20Fix always true/false valuesqarmin
2019-04-23Import 4/1 bit bmp imagesAndrii Doroshenko (Xrayez)
Add some sanity checks according to bmp specification. Read color table and index data within the same scope and then simply extend the color palette. This particular implementation has one limitation: not all 4/1 bit images can be imported as it requires bit unpacking (size dimensions must be a multiple of 8 for 1-bit and 2 (even) for 4-bit images).
2019-04-23Merge pull request #24547 from Shinryuuji/masterHein-Pieter van Braam
Add support for 8bpp bmp files
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-23Add support for 8bpp bmp filesShinryuuji
2018-10-03Fix warnings on release builds (not DEBUG_ENABLED)Rémi Verschelde
Fixes the following Clang 5 warnings: ``` modules/bmp/image_loader_bmp.cpp:46:60: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] modules/bmp/image_loader_bmp.cpp:48:61: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] drivers/png/image_loader_png.cpp:231:20: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] scene/gui/graph_edit.cpp:1045:8: warning: comparison of constant 0 with expression of type 'bool' is always false [-Wtautological-constant-out-of-range-compare] core/class_db.cpp:812:13: warning: unused variable 'check' [-Wunused-variable] core/io/file_access_pack.cpp:172:11: warning: unused variable 'ver_rev' [-Wunused-variable] core/math/bsp_tree.cpp:195:13: warning: unused variable 'plane' [-Wunused-variable] core/math/bsp_tree.cpp:168:6: warning: unused variable 'plane_count' [-Wunused-variable] modules/gdscript/gdscript_function.cpp:685:10: warning: unused variable 'ok' [-Wunused-variable] modules/gdscript/gdscript_function.cpp:706:10: warning: unused variable 'ok' [-Wunused-variable] modules/gdscript/gdscript_function.cpp:755:19: warning: unused variable 'var_type' [-Wunused-variable] modules/gdscript/gdscript_function.cpp:1306:12: warning: unused variable 'err' [-Wunused-variable] modules/gdscript/gdscript_function.cpp:158:15: warning: unused function '_get_var_type' [-Wunused-function] modules/gdscript/gdscript_parser.cpp:750:20: warning: unused variable 'lv' [-Wunused-variable] modules/gdscript/gdscript_parser.cpp:59:15: warning: unused function '_find_function_name' [-Wunused-function] scene/main/node.cpp:2489:13: warning: unused function '_Node_debug_sn' [-Wunused-function] ```
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
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-07-08Fix bits_per_pixel validation in BMP and TGA loader modules.Saracen
2018-05-30SCons: Pass env to modules can_build methodRémi Verschelde
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-04-30BMP moduleSaracen