| 1 |
/* SPDX-License-Identifier: BSD-3-Clause */ |
| 2 |
/* SPDX-FileCopyrightText: OpenMPT Project Developers and Contributors */ |
| 3 |
|
| 4 |
|
| 5 |
#pragma once |
| 6 |
|
| 7 |
#include "openmpt/all/BuildSettings.hpp" |
| 8 |
|
| 9 |
#include "mpt/endian/int24.hpp" |
| 10 |
#include "openmpt/base/Types.hpp" |
| 11 |
|
| 12 |
#include <limits> |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
OPENMPT_NAMESPACE_BEGIN |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
using uint24 = mpt::uint24; |
| 21 |
static_assert(sizeof(uint24) == 3); |
| 22 |
inline constexpr uint32 uint24_min = std::numeric_limits<uint24>::min(); |
| 23 |
inline constexpr uint32 uint24_max = std::numeric_limits<uint24>::max(); |
| 24 |
using int24 = mpt::int24; |
| 25 |
static_assert(sizeof(int24) == 3); |
| 26 |
inline constexpr int32 int24_min = std::numeric_limits<int24>::min(); |
| 27 |
inline constexpr int32 int24_max = std::numeric_limits<int24>::max(); |
| 28 |
|
| 29 |
using int24le = mpt::packed<int24, mpt::endian::little>; |
| 30 |
using uint24le = mpt::packed<uint24, mpt::endian::little>; |
| 31 |
using int24be = mpt::packed<int24, mpt::endian::big>; |
| 32 |
using uint24be = mpt::packed<uint24, mpt::endian::big>; |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
OPENMPT_NAMESPACE_END |