0 Members and 3 Guests are viewing this topic.
Well, what I would do is creating a str/gdb/pic (w/e) and store the highscore in that since when you write to a string/ w/e ya chose (basically it's the same) you use writeback. I have never really used it, tho.
(This question is directed toward Deep Thought, but if anybody could answer it, that would be great)I was trying to figure out how to save a highscore within the program, rather than in an appvar, so I looked at the snakecaster source to try to figure it out.I'm pretty sure that I got everything else working, except for this one line of code.Code: [Select]:GetCalc(E8478)+GDB3-E9D93->Q //Where E is the little E on calc (2ND + , )This is what 'gets' the highscore at the beginning of the program, but I'm unsure of exactly what all the stuff is for. (and why it's not working for me)
:GetCalc(E8478)+GDB3-E9D93->Q //Where E is the little E on calc (2ND + , )
If I recall correctly Deep Thought said it was just a fancy optimization. You can still easily just reference GDB3 the normal way.
When the TI-OS runs an ASM program, it copies it to $9D95 and deletes the copy when its done. Thus, any changes to the running copy don't do anything.
GDB3-E9D93 is the offset to the high-score value from the start of the ASM program header.
Is it possible to write to the back buffer ?Like Text(X,Y,PTR,L3) (not in the commands)or Text(X,Y,PTR)r (not in the commands)or Fix 51 // Text(X,Y,PTR) (not in the commands)or with any routine you have ?
Quote from: Hayleia on July 02, 2012, 03:19:55 pmIs it possible to write to the back buffer ?Like Text(X,Y,PTR,L3) (not in the commands)or Text(X,Y,PTR)r (not in the commands)or Fix 51 // Text(X,Y,PTR) (not in the commands)or with any routine you have ?Sadly, no. The text command is an OS routine by TI, so it isn't possible to write text to any other buffer than the main. You have to write it to the front buffer and copy the part you want to the back buffer. If it is a whole line, the copy() function is the right one, otherwise you might have to make your one routine or use the pt-Get() function several times (lot of size and takes some time).The last possibility would be to use your own font and just 'sprite' it there.
You don't even need an axiom for that. I wrote text routines that were as fast as the OS routine in plain axe. (tho I'm not doing it for ya, sorry: I hate creating 255 sprites for the single purpose of a text routine :p)
Blame TI for that. If you want to draw directly to the back-buffer, you'd have to make your own font routine, which is easy, but takes forever to get all those letter/number/symbol sprites as well as a lot of space in the program itself. But sometimes a kick-ass font can really improve a game's look!