Improve struct and namespace usage
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include "../../GPU/gpu_types.hpp"
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace GPU {
|
||||
namespace GPU_IO {
|
||||
enum struct SemiTransparency {
|
||||
B_Half_add_F_Half = 0,
|
||||
B_add_F = 1,
|
||||
@@ -47,11 +47,11 @@ namespace JabyEngine {
|
||||
Off = 1
|
||||
};
|
||||
|
||||
namespace Command {
|
||||
struct Command {
|
||||
struct __no_align GP0 : public ComplexBitMap<uint32_t> {
|
||||
__io_port_inherit_complex_bit_map(GP0);
|
||||
|
||||
static constexpr GP0 QuickFill(Color24 color) {
|
||||
static constexpr GP0 QuickFill(GPU::Color24 color) {
|
||||
return ComplexBitMap{(0x02 << 24) | color.raw()};
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace JabyEngine {
|
||||
return ComplexBitMap{construct_cmd(0x08, mode)};
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
struct __no_align GPUStatusRegister : public ComplexBitMap<uint32_t> {
|
||||
static constexpr auto DrawingOddLinesInterlaced = Bit<uint32_t>(31);
|
||||
@@ -144,7 +144,7 @@ namespace JabyEngine {
|
||||
static constexpr auto InterruptRequest = Bit<uint32_t>(24);
|
||||
static constexpr auto DisplayDisabled = Bit<uint32_t>(23);
|
||||
static constexpr auto VerticalInterlaceOn = Bit<uint32_t>(22);
|
||||
static constexpr auto DisplayAreaColorDepth = BitRange<GPU::DisplayAreaColorDepth>::from_to(21, 21);
|
||||
static constexpr auto DisplayAreaColorDepth = BitRange<GPU_IO::DisplayAreaColorDepth>::from_to(21, 21);
|
||||
static constexpr auto VideoModePal = Bit<uint32_t>(20);
|
||||
static constexpr auto VerticalResolutionValue = BitRange<VerticalResolution>::from_to(19, 19);
|
||||
static constexpr auto HorizontalResolutionValue = BitRange<HorizontalResolution>::from_to(17, 18);
|
||||
|
Reference in New Issue
Block a user