summaryrefslogtreecommitdiffstats
path: root/scene/2d/tile_map.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * | added negative X and negative Y offset to TileMapAaron Winter2019-04-051-5/+19
| | | | | | | | | | | | | | | | | | clang-format added negative X and negative Y offset to TileMap
* | | Make size cache dirty when removing tiles in 'TileMap'Michael Alexsander Silva Dias2019-03-151-0/+1
|/ /
* | TileSet/TileMap: Decompose solid non-convex polygons into convexes. Real fix ↵Mariano Suligoy2019-03-041-4/+22
| | | | | | | | for #24003
* | Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-27/+27
| | | | | | | | Fixes #25316.
* | Fix typos with codespellRémi Verschelde2019-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* | -Re-added margins in one way collision (made in a more user friendly way ↵Juan Linietsky2019-01-181-1/+1
| | | | | | | | | | | | than in Godot 2.1), fixes #23860 -Fixed potential bug in OWC (i dont think anyone had it but..)
* | Appease some CppCheck warns for files in the "scene" directoryMichael Alexsander Silva Dias2019-01-161-3/+2
| |
* | Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Merge pull request #24509 from guilhermefelipecgs/fix_24273Rémi Verschelde2018-12-211-0/+2
|\ | | | | Add bind for TileMap::get_cell_autotile_coord
| * Add bind for TileMap::get_cell_autotile_coordGuilherme Felipe2018-12-201-0/+2
| |
* | Fixes for TileSetEditor and TileMapEditorGuilherme Felipe2018-12-201-2/+3
|/ | | | | | | [TileSetEditor] Hide Bitmask and Priority for ATLAS_TILE [TileMapEditor] Hide "Disable autotile" if the selected tile isn't autotile Fix #22756, don't update bitmask when tilemode is ATLAS_TILE
* Add z-index to ATLAS_TILEGuilherme Felipe2018-12-171-1/+2
|
* Add Z-Index for AutotileGuilherme Felipe2018-12-071-0/+4
|
* Fixed tilemap saving, format FORMAT_2 was not correctly written since it was ↵Davide Baldo2018-11-101-1/+3
| | | | | | recognized as default value, hence FORMAT_1 was always the case even when the tile_data was written in FORMAT_2.
* TileMap: Fix floor precision in world_to_map on tile bordersRémi Verschelde2018-11-021-0/+5
| | | | Fixes #23250, supersedes #23315.
* Fixing warnings generated by MSVCDualtagh Murray2018-10-191-1/+1
| | | | Fixes #22684.
* Fix GCC 8 warnings about potentially unitialized variablesRémi Verschelde2018-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes the following GCC 8 warnings: ``` core/image.cpp:730:44: warning: 'mip1_weight' may be used uninitialized in this function [-Wmaybe-uninitialized] core/image.cpp:293:20: warning: 'mip2' may be used uninitialized in this function [-Wmaybe-uninitialized] core/image.cpp:293:20: warning: 'mip1' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/audio_stream_preview.cpp:58:19: warning: 'vmax' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/audio_stream_preview.cpp:85:19: warning: 'vmin' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/editor_themes.cpp:306:53: warning: 'preset_contrast' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/plugins/animation_blend_space_2d_editor.cpp:459:27: warning: 'prev_idx' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/plugins/animation_blend_space_2d_editor.cpp:443:27: warning: 'prev_idx' may be used uninitialized in this function [-Wmaybe-uninitialized] main/tests/test_oa_hash_map.cpp:57:29: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized] modules/csg/csg.cpp:764:40: warning: 'max_angle' may be used uninitialized in this function [-Wmaybe-uninitialized] modules/csg/csg_shape.cpp:1945:3: warning: 'face_count' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/3d/voxel_light_baker.cpp:1593:8: warning: 'cone_aperture' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/3d/voxel_light_baker.cpp:1592:6: warning: 'cone_dir_count' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/animation/animation_blend_space_2d.cpp:471:8: warning: 'mind' may be used uninitialized in this function [-Wmaybe-uninitialized] core/os/memory.cpp:94: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] core/os/memory.cpp:95: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] core/os/memory.cpp:98: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] ```
* Fix warnings about set but unused variables [-Wunused-but-set-variable]Rémi Verschelde2018-09-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following GCC 5 warnings: ``` drivers/gles2/rasterizer_canvas_gles2.cpp:814:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:2270:11: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:2673:22: warning: variable 'e' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:715:7: warning: variable 'no_cull' set but not used [-Wunused-but-set-variable] drivers/gles2/shader_gles2.cpp:693:14: warning: variable 'cc' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_canvas_gles3.cpp:1226:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_scene_gles3.cpp:3039:10: warning: variable 'contrib' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_scene_gles3.cpp:4504:32: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable] editor/editor_inspector.cpp:272:9: warning: variable 'guide_color' set but not used [-Wunused-but-set-variable] editor/editor_themes.cpp:1067:14: warning: variable 'alpha3' set but not used [-Wunused-but-set-variable] editor/editor_themes.cpp:263:8: warning: variable 'script_bg_color' set but not used [-Wunused-but-set-variable] editor/plugins/collision_shape_2d_editor_plugin.cpp:326:11: warning: variable 'cpoint' set but not used [-Wunused-but-set-variable] editor/plugins/mesh_editor_plugin.cpp:72:9: warning: variable 'size' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:471:12: warning: variable 'mpos' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:89:8: warning: variable 'basetype_color' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:90:8: warning: variable 'type_color' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:92:8: warning: variable 'string_color' set but not used [-Wunused-but-set-variable] modules/visual_script/visual_script_editor.cpp:2521:7: warning: variable 'seq_connect' set but not used [-Wunused-but-set-variable] platform/android/export/export.cpp:580:12: warning: variable 'styles_count' set but not used [-Wunused-but-set-variable] platform/android/export/export.cpp:584:12: warning: variable 'styles_offset' set but not used [-Wunused-but-set-variable] platform/osx/export/export.cpp:464:9: warning: variable 'zerr' set but not used [-Wunused-but-set-variable] scene/2d/tile_map.cpp:260:10: warning: variable 'tcenter' set but not used [-Wunused-but-set-variable] scene/3d/light.cpp:166:7: warning: variable 'editor_ok' set but not used [-Wunused-but-set-variable] scene/3d/navigation.cpp:566:11: warning: variable 'closest_navmesh' set but not used [-Wunused-but-set-variable] scene/gui/rich_text_label.cpp:869:8: warning: variable 'size' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:705:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:706:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:726:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:727:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable] scene/resources/material.cpp:430:7: warning: variable 'using_world' set but not used [-Wunused-but-set-variable] servers/visual/shader_language.cpp:2026:7: warning: variable 'all_const' set but not used [-Wunused-but-set-variable] servers/visual/visual_server_scene.cpp:1383:28: warning: variable 'z_max_cam' set but not used [-Wunused-but-set-variable] ``` Also fixes two [-Wunused-value] warnings: ``` scene/gui/text_edit.cpp:4405:20: warning: statement has no effect [-Wunused-value] servers/visual/visual_server_scene.cpp:905:48: warning: value computed is not used [-Wunused-value] ``` Some of those are bugs and need further work, they are identified with `// FIXME` comments.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-3/+3
| | | | | | 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.
* Unexpose TileMap set_celldMarcelo Fernandez2018-08-291-2/+2
|
* Merge pull request #20587 from groud/fix_2deditor_scrollable_zoneRémi Verschelde2018-08-131-5/+6
|\ | | | | Fixes bugs on the 2D editor scrollable area
| * Fixes bugs on the 2D editor scrollable areagroud2018-07-301-5/+6
| |
* | New TileSet EditorMAriano Javier Suligoy2018-08-091-4/+4
|/
* doc: Sync classref with current sourceRémi Verschelde2018-07-261-1/+1
| | | | Fix various missing arguments in bindings.
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.