Mercurial > fife-parpg
diff tests/core_tests/test_images++.cpp @ 38:38232a42ff8d
Updated tests (loadResource instead of load). Added static fife-project to Unittest-Solution for VS9.
author | aldart@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 12 Jul 2008 12:30:31 +0000 |
parents | 4a0efb7baf70 |
children | 4c8334b0ab30 |
line wrap: on
line diff
--- a/tests/core_tests/test_images++.cpp Sat Jul 12 12:00:57 2008 +0000 +++ b/tests/core_tests/test_images++.cpp Sat Jul 12 12:30:31 2008 +0000 @@ -75,7 +75,7 @@ renderbackend.createMainScreen(800, 600, 0, false); ImageLoader provider(vfs); - boost::scoped_ptr<Image> img(provider.load(ImageLocation(IMAGE_FILE))); + boost::scoped_ptr<Image> img(dynamic_cast<Image*>(provider.loadResource(ImageLocation(IMAGE_FILE)))); int h = img->getHeight(); int w = img->getWidth(); @@ -100,7 +100,7 @@ renderbackend.createMainScreen(800, 600, 0, false); ImageLoader imgprovider(vfs); - boost::scoped_ptr<Image> img(imgprovider.load(ImageLocation(SUBIMAGE_FILE))); + boost::scoped_ptr<Image> img(dynamic_cast<Image*>(imgprovider.loadResource(ImageLocation(SUBIMAGE_FILE)))); ImageLocation location(SUBIMAGE_FILE); location.setParentSource(&*img); @@ -117,7 +117,7 @@ for (int y = 0; y < (H - h); y+=h) { location.setXShift(x); location.setYShift(y); - Image* sub = subprovider.load(location); + Image* sub = dynamic_cast<Image*>(subprovider.loadResource(location)); subimages.push_back(sub); } } @@ -145,9 +145,9 @@ ImageLoader provider(env.vfs.get()); env.vfs.get()->exists(IMAGE_FILE); - boost::scoped_ptr<Image> img(provider.load(ImageLocation(IMAGE_FILE))); + boost::scoped_ptr<Image> img(dynamic_cast<Image*>(provider.loadResource(ImageLocation(IMAGE_FILE)))); env.vfs.get()->exists(ALPHA_IMAGE_FILE); - boost::scoped_ptr<Image> alpha_img(provider.load(ImageLocation(ALPHA_IMAGE_FILE))); + boost::scoped_ptr<Image> alpha_img(dynamic_cast<Image*>(provider.loadResource(ImageLocation(ALPHA_IMAGE_FILE)))); int h0 = img->getHeight(); int w0 = img->getWidth();