PAlib in 2016

Discussion in 'NDS - Emulation and Homebrew' started by PavelKondratev, Sep 20, 2016.

  1. PavelKondratev
    OP

    PavelKondratev Newbie

    Newcomer
    6
    0
    Sep 20, 2016
    Serbia, Republic of
    Hello everyone,
    I'm new in DS development, but not new in C language and I was surprised then saw that devkitpro hasn't methods to draw line from the box. My task is make from my DSi something useful for me and I do not ready to pass on it a lot of time. So, maybe someone can help me with PAlib, because I cannot find working URL on it, maybe anybody has got .rar with all in one pack? Please, help. And sorry for my bad English
     
  2. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    18,749
    9,035
    Oct 27, 2002
    France
    Engine room, learning
    PALib website used to have a tutorial, but the website closed.
    PALib is kind of abandoned (since 2007?) and deprecated. I don't know if it supported DSi or only DS.
    NDSLib is a better solution.


    If you really want PALib, it's there on sourceforge with a google search.
    https://sourceforge.net/projects/pands/files/
     
  3. PavelKondratev
    OP

    PavelKondratev Newbie

    Newcomer
    6
    0
    Sep 20, 2016
    Serbia, Republic of
    Yes, I understand it and has founded it yet. But it doesn't work with the latest version of DevKitPro and couldn't find g++. What do I need to do to make it work. I need from it only primitives, such as DrawLine or Rectangle. I don't need to work with graphics. Maybe there can be an alternative for PAlib what can draw Lines and Restangles? What about NFlib? Can it draw?
     
    Last edited by PavelKondratev, Sep 21, 2016
  4. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    18,749
    9,035
    Oct 27, 2002
    France
    Engine room, learning
    I wanted to recommended Foxlib too (NFLib, it probably changed its name since last time I saw it?), I don't know if it can draw lines and rectangles, but it's used to manage sprites. if it's only a sprite lib, maybe you can create a line sprite and a rectangle sprite?
    here some tutorial (I didn't read it, I don't know if there's what you asked):
    https://gbatemp.net/threads/ds-programming-for-newbies.322106/
     
  5. Gericom

    Gericom GBAtemp Advanced Fan

    Member
    857
    908
    Jun 30, 2011
    Netherlands
    If you want some simple drawing canvas, you could do something with 2 256*192*16bit buffers in main memory copy them in an alternating way to the vram each vblank (by dma). You can then write some simple functions (and put them in ITCM for speed) to draw lines on it and stuff. Examples of how to draw lines and stuff can be found here: http://www.coranac.com/tonc/text/bitmaps.htm it's for gba, but you could use it for any kind of 16 bit canvas. On the ds make sure the alpha bit (0x8000) is set, otherwise you wouldn't see a thing.
     
    Coto and Cyan like this.