Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
18 May, 2013, 22:29:21 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 2 3 [4]   Go Down
  Print  
Author Topic: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1 -  (Read 5151 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
epic7
Chopin!
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 05:29:07
Date Registered: 22 October, 2011, 01:45:43
Location: Northeast US
Posts: 2159


Total Post Ratings: +118

View Profile
« Reply #45 on: 18 April, 2012, 02:14:59 »
0

Yay!

What was that double-buffering thing?
Logged



Current Projects:
TitleLanguageProgressStatus
DrillMiner    C (ndless)   35%         Active
?     C (ndless)   0%        Unconfirmed

Spoiler for Programming languages I currently know:
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit Tongue)
totorigolo
LV2 Member (Next: 40)
**
Offline Offline

Gender: Male
Last Login: 28 April, 2013, 02:07:00
Date Registered: 19 December, 2011, 00:19:11
Location: Bouches-du-Rhône
Posts: 24

Topic starter
Total Post Ratings: +9

View Profile
« Reply #46 on: 19 April, 2012, 18:05:15 »
0

Yay!

What was that double-buffering thing?

If you are talking about "PS: For epic7, I haven't change your code, but I've just added the double-buffering :", I was seemingly wrong because I use only one buffer... I actually don't know how to name it, but it's a buffer Wink

If you are talking about the code, here it is : http://pastebin.com/UPmJT0nB. There are not several changes.

---------------------------------------------------

You can download the v0.3 samples here !
« Last Edit: 19 April, 2012, 18:06:39 by totorigolo » Logged

nRGBlib - A portable graphic library for Nspire !
epic7
Chopin!
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 05:29:07
Date Registered: 22 October, 2011, 01:45:43
Location: Northeast US
Posts: 2159


Total Post Ratings: +118

View Profile
« Reply #47 on: 19 April, 2012, 20:18:43 »
0

Cool! Cheesy

I didn't know that I could add buffers like that.
Now that it looks like the flashing is no longer an issue, I can start making a better game! Cheesy
* epic7 downloads 0.3
« Last Edit: 19 April, 2012, 20:19:20 by epic7 » Logged



Current Projects:
TitleLanguageProgressStatus
DrillMiner    C (ndless)   35%         Active
?     C (ndless)   0%        Unconfirmed

Spoiler for Programming languages I currently know:
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit Tongue)
epic7
Chopin!
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 05:29:07
Date Registered: 22 October, 2011, 01:45:43
Location: Northeast US
Posts: 2159


Total Post Ratings: +118

View Profile
« Reply #48 on: 22 April, 2012, 16:49:48 »
0

How do I draw images/sub-images?

Also, could sub-images possibly be used as sprites?
Logged



Current Projects:
TitleLanguageProgressStatus
DrillMiner    C (ndless)   35%         Active
?     C (ndless)   0%        Unconfirmed

Spoiler for Programming languages I currently know:
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit Tongue)
totorigolo
LV2 Member (Next: 40)
**
Offline Offline

Gender: Male
Last Login: 28 April, 2013, 02:07:00
Date Registered: 19 December, 2011, 00:19:11
Location: Bouches-du-Rhône
Posts: 24

Topic starter
Total Post Ratings: +9

View Profile
« Reply #49 on: 22 April, 2012, 17:33:07 »
0

* How do I draw images/sub-images?

Take a look at the RPG sample.


1
2
3
4
5
6
7
8
9
10
11
12
13
   // Create the sub-image
    ImageSubrect tile;
    setImage(&tile, &img);

    tile.w = CELL_SIZE;
    tile.h = CELL_SIZE;
    tile.x = 0;
    tile.y = 0;
    tile.offset_x = CELL_SIZE * 3;
    tile.offset_y = CELL_SIZE * 2;

    drawImagesubrect(&tile, buffer);

edit 1:
* Also, could sub-images possibly be used as sprites?
I don't know what is exactly a sprite, but you can use it to draw tiles from a tileset, or to draw an animated sprite.
A sub-image is just like a frame on an image, where you can change its height, width and position.

I hope you understand me...

edit 2:
Sub-Images are like SDL_Rect in these tuto : http://vally8.free.fr/coinprog/sdl/tut5/sprite.php - http://www.aaroncox.net/tutorials/2dtutorials/sdl_sprite.pdf. But SDL_SetColorKey() doesn't exists yet.

« Last Edit: 25 April, 2012, 02:44:58 by totorigolo » Logged

nRGBlib - A portable graphic library for Nspire !
Pages: 1 2 3 [4]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.215 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.