summaryrefslogtreecommitdiffstats
path: root/scene/2d/animated_sprite.cpp
diff options
context:
space:
mode:
authorPoommetee Ketson <poommetee@protonmail.com>2017-12-12 22:57:17 +0700
committerPoommetee Ketson <poommetee@protonmail.com>2017-12-12 23:04:37 +0700
commit24df9f3707767f94a8b7842a24013aa3709b1805 (patch)
tree6afe7e0d6be6e1d886c2c40e929d9f50301f22f1 /scene/2d/animated_sprite.cpp
parent55962ce28fec5f06016ed3f66f52e6e84b817dbe (diff)
downloadredot-engine-24df9f3707767f94a8b7842a24013aa3709b1805.tar.gz
Enhance undoredo action name, TTR, cleanup
Diffstat (limited to 'scene/2d/animated_sprite.cpp')
-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;
}