xboxscene.org forums

Author Topic: Sdlx And The Xdk  (Read 1668 times)

Hyper_Eye

  • Recovered User
  • Sr. Member
  • *
  • Posts: 366
Sdlx And The Xdk
« on: September 04, 2011, 01:33:00 PM »

The Xbox cannot handle forward slashes in paths. You must provide a path with a backslash separator. In C/C++ a backslash character must be escaped and the escape character is a backslash so the result is two per: "\\". It is  also good to use the drive letter which is D: in the case of your applications working directory. Using D: ensures that your application can be executed from any installation location. So try the following snippet:

CODE
   //Loading Bitmap
#ifdef _XBOX
    Padel = load_image("D:\\sprite_one.bmp");
#else
    Padel = load_image("image/sprite_one.bmp");
#endif


In a large cross-platform application it is good to use preprocessor directives to define a global const that can be used where needed so that you don't need preprocessor directives all over the code.

CODE
#if (defined _WIN32 || defined _XBOX)
    #define PATHSEP     "\\"
    #define PATHSEPCHAR '\\'
#else
    #define PATHSEP     "/"
    #define PATHSEPCHAR '/'
#endif
Logged

Hyper_Eye

  • Recovered User
  • Sr. Member
  • *
  • Posts: 366
Sdlx And The Xdk
« Reply #1 on: September 04, 2011, 03:36:00 PM »

I'm glad that solved your issue. Good luck with your project!
Logged

Hyper_Eye

  • Recovered User
  • Sr. Member
  • *
  • Posts: 366
Sdlx And The Xdk
« Reply #2 on: September 04, 2011, 07:27:00 PM »

1) Open your project
2) Select Project->Properties
3) Select Xbox Deployment
4) Change "Exclude From Build" to Yes.

You should consider getting a debug kit or installing a debug bios and xdk dash on your Xbox. It is really easy to do if you use a modchip but not hard to do with a softmod either. It makes a very big difference. When you are chasing down a bug it is invaluable.
Logged

Hyper_Eye

  • Recovered User
  • Sr. Member
  • *
  • Posts: 366
Sdlx And The Xdk
« Reply #3 on: September 05, 2011, 11:21:00 AM »

He is aware of that. He just wants to skip that step because it holds up the build process. If you don't have a machine to deploy to that step takes a little bit before it fails. The instructions I provided allow you to disable deployment and avoid the issue. It makes building without a deployment target much faster.
Logged

richi902

  • Archived User
  • Newbie
  • *
  • Posts: 3
Sdlx And The Xdk
« Reply #4 on: September 26, 2011, 08:26:00 PM »

i installed a debug bios now anyway, i used that x2 bios so i can still keep my other dashboard.
it is much better to just press the button and it copys the new file over tongue.gif.
now i just need to learn more c(++) :/ gets too confusing sometimes, and i have a hard time understanding,
especially  classes, functions and arrays(and probably some other stuff), well just the hole c++ lol.
Logged