Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: nemo on September 11, 2010, 11:00:32 pm

Title: Grayscale title screen editor
Post 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:
Code: [Select]
.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
Title: Re: Grayscale title screen editor
Post by: meishe91 on September 11, 2010, 11:13:30 pm
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.
Title: Re: Grayscale title screen editor
Post by: DJ Omnimaga on September 11, 2010, 11:17:45 pm
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 :)
Title: Re: Grayscale title screen editor
Post by: meishe91 on September 11, 2010, 11:37:54 pm
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.
Title: Re: Grayscale title screen editor
Post by: DJ Omnimaga on September 11, 2010, 11:49:43 pm
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}.
Title: Re: Grayscale title screen editor
Post by: nemo on September 11, 2010, 11:54:24 pm
{^r}=^r and {input} means the byte at Input, input being the token
Title: Re: Grayscale title screen editor
Post by: meishe91 on September 11, 2010, 11:54:30 pm
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.
Title: Re: Grayscale title screen editor
Post by: nemo on September 12, 2010, 12:01:31 am
There aren't any typos. Dispgraphrr is dispgraphrr
Sorry im being brief im on an ipad
Title: Re: Grayscale title screen editor
Post by: meishe91 on September 12, 2010, 12:04:53 am
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 :(
Title: Re: Grayscale title screen editor
Post by: nemo on September 12, 2010, 12:08:19 am
Oops. Those aré typos. Treat the ( as {
Title: Re: Grayscale title screen editor
Post by: meishe91 on September 12, 2010, 12:11:00 am
Ya, that's what I assumed.
Title: Re: Grayscale title screen editor
Post by: meishe91 on September 12, 2010, 02:26:45 pm
Was anyone able to type this in and get a working executable?
Title: Re: Grayscale title screen editor
Post by: Builderboy on September 12, 2010, 02:32:36 pm
Not I :(
Title: Re: Grayscale title screen editor
Post by: DJ Omnimaga on September 12, 2010, 02:48:13 pm
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.
Title: Re: Grayscale title screen editor
Post by: meishe91 on September 12, 2010, 02:51:51 pm
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.
Title: Re: Grayscale title screen editor
Post by: AngelFish on September 13, 2010, 12:36:36 am
With a few modifications, it's compiling.

But there are more efficient ways to crash my calc... ::)

Really, what is this "Input" command?
Title: Re: Grayscale title screen editor
Post by: meishe91 on September 13, 2010, 12:51:34 am
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.
Title: Re: Grayscale title screen editor
Post by: Builderboy on September 13, 2010, 01:43:11 am
When i tried Input, it was very buggy for me, so maybe thats the whole problem?
Title: Re: Grayscale title screen editor
Post by: meishe91 on September 13, 2010, 01:51:57 am
Well I feel like nemo had this working on his calculator or he wouldn't have posted it. I don't know though.
Title: Re: Grayscale title screen editor
Post by: DJ Omnimaga on September 13, 2010, 02:15:31 am
I think we'll need to wait until he gets access to a computer again for a 8xp x.x
Title: Re: Grayscale title screen editor
Post by: meishe91 on September 13, 2010, 02:16:33 am
Ya. Or until we find out what is going wrong.
Title: Re: Grayscale title screen editor
Post by: ztrumpet on September 13, 2010, 08:02:16 am
Quoted from the readme.
Quote
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. :)
Title: Re: Grayscale title screen editor
Post by: Quigibo on September 13, 2010, 04:49:03 pm
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.
Title: Re: Grayscale title screen editor
Post by: Builderboy on September 13, 2010, 05:06:26 pm
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
Title: Re: Grayscale title screen editor
Post by: LordConiupiter on September 13, 2010, 05:56:26 pm
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 :)