#include "svt.h" //The names of these variables are generated by the compiler and are based on //the filename of the image being compiled extern char _binary_Images_testimg_bmp_end[]; extern char _binary_Images_testimg_bmp_start[]; Color black; //Colour we're going to make transparent int testImage; //handle from the image register //Helper function to return colour structs from R, G, B and Transparency inputs Color RGBColor(unsigned char R, unsigned char G, unsigned char B, unsigned char T) { Color ret; ret.R=R; ret.G=G; ret.B=B; ret.Transparent=T; return ret; } //Initialisation stuff void Start() { OpenGraphics(); //Get control of the screen black=RGBColor(0,0,0,0); //define a colour //Register our image - takes a start address and a size, which we calculate given the end address minus the start address OpenImageRegister(); testImage = RegisterImage(_binary_Images_testimg_bmp_start,_binary_Images_testimg_bmp_end - _binary_Images_testimg_bmp_start); CloseImageRegister(); //Might as well draw it here too ClearScreen(); DrawImage(testImage, 0,0,black); //params are - handle we got when registering, x and y co-ords, and colour to make transparent Show(); } bool Run() { //Just wait around for the home key to be pushed if (GetRemoteKeys() & KEY_HOME) return false; else { Sleep(100); return true; } } void End() { CloseGraphics(); }