This is annotated to help in modding. Remove comments to improve speed. Includes platform detection, jumping, infinite scrolling, parallax, but needs better wall detection. Has an occasional hard to reproduce but bug when it hits a wall.
Based on Griffpatch scroller, with additions by myself.