0 Members and 1 Guest are viewing this topic.
//// Prepare graph screen to be used in TI-BASICStoreGDB 0 // save the current graph screen, user friendlyFnOff // we don't want functions to bloatPlotsOff // plots tooGridOff // rare but just in caseAxesOff // no axes please :)// miss here the coordinates setup...///main codeRecallGDB 0 // restore the graph screen, user friendlyDelVar GDB0 // clean up//The following code sets up an integer square window with (0,0) in the center::ZStandard:ZInteger//An integer window with (0,0) in the bottom left corner:ZStandard:84→Xmin:72→Ymax:ZInteger//An integer window with (0,0) in the top left corner:ZStandard:84→Xmin:-72→Ymax:ZInteger
ZoomSto // store the zoomFnOff // we don't want functions to bloatPlotsOff // plots tooGridOff // rare but just in caseAxesOff // no axes please :)// miss here the coordinates setup...///main code// restoreZoomRcl // restore the zoomAxesOn
:0→Xmin:94→Xmax:0→Ymin:62→Ymaxcan be:0→Xmin:1→ΔX:0→Ymin:1→ΔY
-62->Ymin:0->Ymax
:ZStandard:84→Xmin:-72→Ymax:ZInteger
Thats the window setting i use as well ^^ I find its most useful when mixing window based drawing and screen based drawing. haha i remember when i used to use the Integer window setting, and i had to do math in order to draw accurately
cool, thanks for the info. Are they generally smaller too?
Indeed. Some of my old games use Zstandard but only because everything involving drawing doesn't need much pixel precision. Still hectic at times, though.
A pixel Y,X (such as used with Pxl-On) becomes Xmin+^X*X,Ymax-^Y*Y (yes I'm using carets for deltas) and conversion back is even uglier, with rounding involved. *shudder*
Maybe ZPrevious could be used for further optimization.