| Some questions on Ndless/nRGBlib |
| (1/2) > >> |
|
epic7: I just started making programs with nRGBlib and ndless today, so I'm a beginner with it. I started making Pong as my first mini-project and I now have a few questions. If anybody can answer some, I'd really appreciate it ;D (Also i mention drawStr in this, and I'm not really sure if I'm remembering the correct name of that function :P) First, how could the addition of this line cause my calc to crash? ??? yvel+=rmov; Both of those are defined and have values, but I have no clue why that wouldn't work. Does it depend on the code around it or something? How can rand() work while using nRGBlib? It gives me errors. After I showed Levak my error (here),he said that there's a conflict between rgblib's rand and yagorto's one. So I guess that means RGBlib has a rand too? In nRGBlib, what would you use to display an integer? I only know of drawStr and I don't think that works for it... Also is there perhaps a %d thing like in printf? For the 4th and 5th arguments of drawStr, what do they do? Size? And so I can be clear on how to use RGBlib, is there some sort of guide I can use that says all the functions? |
|
Lionel Debroux: If there's a conflict between nRGBlib and yagarto/newlib, indeed, nRGBlib must be defining its own rand() function. Displaying integers is usually done through a combination of sprintf (or the less standard "itoa" family) and some string-drawing function :) |
|
epic7: So does that mean I can't use rand() while using nRGBlib? Would it be possible to just delete one of the rands? I found nRGBlib's function for it in the source. |
|
Jim Bauwens: Do you need to inlucde newlib? It might be better to do without, you will have less problems (but also less functions). |
|
epic7: Because I have no clue what newlib is, I don't think I'm including it :p |
| Navigation |
| Message Index |
| Next page |