Page 24 of 25

Re: wishlist for NXC

Posted: 12 Nov 2012, 10:01
by HaWe
I suggest you never again ask for recursions in NXC
who do you think you are to think you may give me advices?
Better ignore posts which are not addressed to you in future and walk along! (as already suggested by J.H.)

Re: wishlist for NXC

Posted: 13 Nov 2012, 15:57
by afanofosc
Also, it is best to ignore advice from people that you think should not be giving you advice rather than to ask them who they think they are and give them advice that they don't think you should be giving them.

If the firmware supported a function call mechanism that allowed for recursion then maybe I would add support for recursion in NXC.

John Hansen

Re: wishlist for NXC

Posted: 17 Nov 2012, 14:54
by HaWe
what about making such fw changes for recursions?
(and, BTW, also for a peer-to-peer-network protocol?)

Re: wishlist for NXC

Posted: 13 Dec 2012, 21:00
by jld001
http://pastebin.com/Apd8eSD8
I have a program that cycles through a bool array and draws it as rectangles. I would like to be able to clear the false rectangles and fill the true ones. The DRAW_OPT_CLEAR, and DRAW_OPT_INVERT don't work for clearing the false rectangles.
Any ideas? Thanks.

Re: wishlist for NXC

Posted: 02 Jan 2013, 22:16
by jld001
I am working on some games, and for the graphics to look best, I want to clear only part of the screen, not the entire screen. (Clearing the entire screen creates flicker.)
I would imagine the code would look something like this:

Code: Select all

RectOut(x,y,w,h,DRAW_OPT_NORMAL);
Wait(1000);
RectOut(x,y,w,h,DRAW_OPT_FILL_INVERT); //No such thing :)
Here are the actual drawing option constants.

Code: Select all

#define  DRAW_OPT_CLEAR_PIXELS (0x0004)
#define  DRAW_OPT_CLEAR             (0x0004)
#define  DRAW_OPT_INVERT            (0x0004)
Clear Pixels, Clear, and Invert don't clear the rectangle specified.
Does anyone know a workaround, or would anyone be interested in this being implemented?

Re: wishlist for NXC

Posted: 02 Jan 2013, 23:51
by mattallen37
Use:

Code: Select all

DRAW_OPT_FILL_SHAPE | DRAW_OPT_CLEAR
for the draw options (equals 0x24).

So, it would be like this:

Code: Select all

RectOut(x, y, w, h, (DRAW_OPT_FILL_SHAPE | DRAW_OPT_CLEAR));
or you could #define DRAW_OPT_FILL_INVERT like this:

Code: Select all

#define DRAW_OPT_FILL_INVERT (DRAW_OPT_FILL_SHAPE | DRAW_OPT_CLEAR)
and then you could use:

Code: Select all

RectOut(x, y, w, h, DRAW_OPT_FILL_INVERT);

Re: wishlist for NXC

Posted: 03 Jan 2013, 18:17
by jld001
:D Thank you so much, I implemented it and it works great! :D

Re: wishlist for NXC

Posted: 05 Jan 2013, 21:28
by HaWe
currently, TextOut cuts off the rest of a string when the end of a line has been reached.
What about making automatic line breaks (wordwrap, CR/LF) in these cases like on a real text console instead of cutting off the string?

Re: wishlist for NXC

Posted: 07 Jan 2013, 13:20
by afanofosc
I think adding support for text wrapping either automatically at the edge of the screen (with the appropriate text option) and/or support for LF and CR would be great. I can work on that while I wait anxiously for some additional information about the new LEGO MINDSTORMS EV3 and start focusing more on implementing support in BricxCC for native ARM9 Linux executables.

Wired has some cool photos from the LEGO Education version:

Image

Image


From the LEGO Education website: http://www.legoeducation.us/eng/categor ... cation/ev3

The retail set models from Engadget.com: http://www.engadget.com/gallery/lego-mindstorms-ev3/

http://www.engadget.com/2013/01/07/lego ... bile-apps/

John Hansen

Re: wishlist for NXC

Posted: 07 Jan 2013, 13:34
by HaWe
yes, that would be great.
Also different unfulfilled wishes for NXC (like e.g., for making real superscaled-parallelized-NXT-IO-control, pointers, recursions, stack, heap, dynamic memory allocation, stdio.h lib, and all based on a real ANSI C compiler for genuine ARM machine code like e.g., based on gnu for arm/Linux) instead of that awfully slow and straitened Lego firmware will now hopefully be history by then...
(conditional when again provided by a proven J.H. API)

8-)