xboxscene.org forums

OG Xbox Forums => Software Forums => Development => Topic started by: Hyper_Eye on September 04, 2011, 01:33:00 PM

Title: Sdlx And The Xdk
Post by: Hyper_Eye 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
Title: Sdlx And The Xdk
Post by: Hyper_Eye on September 04, 2011, 03:36:00 PM
I'm glad that solved your issue. Good luck with your project!
Title: Sdlx And The Xdk
Post by: Hyper_Eye 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.
Title: Sdlx And The Xdk
Post by: Hyper_Eye 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.
Title: Sdlx And The Xdk
Post by: richi902 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.