0 Members and 2 Guests are viewing this topic.
Optimization is going smoothly. I managed to cut the size from 10416 bytes to 9910! That's 506 bytes saved! And I'm pretty sure there are still several things I can optimize.
:.NOSMENU:.[Pic1]→Pic1:.[Pic3]→Pic2:.[Pic2]→Pic3:.[Pic6]→Pic4:.[Pic5]→Pic5:[10A040A00000000060F0909000000000F09090600000000000A040A000000000→Pic1I:"vNOSBUFF"→Str1D:"IRON SWORD*"→Str1E:"STEEL SWORD*"→Str2E:"ARBITER'S BLADE*"→Str3E:"IRON ARMOR*"→Str1A:"STEEL ARMOR*"→Str2A:"GUARDIAN MAIL*"→Str3A:"IRON SHIELD*"→Str1S:"STEEL SHIELD*"→Str2S:"ROUND SHIELD*"→Str3S:DiagnosticOff:0→r1:GetCalc(Str1D,768)→J:DeltaList(8,20,42,60,48,99)→GDB1E:DeltaList(12,23,33,50,60)→GDB1A:DeltaList(6,10,15,26,39)→GDB2A:DeltaList(5,25,125,625,0)→GDB1EX:GetCalc("vNosStats")→K:GetCalc("vNosPorts")→I:GetCalc("vNosMenus",Y1):ClrDrawr:DrawInv r:Full:For(θ,0,767:{Y1+1536+θ} and {L3+θ}→{L3+θ}:End:Lbl MS:If ‾1sub(R1) or (getKey(48):0→r1:Return:End:Full:conj(Y1,L6,768:For(θ,0,1:If {θ+K+70}=1:sub(TX,63,θ*15+4,"ROLAND*":sub(DN,{38sub(K)}r,76,θ*15+9,2:sub(DN,{40sub(K)},76,θ*15+14,1:End:If {θ+K+70}=2:sub(TX,63,θ*15+4,"ARIA*":sub(DN,{0sub(K)}r,76,θ*15+9,2:sub(DN,{2sub(K)},76,θ*15+14,1:End:If {θ+70+K}:sub(TX,63,θ*15+9,"HP*":sub(TX,63,θ*15+14,"MP*":End:End:conj(L6,J,768:Lbl MM:ClrDraw:conj(J,L6,768:Normal:For(θ,0,10:DispGraphr:End:sub(BMG,3,30,7,3,6):r1→θ:If ‾1sub(R1) or (θ>15:DelVar Str1D:ClrHome:Goto EXT:End:If θ≤15:Goto CS:End:Lbl EXT:DelVar Str1D:ClrHome:Return::.Item Screen:Lbl IT:Full:conj(Y1+768,L6,768:For(θ,0,7:!If {θ+58+K}:ref(4,θ*5+10,81,5:rref(4,θ*5+10,81,5:Else:sub(DN,{θ+58+K},82,θ*5+11,1:End:End:DispGraph:Normal:Pause 200:0→S:Repeat ‾1sub(R1) or (S≠0) or (‾3sub(R1):sub(BM,10,74,8,3,6,1):r1/5→S:{S+58+K}→S:End:If ‾1sub(R1):Goto MM:End:If r1≥0:sub(ITM,r1/5:End:If r1>200:conj(Y1+4608,L6,768:DispGraph:Pause 200:0→r1:sub(BM,10,74,2,3,6,2):If r1≠65534 or (‾1sub(R1):0→r1:Goto MM:End:Goto IT:End:Goto MS::.Character Select:Lbl CS:θ→V:For(θ,0,10:DispGraphr:End:0→r1:If V≠15 and ({71sub(K)}≠0:sub(BMG,3,31,2,62,16:End:If ‾1sub(R1):Goto MM:End:If V=5:0→r6:If {r1/15+70+K}=1:38→r6:End:Goto ST:End:If V=0:0→V:If {r1/15+70+K}=1:32→V:End:Goto EQ:End:If V=10:0→V:If {r1/15+70+K}=1:38→V:End:Goto IT:End:If V=15 and ({71sub(K)}≠0:expr(K+70,K+71,1:Goto MS:End:Goto MM::.Status Screen:Lbl ST:conj(Y1+3072,L6,768:If r6=38:Fix 9:Tangent(4,4,I):Fix 8:ref(37,4,33,10:rref(37,4,33,10:sub(TX,37,4,"ROLAND*":sub(TX,37,9,"THIEF*":End:sub(DN,{r6sub(K)}r,49,15,2:sub(DN,{r6+3+K}r,68,15,2:sub(DN,{K+r6+2},49,20,1:sub(DN,{K+r6+5},63,20,1:sub(LN,{31*(r6=38)+23+K}r:sub(DN,{31*(r6=38)+23+K}r,57,26,Y:sub(LN,{31*(r6=38)+25+K}r:sub(DN,{31*(r6=38)+25+K}r,57,31,Y:sub(DN,{K+r6+6},21,38,1:sub(DN,100-{K+r6+7},74,38,1:sub(DN,{K+r6+8},21,43,1:sub(DN,{K+r6+9},74,43,1:sub(DN,{K+r6+10},21,48,1:sub(DN,{K+r6+11},21,53,1:sub(DN,{K+r6+12},74,48,1:sub(LN,{29*(r6=38)+37+K}:sub(DN,{29*(r6=38)+37+K},84,4,Y:sub(LN,{{32*(r6=38)+19+K}-13+GDB1E}:sub(DN,{{32*(r6=38)+19+K}-13+GDB1E},44,38,Y:{{32*(r6=38)+20+K}-27+GDB1A}→V:{{32*(r6=38)+21+K}-32+GDB2A}+V→A:sub(LN,A:sub(DN,A,44,48,Y:DispGraph:Pause 200:Repeat getKey(48) or getKey(1):End:If getKey(1):conj(Y1+4272,L6+432,336:Pxl-Off(8,40:For(θ,0,2:sub(DN,{9*(r6=38)+74+θ+K},26,θ*8+39,0:End:sub(LN,{{9*(r6=38)+74+K}-1+GDB1EX}-{9*(r6=38)+77+K}r:sub(DN,{{9*(r6=38)+74+K}-1+GDB1EX}-{9*(r6=38)+77+K}r,54,39,Y:sub(LN,{{9*(r6=38)+75+K}-1+GDB1EX}-{9*(r6=38)+79+K}r:sub(DN,{{9*(r6=38)+75+K}-1+GDB1EX}-{9*(r6=38)+79+K}r,54,47,Y:sub(LN,{{9*(r6=38)+76+K}-1+GDB1EX}-{8*(r6=38)+81+K}r:sub(DN,{{9*(r6=38)+76+K}-1+GDB1EX}-{8*(r6=38)+81+K}r,54,55,Y:DispGraph:Pause 200:Repeat getKey(48) or getKey(4):End:If getKey(4):Goto ST:End:End:Goto MM::.Equip Screen:Lbl EQ:conj(Y1+2304,L6,768:ref(36,4,52,10:rref(36,4,52,10:If V=32:GetCalc("vNosPorts")→I:Fix 8:Tangent(4,4,I:Fix 9:ref(36,4,8,32:rref(36,4,8,32:sub(TX,37,4,"ROLAND*":sub(TX,37,9,"THIEF*":Else:sub(TX,37,4,"ARIA*":sub(TX,37,9,"KNIGHT*":End:sub(TX,72,4,"LV*":sub(LN,{29*(V=32)+37+K}:sub(DN,{29*(V=32)+37+K},84,4,Y:ref(87,37,5,25:rref(87,37,5,25:ref(4,37,83,24:rref(4,37,83,24:If {sub(KV)+19}=13:sub(TX,37,15,Str1E:End:If {sub(KV)+19}=14:sub(TX,37,15,Str2E:End:If {sub(KV)+19}=15:sub(TX,37,15,Str3E:End:If {sub(KV)+20}=27:sub(TX,37,20,Str1A:End:If {sub(KV)+20}=28:sub(TX,37,20,Str2A:End:If {sub(KV)+20}=29:sub(TX,37,20,Str3A:End:If {sub(KV)+21}=32:sub(TX,37,25,Str1S:End:If {sub(KV)+21}=33:sub(TX,37,25,Str2S:End:If {sub(KV)+21}=34:sub(TX,37,25,Str3S:End:sub(TX,37,30,"BACK*":DispGraph:Pause 200:sub(BM,14,56,4,36,6,0):If 15sub(R1):Goto MM:End:If ‾1sub(R1):Goto MM:End:r1→θ:If θ=0:If {13sub(K)}:Pt-On(4,37,Pic1I:sub(TX,9,37,Str1E:Pt-On(83,37,Pic1I+24:sub(DN,{13sub(K)},87,37,0:End:If {14sub(K)}:Pt-On(4,42,Pic1I:sub(TX,9,42,Str2E:Pt-On(83,42,Pic1I+24:sub(DN,{14sub(K)},87,42,0:End:If {15sub(K)}:Pt-On(4,47,Pic1I:sub(TX,9,47,Str3E:Pt-On(83,47,Pic1I+24:sub(DN,{15sub(K)},87,47,0:End:13→U:19→S:End:If θ=5:If {27sub(K)}:Pt-On(4,37,Pic1I+8:sub(TX,9,37,Str1A:Pt-On(83,37,Pic1I+24:sub(DN,{27sub(K)},87,37,0:End:If {28sub(K)}:Pt-On(4,42,Pic1I+8:sub(TX,9,42,Str2A:Pt-On(83,42,Pic1I+24:sub(DN,{28sub(K)},87,42,0:End:If {29sub(K)}:Pt-On(4,47,Pic1I+8:sub(TX,9,47,Str3A:Pt-On(83,47,Pic1I+24:sub(DN,{29sub(K)},87,47,0:End:27→U:20→S:End:If θ=10:If {32sub(K)}:Pt-On(4,37,Pic1I+16:sub(TX,9,37,Str1S:Pt-On(83,37,Pic1I+24:sub(DN,{32sub(K)},87,37,0:End:If {33sub(K)}:Pt-On(4,42,Pic1I+16:sub(TX,9,42,Str2S:Pt-On(83,42,Pic1I+24:sub(DN,{33sub(K)},87,42,0:End:If {34sub(K)}:Pt-On(4,47,Pic1I+16:sub(TX,9,47,Str3S:Pt-On(83,47,Pic1I+24:sub(DN,{34sub(K)},87,47,0:End:32→U:21→S:End:Pause 200:Repeat ‾1sub(R1):0→r1:sub(BM,36,79,5,3,6,0):If ‾1sub(R1):Goto EQ:End:If pxl-Test(4,r1+38) or (pxl-Test(4,r1+40:{{sub(KV)+S}sub(K)}+1→{{sub(KV)+S}sub(K)}:r1/5+U→{sub(KV)+S}:{r1/5+U+K}-1→{r1/5+U+K}:‾1→r1:End:End:Goto EQ:Return:Lbl BM:r6→F:r5→θ:r4→r5:r3-1*(θ-1)+r1→r3:r1→r4:Repeat getKey(54) or (getKey(48)) or (‾3sub(R1)) or (‾2sub(R1):rref(r5,r1,r2,θ:DispGraph:rref(r5,r1,r2,θ:Repeat getKey:End:If getKey(3) and (F≠0:‾3→r1:End:If getKey(2) and (F=2:‾2→r1:End:If getKey(4) and (r1≠r4:For(r6,1,θ-1:rref(r5,r1,r2,θ:DispGraph:Pause 20:rref(r5,r1,r2,θ:r1-1→r1:End:End:If getKey(1) and (r1≠r3:For(r6,1,θ-1:rref(r5,r1,r2,θ:DispGraph:Pause 20:rref(r5,r1,r2,θ:r1+1→r1:End:End:End:If r1<<0:Return:End:r1-r4→r1:If getKey(48):‾1→r1:End:While getKey(0):End:Return::.Menu - Grey:Lbl BMG:r5→θ:r4→r5:r3-1*(θ-1)+r1→r3:r1→r4:Repeat getKey(54) or (getKey(48):rref(r5,r1,r2,θ:Normal:Repeat getKey:DispGraphr:End:Full:rref(r5,r1,r2,θ:If getKey(4) and (r1≠r4:For(r6,1,θ-1:rref(r5,r1,r2,θ:Normal:For(Z,0,2:DispGraphr:End:Full:rref(r5,r1,r2,θ:r1-1→r1:End:End:If getKey(1) and (r1≠r3:For(r6,1,θ-1:rref(r5,r1,r2,θ:Normal:For(Z,0,2:DispGraphr:End:Full:rref(r5,r1,r2,θ:r1+1→r1:End:End:End:r1-r4→r1:If getKey(48):‾1→r1:End:Normal:While getKey(0):DispGraphr:End:Return::.Text:Lbl TX:[6050709000000000E0605070000000006080906000000000E05050B0000000006080C0E000000000F0406040000000007080B07000000000C878484800000000E04040F000000000F028A06000000000D060505800000000C040507000000000D0A8A8A8000000008060909000000000609090E000000000E0507040000000006090B06800000000E05060D000000000E0C060E00000000070A02020000000009890906000000000989050200000000088A8A85800000000502050D0000000009070202000000000F01060F00000000040C040E000000000709060F000000000609030F00000000020A0F02000000000E08060E0000000006080E0E000000000F09020200000000070F090F000000000E0E020C000000000E09090700000000000000080000000000000C04000000000604000800000000060A0004000000000C040000000000000A0A00000000000000000F8000000000020404080000000000000000000000000→Str1:r1→X→F:r2→Y→G:0→C:r3→S:Repeat getKey(15) or ({S+C}=42:If {S+C}=41:Y+5→Y:F→X:C+1→C:End:If {S+C}=43:Repeat getKey(54):End:conj(L3,L6,756:F→X:G→Y:C+1→C:End:While {S+C}=32:X+2→X:C+1→C:End:If {S+C}=42:Goto RT:End:If {S+C}=41:Y+5→Y:F→X:C+1→C:End:{S+C}→D:D-65→B:If D<65:(D-48)+25→B:If D=48:35→B:End:If D=46:36→B:End:If D=44:37→B:End:End:5→A:.If (D=72) or (D=74) or (D=75) or (D=77) or (D=81) or (D=85) or (D=86) or (D=87:If inString(D,DeltaList(72,74,75,77,81,85,86,87,0)):6→A:End:.If (D=69) or (D=83) or (D=49) or (D=53) or (D=54) or (D=57) or (D=33:If inString(D,DeltaList(69,83,49,53,54,57,33,0)):4→A:End:If D=33:38→B:End:If D=39:40→B:3→A:End:Pt-On(X,Y,8*B+Str1:X+A→X:C+1→C:End:Lbl RT:Return::.Draw Numbers:Lbl DN:[E09090700000000040C040E000000000709060F000000000609030F00000000020A0F02000000000E08060E0000000006080E0E000000000F09020200000000070F090F000000000E0E020C000000000→Str1N:DeltaList(5,4,5,5,5,4,4,5,5,4)→GDB3:For(X,0,2:0→{L1+X}:5→{L5+X}:End:r1→Z:r4→X:While Z:sub(CN,Z^10):Z/10→Z:End:sub(DRN):Return::.Calculate Numbers:Lbl CN:{GDB3+r1}→{L5+X}:r1→{L1+X}:X-1→X:Return::.Draw Numbers:Lbl DRN:r2→Y:For(X,0,r4):Pt-On(Y,r3,8*{L1+X}+Str1N:Y+{L5+X}→Y:End:Return::.Length of Numbers:Lbl LN:0+(r1≥10)+(r1≥100)+(r1≥1000)+(r1≥10000)→Y:Return::.Item Usage:Lbl ITM:If 0sub(R1) and ({sub(KV)}r≠0) and ({sub(KV)}r≠{sub(KV)+3}r) and ({58sub(K)}≠0:{sub(KV)}r+100→{sub(KV)}r:If {sub(KV)}r≥{sub(KV)+3}r:{sub(KV)+3}r→{sub(KV)}r:End:{58sub(K)}-1→{58sub(K)}:End:If 3sub(R1) and ({sub(KV)+2}≠0) and ({sub(KV)+2}≠{sub(KV)+5}) and ({61sub(K)}≠0:{sub(KV)+2}+10→{sub(KV)+2}:If {sub(KV)+2}≥{sub(KV)+5}:{sub(KV)+5}→{sub(KV)+2}:End:{61sub(K)}-1→{61sub(K)}:End:If 6sub(R1) and ({sub(KV)}r=0) and ({61sub(K)}≠0:1→{sub(KV)}r:{sub(KV)+5}→{sub(KV)+2}:{61sub(K)}-1→{61sub(K)}:End:Return::Lbl R1:(=r1)Return::Lbl KV:ReturnK+V::Lbl K:(+K)Return
Yeah. I'm just so used to the on-calc editor, that it doesn't phase me all to much. Plus, since I wrote the thing on-calc, I'm pretty comfortable with editing on-calc.
i'M NOT SURE WHAT A SWORD SKILL IS BUT HERE'S THE SWORD ANIMATION FROM THE TWO SPRITES ON PG 13
ClrDrawrDrawInv rFullFor(θ,0,767{Y1+1536+θ} and {L3+θ}→{L3+θ}End
Fullconj(Y1+1536,L3,768)
You edit this behemoth on-calc?!? Thanks for reminding me of Merthsoft's Tokens program, that appears to work correctly. I'll try optimizing it from there now.