Add Debugger interface, RoomObject class

- Log instructions to debugger using experiment flag
- Use BitmapManager for more functionality
- Draw framebuffer and integrated debugger
This commit is contained in:
scawful
2023-11-13 14:51:01 -05:00
parent 75ef4fd9b0
commit 299770922c
27 changed files with 740 additions and 234 deletions

View File

@@ -249,33 +249,30 @@ absl::Status ROM::LoadAllGraphicsData() {
core::kTilesheetHeight,
core::kTilesheetDepth);
graphics_manager_[i]->CreateTexture(renderer_);
} else {
graphics_bin_[i] =
gfx::Bitmap(core::kTilesheetWidth, core::kTilesheetHeight,
core::kTilesheetDepth, converted_sheet.data(), 0x1000);
graphics_bin_.at(i).CreateTexture(renderer_);
}
graphics_bin_[i] =
gfx::Bitmap(core::kTilesheetWidth, core::kTilesheetHeight,
core::kTilesheetDepth, converted_sheet.data(), 0x1000);
graphics_bin_.at(i).CreateTexture(renderer_);
if (flags()->kUseBitmapManager) {
for (int j = 0; j < graphics_manager_[i].get()->size(); ++j) {
graphics_buffer_.push_back(graphics_manager_[i]->at(j));
}
} else {
for (int j = 0; j < graphics_bin_[i].size(); ++j) {
graphics_buffer_.push_back(graphics_bin_.at(i).at(j));
}
}
for (int j = 0; j < graphics_bin_[i].size(); ++j) {
graphics_buffer_.push_back(graphics_bin_.at(i).at(j));
}
} else {
if (flags()->kUseBitmapManager) {
for (int j = 0; j < graphics_manager_[i].get()->size(); ++j) {
graphics_buffer_.push_back(0xFF);
}
} else {
for (int j = 0; j < graphics_bin_[0].size(); ++j) {
for (int j = 0; j < graphics_manager_[0].get()->size(); ++j) {
graphics_buffer_.push_back(0xFF);
}
}
for (int j = 0; j < graphics_bin_[0].size(); ++j) {
graphics_buffer_.push_back(0xFF);
}
}
}
return absl::OkStatus();