housekeeping inline ROM functions
This commit is contained in:
@@ -168,7 +168,7 @@ void MasterEditor::DrawViewMenu() {
|
|||||||
|
|
||||||
if (show_memory_editor) {
|
if (show_memory_editor) {
|
||||||
static MemoryEditor mem_edit;
|
static MemoryEditor mem_edit;
|
||||||
mem_edit.DrawWindow("Memory Editor", (void *)rom_.data(), rom_.getSize());
|
mem_edit.DrawWindow("Memory Editor", (void *)rom_.data(), rom_.GetSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (show_imgui_demo) {
|
if (show_imgui_demo) {
|
||||||
@@ -209,8 +209,8 @@ void MasterEditor::DrawHelpMenu() const {
|
|||||||
if (ImGui::MenuItem("About")) {
|
if (ImGui::MenuItem("About")) {
|
||||||
// insert the about window here
|
// insert the about window here
|
||||||
}
|
}
|
||||||
ImGui::Text("Title: %s", rom_.getTitle());
|
ImGui::Text("Title: %s", rom_.GetTitle());
|
||||||
ImGui::Text("ROM Size: %ld", rom_.getSize());
|
ImGui::Text("ROM Size: %ld", rom_.GetSize());
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,15 +66,16 @@ class ROM {
|
|||||||
|
|
||||||
SDL_Texture* DrawGraphicsSheet(int offset);
|
SDL_Texture* DrawGraphicsSheet(int offset);
|
||||||
|
|
||||||
long getSize() const { return size_; }
|
auto data() { return rom_data_.data(); }
|
||||||
uchar* data() { return current_rom_; }
|
auto isLoaded() const { return is_loaded_; }
|
||||||
const uchar* getTitle() const { return title; }
|
auto GetSize() const { return size_; }
|
||||||
bool isLoaded() const { return is_loaded_; }
|
auto GetTitle() const { return title; }
|
||||||
auto Renderer() { return renderer_; }
|
auto Renderer() { return renderer_; }
|
||||||
auto GetGraphicsBin() const { return graphics_bin_; }
|
auto GetGraphicsBin() const { return graphics_bin_; }
|
||||||
auto GetGraphicsBinV2() const { return graphics_bin_v2_; }
|
auto GetGraphicsBinV2() const { return graphics_bin_v2_; }
|
||||||
auto GetMasterGraphicsBin() const { return master_gfx_bin_; }
|
auto GetMasterGraphicsBin() const { return master_gfx_bin_; }
|
||||||
auto GetVRAM() const { return pseudo_vram_; }
|
auto GetVRAM() const { return pseudo_vram_; }
|
||||||
|
auto GetBytes() const { return rom_data_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int num_sheets_ = 0;
|
int num_sheets_ = 0;
|
||||||
@@ -87,7 +88,7 @@ class ROM {
|
|||||||
ImVec4 display_palette_[8];
|
ImVec4 display_palette_[8];
|
||||||
|
|
||||||
gfx::pseudo_vram pseudo_vram_;
|
gfx::pseudo_vram pseudo_vram_;
|
||||||
std::vector<uchar> rom_data_;
|
Bytes rom_data_;
|
||||||
|
|
||||||
std::vector<uchar*> decompressed_graphic_sheets_;
|
std::vector<uchar*> decompressed_graphic_sheets_;
|
||||||
std::vector<uchar*> converted_graphic_sheets_;
|
std::vector<uchar*> converted_graphic_sheets_;
|
||||||
|
|||||||
Reference in New Issue
Block a user