Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rtoumazet committed Sep 25, 2024
1 parent b7def88 commit f1b027b
Showing 1 changed file with 12 additions and 38 deletions.
50 changes: 12 additions & 38 deletions saturnin/src/video/vdp2/vdp2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1631,24 +1631,12 @@ class Vdp2 {
readPalette2048Dot<T>(texture_data, screen, row.as_11bits >> DataExtraction::As11Bits::dot1_shift);
};
for (u32 i = 0; i < 8; ++i) {
// row.as_11bits = modules_.memory()->read<u32>(current_address);
// readPalette2048Dot<T>(texture_data, screen, row.as_11bits >> DataExtraction::As11Bits::dot0_shift);
// readPalette2048Dot<T>(texture_data, screen, row.as_11bits >> DataExtraction::As11Bits::dot1_shift);
readDot();
current_address += row_offset;
// row.as_11bits = modules_.memory()->read<u32>(current_address);
// readPalette2048Dot<T>(texture_data, screen, row.as_11bits >> DataExtraction::As11Bits::dot0_shift);
// readPalette2048Dot<T>(texture_data, screen, row.as_11bits >> DataExtraction::As11Bits::dot1_shift);
readDot();
current_address += row_offset;
// row.as_11bits = modules_.memory()->read<u32>(current_address);
// readPalette2048Dot<T>(texture_data, screen, row.as_11bits >> DataExtraction::As11Bits::dot0_shift);
// readPalette2048Dot<T>(texture_data, screen, row.as_11bits >> DataExtraction::As11Bits::dot1_shift);
readDot();
current_address += row_offset;
// row.as_11bits = modules_.memory()->read<u32>(current_address);
// readPalette2048Dot<T>(texture_data, screen, row.as_11bits >> DataExtraction::As11Bits::dot0_shift);
// readPalette2048Dot<T>(texture_data, screen, row.as_11bits >> DataExtraction::As11Bits::dot1_shift);
readDot();
current_address += row_offset;
}
Expand All @@ -1658,45 +1646,31 @@ class Vdp2 {
constexpr auto row_offset = u8{4};
auto current_address = vram_start_address + cell_address;
auto row = DataExtraction{};
for (u32 i = 0; i < 8; ++i) {

auto readDot = [&]() {
row.as_16bits = modules_.memory()->read<u32>(current_address);
read32KDot(texture_data, screen, row.as_16bits >> DataExtraction::As16Bits::dot0_shift);
read32KDot(texture_data, screen, row.as_16bits >> DataExtraction::As16Bits::dot1_shift);
};
for (u32 i = 0; i < 8; ++i) {
readDot();
current_address += row_offset;
row.as_16bits = modules_.memory()->read<u32>(current_address);
read32KDot(texture_data, screen, row.as_16bits >> DataExtraction::As16Bits::dot0_shift);
read32KDot(texture_data, screen, row.as_16bits >> DataExtraction::As16Bits::dot1_shift);
readDot();
current_address += row_offset;
row.as_16bits = modules_.memory()->read<u32>(current_address);
read32KDot(texture_data, screen, row.as_16bits >> DataExtraction::As16Bits::dot0_shift);
read32KDot(texture_data, screen, row.as_16bits >> DataExtraction::As16Bits::dot1_shift);
readDot();
current_address += row_offset;
row.as_16bits = modules_.memory()->read<u32>(current_address);
read32KDot(texture_data, screen, row.as_16bits >> DataExtraction::As16Bits::dot0_shift);
read32KDot(texture_data, screen, row.as_16bits >> DataExtraction::As16Bits::dot1_shift);
readDot();
current_address += row_offset;
}
}
void read16MColorsCellData(std::vector<u8>& texture_data, const ScrollScreenStatus& screen, const u32 cell_address) {
constexpr auto row_offset = u8{4};
auto current_address = vram_start_address + cell_address;
for (u32 i = 0; i < 8; ++i) {
read16MDot(texture_data, screen, modules_.memory()->read<u32>(current_address));
current_address += row_offset;
read16MDot(texture_data, screen, modules_.memory()->read<u32>(current_address));
current_address += row_offset;
read16MDot(texture_data, screen, modules_.memory()->read<u32>(current_address));
current_address += row_offset;
read16MDot(texture_data, screen, modules_.memory()->read<u32>(current_address));
current_address += row_offset;
read16MDot(texture_data, screen, modules_.memory()->read<u32>(current_address));
current_address += row_offset;
read16MDot(texture_data, screen, modules_.memory()->read<u32>(current_address));
current_address += row_offset;
read16MDot(texture_data, screen, modules_.memory()->read<u32>(current_address));
current_address += row_offset;
read16MDot(texture_data, screen, modules_.memory()->read<u32>(current_address));
current_address += row_offset;
for (u32 j = 0; j < 8; ++j) {
read16MDot(texture_data, screen, modules_.memory()->read<u32>(current_address));
current_address += row_offset;
}
}
}

Expand Down

0 comments on commit f1b027b

Please sign in to comment.