Skip to content

Commit d609c14

Browse files
committed
1.5.1.0
1 parent 4332ca1 commit d609c14

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

Visual Studio 2022/ps-image/Source/app_imgui.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,8 +1240,10 @@ void Global_Application::CreateModal(void)
12401240
bool b_PaletteRaw = (std::to_underlying(m_CreateInfo.PaletteType) & (std::to_underlying(ImageType::RAW)));
12411241
bool b_PaletteTIM = (std::to_underlying(m_CreateInfo.PaletteType) & (std::to_underlying(ImageType::TIM)));
12421242
bool b_PaletteCLT = (std::to_underlying(m_CreateInfo.PaletteType) & (std::to_underlying(ImageType::CLT)));
1243+
bool b_PaletteBMP = (std::to_underlying(m_CreateInfo.PaletteType) & (std::to_underlying(ImageType::BMP)));
12431244
bool b_PalettePAL = (std::to_underlying(m_CreateInfo.PaletteType) & (std::to_underlying(ImageType::PAL)));
1244-
bool b_PaletteNone = (b_PaletteRaw || b_PaletteTIM || b_PaletteCLT || b_PalettePAL) ? false : true;
1245+
bool b_PalettePNG = (std::to_underlying(m_CreateInfo.PaletteType) & (std::to_underlying(ImageType::PNG)));
1246+
bool b_PaletteNone = (b_PaletteRaw || b_PaletteTIM || b_PaletteCLT || b_PaletteBMP || b_PalettePAL || b_PalettePNG) ? false : true;
12451247

12461248
bool b_PixelsRaw = (std::to_underlying(m_CreateInfo.PixelType) & (std::to_underlying(ImageType::RAW)));
12471249
bool b_PixelsTIM = (std::to_underlying(m_CreateInfo.PixelType) & (std::to_underlying(ImageType::TIM)));
@@ -1417,11 +1419,7 @@ void Global_Application::CreateModal(void)
14171419
Tooltip(Str.FormatCStyle("Read raw pixel data (0x%llx bytes) at 0x%llx in \"%ws\"", (Width * m_CreateInfo.Height), m_CreateInfo.pPixel, m_CreateInfo.Pixel.filename().wstring().c_str()));
14181420
}
14191421
break;
1420-
case 2:
1421-
case 3:
1422-
case 4:
1423-
case 5:
1424-
case 6:
1422+
default:
14251423
Tooltip(Str.FormatCStyle("Read \"%s\" file type at 0x%llx in \"%ws\"", PixelFileTypes[iFileType], m_CreateInfo.pPixel, m_CreateInfo.Pixel.filename().wstring().c_str()));
14261424
break;
14271425
}
@@ -1479,7 +1477,7 @@ void Global_Application::CreateModal(void)
14791477
}
14801478

14811479
{
1482-
uint32_t iFileType = b_PaletteNone ? 0 : b_PaletteRaw ? 1 : b_PaletteTIM ? 2 : b_PaletteCLT ? 3 : b_PalettePAL ? 4 : 0;
1480+
uint32_t iFileType = b_PaletteNone ? 0 : b_PaletteRaw ? 1 : b_PaletteTIM ? 2 : b_PaletteCLT ? 3 : b_PaletteBMP ? 4 : b_PalettePAL ? 5 : b_PalettePNG ? 6 : 0;
14831481

14841482
ImGui::SetNextItemWidth(ItemWidth);
14851483

@@ -1537,9 +1535,7 @@ void Global_Application::CreateModal(void)
15371535
m_CreateInfo.Depth == 4 ? (m_CreateInfo.nPalette * 0x20) : (m_CreateInfo.nPalette * 0x200),
15381536
m_CreateInfo.pPalette, m_CreateInfo.Palette.filename().wstring().c_str()));
15391537
break;
1540-
case 2:
1541-
case 3:
1542-
case 4:
1538+
default:
15431539
Tooltip(Str.FormatCStyle("Read \"%s\" file type at %llx in \"%ws\"", PaletteFileTypes[iFileType], m_CreateInfo.pPalette, m_CreateInfo.Palette.filename().wstring().c_str()));
15441540
break;
15451541
}

images/ps-image_00.jpg

-12.2 KB
Loading

images/ps-image_03.jpg

-39.2 KB
Loading

0 commit comments

Comments
 (0)