(Glide64) Refactor code in TexMod.h