You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
647 B
30 lines
647 B
#pragma once |
|
|
|
#include <cstdint> |
|
|
|
namespace devilution { |
|
|
|
[[nodiscard]] constexpr bool IsClxOpaque(uint8_t control) |
|
{ |
|
constexpr uint8_t ClxOpaqueMin = 0x80; |
|
return control >= ClxOpaqueMin; |
|
} |
|
|
|
[[nodiscard]] constexpr uint8_t GetClxOpaquePixelsWidth(uint8_t control) |
|
{ |
|
return -static_cast<int8_t>(control); |
|
} |
|
|
|
[[nodiscard]] constexpr bool IsClxOpaqueFill(uint8_t control) |
|
{ |
|
constexpr uint8_t ClxFillMax = 0xBE; |
|
return control <= ClxFillMax; |
|
} |
|
|
|
[[nodiscard]] constexpr uint8_t GetClxOpaqueFillWidth(uint8_t control) |
|
{ |
|
constexpr uint8_t ClxFillEnd = 0xBF; |
|
return ClxFillEnd - control; |
|
} |
|
|
|
} // namespace devilution
|
|
|