0 Members and 1 Guest are viewing this topic.
.GRAYSPRT.An example GrayLib program by Runer112.==GrayLib==.4-level grayscale, 83+ support, GDisp(), GDisp() clears, GTune() (and first run auto run), GWait(), getKey support (always on)1→°G4→°GS83→°GID→°GDC→°GIGT→°GIW→°GSGKprgmGRAYLIB.==SETUP==.Enable grayscaleGLoad().Sprite X and Y positions16→X→Y.==MAIN==.Main loopWhile 1 .Increment or decrement X by 2 if right or left is pressed, respectively, and increment or decrement Y by 2 if down or up is pressed, respectively, not letting the sprite go offscreen, and draw the first layer of the 8x8 grayscale sprite Pt-Off(getKey(3)*2+X-(?getKey(2)*2)+(≤88-1*2)→X,getKey(1)*2+Y-(?getKey(4)*2)+(≤56-1*2)→Y,Pic0,GB1) .Draw the second layer of the 8x8 grayscale spritePt-Off(X,Y,Pic0+8,GB2) .Wait until the last frame has been fully dispalyed with each dither mask GWait() .Mark the new frame for display GDisp() .If VARS was pressed, run grayscale tuner !If getKey xor 23 GTune() End.End the main loop if CLEAR was pressedEnd!If xor 24.==TEARDOWN==.Disable grayscale and quitGoto GUnload.==DATA==.8x8 grayscale sprite[FFFFC3C3C3C3FFFFFF81BDA5A5BD81FF]→Pic0
Runer, the scrolling mask you did in the Pokemon demo should be an actual function in your lib. That makes the rendered result quite clearer.