From 98a329670227c726a5d7a196e5cba8dbdd54301b Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 17 May 2017 07:36:47 -0300 Subject: Removal of Image from Variant, converted to a Resource. --- main/tests/test_containers.cpp | 12 ------------ main/tests/test_image.cpp | 5 ----- main/tests/test_physics_2d.cpp | 10 +++++----- 3 files changed, 5 insertions(+), 22 deletions(-) (limited to 'main/tests') diff --git a/main/tests/test_containers.cpp b/main/tests/test_containers.cpp index 890599385a..956be5d169 100644 --- a/main/tests/test_containers.cpp +++ b/main/tests/test_containers.cpp @@ -55,18 +55,6 @@ MainLoop *test() { { - Image img; - img.create(default_mouse_cursor_xpm); - - { - for (int i = 0; i < 8; i++) { - - Image mipmap; - //img.make_mipmap(mipmap); - img = mipmap; - if (img.get_width() <= 4) break; - }; - }; }; #if 0 diff --git a/main/tests/test_image.cpp b/main/tests/test_image.cpp index aff3bae417..c2c742e75d 100644 --- a/main/tests/test_image.cpp +++ b/main/tests/test_image.cpp @@ -63,11 +63,6 @@ public: MainLoop *test() { - Image img; - ImageLoader::load_image("as1.png", &img); - - img.resize(512, 512); - return memnew(TestMainLoop); } } diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp index 1476e45fcc..d8a00a589a 100644 --- a/main/tests/test_physics_2d.cpp +++ b/main/tests/test_physics_2d.cpp @@ -82,7 +82,7 @@ class TestPhysics2DMainLoop : public MainLoop { } } - Image image(32, 2, 0, Image::FORMAT_LA8, pixels); + Ref image = memnew(Image(32, 2, 0, Image::FORMAT_LA8, pixels)); body_shape_data[Physics2DServer::SHAPE_SEGMENT].image = vs->texture_create_from_image(image); @@ -109,7 +109,7 @@ class TestPhysics2DMainLoop : public MainLoop { } } - Image image(32, 32, 0, Image::FORMAT_LA8, pixels); + Ref image = memnew(Image(32, 32, 0, Image::FORMAT_LA8, pixels)); body_shape_data[Physics2DServer::SHAPE_CIRCLE].image = vs->texture_create_from_image(image); @@ -136,7 +136,7 @@ class TestPhysics2DMainLoop : public MainLoop { } } - Image image(32, 32, 0, Image::FORMAT_LA8, pixels); + Ref image = memnew(Image(32, 32, 0, Image::FORMAT_LA8, pixels)); body_shape_data[Physics2DServer::SHAPE_RECTANGLE].image = vs->texture_create_from_image(image); @@ -164,7 +164,7 @@ class TestPhysics2DMainLoop : public MainLoop { } } - Image image(32, 64, 0, Image::FORMAT_LA8, pixels); + Ref image = memnew(Image(32, 64, 0, Image::FORMAT_LA8, pixels)); body_shape_data[Physics2DServer::SHAPE_CAPSULE].image = vs->texture_create_from_image(image); @@ -178,7 +178,7 @@ class TestPhysics2DMainLoop : public MainLoop { { - Image image(convex_png); + Ref image = memnew(Image(convex_png)); body_shape_data[Physics2DServer::SHAPE_CONVEX_POLYGON].image = vs->texture_create_from_image(image); -- cgit v1.2.3