mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-06 11:01:38 +12:00
[PICA] More textoor
This commit is contained in:
parent
ce72368f01
commit
51130b295a
6 changed files with 53 additions and 2 deletions
13
include/colour.hpp
Normal file
13
include/colour.hpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
#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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue