sprite_asm_const.h
1 #ifndef _SPRITE_ASM_CONST 2 #define _SPRITE_ASM_CONST 3 4 // Put every function in its own ELF section, to permit linker GC 5 .macro decl_func name 6 .section .time_critical.\name, "ax" 7 .global \name 8 .type \name,%function 9 .thumb_func 10 \name: 11 .endm 12 13 // Assume RGAB5515 (so alpha is bit 5) 14 // Note the alpha bit being in the same position as RAGB2132 is a coincidence. 15 // We are just stealing an LSB such that we can treat our alpha pixels in the 16 // same way as non-alpha pixels when encoding (and the co-opted channel LSB 17 // always ends up being set on alpha pixels, which is pretty harmless) 18 19 #define ALPHA_SHIFT_16BPP 6 20 21 // Assume RAGB2132 (so alpha is bit 5) 22 23 #define ALPHA_SHIFT_8BPP 6 24 25 26 #endif