0 Members and 1 Guest are viewing this topic.
Your pictures take up 768 bytes, right? Why not store all your pics consecutively, so having a 768 byte appvar for one pic, a 1536 for two pics, etc. If you have, say, 35 pics to store, you'd need an appvar that's 26,880 bytes, and obviously it'd need to be in the user archive. If you have it loaded in Y1, you could load the first pic into a RAM location (say, GDB1) like so: Copy(Y1,GDB1,768) . You could then load, say the twenty-seventh picture like so: Copy(26*768+Y1,GDB1,768) . The pseudo code for this would be something like: Copy(number_of_pic_to_load_counting_from_zero * 768 + Y1, RAM_location_to_load_to, 768)
Quote from: buttsfredkin on September 19, 2011, 09:59:18 amYour pictures take up 768 bytes, right? Why not store all your pics consecutively, so having a 768 byte appvar for one pic, a 1536 for two pics, etc. If you have, say, 35 pics to store, you'd need an appvar that's 26,880 bytes, and obviously it'd need to be in the user archive. If you have it loaded in Y1, you could load the first pic into a RAM location (say, GDB1) like so: Copy(Y1,GDB1,768) . You could then load, say the twenty-seventh picture like so: Copy(26*768+Y1,GDB1,768) . The pseudo code for this would be something like: Copy(number_of_pic_to_load_counting_from_zero * 768 + Y1, RAM_location_to_load_to, 768)OK thnkx It'll be helpful for making a second one.EDIT: OK. So how do I store it?
:.θCUR // Main File:[80003C383C2E0400→Pic1:[8078844222413A04:[801C3E7E7D3A3408:[B80C8C98FC6E0703:[90381C2E170E1C08:GetCalc("varA")→P:GetCalc("varB")→Q:GetCalc("varC")→R:GetCalc("varD")→S:GetCalc("varF")→U:GetCalc("uZ")→Y:float{P}→A:float{Q}→B:float{R}→C:float{S}→D:float{U}→F:float{Y}→Z:0→E:prgmAAAAA:Repeat getKey(54):ClrDraw:"PROBLEM HERE?":Copy(Z*768+Y1,L6,768):Pt-Change(A,B,Pic1+E):If getKey(48) and (F=1):32→E:4→C:End:If getKey(35):24→E:3→C:End:If getKey(18):16→E:2→C:End:If getKey(26):8→E:1→C:End:If getKey(34):0→E:0→C:End:If getKey(32):8→C:End:If getKey(56):7→C:End:If getKey(2):A-1→A:End:If getKey(3):A+1→A:End:If getKey(4):B-1→B:End:If getKey(1):B+1→B:End:If A>95:95→A:End:If A<1:1→A:End:If B<1:1→B:End:If B>63:63→B:End:If getKey(55):9→C:End:DispGraph:End:A→float{P}:B→float{Q}:C→float{R}
:.A //Storing appvar:[Pic1]→Str1:[Pic2]→Str2:GetCalc("appvS201",1536)→A:Copy(Str1,A,768):Copy(Str2,A+768,768
:..BB // Accessing appvar:"appvS200"→Str0:D^10*256+(D/10)+E3030→{Str0+2}r:GetCalc(Str0,Y1)
.MAKE Make big appvars out of little ones.load the smaller appvars, the 768 byte ones.make sure these are in the archive, or this won't workGetCalc("appvAppVarOne",Y1)GetCalc("appvAppVarTwo",Y2)GetCalc("appvAppVarThree",Y3).make a new, bigger appvar (make sure this appvar doesn't already exist. if it does, delete it.)GetCalc("appvReally_Big_Appvar",2304)->W.let's store the pointer to Really_Big_Appvar in variable W.and make Really_Big_Appvar 2304 bytes in size..Now start copying the small appvars into the big one.Copy(Y1,W,768)Copy(Y2,W+768,768)Copy(Y3,W+1536,768).archive Really_Big_Archive (optional) and you're all done!Archive "appvReally_Big_Archive"