3 changed files with 51 additions and 26 deletions
-
13src/citra_qt/debugger/graphics_framebuffer.cpp
-
32src/video_core/color.h
-
32src/video_core/debug_utils/debug_utils.cpp
@ -0,0 +1,32 @@ |
|||||
|
// Copyright 2014 Citra Emulator Project |
||||
|
// Licensed under GPLv2 or any later version |
||||
|
// Refer to the license.txt file included. |
||||
|
|
||||
|
#pragma once |
||||
|
|
||||
|
#include "common/common_types.h" |
||||
|
|
||||
|
namespace Color { |
||||
|
|
||||
|
/// Convert a 1-bit color component to 8 bit |
||||
|
static inline u8 Convert1To8(u8 value) { |
||||
|
return value * 255; |
||||
|
} |
||||
|
|
||||
|
/// Convert a 4-bit color component to 8 bit |
||||
|
static inline u8 Convert4To8(u8 value) { |
||||
|
return (value << 4) | value; |
||||
|
} |
||||
|
|
||||
|
/// Convert a 5-bit color component to 8 bit |
||||
|
static inline u8 Convert5To8(u8 value) { |
||||
|
return (value << 3) | (value >> 2); |
||||
|
} |
||||
|
|
||||
|
/// Convert a 6-bit color component to 8 bit |
||||
|
static inline u8 Convert6To8(u8 value) { |
||||
|
return (value << 2) | (value >> 4); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} // namespace |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue