summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorSaracen <SaracenOne@gmail.com>2015-11-18 23:18:10 +0000
committerSaracen <SaracenOne@gmail.com>2015-11-18 23:18:10 +0000
commitdd00452997122029dd2f74a278574d781fd2bf5f (patch)
treee36f0c62cac499500724c2929100c042972d1a5c /scene/2d
parentc1d19ad258139c73e7aa81cf6e1fbd99e1bfe38b (diff)
parent94fdd01241749cb7a575ed5f9fa4c7bbb286901a (diff)
Merge branch 'master' of https://github.com/okamstudio/godot into shadow_color
Conflicts: drivers/gles2/shader_compiler_gles2.cpp
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/SCsub2
-rw-r--r--scene/2d/animated_sprite.cpp3
-rw-r--r--scene/2d/camera_2d.cpp2
-rw-r--r--scene/2d/tile_map.cpp5
4 files changed, 6 insertions, 6 deletions
diff --git a/scene/2d/SCsub b/scene/2d/SCsub
index 055d2f2474..bbe59b3054 100644
--- a/scene/2d/SCsub
+++ b/scene/2d/SCsub
@@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.scene_sources,"*.cpp")
Export('env')
-
-
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp
index 342b86b4c1..458246671c 100644
--- a/scene/2d/animated_sprite.cpp
+++ b/scene/2d/animated_sprite.cpp
@@ -165,7 +165,8 @@ 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(ci,dst_rect,false,modulate);
+ texture->draw_rect_region(ci,dst_rect,Rect2(Vector2(),texture->get_size()),modulate);
// VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate);
} break;
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 49683da226..52ae5d2954 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -57,7 +57,9 @@ void Camera2D::_update_scroll() {
void Camera2D::set_zoom(const Vector2 &p_zoom) {
zoom = p_zoom;
+ Point2 old_smoothed_camera_pos = smoothed_camera_pos;
_update_scroll();
+ smoothed_camera_pos = old_smoothed_camera_pos;
};
Vector2 Camera2D::get_zoom() const {
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 418ee192b2..167b637bdc 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -1031,13 +1031,12 @@ Vector2 TileMap::world_to_map(const Vector2& p_pos) const{
switch(half_offset) {
case HALF_OFFSET_X: {
- if (int(ret.y)&1) {
-
+ if ( ret.y > 0 ? int(ret.y)&1 : (int(ret.y)-1)&1 ) {
ret.x-=0.5;
}
} break;
case HALF_OFFSET_Y: {
- if (int(ret.x)&1) {
+ if ( ret.x > 0 ? int(ret.x)&1 : (int(ret.x)-1)&1) {
ret.y-=0.5;
}
} break;