// Function to Align a point on the world plane with a point on the // display plane at a given zoom level. // // Parameters: // worldX# , worldY# Point on world plane to align // displayX# , displayY# Point on Display to Align to // worldZ# Zoom Level to align at // function AlignWorld( worldX# , worldY# , displayX# , displayY#, worldZ# ) setViewZoom( worldZ# ) setViewOffset( worldX# - ( displayX# / worldZ# ) , worldY# - ( displayY# / worldZ# ) ) endfunction // // Example Use - centering the display on a world sprite at zoom 2.0 // AlignWorld( getSpriteXByOffset( sprite ) , getSpriteXByOffset( sprite ) , getVirtualWidth() * 0.5 , getVirtualHeight() * 0.5 , 2.0 )