summaryrefslogtreecommitdiff
path: root/scene/2d/tile_map.cpp
AgeCommit message (Collapse)Author
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: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
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-10Rename various TileMap methods/properties for clarity and consistencyHugo Locurcio
The YSort renames were tracked in https://github.com/godotengine/godot/issues/16863. This closes https://github.com/godotengine/godot-proposals/issues/814.
2020-05-10Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
2020-05-03Fix performance issue in update_bitmask_region fallbackThomas Riedmair
2020-04-21Add proper type to most public API uses of ArrayJuan Linietsky
2020-04-21Add ability to bind typed arrays to script APIJuan Linietsky
Note: Only replaced 2 instances to test, Node.get_children and TileMap.get_used_cells Note: Will do a mass replace on later PRs of whathever I can find, but probably need a tool to grep through doc. Warning: Mono will break, needs to be fixed (and so do TypeScript and NativeScript, need to ask respective maintainers)
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-02-28Signals: Port connect calls to use callable_mpRémi Verschelde
Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.)
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-11Bugfixes and ability to better specify filter and repeat modes everywhere.Juan Linietsky
Removes antialiased flag for draw_* methods.
2020-02-11A lot of progress with canvas rendering, still far from working.Juan Linietsky
2020-02-11Texture refactorJuan Linietsky
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
2020-02-10- Integrated NavigationServer and Navigation2DServer.Andrea Catania
- Added Navigation Agents and Obstacles. - Integrated Collision Avoidance. This work has been kindly sponsored by IMVU.
2020-01-09Don't compile editor-only function when tools=noGilles Roudière
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-11-20Fix some overflows and unitialized variablesRafał Mikrut
2019-10-08Fix crash in TileMap::update_cell_bitmaskqarmin
2019-10-05Fix crash in TileMap::fix_invalid_tilesqarmin
2019-09-26Fix TileMap world_to_map rounding issue for negative integersbob
The previous code would fail for negative integer values like -3.0 (would return -4 instead of -3). Fixes #31468.
2019-09-25Added some obvious errors explanationsqarmin
2019-09-01Initialize TileMap Custom TransformBhupendra Aole
Initialize TileMap Custom Transform to same as Cell Size (64). Fixes #30948.
2019-08-08Fix corrupted TileMap saves due to missing/wrong formatBojidar Marinov
Fixes #29312
2019-07-09Improve the node configuration warning displayHugo Locurcio
- Refer to properties explicitly when possible - When multiple warnings are returned, always separate them by one blank line to make them easier to distinguish - Improve grammar and formatting
2019-07-08Fix some issue with TileMap's and other nodes' boundariesBojidar Marinov
Fixes #30348 Addresses a small part of #30012
2019-07-06Added release function to PoolVector::Access.Ibrahn Sahir
For clarity, assign-to-release idiom for PoolVector::Read/Write replaced with a function call. Existing uses replaced (or removed if already handled by scope)
2019-07-02Tilemap fix displaced textures and shapes and added center texture and ↵Ranoller
compatibility mode This commit fix #22989 #15249 #28206. Main problem is that tilemap displace textures in different tile origins in a strange way and doesn´t respect coincidence between texture and shapes in not uniform tiles. This issue is present in godot 3.0 and godot 3.1. To maintain compatibility are added a compatibility mode and a center texture option. Other related issues and pull request: #28896 #29487 #29519 #29961. Idications of #30204 are added
2019-06-30Fix uninitialized variables in Line2D, JSONParseResult and TileMapRémi Verschelde
2019-06-27Allow ColisionObject2D to get shapes from tilemapsBojidar Marinov
Fixes #4454 and likely resolves #22285
2019-06-05Make tilemap texture origin point top-left.Ranoller
Fix https://github.com/godotengine/godot/issues/29487. In this commit: https://github.com/godotengine/godot/pull/28896 bad offset of textures and shapes was fixed, but a center of texture was added too, and this seems not dessired by default because breaks too much compatibility with demos and user projects. A future Check box for center texture can be added
2019-06-01Merge pull request #24560 from guilhermefelipecgs/fix_24549Rémi Verschelde
Add EDITMODE_PRIORITY for ATLAS_TILE
2019-05-28Merge pull request #28896 from Ranoller/masterRémi Verschelde
Fix tilemap displaced textures and shapes
2019-05-19Fix typos with codespellRémi Verschelde
Using codespell 1.15.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear doubleclick leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
2019-05-15Fix tilemap displaced textures and shapes with origin point BOTTOM_LEFT and ↵Ranoller
CENTER and other casuistry This commit fix https://github.com/godotengine/godot/issues/22989 fixing displaced textures and not coincident shapes in tilemap. Fix too: https://github.com/godotengine/godot/issues/15249, https://github.com/godotengine/godot/issues/28206, https://github.com/godotengine/godot/issues/28610 and probably others
2019-04-30Merge pull request #27845 from samdze/masterRémi Verschelde
Make TileMap overridable "set_cell" function called on undo/redo
2019-04-27Make TileMap overridable "set_cell" function called on undo/redoSamuele Zolfanelli
2019-04-09Style: Apply new changes from clang-format 8.0Rémi Verschelde
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0, so contributors can keep using those versions for now (they will not undo those changes).
2019-04-05Merge pull request #27365 from Byteron/tile_map_negative_offsetMariano Javier Suligoy
TileMap, negative Y and X Offset
2019-04-05added negative X and negative Y offset to TileMapAaron Winter
clang-format added negative X and negative Y offset to TileMap
2019-03-15Make size cache dirty when removing tiles in 'TileMap'Michael Alexsander Silva Dias
2019-03-04TileSet/TileMap: Decompose solid non-convex polygons into convexes. Real fix ↵Mariano Suligoy
for #24003
2019-02-20Add -Wshadow=local to warnings and fix reported issues.marxin
Fixes #25316.
2019-02-13Fix typos with codespellRémi Verschelde
Using codespell 1.14.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang doubleclick lod nd numer que te unselect EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
2019-01-18-Re-added margins in one way collision (made in a more user friendly way ↵Juan Linietsky
than in Godot 2.1), fixes #23860 -Fixed potential bug in OWC (i dont think anyone had it but..)
2019-01-16Appease some CppCheck warns for files in the "scene" directoryMichael Alexsander Silva Dias
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!