(Glide64) Create gsSP4Triangles and refactor more code