0 Members and 2 Guests are viewing this topic.
:.CHARACTER:.HEADFRONT:[7E7E99A5A5423C42]→Pic1:.BODYFRONT:[81A5A5A5425A6666]:[81A5A5A5425A6760]:[81A5A5A5425AE606]::.HEADRIGHT:[3C7EF1C585423C42]:.BODYRIGHT:[4A4A45452624241C]:[4A4A45452654B2EC]:[4A4A45252624241C]::.HEADLEFT:[3C7E8FA3A1423C42]:.BODYLEFT:[5252A2A264242438]:[5252A2A2642C4A76]:[5252A2A464242438]::.HEADBACK:[7E7EB9B191423C42]:.BODYBACK:[81A5A5A5425A6666]:[81A5A5A5425A6760]:[81A5A5A5425AE606]:::.STORE YOUR SPRITE DATA FIRST, I'M ASSUMMING YOU WANT MONOCHROME SPRITES:.EXAMPLE SPRITES:.GROUND TILE,0 THIS IS THE NUMBER THAT WILL REPRESENT THE TILE:[00A04000000A0400]→Pic0::.TREE,1:[186689A14A3C2442]::.HOUSE,2,3,4,5,6,7,8,9,A SOME OBJECTS NEED MORE THAN ONE TILE, AND THE A IS 10 IN BASE 16:[03060A1A2A6AAAAA]:[FF00000000000000]:[C060505854565555]:[ABACABB4A8D2A5C2]:[FF00FF000000007E]:[D535D52D154BA543]:[407F407F407F403F]:[8181A1A1818181FF]:[02FE02FE02FE02FC]::.PATH,B:[8181818181818181]::.BLACK BOUDARIES,C:[FFFFFFFFFFFFFFFF]
:.MAP DATA, REMBER THOSE NUMBERS? ADD 0's RIGHT BEFORE THEM, AND STORE THEM TO A POINTER:[0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C]→GDB1:[0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C]:[0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C]:[0C0C0C0C010101010101010101010101010101010C0C0C0C]:[0C0C0C0C010000000000000000000000000000010C0C0C0C]:[0C0C0C0C010000000000000000000000000000010C0C0C0C]:[0C0C0C0C010000000000000000000000000000010C0C0C0C]:[0C0C0C0C010000000203040000000000000000010C0C0C0C]:[0C0C0C0C010000000506070000000000000000010C0C0C0C]:[0C0C0C0C0100000008090A0000000000000000010C0C0C0C]:[0C0C0C0C01000000000B000000000000000000010C0C0C0C]:[0C0C0C0C01000000000B000000000000000000010C0C0C0C]:[0C0C0C0C01000000000B000000000000000000010C0C0C0C]:[0C0C0C0C010000000000000000000000000000010C0C0C0C]:[0C0C0C0C010000000000000000000000000000010C0C0C0C]:[0C0C0C0C010000000000000000000000000000010C0C0C0C]:[0C0C0C0C010000000000000000000000000000010C0C0C0C]:[0C0C0C0C010000000000000000000000000000010C0C0C0C]:[0C0C0C0C010101010101010101010101010101010C0C0C0C]:[0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C]:[0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C]
:.P AND Q ARE THE LOCATION OR THE TOP CORNER OF THE MAP DATA:0→P→Q→V→H→I→J→θ→{r1}
:Repeat getKey(15)::Z→Y::Q*24+P+126→Z::.P+(getKey(3) and (({Z+1+GDB1}=0) or ({Z+1+GDB1}=11)))-(getKey(2) and (({Z-1+GDB1}=0) or ({Z-1+GDB1}=11)))→P::.Q*24+P+101→Z:.Q+(getKey(1) and (({Z+24+GDB1}=0) or ({Z+24+GDB1}=11)))-(getKey(4) and (({Z-24+GDB1}=0) or ({Z-24+GDB1}=11)))→Q::If getKey(3) and (I=0) and (J=0) and (({Z+1+GDB1}=0) or ({Z+1+GDB1}=11)):1→I:32→{r1}:End:If getKey(2) and (I=0) and (J=0) and (({Z-1+GDB1}=0) or ({Z-1+GDB1}=11)):0-1→I:64→{r1}:End:If getKey(1) and (I=0) and (J=0) and (({Z+24+GDB1}=0) or ({Z+24+GDB1}=11)):1→J:0→{r1}:End:If getKey(4) and (I=0) and (J=0) and (({Z-24+GDB1}=0) or ({Z-24+GDB1}=11)):0-1→J:96→{r1}:End::If getKey(1) or (getKey(2)) or (getKey(3)) or (getKey(4):θ+1→θ:Else:0→θ:End::H+I+I→H:V+J+J→V::If H-8=0 or (H+8=0:P+I→P:0→H→I:End:If V-8=0 or (V+8=0:Q+J→Q:0→V→J:End::.If Y≠Z:sub(MAP):.End::Pt-Off(40,32,Pic1+8+(θ/4^2*8+8*(θ≠0))+{r1}:Pt-Off(40,24,Pic1+{r1}::DispGraph::End
:Lbl MAP::Q*24+P→Z::ClrDraw:For(B,0,9:For(A,0,13:Pt-On(A*8-8-H,B*8-8-V,{B*24+A+Z+GDB1}*8+Pic0:End:End
:.P+(getKey(3) and (({Z+1+GDB1}=0) or ({Z+1+GDB1}=11)))-(getKey(2) and (({Z-1+GDB1}=0) or ({Z-1+GDB1}=11)))→P::.Q*24+P+101→Z:.Q+(getKey(1) and (({Z+24+GDB1}=0) or ({Z+24+GDB1}=11)))-(getKey(4) and (({Z-24+GDB1}=0) or ({Z-24+GDB1}=11)))→Q:
:Pt-Off(40,32,Pic1+8+(θ/4^2*8+8*(θ≠0))+{r1}:Pt-Off(40,24,Pic1+{r1}
The parts that are commented out are for scrolling by 8 pixels at a time (i.e. not smooth scrolling) Uncomment those and comment/delete the If clauses with getkey(1-4) in them. (but not the one that involves storing things into theta)
:Pt-on(0,0,[FFFFFFFFFFFFFFFF]:Pt-off(0,0,[0000000000000000]:Dispgraph
:If getkey(1) and [some other conditions]:blah:End:If getkey(2) and [conditions]:blah:End
:Lbl MAP::Q*24+P→Z::ClrDraw:For(A,0,139:Pt-On(A^14*8-8-H,A/14*8-8-V,{A/14*24+(A^14)+Z+GDB1}*8+Pic0:End:End