Omnimaga

Calculator Community => TI Calculators => Calculator C => Topic started by: Eiyeron on June 10, 2012, 10:43:17 am

Title: nSDL: crossProject
Post by: Eiyeron on June 10, 2012, 10:43:17 am
Hey Guys! Just a question: I want to program some tests for The Cx, but I want first to test with computer, and without the nSpire emulator.
I want my programs to be compiled as good as for nSpire as Computer.

For the moment, I'll be on SDL. What should I do to make the project "automatically" nSDL-compliant?

Thanks.
Eiyeron

PS/ Ah, and I'll start doing the tutorial to get an Windows portable nDless SDK the week after the BAC, french exams.
Title: Re: nSDL: crossProject
Post by: Adriweb on June 10, 2012, 10:48:03 am
I'm not sure I understand what you mean, by "without the emulator", but I advise you to check that out :
https://github.com/Hoffa/nSDL/wiki/How-to-guide
Title: Re: nSDL: crossProject
Post by: Eiyeron on June 10, 2012, 10:49:02 am
I already did that, But here: I want to make a game which will be multi-platform: PC and nSpire. How could i do this?
Title: Re: nSDL: crossProject
Post by: Lionel Debroux on June 10, 2012, 10:50:19 am
AFAICT, there are some API differences between nSDL and PC SDL, so you'll have to handle them explicitly by yourself, in your program.
Title: Re: nSDL: crossProject
Post by: Eiyeron on June 10, 2012, 10:51:15 am
Okay, so the nSDL isn't made to be multi-platform. Okay, I'll try to handle this, thanks anyway! ^^
Title: Re: nSDL: crossProject
Post by: hoffa on June 10, 2012, 11:07:31 am
Actually it is multi-platform, except for the TI-Nspire-specific functions that are not part of standard SDL (which you can view here (https://github.com/Hoffa/nSDL/wiki/TI-Nspire-specific-functions-and-macros)). That means you won't be able to use nSDL's font system to draw strings on your PC basically (it could be integrated into a custom PC SDL build without too much trouble however, as it's not just a bunch of separate files dependent on nothing but standard SDL). So just write your SDL games using 320x240 resolution and 16-bit color depth and you'll be fine (of course no audio support on TI-Nspire as you can imagine)
Title: Re: nSDL: crossProject
Post by: Eiyeron on June 10, 2012, 11:24:00 am
Thanks Hoffa! ^^
By the way, Is SDL_gfx compatible with nSDL?/me dreams about rotozoom
Title: Re: nSDL: crossProject
Post by: hoffa on June 10, 2012, 11:35:04 am
Thanks Hoffa! ^^
By the way, Is SDL_gfx compatible with nSDL?/me dreams about rotozoom
It isn't, haven't had the time to port it (this made me remember I have a half-assed port of SDL_image also somewhere). Actually I just checked the source code of SDL_gfx, and it's just a few files, so porting should be that difficult at all (with a bit of luck it won't require and code change at all). I for one have my exams currently so I won't have the time, but if you're up for the task go for it (I might however try in a few days if I find a few hours free).

EDIT: As far as I can remember, rotozoom is pretty damn slow even on a desktop PC. Maybe they've optimized it a bit since, but I'm not sure how well it'll perform.
Title: Re: nSDL: crossProject
Post by: Eiyeron on June 10, 2012, 11:37:53 am
Trying to port this? I don't event know how you could port SDL! :p
BUt I'll try simply use it.^^