mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
13 lines
No EOL
294 B
C++
13 lines
No EOL
294 B
C++
#pragma once
|
|
#include "helpers.hpp"
|
|
|
|
// Helpers functions for converting colour channels between bit depths
|
|
namespace Colour {
|
|
inline static u8 convert4To8Bit(u8 c) {
|
|
return (c << 4) | c;
|
|
}
|
|
|
|
inline static u8 convert5To8Bit(u8 c) {
|
|
return (c << 3) | (c >> 2);
|
|
}
|
|
} |