Author Topic: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1  (Read 28591 times)

0 Members and 1 Guest are viewing this topic.

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #15 on: January 17, 2012, 06:35:19 pm »
I like the progress on this, great work! :)


Offline totorigolo

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +9/-0
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #16 on: January 19, 2012, 04:48:27 pm »
Ndless 3 is out !
Here is the link to download nRGBlib :) :
https://bitbucket.org/totorigolo/nrgblib/downloads

This link will be always up to date, because it's mine.
nRGBlib - A portable graphic library for Nspire !

Offline ExtendeD

  • Project Author
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #17 on: January 19, 2012, 04:49:55 pm »
Thanks totorigolo :) Also make sure to put it in your first post.
Ndless.me with the finest TI-Nspire programs

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #18 on: January 19, 2012, 11:36:49 pm »
So, does "character drawing" mean sprite support or text?

Sprite support would be really nice. At arbitrary sizes, ideally.

Also, have you considered image importing?

Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #19 on: January 20, 2012, 08:51:42 am »
Is there a pixel test command? That would be highly useful.

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #20 on: February 07, 2012, 05:10:04 am »
Looks very interesting!

I might use it sometime when I have the time XD

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #21 on: February 22, 2012, 05:23:30 pm »
* epic7 downloads
* epic7 is clueless about ndless makefile stuff

In your example makefile,
What does "the directory for the tns file" mean
Also, where it says "one .o file for each .c file" am I supposed to replace that with something?
« Last Edit: February 22, 2012, 05:26:54 pm by epic7 »

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #22 on: February 22, 2012, 05:54:06 pm »
the "directory for the tns file" means the name and directory were the compiled .tns will be. For example this line could be
Code: [Select]
DISTDIR = Example.tns
In the OBJS line you have to write the names of the .c files you want to compile, but with .o instead of .c at the end of each name.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #23 on: February 23, 2012, 07:20:24 pm »
Where am I supposed to put all that makefile code?

Offline Jonius7

  • python! Lua!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1918
  • Rating: +82/-18
  • Still bringing new dimensions to the TI-nspire...
    • View Profile
    • TI Stadium
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #24 on: February 23, 2012, 10:36:23 pm »
This is great. Hopefully this'll allow to extend the capabilities of the nspire significantly.
Programmed some CASIO Basic in the past
DJ Omnimaga Music Discographist ;)
DJ Omnimaga Discography
My Own Music!
My Released Projects (Updated 2015/05/08)
TI-nspire BASIC
TI-nspire Hold 'em
Health Bar
Scissors Paper Rock
TI-nspire Lua
Numstrat
TI-nspire Hold 'em Lua
Transport Chooser
Secret Project (at v0.08.2 - 2015/05/08)
Spoiler For Extra To-Be-Sorted Clutter:

Spoiler For Relegated Projects:
TI-nspire BASIC
Battle of 16s (stalled) | sTIck RPG (stalled) | Monopoly (stalled) | Cosmic Legions (stalled)
Axe Parser
Doodle God (stalled while I go and learn some Axe)

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #25 on: February 23, 2012, 11:01:16 pm »
the "directory for the tns file" means the name and directory were the compiled .tns will be. For example this line could be
Code: [Select]
DISTDIR = Example.tns
In the OBJS line you have to write the names of the .c files you want to compile, but with .o instead of .c at the end of each name.
So I could put
DISTDIR = C:/ndless/test1/testprogram.tns
?

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #26 on: February 24, 2012, 08:07:59 pm »
Is there any guide or something to tell how to use the functions?''

And should this makefile work?
I get an error that i think is in the OBJS line.
Code: [Select]
GCC = nspire-gcc
LD = nspire-ld
GCCFLAGS = -Os -nostdlib -I"c:/nRGBlib/sdk/include/"
LDFLAGS = -L "c:/nRGBlib/sdk/lib/"
OBJCOPY := "$(shell (which arm-elf-objcopy arm-none-eabi-objcopy arm-linux-gnueabi-objcopy | head -1) 2>/dev/null)"
ifeq (${OBJCOPY},"")
OBJCOPY := arm-none-eabi-objcopy
endif
OBJS = main.o bar.o -> hello.o
DISTDIR = .
vpath %.tns $(DISTDIR)

all: hello.tns

%.o: %.c
$(GCC) $(GCCFLAGS) -c $<

%.o: %.S
$(GCC) $(GCCFLAGS) -c $<

hello.tns: $(OBJS)
$(LD) $(LDFLAGS) $^ -o $(@:.tns=.elf) -lRGB
@mkdir -p $(DISTDIR)
$(OBJCOPY) -O binary $(@:.tns=.elf) $(DISTDIR)/$@

clean:
rm -f *.o *.elf
rm -f $(DISTDIR)/hello.tns
EDIT: I changed it to just OBJS = hello.o and it made the tns
« Last Edit: February 24, 2012, 10:02:15 pm by epic7 »

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #27 on: February 26, 2012, 11:18:17 pm »
In nRGBlib, how do you make sprites? Or has that not been implemented yet?

Also, as ive posted multiple times :P, rand() doesnt work because RGBlib has a rand function that conflicts with yagarto's one, so how do I get it to work? The snake game uses rand() and it works fine.... I can't really spot any differences between snake's code and mine that could have made snake's work, other than that it included nMATHS, but that didn't change anything for me when I included it

Edit: Ouch, triple post D:
« Last Edit: February 26, 2012, 11:22:25 pm by epic7 »

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #28 on: February 27, 2012, 02:14:46 am »
Just take a look at the example nRGBLib program's source, it's quite clear.
It also shows how to draw sprites IIRC.

Offline totorigolo

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +9/-0
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #29 on: March 03, 2012, 09:27:53 am »
Above all, please excuse me epic7, Spyro543 and willrandship for not responding, I didn't receive any mail and this topic has more succes than the french one...

So, does "character drawing" mean sprite support or text?

Sprite support would be really nice. At arbitrary sizes, ideally.

Also, have you considered image importing?

"character drawing" means text. I was wondering about sprite support and images, but i had actually not work on nRGBlib since Ndless 3 out.

Is there a pixel test command? That would be highly useful.

I added one, but i had problems, so i deleted it for the public release. It will be added soon  :)

In nRGBlib, how do you make sprites? Or has that not been implemented yet?

Also, as ive posted multiple times :P, rand() doesnt work because RGBlib has a rand function that conflicts with yagarto's one, so how do I get it to work? The snake game uses rand() and it works fine.... I can't really spot any differences between snake's code and mine that could have made snake's work, other than that it included nMATHS, but that didn't change anything for me when I included it

Edit: Ouch, triple post D:

Did you manage to use rand() and to compile ? I will answer faster this time ;)

nRGBlib - A portable graphic library for Nspire !