Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 449 Bytes

README.md

File metadata and controls

15 lines (10 loc) · 449 Bytes

SafeSprite for Axmol

This alternative to ax::Sprite avoids a crash when the requested file is not found, showing instead a predetermined image (HelloWorld.png by default).

Include the following files in your Source folder:

SafeSprite.h
SafeSprite.cpp

and use #include "SafeSprite.h" where needed.

Call it with auto mySprite = SafeSprite::create("myImage.png");

You can edit the predetermined image inside SafeSprite.cpp.