0 Members and 1 Guest are viewing this topic.
For(A,0,92,2For(B,0,60,2If Pxl-Test(B,AThenPxl-On(B+1,APxl-On(B,A+1Pxl-On(B+1,A+1ElsePxl-Off(B+1,APxl-Off(B,A+1Pxl-Off(B+1,A+1EndEndEnd
:For(X,0,47:For(Y,0,31:2*X→A:2*Y→B:If pxl-Test(A,B:Pxl-On(A+1,B:Pxl-On(A,B+1:Pxl-On(A+1,B+1:Else:Pxl-Off(A+1,B:Pxl-Off(A,B+1:Pxl-Off(A+1,B+1:End:End:End:DispGraph:For(X,0,23:For(Y,0,15:4*X→A:4*Y→B:If pxl-Test(A,B:For(C,0,3:For(D,0,3:Pxl-On(A+C,B+D:End:End:Else:For(C,0,3:For(D,0,3:Pxl-Off(A+C,B+D:End:End:End:End:End:DispGraph:For(X,0,11:For(Y,0,7:8*X→A:8*Y→B:If pxl-Test(A,B:For(C,0,7:For(D,0,7:Pxl-On(A+C,B+D:End:End:Else:For(C,0,7:For(D,0,7:Pxl-Off(A+C,B+D:End:End:End:End:End:DispGraphGenerated by SourceCoder, © 2005 Cemetech
For(A,0,7output(A,A,"HELLOA+1->AEnd
For(A,1,8,2)output(A,A,"HELLOEnd
DiagnosticOffClrDraw6üA // X Variable6üB // Y Variable5üS // Size of "snake"1üC // X direction0üD // Y direction0üE[0664646464]üStr1[0664646464]üStr2sub(ZZRepeat getKey(15) or pxl-Test(A,B)Pxl-On(A,B)Pxl-Off({Str1+S-1},{Str2+S-1})DispGraphIf getKey(1)0üC1üDEndIf getKey(2)ú1üC0üDEndIf getKey(3)1üC0üDEndIf getKey(4)0üCú1üDEnd****MY PROBLEM STARTS HERE****If getKey(54) // If 2nd was pushed0ü{Str1+S // Store 0 into0ü{Str2+S // The 'new' location1+SüS // Increase S (size)End****AND ENDS HERE****A+CüAB+DüBFor(X,1,S-1){Str1+S-X-1}ü{Str1+S-X{Str2+S-X-1}ü{Str2+S-XEndAü{Str1+0Bü{Str2+0Pause 50EndReturn****DRAWS BOX AROUND SCREEN****Lbl ZZFor(X,0,95Pxl-On(X,0)Pxl-On(X,63)EndFor(X,0,63Pxl-On(0,X)Pxl-On(95,X)EndReturn
Well, I didn't look too closely, but the problem might be trying to use str1/str2 for your array, I would try L1/L2 instead. They have a large amount of room and Str1/2 only have what you define at the start.but from what you say I guess you already understand this. Could you create a simple test that just lists off all the numbers in eacharray and see if it's calling the correct area?
Np! I actually use a form of this in the most recent version of alien. For drawing the background, every time a pixel is drawn it adds 3 to A otherwise it will increment normally. This keeps it from having multiple "stars" in a row.