0 Members and 1 Guest are viewing this topic.
ClrHomeClrDrawDiagnosticOff.DOWN[3C245A42A5A55A663C245A42A5A55E603C245A42A5A55A663C245A42A5A57A06→Pic1.RIGHT[3824445858582838382444586C6894EC3824445858582838382444585C4894EC→Pic2.LEFT[1C24221A1A1A141C1C24221A361629371C24221A1A1A141C1C24221A3A122937→Pic3.UP[3C244242A5A55A663C244242A5A55E603C244242A5A55A663C244242A5A57A06→Pic40→X1→A→B ;More efficient way to initialize similar variablesRepeat getKey(15) ;"Repeat" is the same as "while zero"Pt-On(A,B,D*64+Pic1) ;Each sprite group is 64 bytes apart ;Draw the rest sprite every frame, even if it gets written over.If X+1→X=20 ;You can put the storage statements in if conditions. 0→XEndPause 100If getKey(1) ;You don't need the equals one here B+1→B 0→D ;D should start at zero sub(DW)EndIf getKey(2) A-1→A 1→D sub(DW)EndIf getKey(3) A+1→A 2→D sub(DW)EndIf getKey(4) B-1→B 3→D sub(DW)EndDispGraphEndClrHome ;Clear the screen on exitReturnLbl DWClrDraw ;Clear the screen. It will erase the rest sprite.Pt-On(A,B,D*64+(X/5*8)+Pic4) ;Draw the sprite with the right sprite set.Return
DiagnosticOff'DOWN[3C245A42A5A55A663C245A42A5A55E603C245A42A5A55A663C245A42A5A57A06→Pic1'LEFT[1C24221A1A1A141C1C24221A361629371C24221A1A1A141C1C24221A3A122937→Pic2'RIGHT[3824445858582838382444586C6894EC3824445858582838382444585C4894EC→Pic3'UP[3C244242A5A55A663C244242A5A55E603C244242A5A55A663C244242A5A57A06→Pic41->C0->X0->YWhile 1C+1->CIf X^5=0 \\ this should actually be "If C^5=0"C/5->Agetkey->KX+(K=3)-(K=2)->XY+(K=1)-(K=4)->YIf K=00->AElseK->DEndsub(DP)ReturnIf K=15EndEndLbl DSClrDrawIf D=1:Pt-Off(X,Y,A*8+Pic1:EndIf D=2:Pt-Off(X,Y,A*8+Pic2:EndIf D=3:Pt-Off(X,Y,A*8+Pic3:EndIf D=4:Pt-Off(X,Y,A*8+Pic4:EndDispGraphReturn
By the way, what's the pattern of getKey expressions? It's different than the standard one used in Ti-BASIC, and i haven't quite figured it out.