From a3b2141540d74456689ddfaac44c4f83f995c6a7 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Sun, 28 May 2023 09:30:50 +0200 Subject: Supress some warnings for now --- src/gba/gba.h | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'src/gba/gba.h') diff --git a/src/gba/gba.h b/src/gba/gba.h index 27a6a9a..be7a305 100644 --- a/src/gba/gba.h +++ b/src/gba/gba.h @@ -327,40 +327,10 @@ key_hold(u32 key) { return key_curr & key_prev & key; } -// Back/unpack bits. -static inline -u32 -unpack_1bb(u8 hex) { - const u32 conversion_u32[16] = { - 0x00000000, 0x00000001, 0x00000010, 0x00000011, - 0x00000100, 0x00000101, 0x00000110, 0x00000111, - 0x00001000, 0x00001001, 0x00001010, 0x00001011, - 0x00001100, 0x00001101, 0x00001110, 0x00001111, - }; - u8 low = hex & 0xF; - u8 high = (hex >> 4) & 0xF; - return (conversion_u32[high] << 16) | conversion_u32[low]; -} - -// Unpack N tiles packed at 1bpp. -static inline -void -unpack_tiles(const u32 *src, u32 *dst, size_t n_tiles) { - const u32 *target_src = src + n_tiles * 2; - while (src != target_src) { - *dst++ = unpack_1bb((*src >> 24) & 0xFF); - *dst++ = unpack_1bb((*src >> 16) & 0xFF); - *dst++ = unpack_1bb((*src >> 8) & 0xFF); - *dst++ = unpack_1bb(*src & 0xFF); - src++; - } -} - // // Direct Memory Access (DMA) // - // Source, destination, and control registers. #define DMA_SRC(N) *((vu32*) 0x040000B0 + (N) * 12) #define DMA_DST(N) *((vu32*) 0x040000B4 + (N) * 12) -- cgit v1.2.1