Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: nemo on September 11, 2010, 11:00:32 pm
-
i made a simple grayscale editor where you can define the height and width of your title screen and edit it pixel-by-pixel. when you enter a number in, it has to have two digits. meaning "6" is not a valid input, it should be "06". it's pretty simple right now.. you move a cursor around where [2nd] inverts the pixel on the buffer, and [alpha] inverts the pixel on the backbuffer. mode inverts the buffer, xton inverts the backbuffer, del clears the buffer, stat clears the backbuffer. they literally use drawInv and ClrDraw, so when you invert the buffer, not only will your title screen be inverted, but also the rest of the buffer.
unfortunately, i don't have access to a link cable right now.. so here's the source code, if you feel like typing it in. the source is only 440 bytes, the executable is just over a thousand. here's the source:
.PICEDIT
ClrDraw
ClrDraw{^r}
DiagnosticOff
Disp "HEIGHT"
{input}^r->C^256-48*10+(C/256-48)->H
ClrHome
Disp "WIDTH"
{input}^r->C^256-48*10+(C/256-48)->W
0->X->Y
Repeat getKey(9)
If getKey->K=54
Pxl-Change(X,Y
End
If K=48
Pxl-Change(X,Y)^r
End
If K=55
DrawInv :End
If K=40
DrawInv ^r:End
If K=56
ClrDraw:End
If K=32
ClrDraw^r:End
K=3 and (W-1!=X)-(K=2)+X->X
K=1 and (H-1!=Y)-(K=4)+Y->Y
Pxl-Change(X,Y
DispGraphrr
Pxl-Change(X,Y
End
"0123456789ABCDEF"->Str1
GetCalc("Str1",W/8+(W^8!=0)->L*H->U*4)->A
12-L->B
For(Z,0,U-1
{{Z/L*B+L6+Z}->C/16+Str1}->(Z*2+A}
{C^16+Str1}->{Z*2+1+A}
{{Z/L*B+L3+Z}->C/16+Str1}->(Z*2+(U*2)+A}
{C^16+Str1}->{Z*2+1+(U*2)+A}
End
-
What is the "{input}" thing? Like what token or what do I type in. I was gonna get a copy up for people.
Nevermind, think I got it.
-
Nice, I would like to eventually see more development on this, like some tools such as rectangles, flood filling, etc. I'M glad to see more drawing tools for Axe :)
-
Um, so I tried typing it all in and it is compiling but it doesn't do anything. I don't know what is wrong. I've gone over the code twice. I'd try to fix it but I don't know enough about Axe. Either there are typos that are making it wrong (there are some) or I'm missing something in my code. I don't know though, sorry I can't get a copy up.
-
Maybe he did a typo or there's part of the code that was meant to be something else, idk.
Btw, {^r} is meant to be r. No clue about ^r, though, nor {input}.
-
{^r}=^r and {input} means the byte at Input, input being the token
-
Ya, I don't know. I mean there are typos in the code (no offence, nemo) like that one and I thought I caught them all. The only one that I see that I'm not sure about is "DispGraphrr" but I'm assuming it's supposed to be DispGraphr. {input} I figured out, it's just another command that wasn't in the version I had on my calculator, which I fixed. What seems to be happening though is that it isn't repeating or something.
-
There aren't any typos. Dispgraphrr is dispgraphrr
Sorry im being brief im on an ipad
-
Oh...how did I not realize that ???
And what about the places where you start with a ( and end with a }?
Edit:
I still can't seem to get it to work :(
-
Oops. Those aré typos. Treat the ( as {
-
Ya, that's what I assumed.
-
Was anyone able to type this in and get a working executable?
-
Not I :(
-
Same x.x
I think there migth be a typo or we are all interpreting a part of the code as something else, or something like that.
-
Well from what I'm seeing this do it looks like what happens with TI-BASIC when you don't put a End at the end of a loop.
-
With a few modifications, it's compiling.
But there are more efficient ways to crash my calc... ::)
Really, what is this "Input" command?
-
Ya, it compiles but doesn't work correctly. I think nemo needs to recheck his code, unless someone else got it to run correctly.
It is a command new to v0.4.4 I believe. I don't know what it does.
-
When i tried Input, it was very buggy for me, so maybe thats the whole problem?
-
Well I feel like nemo had this working on his calculator or he wouldn't have posted it. I don't know though.
-
I think we'll need to wait until he gets access to a computer again for a 8xp x.x
-
Ya. Or until we find out what is going wrong.
-
Quoted from the readme.
input - Prompts for an input string just like BASIC then returns a pointer to the string structure. Don't forget, its a string of tokens, not characters.
I can't wait to see this as well. :)
-
Yeah, the "input" command is essentially identical to BASIC's "Input" execept that it stores to a temporary variable instead of an OS one. The i is Lower-case here because it can be used in-line since things like "1+input" are acceptable. The buggyness that's been reported so far has to do with the fact that in BASIC there is an optional argument for a leading string to display before the actual inputing portion. So far, that string has always been null for me but it has been reported that garbage strings occasionally show up meaning that I need to zero a piece of memory somewhere before calling it to keep it blank (you can use the regular Disp to print text before it). Both [Enter] and [On] should end the input the same way. There may or may not be an issue with APD.
-
I was one of the people with lots of garbage before the input command :( It doesnt seem to mess with the input though, which is nice
-
well, I'm just still using my own input command, but that is perhaps just because of I wrote it myself: I like to use selfmade things, untill they die :)