Fix macros and add texture-atlas