From 7f9ee69a2bc769042433dba3970137b7be9afa03 Mon Sep 17 00:00:00 2001 From: archshift Date: Thu, 26 Feb 2015 19:11:39 -0800 Subject: Added RGBA5551 compatibility in the rasterizer This allows Virtual Console games to display properly. --- src/video_core/color.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/video_core/color.h') diff --git a/src/video_core/color.h b/src/video_core/color.h index e86ac126..f095d8ac 100644 --- a/src/video_core/color.h +++ b/src/video_core/color.h @@ -28,5 +28,24 @@ static inline u8 Convert6To8(u8 value) { return (value << 2) | (value >> 4); } +/// Convert a 8-bit color component to 1 bit +static inline u8 Convert8To1(u8 value) { + return value >> 7; +} + +/// Convert a 8-bit color component to 4 bit +static inline u8 Convert8To4(u8 value) { + return value >> 4; +} + +/// Convert a 8-bit color component to 5 bit +static inline u8 Convert8To5(u8 value) { + return value >> 3; +} + +/// Convert a 8-bit color component to 6 bit +static inline u8 Convert8To6(u8 value) { + return value >> 2; +} } // namespace -- cgit v1.2.3