Man, I was going to start bug hunting but got discouraged by all your unclosed parenthesises and brackets -.-° That is really calling for bugs for nothing since that doesn't optimize anything.
lol, how did you answer that then ? Anyway, there seems to be an error in the count since this one says 4677 while the previous one said 4679. Dunno if it was fixed by this post or if the error appeared here, just saying
I don't know if it "has to be last", but the alphabetical order works while the anti-alphabetical order doesn't. I'll try other orders when I get back on the right PC (now on my sister's computer).
I have absolutely no idea what is going on I am making a program using zstaxe and it has many problems. I don't know at all if that comes from zstaxe, maybe it is Wabbitemu's fault, but the problems appeared when I added zstaxe, so I assumed it was its fault.
First problem: When the first 3 lines of the code were those, #Axiom(ZSTAXE) #Axiom(TEXT) #Axiom(AMEMKIT) Axe freezed a few seconds after the first pass, then continued compiling and the outputted program "worked". Then, I tried changing the first 3 lines in to this (basically, changing their order): #Axiom(AMEMKIT) #Axiom(TEXT) #Axiom(ZSTAXE) And the freezing time disappeared
Second problem: I said "worked" because the background image had an offset, for some reason, even though I didn't change any command on the background drawing code.
Here is the full source code if you are interested, in spoiler. See the offset in Lbl DG, there is a "+156" that should normally not be necessary but the background is not at the right place if that "+156" is not there.
.put here the labels of the subroutines of the included options, then we'll call it with a Goto {...}^^r Data(|LSettings^^r,|LExecProg^^r,|LCredits^^r)->°Labels
"|vTEMPBUFF"->Str0 DelVar Str0 GetCalc(Str0,10000)->A !If Disp "NOT ENOUGH MEM" Pause 3600 Goto RET End ClrDraw^^r^^r
0->B->C->D Lbl Menu Fill(A,10000,0)
Copy(°List+1,L5,{°List}-1*10) For(theta,0,11) theta*10+L5->Z .options included in the prog For(W,0,°NbOpt-1) !If Equ>String(Z,stdDev(°OptNames,W)->r1) r1->T W*32+°Sprites+64->S End End .other options !If {Z} "Empty"->T 32+°Sprites->S Else!If -21 .Folder in |var Z+1->T °Sprites->S End ~1->r1 For(16) {r1++*2+S}^^r->{theta/3*24+r1+1*12+(theta^3*4)+1+A}^^r End TEXT(theta^3*32,17,T,theta/3*24*12+A) End TEXT(,,"Top Text Test",L6) TEXT(0,57,"Bottom Text Test",L6) Fill(L6+84,12,255) Fill(L6+672,12,255) GreyON()
Lbl MainL While 1 B->T getKey(1)?D?B+24->B,+1->D getKey(4)?D?-1->D,B?-24->B getKey(3)-getKey(2)+C+3^3->C B/24+D*3+C->Z .Z holds number of current choice If getKey(54) For(W,0,°NbOpt-1) !If Equ>String(Z*10+L5,stdDev(°OptNames,W)) Goto ({W*2+°Labels}^^r) End End End For(30) Copy(T<B+T-(T>B)->T*12+A,L6+96,576) T!=B*5+1 Pause End EndIf getKey(15)
Lbl RET DelVar Str0 LnReg ClrHome Return
Lbl Notif ->r1 Copy(L6,L1+84,84) Fill(L1,84,255) 0->ZXmin+1->ZXmax->Z ZXsclr1,L1) For(2) Pause Z*200+1 7->r1 For(7) Copy(r1--*12+L1,L6,84) .DispGraph Pause 50 End Exch(L1,+84,84) End Return
Lbl DG TC++ !If ^10 Cursor() DispGraph(L6,°BG+156)^^r Cursor() End Return
Lbl Cursor RectI(C*32,D*24+8,32,24) Return
Lbl Settings stdDev(°OptNames,0) sub(Notif) Goto Menu
Lbl ExecProg FnOff Prgm() If DelVar Str0 .DelVar TEMPBUFF to save mem Fill(L5,128,0) .Clears L5 to prevent strange tokens on homescreen Fpdf(T) End Goto Menu
Lbl Credits stdDev(°OptNames,2) sub(Notif) Goto Menu
Lbl Prgm .browse programs and returns pointer to selected program, or 0 if no programs found .btw, how could there be no program if you launched this program ? StorePic ClrDraw(L1) 0->N First(5) If Print(A) While Next() Print(N++*10+A) End 0->T->S WLP() While 1 S+getKey(1)-getKey(4)->S !If S+1 ->S T--+1??->T Else!If S-9 S-- N-8>T+T->T End S-(+T>N)->S ~1->Z ClrDraw For(8) If Z+++T<=N Text(5,Z*6,T+Z*10+A+1) End End Text(0,S*6,"-") DispGraph EndIf getKey(54) or getKey(48) 5->{T+S*10+A->T} Else 0 End RecallPic Return
It is not really hard to make an outline routine using several sprites. I have one just below (where 0 is nothing and 1 is wall) On the contrary, I have no idea how to do it without sprites
So, here is for example a rendering of a map with only 0s and 1s, first without borders, then with borders
.create a random map in L1 with only 0s and 1s ~1->r1 For(96) rand^2->{r1+++L1} End
Draw() Fill(L5,128,0) Copy(L1,L5,96) For(X,0,11) For(Y,0,7) If {Y*12+X+L5} {Y-1*12+X+L5}*2+{Y*12+X+1+L5}*2+{Y*12+X-1+L5}*2+{Y+1*12+X+L5}+1->{Y*12+X+L1} End End End
Lbl Draw ClrDraw 0->X For(12) ~1->Y For(8) Pt-On(X*8,Y++*8,{Y*12+X+L1}*8+°Sprites) End X++ End DispGraph Pause 3600 ClrHome Return
edit of course it can be optimized, but I made that like that so I didn't optimize at all
I don't know what that word means () but "inflation by Z" is somehow a programming technic. Basically, when your coordinate increases by one, you don't move of a pixel. You only move by a pixel when your coordinate increased by Z. And 256 is a good number because dividing by 256 is really optimized for Axe
Is there a way to connect earphones to it ? It would be stupid to prevent visually impaired people from using it at test due to it giving the answer to everybody.
This is what I love with open-source projects, everyone can contribute
So SpenceBoy, here is the code with some lines changed: -I added a grey background -I added inflation by 256 (for more precision) -I inverted the lines such as "getKey(...) and (meh>blah)" into "meh>blah and getKey(...)" to get rid of useless parenthesises -I didn't optimize anything since it is your project so I don't want to interfere with your way of coding
New source code in attachement and in spoiler, with screenshot
Spoiler For Spoiler:
.TENNIS [030F1F3F7F7FFFFF]->Pic1 [C0F0F89C9EFEFFFF] [030C1026464080FF]->Pic2 [C0300804020201FF] 0->X 56->Y 88->Z 56->W 0.1->G 0->V Repeat getKey(15) ClrDraw G+V->V Pt-On(X/256,Y/256,Pic1) Pt-On(X/256+8,Y/256,8+Pic1) If Y/256>=56 56*256->Y 0->V End Y+V->Y If X>0 and getKey(2) X-256->X End If X/256<80 and getKey(3) X+256->X End If Y/256=56 and getKey(54) ~256->V Y+V->Y End DispGraph(L6,°BG)^^r End
edit that background is the only image that I had available directly in hex and that was not a trollface so I put that for example, but it can be easily changed edit 2 forgot the spoiler
Not a big update, just some more generic code. I am basically posting here for a lot of reasons: -to let you know this is alive -to have the code somewhere in case my hard drive fails -if you have suggestions after testing, you can tell or add them
(note, this needs two Axioms to compile: TEXT by Jacobly and AMEMKIT by Jacobly, which can be found here even though it is not used yet)