Support Overlays #2
|
@ -5,6 +5,8 @@
|
|||
|
||||
namespace JabyEngine {
|
||||
namespace bit {
|
||||
template<typename T>
|
||||
static constexpr T set(T raw_value, size_t bit);
|
||||
namespace value {
|
||||
template<typename T>
|
||||
static constexpr T set_normalized(T raw_value, T value, size_t start_bit, size_t length);
|
||||
|
@ -27,6 +29,11 @@ namespace JabyEngine {
|
|||
constexpr ClearBit operator!() const {
|
||||
return ClearBit(this->pos);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
constexpr explicit operator T() const {
|
||||
return bit::set(0, this->pos);
|
||||
}
|
||||
};
|
||||
|
||||
struct BitRange {
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace JabyEngine {
|
|||
static constexpr auto WantData = Bit(7);
|
||||
|
||||
void want_data() {
|
||||
this->raw_value = Self::set(Self::WantData);
|
||||
this->raw_value = static_cast<uint8_t>(Self::WantData);
|
||||
}
|
||||
|
||||
void reset() {
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace JabyEngine {
|
|||
auto* sector = sector_allocator.allocate_sector();
|
||||
if(sector) {
|
||||
//Now obtain sector
|
||||
//read_sector_to(*sector);
|
||||
read_sector_to(*sector);
|
||||
|
||||
sectors_left--;
|
||||
if(sectors_left == 0) {
|
||||
|
|
Loading…
Reference in New Issue