mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-05 14:10:27 -04:00
fix mapping for 1555
This commit is contained in:
parent
8e5a26011d
commit
4ab5f37d82
1 changed files with 7 additions and 5 deletions
|
@ -1,9 +1,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <SDL_pixels.h>
|
#include <SDL_surface.h>
|
||||||
|
|
||||||
|
|
||||||
template<Uint32 format>
|
template<Uint32 format>
|
||||||
struct FormatMapping;
|
struct FormatMapping {
|
||||||
|
static_assert(false, "Unsupported pixel format");
|
||||||
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct FormatMapping<SDL_PIXELFORMAT_ARGB2101010> {
|
struct FormatMapping<SDL_PIXELFORMAT_ARGB2101010> {
|
||||||
|
@ -145,9 +147,9 @@ struct FormatMapping<SDL_PIXELFORMAT_ARGB1555> {
|
||||||
static constexpr int BShift = 0;
|
static constexpr int BShift = 0;
|
||||||
static constexpr int AShift = 15;
|
static constexpr int AShift = 15;
|
||||||
|
|
||||||
static constexpr int RBits = 8;
|
static constexpr int RBits = 5;
|
||||||
static constexpr int GBits = 8;
|
static constexpr int GBits = 5;
|
||||||
static constexpr int BBits = 8;
|
static constexpr int BBits = 5;
|
||||||
static constexpr int ABits = 1;
|
static constexpr int ABits = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue