(Glide64 mk2) Split up reused functions to glitchgeometry.cpp