| 1751 | } |
| 1752 | |
| 1753 | void TextureAsync::loadImages(float dt) |
| 1754 | { |
| 1755 | auto textureCache = Director::getInstance()->getTextureCache(); |
| 1756 | char szSpriteName[100]; |
| 1757 | |
| 1758 | for (int i = 0; i < 8; i++) |
| 1759 | { |
| 1760 | for (int j = 0; j < 8; j++) |
| 1761 | { |
| 1762 | auto spriteName = fmt::format_to_z(szSpriteName, "Images/sprites_test/sprite-{}-{}.png", i, j); |
| 1763 | textureCache->addImageAsync(spriteName, AX_CALLBACK_1(TextureAsync::imageLoaded, this)); |
| 1764 | } |
| 1765 | } |
| 1766 | |
| 1767 | textureCache->addImageAsync("Images/background1.jpg", AX_CALLBACK_1(TextureAsync::imageLoaded, this)); |
| 1768 | textureCache->addImageAsync("Images/background2.jpg", AX_CALLBACK_1(TextureAsync::imageLoaded, this)); |
| 1769 | textureCache->addImageAsync("Images/background.png", AX_CALLBACK_1(TextureAsync::imageLoaded, this)); |
| 1770 | textureCache->addImageAsync("Images/atlastest.png", AX_CALLBACK_1(TextureAsync::imageLoaded, this)); |
| 1771 | textureCache->addImageAsync("Images/grossini_dance_atlas.png", AX_CALLBACK_1(TextureAsync::imageLoaded, this)); |
| 1772 | } |
| 1773 | |
| 1774 | void TextureAsync::imageLoaded(Texture2D* texture) |
| 1775 | { |
nothing calls this directly
no test coverage detected