Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: epic7 on October 28, 2011, 08:10:04 pm
-
Im trying to make a title screen. I don't really know how to make it work.
(the third picture also shows half of whats on the previous page.
-
What's the pic? (both)
-
Those are pics of the code
-
no as in Pic0 and Pic9.
EDIt: does it compile?
-
Pic9 is a graph image I storepic'd. Pic0 is an 8x8 of an arrow. It compiles
-
hmmm...
my expirience with pics is: DON'T!
I always use appvars, easier to store, recall, and doesn't take up precious pic space.
whenever I use a OS pic, it puts the pixels wherever it wants.
-
How do you use appvars?
-
one sec...
I gotta get code...
ok got it...
just make a simple drawing program in which you draw the pic desired... (I can help with that too :)) and then do this:
:If getKey(42) //press store
:ClrHome //duh
:Disp "Saving...",i //imaginary i
:GetCalc("appvPIC",768)->A //appvar PIC created (768 bytes, for a picture) and stored in pointer A
:Copy(L6,A,768) //copies L6 (buffer) into appvar (pointer A)
:Archive "appvPIC" //this is optional, won't delete in ram clears
:End
and to recall it...
:ClrDraw
:GetCalc("appvPIC",Y0) //recalls pic from archive and stored in Y0
:For(r1,0,767) //loops through all bytes in pic
:{Y0+r1}->{L6+r1} //copies byte into L6 (buffer)
:End
:DispGraph
Optimized way:
:ClrDraw
:GetCalc("appvPIC",Y0) //recalls pic from archive and stored in Y0
:Copy(Y0,L6,768) //copies it into L6 (buffer)
:DispGraph
-
k
-
lol you posted right after I edited
-
Optimized recalling appvar pic
:GetCalc("appvPIC",Y0)
:ClrDraw
:Copy(Y0,L6,768)
:DispGraph
8)
-
ooh that is WAY more optimized
-
:banghead: :banghead: :banghead: :banghead: :banghead:
So.... How do I put my pic into an apvar?
-
don't get it?
-
I have 3 questions:
Why wont my pic0 work?
Why doesnt my background work?
How can I stop my title screen text blinking?
-
pic into appvar:
(quote from yeongJIN_COOL :))
To Store Pic in appvar:
(just create a temp program to do this)
GetCalc("appvBLAH",768)→A //appvBLAH created and stored into pointer A
[Pic1]→B //Pic1 in OS Stored into pointer B
Copy(B,A,768) //Copies Pic1 into appvBLAH
put an arrow on the screen? can you elaborate on that? (now I sound like eliza lol ;))
-
Do I have to use an appvar? I have an arrow sprite and I just want to display it on the screen
Here's what happens with my code:
-
of course you don't have to use an appvar.
arrow sprite: Pt-On(X,Y,Pic1)
is that what you need?
EDIT: try doing Fix 5 at the beginning of the program. It might help.
-
I used that and it usually works.
I used
Pt-on(x,y,rotC(Pic0)
-
It looks like you were drawing the background over the arrows in the first post, which is why they are not showing up.
-
Oh. I just noticed that when I tried to recall my Pic9 background, It was blank, so I must have not even stored the background
-
oh yeah duh :P I am stupid.
doing the pic recall erases it. (the buffer)
do it at the beginning and do storepic, or whatever ;)
-
hmmm...
my expirience with pics is: DON'T!
I always use appvars, easier to store, recall, and doesn't take up precious pic space.
whenever I use a OS pic, it puts the pixels wherever it wants.
Really? I use OS Pic's all the time and never have they ever given me any problems. I think they are also much much more useful than appvars because appvars can't be compiled directly into the code. And since the picture variables are compiled into the program, you can delete them when you are done, freeing up that precious pic space.
-
This happened to me twice now. I run the program once, and it works great. Second time, the Pic9 is erased.
-
The pictures on the first post don't show the entire program, could you post the entire source in text?
-
Im going to make a few adjustments and then get the code
Edit: Screw it, Im getting the code first
Double Edit: Here is is
:.ROBOGUN
:1→G
:[081C2A4908080808]→Pic0
:[F080800000000000]→Pic1
:[FCA0A02000000000]
:[FFFCA0A080000000]
:[FCFFFC4848484000]
:[F8FFFFF848484850]
:[F8FFFFFFFC6C6C6C]
:Repeat getKey(15)
:Text(35,1,"RoboGun")
:Text(42,8,"V1.0"
:Text(1,55,"New Game"
:Text(60,55,"Load Game"
:copy([Pic9],L6,768)
:Pt-On(75,47,ShadeNorm(Pic0)
:Pt-On(12,47,Shade_t(Pic0)
:DispGraph
:End
I think If I put the Text( after the background, it'll stop the blinking of the words a bit, right?
-
Firstly, to stop the flickering, add a
Fix 5
somewhere at the top, and a
Fix 4
at the end of the program.
Second, I've never use OS Pic vars before -- is it safe to use a direct [Pic9] inside of a command?
Thirdly, try doing something like
[Pic9]->Pic8
outside of the loop then doing
Copy(Pic8,L6,768) .or whatever number
I don't know if that'll do anything, but it seems like it's worth a shot.
Fourthly, a bit random, but I'm assuming that RotC is run at compile time and returns a pointer to the rotated sprite data? If so, couldn't you dereference that pointer and technically do RotC on it infinitely as long as you don't mind the code bloat?
-
Does
Fix 5 draw text to the buffer or something?
Edit: With fix5, no text shows up.
Edit: Nvm I know why
-
That's exactly what it does. Everytime you do a 'DispGraph', you're actually destroying the text on the screen (because there's no text written to the buffer and the blankness overwrites what's on the screen).
-
Will [pic9]-> pic8 hopefully stop the deleting of my background?
Edit: It kinda does.... I compiled and ran multiple times, it worked. I compiled it again and my background was deleted.
-
You could always store it to L3 (back buffer) and then do recall pic.