i'm trying to get one of the sdl samples running on the xbox from http://lazyfoo.net/SDL_tutorials/lesson01/index2.php
i modified mine to look like this
SDL_Surface* Padel = NULL;
SDL_Surface* Screen = NULL;
//void __cdecl main()
SDL_Surface *load_image(std::string filename)
//Temporary storage for the image that's loaded
SDL_Surface* loadedimage = NULL;
//The optimized image that will be used
SDL_Surface* optimizedimage = NULL;
//Load the image
loadedimage = SDL_LoadBMP(filename.c_str());
//if nothing went wrong in loading the image
if(loadedimage != NULL)
//Create an optimized image
optimizedimage = SDL_DisplayFormat(loadedimage);
//Free the old image
//Return the optimized image
void apply_surface(int x, int y, SDL_Surface* source, SDL_Surface* destination)
//Make a temporary rectangle to hold the offsets
//Give the offsets to the rectangle
offset.x = x;
offset.y = y;
//Blit the surface
SDL_BlitSurface(source, NULL, destination, &offset);
int main(int argc, char* args)
//Setup SDL Screen
Screen = SDL_SetVideoMode( 640, 480, 16, SDL_SWSURFACE | SDL_ANYFORMAT);
SDL_WM_SetCaption( "SDL Test APP", NULL );
Padel = load_image("image/sprite_one.bmp");
//Apply image on screen
apply_surface(180, 140, Padel, Screen);
apply_surface(240, 80, Padel, Screen);
//update the screen
SDL_UpdateRect(Screen, 0, 0, 0, 0);
//Free the loaded image
it compiles fine but it displays no picture on the screen, just a black screen.
the bmp is in the main folder of the xbe on the xbox "e:/games/xbox_sdl/sprite_one.bmp"
i can confirm that the xbe itself is working, because if i change the amount of time for the
SDL_Delay it takes that amount of time to go back to the dash.
so my questen is, whats wrong?
i think 1 have sdlx correctly installed(Microsoft Xbox SDK\xbox\includes and \lib).
is there anything i need to keep in mind while porting windows stuff to the xbox?
oh and i have the latest xdk(59) and the sdlx from hyper_eve's svn
(compiled that in "trunk", i'm not really used to that svn stuff)
hope someone has a clue to fix my problem, thanks in advance
i forgot to add that it compiles and runs under windows fine and display the bmpThis post has been edited by richi902: Sep 4 2011, 07:44 PM