/* SPDX-License-Identifier: BSD-3-Clause */ /* SPDX-FileCopyrightText: OpenMPT Project Developers and Contributors */ #pragma once #include "openmpt/all/BuildSettings.hpp" #include "mpt/base/bit.hpp" #include "mpt/base/memory.hpp" #include "mpt/endian/floatingpoint.hpp" #include "mpt/endian/integer.hpp" #include "openmpt/base/Types.hpp" OPENMPT_NAMESPACE_BEGIN using int64le = mpt::packed; using int32le = mpt::packed; using int16le = mpt::packed; using int8le = mpt::packed; using uint64le = mpt::packed; using uint32le = mpt::packed; using uint16le = mpt::packed; using uint8le = mpt::packed; using int64be = mpt::packed; using int32be = mpt::packed; using int16be = mpt::packed; using int8be = mpt::packed; using uint64be = mpt::packed; using uint32be = mpt::packed; using uint16be = mpt::packed; using uint8be = mpt::packed; using IEEE754binary32LE = mpt::IEEE754binary_types::is_ieee754_binary32ne, mpt::endian::native>::IEEE754binary32LE; using IEEE754binary32BE = mpt::IEEE754binary_types::is_ieee754_binary32ne, mpt::endian::native>::IEEE754binary32BE; using IEEE754binary64LE = mpt::IEEE754binary_types::is_ieee754_binary64ne, mpt::endian::native>::IEEE754binary64LE; using IEEE754binary64BE = mpt::IEEE754binary_types::is_ieee754_binary64ne, mpt::endian::native>::IEEE754binary64BE; // unaligned using float32le = mpt::IEEE754binary32EmulatedLE; using float32be = mpt::IEEE754binary32EmulatedBE; using float64le = mpt::IEEE754binary64EmulatedLE; using float64be = mpt::IEEE754binary64EmulatedBE; // potentially aligned using float32le_fast = mpt::IEEE754binary32LE; using float32be_fast = mpt::IEEE754binary32BE; using float64le_fast = mpt::IEEE754binary64LE; using float64be_fast = mpt::IEEE754binary64BE; #define MPT_BINARY_STRUCT(type, size) \ constexpr bool declare_binary_safe(const type &) \ { \ return true; \ } \ static_assert(mpt::check_binary_size(size)); \ /**/ OPENMPT_NAMESPACE_END