Author Topic: nSDL 1.1.1 Anniversary Edition—The Ultimate TI-Nspire Graphics Library  (Read 140611 times)

0 Members and 1 Guest are viewing this topic.

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #180 on: April 20, 2012, 07:48:20 pm »
Amazing!  :)
Just wondering, how's the performance of this compared to BMP blitting?
Should be exactly the same as the result is the same (SDL_Surface).

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: nSDL (0.1.4 beta)
« Reply #181 on: April 20, 2012, 11:27:07 pm »
Awesome update Hoffa. :)

Off-topic: Those tiles are nice. Are they from a game in particular or did you make them yourself?

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #182 on: April 21, 2012, 09:18:00 am »
Now by default all text is somewhat formatted before drawn on the screen, i.e. unnecessary spaces are removed. It can be removed for whatever reason using the NSP_FONT_NOFORMAT flag. Screenshot (the string used is the one in quotes of course):



I'll probably add word wrapping at some point too, not sure how cleanly it'll fit in the code. Speaking of cleanness, I've removed tab support, all font width/height getter functions I had at one point, and the textwrapping feature when using SDL_nDrawString(). That is because those features are very rarely useful, have inconsistent behavior and are a bitch to maintain and integrate. They would only be useful in console-type applications, and in that case nspireio should do the job. Removing them allows much cleaner and more robust code.

EDIT: After some further thought, I'll possibly add the string width/height getter functions again. It was especially the tab character that made me hesitate, but now that it's gone I guess I can clean those functions up. They might be useful for drawing centered text and whatnot.

Off-topic: Those tiles are nice. Are they from a game in particular or did you make them yourself?
Some free ones I found somewhere I can't remember.
« Last Edit: April 21, 2012, 11:59:12 am by hoffa »

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #183 on: May 02, 2012, 03:58:23 pm »
0.2.0 coming very soon... :ninja:

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #184 on: May 04, 2012, 01:00:44 pm »
Here's a screenshot of a little program I'm writing for a TI-Nspire SDL tutorial I'm working on:



I actually released 0.2.0 but didn't make it public, as I found some small issues (found them while working on the aforementioned program) that needed to be fixed, so the next public version will be 0.2.1, which should be out tomorrow if everything goes well.
« Last Edit: May 04, 2012, 01:01:19 pm by hoffa »

Offline hellninjas

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 625
  • Rating: +17/-0
    • View Profile
Re: nSDL (0.1.4 beta)
« Reply #185 on: May 04, 2012, 02:43:36 pm »
This looks REALLY cool..
+1!

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: nSDL (0.1.4 beta)
« Reply #186 on: May 04, 2012, 02:49:53 pm »
Yup, as usual, this is good work :)

Relayed at TI-Planet, http://tiplanet.org/forum/viewtopic.php?t=8907&p=123755#p123755 ;)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
0.2.1 is out! ;D

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
is SDL easier to program than nspire c/asm?
Sig wipe!

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
is SDL easier to program than nspire c/asm?
Well it still is in C. But yes, it is much easier than doing everything from scratch. Also SDL's quite mature and there's a lot of resources and information available on the Internet about it, that's always good.
« Last Edit: May 05, 2012, 01:36:44 pm by hoffa »

Offline atiatinini

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 19
  • Rating: +0/-0
    • View Profile
Any progress in C++ support?  :)

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Any progress in C++ support?  :)
No idea, I'm not the one dealing with that. I don't think anyone is working to get C++ on the TI-Nspire.
« Last Edit: May 05, 2012, 03:51:28 pm by hoffa »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Didn't certain C++ commands work on the Nspire though? I remember there was a post somewhere claiming some did... ???

Also nice update on this :)

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Tangrs was/is working on a C++ compiler, but I don't know the status of that right now....
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Some updates...
I will probably release unexpectedly soon the following version, 0.3.0. I'm writing a lot of the video code for full compatibility on all calculators without the need to recompile (and not the slightest impact on performance). That means one program for all calculators. (it's quite a major change, hence the jump to 0.3.0 right away)
There's also a bug with uneven width images when using the array-based images that needs to be fixed.
I'll probably add a mode for easier porting that shows a message box when an error occurs, avoids mystical reboots and such.

Here's the Zelda example running on both machines in 8 bpp, same binary for both (and as you can see in the version, no more nSDL 0.2.0-8/16-cx wizardry):

That also means there'll be no NSP_BPP, so the user will have to specify the bit depth (if 16 bpp is used, it'll be forced to 8 bpp on classic models).

EDIT: here's the on-calc debug helper in action:

It shows all messages printed with NSP_DPRINT() and SDL_SetError().
« Last Edit: May 07, 2012, 05:14:35 pm by hoffa »