Created
September 30, 2014 08:50
-
-
Save revskill10/94f0370f4eb0354a6cf0 to your computer and use it in GitHub Desktop.
Draw image using Marmalade
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Marmalade headers | |
| #include "s3e.h" | |
| #include "Iw2D.h" | |
| int main() | |
| { | |
| // Initialise the 2D graphics system | |
| Iw2DInit(); | |
| CIw2DImage * image = Iw2DCreateImage("test1.png"); | |
| // Loop forever, until the user or the OS performs some action to quit the app | |
| while (!s3eDeviceCheckQuitRequest()) | |
| { | |
| // Clear the drawing surface | |
| Iw2DSurfaceClear(0xff000000); | |
| // draw an image | |
| Iw2DDrawImage(image, CIwFVec2::g_Zero); | |
| // Show the drawing surface | |
| Iw2DSurfaceShow(); | |
| // Yield to the OS | |
| s3eDeviceYield(0); | |
| } | |
| // Clean-up | |
| delete image; | |
| Iw2DTerminate(); | |
| return 0; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| subprojects | |
| { | |
| iw2d | |
| } | |
| files | |
| { | |
| [Source] | |
| (source) | |
| # Game | |
| main.cpp | |
| [Data] | |
| (data) | |
| } | |
| assets | |
| { | |
| (data) | |
| (data-ram/data-gles1, data) | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment