Author Topic: nSDL: crossProject  (Read 5717 times)

0 Members and 1 Guest are viewing this topic.

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
nSDL: crossProject
« 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.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: nSDL: crossProject
« Reply #1 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
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: nSDL: crossProject
« Reply #2 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?

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: nSDL: crossProject
« Reply #3 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.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: nSDL: crossProject
« Reply #4 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! ^^

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: nSDL: crossProject
« Reply #5 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). 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)
« Last Edit: June 10, 2012, 11:10:21 am by hoffa »

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: nSDL: crossProject
« Reply #6 on: June 10, 2012, 11:24:00 am »
Thanks Hoffa! ^^
By the way, Is SDL_gfx compatible with nSDL?
* Eiyeron dreams about rotozoom

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: nSDL: crossProject
« Reply #7 on: June 10, 2012, 11:35:04 am »
Thanks Hoffa! ^^
By the way, Is SDL_gfx compatible with nSDL?
* Eiyeron 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.
« Last Edit: June 10, 2012, 11:40:24 am by hoffa »

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: nSDL: crossProject
« Reply #8 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.^^