-->
0 Members and 1 Guest are viewing this topic.
.0:Return1→X→Y→B→CRepeat getKey(15Circle(Y,X,12,1 ;Draws a circle of radius 12 using pxl-OnDispGraphClrDrawX+B→XIf >95 ;Since negative numbers are really big (>32768), this tests if it is negative, too-B→BY+C→YIf >63-C→CEndStop
π9872→P ;This sets P equal to 9872h. This will be the location of the other buffer.ClrDrawP ;Clears the buffer at PDisp ºP ;Sets the buffer at P as the gray bufferLbl ".→Z ;Locates label named "." and stores that to Z. Better to search once than every loop!0→X→YRepeat getKey(15 ;repeats the loop until clear is pressedRepeat 1 ;repeats until 1 is not zero (so it only cycles once). This is a great trick... ;This is a label. Sub routines use the End statement to end and so does Repeat >.>Line(X,Y,6,6,2,P ;Draws an inverted filled rectangle at X,Y of size 6x6 on the buffer P (the gray buffer)Line(X,Y,6,6,2 ;This inverts the same region on the main buffer.End ;Ends the repeat loop/subroutineDispGraph ;Updates the LCD (in grayscale)prgmZ ;executes the sub routine pointed to by ZgetKey(56 ;tests the delete keyIf +getKey(9 ;tests if Ans or getKey(9 is validLine(X,Y,6,6,1-getKey(56 ;draws a white rectangle if delete is pressed, black otherwiseX+getKey(3-getKey(2→XY+getKey(1-getKey(4→YEndStop
danggit guys lol you make me want to get back into calc programming But that's pretty awesome though that you can do that with such little coding
Okay, so at request, I started this topic for example codes I will try to post a link in this post when I add new codes. The first one is a bouncing circle:Code: [Select].0:Return1→X→Y→B→CRepeat getKey(15Circle(Y,X,12,1 ;Draws a circle of radius 12 using pxl-OnDispGraphClrDrawX+B→XIf >83 ;Changed by Spyro-B→BY+C→YIf >51 ;Changed by Spyro-C→CEndStop
.0:Return1→X→Y→B→CRepeat getKey(15Circle(Y,X,12,1 ;Draws a circle of radius 12 using pxl-OnDispGraphClrDrawX+B→XIf >83 ;Changed by Spyro-B→BY+C→YIf >51 ;Changed by Spyro-C→CEndStop