summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-12-13 08:36:47 +0100
committerGitHub <noreply@github.com>2017-12-13 08:36:47 +0100
commitb0aeecc02b0669d36ea31a2e5c36797bd5c6067c (patch)
tree3cf232804ccef9e3d084eca9d7df91960b303de7 /scene
parentc68b031b052467096a6d8f059e791facb09d82fa (diff)
parent24df9f3707767f94a8b7842a24013aa3709b1805 (diff)
Merge pull request #14596 from Noshyaar/pr
Enhance undoredo action name, TTR, cleanup
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/animated_sprite.cpp27
1 files changed, 4 insertions, 23 deletions
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp
index f8f94926b7..de28fef929 100644
--- a/scene/2d/animated_sprite.cpp
+++ b/scene/2d/animated_sprite.cpp
@@ -355,38 +355,21 @@ void AnimatedSprite::_notification(int p_what) {
case NOTIFICATION_DRAW: {
- if (frames.is_null()) {
- print_line("no draw no faemos");
+ if (frames.is_null())
return;
- }
-
- if (frame < 0) {
- print_line("no draw frame <0");
+ if (frame < 0)
return;
- }
-
- if (!frames->has_animation(animation)) {
- print_line("no draw no anim: " + String(animation));
+ if (!frames->has_animation(animation))
return;
- }
Ref<Texture> texture = frames->get_frame(animation, frame);
- if (texture.is_null()) {
- print_line("no draw texture is null");
+ if (texture.is_null())
return;
- }
Ref<Texture> normal = frames->get_normal_frame(animation, frame);
- //print_line("DECIDED TO DRAW");
-
RID ci = get_canvas_item();
- /*
- texture->draw(ci,Point2());
- break;
- */
-
Size2i s;
s = texture->get_size();
Point2 ofs = offset;
@@ -403,9 +386,7 @@ void AnimatedSprite::_notification(int p_what) {
if (vflip)
dst_rect.size.y = -dst_rect.size.y;
- //texture->draw_rect(ci,dst_rect,false,modulate);
texture->draw_rect_region(ci, dst_rect, Rect2(Vector2(), texture->get_size()), Color(1, 1, 1), false, normal);
- //VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate);
} break;
}