fix all unhandled status return type compiler warnings
This commit is contained in:
@@ -41,7 +41,7 @@ absl::Status DungeonEditor::Update() {
|
||||
|
||||
TAB_BAR("##DungeonEditorTabBar")
|
||||
TAB_ITEM("Room Editor")
|
||||
UpdateDungeonRoomView();
|
||||
status_ = UpdateDungeonRoomView();
|
||||
END_TAB_ITEM()
|
||||
TAB_ITEM("Usage Statistics")
|
||||
if (is_loaded_) {
|
||||
@@ -107,8 +107,8 @@ absl::Status DungeonEditor::RefreshGraphics() {
|
||||
auto sprites_aux1_pal_group = rom()->palette_group().sprites_aux1;
|
||||
for (int i = 9; i < 16; i++) {
|
||||
int block = rooms_[current_room_id_].blocks()[i];
|
||||
graphics_bin_[block].get()->ApplyPaletteWithTransparent(
|
||||
sprites_aux1_pal_group[current_palette_id_], 0);
|
||||
RETURN_IF_ERROR(graphics_bin_[block].get()->ApplyPaletteWithTransparent(
|
||||
sprites_aux1_pal_group[current_palette_id_], 0));
|
||||
rom()->UpdateBitmap(graphics_bin_[block].get(), true);
|
||||
}
|
||||
return absl::OkStatus();
|
||||
@@ -833,8 +833,8 @@ void DungeonEditor::DrawUsageGrid() {
|
||||
ImGui::Text("Floor1: %#02x", room.floor1);
|
||||
ImGui::Text("Floor2: %#02x", room.floor2);
|
||||
ImGui::Text("Message ID: %#04x", room.message_id_);
|
||||
ImGui::Text("Size: %#06x", room.room_size());
|
||||
ImGui::Text("Size Pointer: %#06x", room.room_size_ptr());
|
||||
ImGui::Text("Size: %#016llx", room.room_size());
|
||||
ImGui::Text("Size Pointer: %#016llx", room.room_size_ptr());
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
|
||||
@@ -141,6 +141,8 @@ class DungeonEditor : public Editor,
|
||||
|
||||
std::unordered_map<int, int> room_size_addresses_;
|
||||
std::unordered_map<int, ImVec4> room_palette_;
|
||||
|
||||
absl::Status status_;
|
||||
};
|
||||
|
||||
} // namespace editor
|
||||
|
||||
@@ -435,7 +435,7 @@ absl::Status GraphicsEditor::UpdateScadView() {
|
||||
if (super_donkey_) {
|
||||
if (refresh_graphics_) {
|
||||
for (int i = 0; i < graphics_bin_.size(); i++) {
|
||||
graphics_bin_[i].ApplyPalette(
|
||||
status_ = graphics_bin_[i].ApplyPalette(
|
||||
col_file_palette_group_[current_palette_index_]);
|
||||
rom()->UpdateBitmap(&graphics_bin_[i]);
|
||||
}
|
||||
@@ -740,9 +740,9 @@ absl::Status GraphicsEditor::DecompressImportData(int size) {
|
||||
auto palette_group = rom()->palette_group().overworld_animated;
|
||||
z3_rom_palette_ = palette_group[current_palette_];
|
||||
if (col_file_) {
|
||||
bin_bitmap_.ApplyPalette(col_file_palette_);
|
||||
status_ = bin_bitmap_.ApplyPalette(col_file_palette_);
|
||||
} else {
|
||||
bin_bitmap_.ApplyPalette(z3_rom_palette_);
|
||||
status_ = bin_bitmap_.ApplyPalette(z3_rom_palette_);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -765,7 +765,7 @@ absl::Status GraphicsEditor::DecompressSuperDonkey() {
|
||||
gfx::Bitmap(core::kTilesheetWidth, core::kTilesheetHeight,
|
||||
core::kTilesheetDepth, converted_sheet);
|
||||
if (col_file_) {
|
||||
graphics_bin_[i].ApplyPalette(
|
||||
status_ = graphics_bin_[i].ApplyPalette(
|
||||
col_file_palette_group_[current_palette_index_]);
|
||||
} else {
|
||||
// ROM palette
|
||||
@@ -773,7 +773,7 @@ absl::Status GraphicsEditor::DecompressSuperDonkey() {
|
||||
auto palette_group = rom()->palette_group().get_group(
|
||||
kPaletteGroupAddressesKeys[current_palette_]);
|
||||
z3_rom_palette_ = *palette_group->mutable_palette(current_palette_index_);
|
||||
graphics_bin_[i].ApplyPalette(z3_rom_palette_);
|
||||
status_ = graphics_bin_[i].ApplyPalette(z3_rom_palette_);
|
||||
}
|
||||
|
||||
rom()->RenderBitmap(&graphics_bin_[i]);
|
||||
@@ -791,14 +791,14 @@ absl::Status GraphicsEditor::DecompressSuperDonkey() {
|
||||
gfx::Bitmap(core::kTilesheetWidth, core::kTilesheetHeight,
|
||||
core::kTilesheetDepth, converted_sheet);
|
||||
if (col_file_) {
|
||||
graphics_bin_[i].ApplyPalette(
|
||||
status_ = graphics_bin_[i].ApplyPalette(
|
||||
col_file_palette_group_[current_palette_index_]);
|
||||
} else {
|
||||
// ROM palette
|
||||
auto palette_group = rom()->palette_group().get_group(
|
||||
kPaletteGroupAddressesKeys[current_palette_]);
|
||||
z3_rom_palette_ = *palette_group->mutable_palette(current_palette_index_);
|
||||
graphics_bin_[i].ApplyPalette(z3_rom_palette_);
|
||||
status_ = graphics_bin_[i].ApplyPalette(z3_rom_palette_);
|
||||
}
|
||||
|
||||
rom()->RenderBitmap(&graphics_bin_[i]);
|
||||
|
||||
@@ -261,7 +261,7 @@ void PaletteEditor::DisplayPalette(gfx::SnesPalette& palette, bool loaded) {
|
||||
// Generate a default palette. The palette will persist and can be edited.
|
||||
static bool init = false;
|
||||
if (loaded && !init) {
|
||||
InitializeSavedPalette(palette);
|
||||
status_ = InitializeSavedPalette(palette);
|
||||
init = true;
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ void PaletteEditor::DisplayPalette(gfx::SnesPalette& palette, bool loaded) {
|
||||
void PaletteEditor::DrawPortablePalette(gfx::SnesPalette& palette) {
|
||||
static bool init = false;
|
||||
if (!init) {
|
||||
InitializeSavedPalette(palette);
|
||||
status_ = InitializeSavedPalette(palette);
|
||||
init = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -818,7 +818,7 @@ absl::Status OverworldEditor::DrawTileSelector() {
|
||||
if (BeginTabBar(kTileSelectorTab.data(),
|
||||
ImGuiTabBarFlags_FittingPolicyScroll)) {
|
||||
if (BeginTabItem("Tile16")) {
|
||||
RETURN_IF_ERROR(DrawTile16Selector());
|
||||
status_ = DrawTile16Selector();
|
||||
EndTabItem();
|
||||
}
|
||||
if (BeginTabItem("Tile8")) {
|
||||
@@ -830,7 +830,7 @@ absl::Status OverworldEditor::DrawTileSelector() {
|
||||
EndTabItem();
|
||||
}
|
||||
if (BeginTabItem("Area Graphics")) {
|
||||
DrawAreaGraphics();
|
||||
status_ = DrawAreaGraphics();
|
||||
EndTabItem();
|
||||
}
|
||||
EndTabBar();
|
||||
@@ -1601,12 +1601,14 @@ absl::Status OverworldEditor::LoadGraphics() {
|
||||
palette_ = overworld_.AreaPalette();
|
||||
|
||||
// Create the area graphics image
|
||||
rom()->CreateAndRenderBitmap(0x80, 0x200, 0x40, overworld_.current_graphics(),
|
||||
current_gfx_bmp_, palette_);
|
||||
RETURN_IF_ERROR(rom()->CreateAndRenderBitmap(0x80, 0x200, 0x40,
|
||||
overworld_.current_graphics(),
|
||||
current_gfx_bmp_, palette_));
|
||||
|
||||
// Create the tile16 blockset image
|
||||
rom()->CreateAndRenderBitmap(0x80, 0x2000, 0x08, overworld_.Tile16Blockset(),
|
||||
tile16_blockset_bmp_, palette_);
|
||||
RETURN_IF_ERROR(rom()->CreateAndRenderBitmap(0x80, 0x2000, 0x08,
|
||||
overworld_.Tile16Blockset(),
|
||||
tile16_blockset_bmp_, palette_));
|
||||
map_blockset_loaded_ = true;
|
||||
|
||||
// Copy the tile16 data into individual tiles.
|
||||
|
||||
@@ -74,7 +74,7 @@ void ScreenEditor::DrawInventoryMenuEditor() {
|
||||
tilesheet_canvas_.DrawOverlay();
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
gui::DisplayPalette(palette_, create);
|
||||
status_ = gui::DisplayPalette(palette_, create);
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
@@ -233,8 +233,8 @@ absl::Status ScreenEditor::LoadDungeonMapTile16() {
|
||||
tile16_sheet_.ComposeTile16(rom()->graphics_buffer(), t1, t2, t3, t4);
|
||||
}
|
||||
|
||||
tile16_sheet_.mutable_bitmap()->ApplyPalette(
|
||||
*rom()->mutable_dungeon_palette(3));
|
||||
RETURN_IF_ERROR(tile16_sheet_.mutable_bitmap()->ApplyPalette(
|
||||
*rom()->mutable_dungeon_palette(3)));
|
||||
rom()->RenderBitmap(&*tile16_sheet_.mutable_bitmap().get());
|
||||
|
||||
for (int i = 0; i < tile16_sheet_.num_tiles(); ++i) {
|
||||
|
||||
@@ -83,6 +83,8 @@ class ScreenEditor : public SharedRom {
|
||||
gfx::BitmapTable sheets_;
|
||||
|
||||
gfx::Tilesheet tile16_sheet_;
|
||||
|
||||
absl::Status status_;
|
||||
};
|
||||
|
||||
} // namespace editor
|
||||
|
||||
Reference in New Issue
Block a user