summaryrefslogtreecommitdiffstats
path: root/scene/2d/camera_2d.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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 Camera2D offset_h and offset_v propertiesMarcel Admiraal2020-12-281-61/+57
|
* Rename Control margin to offsetMarcel Admiraal2020-12-231-65/+65
|
* Fix camera2d zoom when set to zero (causing ERROR: affine_invert: Condition ↵Dominik 'dreamsComeTrue' Jasiński2020-12-161-0/+3
| | | | | | ' det == 0 ' is true.) Fixes: #41873
* fixed Camera2D rotation with non-square zoomgreenfox2020-11-221-1/+1
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* fixed camera2D showing incorrect bounds in editorJosh Chandler2020-07-181-5/+13
|
* Revert "Merge pull request #38341 from verdog/camera-bounds-fix"Rémi Verschelde2020-07-111-14/+5
| | | | This reverts commit 08bbb3f161bfb4860d7574fa77b947872d344e7e.
* Merge pull request #38341 from verdog/camera-bounds-fixRémi Verschelde2020-07-101-5/+14
|\ | | | | Fix Camera2D incorrect preview bounds
| * fixed camera2D showing incorrect bounds in editorJosh Chandler2020-04-301-5/+14
| |
* | Fix bad position in Camera2D offset and camera rotation if smothing enabled.Ranoller2020-06-151-0/+8
| | | | | | Fix https://github.com/godotengine/godot/issues/16323 in master. Apply same solution of https://github.com/godotengine/godot/issues/2074 in rotation and offset.
* | Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-20/+38
| | | | | | | | | | 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/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-63/+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.
* Replace NULL with nullptrlupoDharkael2020-04-021-3/+3
|
* Renaming of servers for coherency.Juan Linietsky2020-03-271-1/+1
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Fix inverted use of Camera2D.offset_vEevee2020-02-291-2/+2
| | | | | The code above for horizontal movement uses the right margin (_positive_ x direction) when the offset is negative, but vertical movement uses the top margin (_negative_ y direction) when the offset is negative. The resulting problem is easily seen in the editor — set the drag margins to be asymmetrical, turn on drawing the drag margins, and slide the offsets from -1 to 1 and back. The horizontal offset moves the camera's center between the left and right margins, but the vertical offset gets them backwards and will move the camera outside the margins entirely.
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-7/+7
| | | | | | | | | | | | | | | | | | | | | - 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.
* ObjectID converted to a structure, fixes many bugs where used incorrectly as ↵Juan Linietsky2020-02-121-2/+2
| | | | 32 bits.
* 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.
* Tweaks related to Camera2D drag marginsTomasz Chabora2019-08-061-5/+14
|
* Camera2D's offset now ignores the limit propertyLikeLakers22019-07-051-17/+1
|
* Cleanup some unecessary editor/ includes in scene/Rémi Verschelde2019-06-121-1/+2
| | | | Part of #29730, handles false positives.
* Small fixes to unrechable code, possibly overflows, using NULL pointersqarmin2019-06-031-3/+4
|
* Add process_mode property to Camera2DTimo Schwarzer2019-01-061-7/+40
| | | | | This allows the user to choose if the camera should update in _process or _physics_process.
* Fix viewport not updating with make_current() for Camera2DBrody Eller2019-01-011-0/+1
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* -Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky2018-11-081-1/+1
| | | | -Removed one and zero hints for properties, replaced by default value
* fix enum cast warnings on clangkarroffel2018-10-041-4/+4
|
* Fix Camera2D drag margin property is affected by zoom property #18912Anthony Rey2018-05-161-4/+4
|
* Fix inverted RIGHT/LEFT TOP/BOTTOM Camera2D drag margin in runtime (editor ↵robfram2018-01-271-4/+4
| | | | works fine). Fix #16095.
* Bind many more properties to scriptsBojidar Marinov2018-01-121-0/+7
| | | | | | | Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
* Update Camera2D scroll using NOTIFICATION_INTERNAL_PROCESSBernhard Liebl2018-01-081-6/+6
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Overhauled the ParallaxBackground system so that it works properly ↵Sofox2017-10-261-1/+5
| | | | regardless of the zoom of the camera.
* Bind unbound enums, rearrange some by valuePoommetee Ketson2017-10-221-1/+1
|
* Renamed fixed_process to physics_processAndreaCatania2017-09-301-6/+6
|
* Rename pos to position in user facing methods and variablesletheed2017-09-201-2/+2
| | | | | | | | | | | Rename user facing methods and variables as well as the corresponding C++ methods according to the folloming changes: * pos -> position * rot -> rotation * loc -> location C++ variables are left as is.
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Convert Object::cast_to() to the static versionHein-Pieter van Braam2017-08-241-1/+1
| | | | | | | | | | | | Currently we rely on some undefined behavior when Object->cast_to() gets called with a Null pointer. This used to work fine with GCC < 6 but newer versions of GCC remove all codepaths in which the this pointer is Null. However, the non-static cast_to() was supposed to be null safe. This patch makes cast_to() Null safe and removes the now redundant Null checks where they existed. It is explained in this article: https://www.viva64.com/en/b/0226/
* Merge pull request #10351 from neikeq/enums-are-for-the-weakJuan Linietsky2017-08-211-2/+2
|\ | | | | ClassDB: Provide the enum name of integer constants
| * ClassDB: Provide the enum name of integer constantsIgnacio Etcheverry2017-08-201-2/+2
| |
* | Merge pull request #10319 from neikeq/pr-engine-editor-hintJuan Linietsky2017-08-201-7/+7
|\ \ | |/ |/| Adds Engine::is_editor_hint() method
| * Removes editor_hint from SceneTreeIgnacio Etcheverry2017-08-191-7/+7
| |
* | Synchronize parameter names in definition and declarationTwistedTwigleg2017-08-161-3/+3
|/ | | | Fixes #10244.
* Removes type information from method bindsIgnacio Etcheverry2017-08-101-2/+2
|
* Makes all Godot API's methods Lower CaseIndah Sylvia2017-08-071-1/+1
|
* Added some editor enhancements to Camera2D. Added the option to draw ↵TwistedTwigleg2017-06-251-18/+114
| | | | Camera2Ds bounds and drag margins. Added options to toggle the drawing of Camera2Ds lines in the editor. When a Camera2D is marked as current, its lines become a little less transparent.
* renamed all Rect2.pos to Rect2.positionalexholly2017-06-041-28/+28
|