Skip to content

Instantly share code, notes, and snippets.

@revskill10
Created September 30, 2014 08:50
Show Gist options
  • Select an option

  • Save revskill10/94f0370f4eb0354a6cf0 to your computer and use it in GitHub Desktop.

Select an option

Save revskill10/94f0370f4eb0354a6cf0 to your computer and use it in GitHub Desktop.
Draw image using Marmalade
// 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;
}
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