Successfully read in file

This commit is contained in:
jaby 2023-03-27 20:43:18 +02:00
parent 50eaedde6a
commit 206c95f295
3 changed files with 9 additions and 2 deletions

View File

@ -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 {

View File

@ -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() {

View File

@ -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) {