summaryrefslogtreecommitdiffstats
path: root/scene/2d/tile_map.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #44839 from qarmin/fix_crash_tile_mapRémi Verschelde2021-01-011-1/+3
|\ | | | | Do not iterate over map when removing its values
| * Do not iterate over map when removing its valuesRafał Mikrut2020-12-311-1/+3
| |
* | Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
|/ | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Rename empty() to is_empty()Marcel Admiraal2020-12-281-1/+1
|
* Refactored 2D shader and lighting systemreduz2020-10-241-3/+2
| | | | | | | | | | -Removed normal/specular properties from nodes -Create CanvasTexture, which can contain normal/specular channels -Refactored, optimized and simplified 2D shaders -Use atlas for light textures. -Use a shadow atlas for shadow textures. -Use both items aboves to make light rendering stateless (faster). -Reorganized uniform sets for more efficiency.
* Refactor MethodBind to use variadic templatesreduz2020-10-181-1/+0
| | | | Removed make_binders and the old style generated binders.
* TileMap: Set texture_filter and texture_repeat to generated CanvasItems and ↵Mateo Dev .592020-09-121-0/+25
| | | | update when it changes
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-53/+95
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-142/+0
| | | | | | | | | | | | | | 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.
* Rename various TileMap methods/properties for clarity and consistencyHugo Locurcio2020-05-101-12/+12
| | | | | | The YSort renames were tracked in https://github.com/godotengine/godot/issues/16863. This closes https://github.com/godotengine/godot-proposals/issues/814.
* Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-101-1/+2
| | | | | | | 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.
* Fix performance issue in update_bitmask_region fallbackThomas Riedmair2020-05-031-5/+2
|
* Add proper type to most public API uses of ArrayJuan Linietsky2020-04-211-3/+3
|
* Add ability to bind typed arrays to script APIJuan Linietsky2020-04-211-3/+3
| | | | | | | 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)
* Replace NULL with nullptrlupoDharkael2020-04-021-8/+8
|
* Renaming of servers for coherency.Juan Linietsky2020-03-271-48/+48
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Signals: Port connect calls to use callable_mpRémi Verschelde2020-02-281-3/+2
| | | | | | | | | 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.)
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | - 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.
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-3/+3
| | | | objects and made them default.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-9/+7
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Bugfixes and ability to better specify filter and repeat modes everywhere.Juan Linietsky2020-02-111-1/+1
| | | | Removes antialiased flag for draw_* methods.
* A lot of progress with canvas rendering, still far from working.Juan Linietsky2020-02-111-1/+1
|
* Texture refactorJuan Linietsky2020-02-111-2/+2
| | | | | | | | -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
* - Integrated NavigationServer and Navigation2DServer.Andrea Catania2020-02-101-6/+10
| | | | | | | - Added Navigation Agents and Obstacles. - Integrated Collision Avoidance. This work has been kindly sponsored by IMVU.
* Don't compile editor-only function when tools=noGilles Roudière2020-01-091-0/+2
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* Fix some overflows and unitialized variablesRafał Mikrut2019-11-201-2/+2
|
* Fix crash in TileMap::update_cell_bitmaskqarmin2019-10-081-0/+1
|
* Fix crash in TileMap::fix_invalid_tilesqarmin2019-10-051-0/+1
|
* Fix TileMap world_to_map rounding issue for negative integersbob2019-09-261-6/+8
| | | | | | | The previous code would fail for negative integer values like -3.0 (would return -4 instead of -3). Fixes #31468.
* Added some obvious errors explanationsqarmin2019-09-251-1/+1
|
* Initialize TileMap Custom TransformBhupendra Aole2019-09-011-0/+1
| | | | | Initialize TileMap Custom Transform to same as Cell Size (64). Fixes #30948.
* Fix corrupted TileMap saves due to missing/wrong formatBojidar Marinov2019-08-081-6/+8
| | | | Fixes #29312
* Improve the node configuration warning displayHugo Locurcio2019-07-091-1/+1
| | | | | | | - 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
* Fix some issue with TileMap's and other nodes' boundariesBojidar Marinov2019-07-081-5/+9
| | | | | Fixes #30348 Addresses a small part of #30012
* Added release function to PoolVector::Access.Ibrahn Sahir2019-07-061-1/+1
| | | | | | 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)
* Tilemap fix displaced textures and shapes and added center texture and ↵Ranoller2019-07-021-14/+133
| | | | | | 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
* Fix uninitialized variables in Line2D, JSONParseResult and TileMapRémi Verschelde2019-06-301-0/+1
|
* Allow ColisionObject2D to get shapes from tilemapsBojidar Marinov2019-06-271-43/+172
| | | | Fixes #4454 and likely resolves #22285
* Make tilemap texture origin point top-left.Ranoller2019-06-051-3/+4
| | | | 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
* Merge pull request #24560 from guilhermefelipecgs/fix_24549Rémi Verschelde2019-06-011-0/+9
|\ | | | | Add EDITMODE_PRIORITY for ATLAS_TILE
| * Add EDITMODE_PRIORITY for ATLAS_TILEGuilherme Felipe2018-12-231-0/+9
| | | | | | | | | | When editing ATLAS_TILE, now it's possible to enable priority to randomize subtiles.
* | Merge pull request #28896 from Ranoller/masterRémi Verschelde2019-05-281-78/+19
|\ \ | | | | | | Fix tilemap displaced textures and shapes
| * | Fix tilemap displaced textures and shapes with origin point BOTTOM_LEFT and ↵Ranoller2019-05-151-78/+19
| | | | | | | | | | | | | | | | | | 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
* | | Fix typos with codespellRémi Verschelde2019-05-191-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* | Merge pull request #27845 from samdze/masterRémi Verschelde2019-04-301-1/+4
|\ \ | | | | | | Make TileMap overridable "set_cell" function called on undo/redo
| * | Make TileMap overridable "set_cell" function called on undo/redoSamuele Zolfanelli2019-04-271-1/+4
| | |
* | | Style: Apply new changes from clang-format 8.0Rémi Verschelde2019-04-091-2/+4
|/ / | | | | | | | | | | 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).
* | Merge pull request #27365 from Byteron/tile_map_negative_offsetMariano Javier Suligoy2019-04-051-5/+19
|\ \ | | | | | | TileMap, negative Y and X Offset