0 Members and 3 Guests are viewing this topic.
Lbl DrawChar sub(Maskʳ,{r₁},{1+r₁},256*{3+r₁}+({2+r₁}*64)+r₂)Return
Lbl Mask Pt-Mask(r₁,r₂,r₃)ʳ Ptq-Mask(r₁+8,r₂,r₃+16)ʳ Pt-Mask(r₁+8,r₂+8,r₃+32)ʳ Pt-Mask(r₁,r₂+8,r₃+48)ʳReturn
As to animated tiles, there is no need for an interrupt!The basic idea is that you re-draw the entire tilemap every single frame (that would make the code you wrote for scrolling obsolete (believe me, the calc is powerful enough to easily handle that)) and have a frame counter, and then change for the animated tiles every like 8 frames the pointer of where the sprite data lies, resulting it a different frame being drawn.
//Link's Character Data: X, Y, Direction, StateData(40,24,1,0,0)→GDB1Lbl MainRepeat getKey(15) //Check if Arrow buttons or attack buttons are pressed ActionKey() //Draws Link & other masked objects to front buffer DrawObj() DispGraphEndReturn
Lbl DrawObjCopy(L₃)//Calling this should draw LinkDrawChar(GDB1,Pic1Link)//Here's the Old Code that Only Draws Link's Sprite//DrawLnk({GDB1},{1+GDB1},{2+GDB1},{3+GDB1})Return
Lbl DrawChar Mask({r₁},{1+r₁},256*{3+r₁}+({2+r₁}-1*64)+r₂)ReturnLbl DrawLnk Mask(r₁,r₂,256*r₄+(r₃-1*64)+Pic1Link)ReturnLbl Mask Pt-Mask(r₁,r₂,r₃)ʳPt-Mask(r₁+8,r₂,r₃+16)ʳPt-Mask(r₁+8,r₂+8,r₃+32)ʳPt-Mask(r₁,r₂+8,r₃+48)ʳReturn
Lbl DrawChar Mask({r₁},{1+r₁},256*{3+r₁}+({2+r₁}-1*64)+r₂)Return
Lbl DrawChar {r₁}→r₁ {1+r₁}→r₂ 256*{3+r₁}+({2+r₁}-1*64)+r₂→r₃ Mask()Return
Lbl DrawChar 256*{3+r₁}+({2+r₁}-1*64)+r₂→r₃ {1+r₁}→r₂ {r₁}→r₁ Mask()Return
Lbl DrawChar {r₁+3}*256+({r₁+2}-1*64)+r₂→r₃ {r₁+1}→r₂ {r₁}→r₁ Mask()Return
To not requiring every tile to be a 4-frame animation you could maybe make that only tiles above a certain ID are animated, below they are static