--> Show Posts - hoffa --> -->

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - hoffa

Pages: 1 2 3 [4] 5 6 ... 21
46
Miscellaneous / Re: Just Do Whatever the Fuck You Wanna Do Public License
« on: January 08, 2013, 08:32:39 am »
Register the license? What's that supposed to mean? Give me some links or some concrete stuff.

47
Miscellaneous / Re: Just Do Whatever the Fuck You Wanna Do Public License
« on: January 08, 2013, 08:19:42 am »
Did you copyright this?
What do you mean? As far as I know copyrighting software doesn't involve anyone else (copyright office, gov't, ...) at any point.

48
Miscellaneous / Re: Just Do Whatever the Fuck You Wanna Do Public License
« on: January 08, 2013, 07:58:17 am »
Nice

49
nSDL / Re: nSDL 1.0.2—A very fast & robust graphics library
« on: January 07, 2013, 08:22:11 pm »
Nope. Oh wow, that was nearly a year ago. ;D

50
Miscellaneous / Just Do Whatever the F*** You Wanna Do Public License
« on: January 07, 2013, 08:12:45 pm »
I decided to give a license to one of the projects I'm working on. However, none of the licenses available are truly free. The GPL is a joke, the Beerware notice requires you to retain the notice, the Do What the F*** You Want to Public License requires you to change the name if modified, and all the other ones force me to read a headache-inducing novel of legalese.

That's why I decided to create my own, genuinely permissive and free (in every single sense of the word) software license.

Behold, I hereby present you the Just Do Whatever the F*** You Wanna Do Public License! (or FuPL)

Without further ado, here is the full license:

Code: [Select]
          JUST DO WHATEVER THE F*** YOU WANNA DO PUBLIC LICENSE
                        Version 1, January 2013

  Copyright (C) 2013 Jane Doe <jane@doe.com>

  Everyone is permitted to copy and distribute verbatim or modified copies
of this license document, and changing it is allowed.

         JUST DO WHATEVER THE F*** YOU WANNA DO PUBLIC LICENSE
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. Just do whatever the f*** you wanna do. Seriously.

I will from now on use it in quite a few of my projects. FSF better approve this software license.

Fight for your freedom! Don't let those brainwashed GPL fanboys hinder your vision!

51
nSDL / Re: nSDL 1.0.2—A very fast & robust graphics library
« on: January 07, 2013, 06:33:35 pm »
There's no such thing as nDraw. Blitting (or "drawing" as I referred it to) is all part of standard SDL.

52
nSDL / Re: nSDL 1.0.2—A very fast & robust graphics library
« on: January 07, 2013, 04:35:23 pm »
Done!

I finally managed to port SDL_image. The relocation issues were so frustrating I today decided to hardcode the difficult part. Here's nSDL drawing the OpenBSD fish loaded from a GIF file:



Using the freshly ported SDL_image (which can be downloaded, as usual, here), you can now load images of the following formats: GIF, LBM, PCX, PNM, TGA and XCF.

You should now be able to use much less memory to store those pictures as opposed to using BMP (or the in-code NTI format). GIF images are usually at least 4 times smaller than their BMP counterpart.

53
nSDL / Re: nSDL 1.0.2—A very fast & robust graphics library
« on: January 06, 2013, 04:47:53 pm »
Yeah, worst thing there's no logic at all behind the issues I'm having. And I've done some serious debugging before, but this just takes it all to a whole new level.

54
nSDL / Re: Frequently Asked Questions
« on: January 06, 2013, 08:38:51 am »
Yeah, but JPEG and PNG are by far the most used formats. Also, just partially porting SDL_image wouldn't make it SDL_image anymore, but some dirty stripped spin-off.

Now that I think of it, a trimmed (and possibly renamed, to not confuse the user) version of SDL_image would probably be possible. I'll look into it.

55
nSDL / Frequently Asked Questions
« on: January 05, 2013, 04:48:04 pm »
  • What is nSDL?
    nSDL is a port of the widely used, cross-platform and open source SDL graphics library for the Ndless-fueled TI-Nspire.

  • What is SDL?
    According to Wikipedia, "SDL acts as a thin, cross-platform wrapper, providing support for 2D pixel operations, sound, file access, event handling, timing, threading, and more." It's basically a graphics library with event handling, timing and other nice little things.

  • Where can I download nSDL?
    On the nSDL website.

  • How do I install/use nSDL?
    Copy lib and include folders' content in the nSDL package to the respective folders in your Ndless SDK folder. To build your nSDL programs, use and adapt the Makefile.sample file.

  • Is there some nSDL wiki?
    Yeah.

  • Which version of SDL is nSDL based on?
    1.2.15.

  • Do I need to recompile my code for each machine separately?
    No, compile it once and it'll work on any of the calculators. If however it doesn't, check out some other part of the code isn't causing the trouble.

  • What functionalities of SDL are/aren't supported?
    Supported: video, events, SDL_GetTicks()
    Not supported: audio, threads, timers, mouse

  • Will there ever be mouse support?
    Most probably yes. There was partial mouse support in an earlier nSDL version, but it was removed in a later release because the behavior on CX and non-CX calculators was different, making it desperately frustrating to debug as I only have a Touchpad.

  • Are SDL_image or SDL_gfx supported?
    Yes, both have been ported and can be found here.

  • How do I draw text?
    Using the included nSDL-exclusive functions. First load the font with whatever color you want using nSDL_LoadFont(), then draw your stuff with nSDL_DrawString(), and finally free the font using nSDL_FreeFont(). Simple as that. Here's an example:

    nSDL_Font *font = nSDL_LoadFont(NSDL_FONT_TINYTYPE, 255, 0, 0);
    nSDL_DrawString(screen, font, 10, 10, "I love your string, baby.");
    nSDL_FreeFont(font);


    For more information about the different fonts and available flags, check this page out.

  • What are those nSDL-exclusive functions?
    Here's a list of them.

  • Can I draw text in different sizes?
    No.

  • How do I use cos(), sin() and other mathematical functions?
    Using the ported fdlibm library which can be found here. Just include libfdm.h in your code. It implements all of the functions defined in math.h. Install it the same way as you'd install nSDL. Remember to link fdlibm using the -lfdm switch.

  • Can I draw text in different sizes?
    No.

  • Where do I see which key is mapped to which SDL key value?
    Check out the last part of this file for the latest keymap.

  • Does it run Crysis?
    Yes, the latest tests show that nSDL runs Crysis at about 47 FPS in ultra (note to Fox News: the TI-Nspire doesn't actually run Crysis at 47 FPS). nSDL has been designed with performance in mind.


56
nSDL / Re: nSDL 1.0.2—A very fast & robust graphics library
« on: January 03, 2013, 03:09:28 pm »
  • In my program, I'm loading a bitmap with SDL_LoadBMP(path), but it seems that relative path doesn't work. If I have image.bmp.tns in the same directory as my program, just typing SDL_LoadBMP("image.bmp.tns"); doesn't work. Is there a way to fix that ?
Yeah that must be because of the way ndless (or syscalls, whatever) handle opening files (at some point in the code it's just calling fopen). Rather than implementing the relative path thing in nSDL, I think it would be better to do it in the fopen code itself for consistency across all programs. Despite that, I've never had to use "/documents/Examples/derp.bmp.tns" as the path, "Examples/derp.bmp.tns" has always worked IIRC.

  • Second question, I have sprites that have transparent parts, but it seems that transparency isn't supported due to the NTI format and get replaced by white 0xffff. Is there a way to use transparent sprites or are they forbidden ?
The format itself doesn't support transparency (neither does BMP), but SDL does support color keys for surfaces, and that's what you should be using. In the image, draw (in Paint or whatever) the parts that you want transparent with a certain color (#ff00ff is quite common) and after you've loaded it and have its SDL_Surface, do SDL_SetColorKey(surface, SDL_SRCCOLORKEY, SDL_MapRGB(screen->format, 0xff, 0x00, 0xff)). More info here.

57
nSDL / Re: nSDL 1.0.2—A very fast & robust graphics library
« on: November 29, 2012, 11:50:56 am »
Tiny update that handles arrow keys better (diagonal arrow keys supported) and maps the Nspire's touchpad click button to SDLK_KB_ENTER. Those were supposed to be included in an update with functional mouse support, but as it's been taking so long and can't test my code on an actual TI-Nspire (and probably won't for long), I decided to push those changes to master so they're outta the way.

(Download's on the website, as usual)

58
TI-Nspire / Re: nCraft (3D minecraft-like game for the nspire)
« on: September 27, 2012, 01:29:52 pm »
Oh, true, my bad. Well, even if in theory everything did scale well and there would be no visual issues, I think it would complexify the code quite a bunch as the maths behind your technique might be difficult (mixing 2D and 3D maths is not easy) and I'm not sure if it's guaranteed it will handle all situations perfectly without some dirty hacks. Furthermore, I don't know if the eventual speed gain is enough to compensate for the pain of implementing the technique. But I might be wrong, if it is a (variation) of a proven rendering technique why not. However I believe there are simpler and faster alternatives (I'm not sure what those alternatives are, but looking at the Yeti3D demo on GBA makes me think they exist).

59
TI-Nspire / Re: nCraft (3D minecraft-like game for the nspire)
« on: September 27, 2012, 01:05:57 pm »
Isometric 3D would look extremely weird and is not at all suitable for first person games.

60
Calculator C / Re: [Ndless] Memory leaks happen anyway
« on: September 25, 2012, 02:32:12 pm »
I doubt it has anything to do with a memory leak.

Pages: 1 2 3 [4] 5 6 ... 21