yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
bpp_format_ui.cc
Go to the documentation of this file.
1#include "bpp_format_ui.h"
2
3#include <algorithm>
4#include <sstream>
5
7#include "app/gfx/bitmap.h"
9#include "imgui/imgui.h"
10
11namespace yaze {
12namespace gui {
13
14BppFormatUI::BppFormatUI(const std::string& id)
15 : id_(id), selected_format_(gfx::BppFormat::kBpp8), preview_format_(gfx::BppFormat::kBpp8),
16 show_analysis_(false), show_preview_(false), show_sheet_analysis_(false),
17 format_changed_(false), last_analysis_sheet_("") {
18}
19
21 std::function<void(gfx::BppFormat)> on_format_changed) {
22 if (!bitmap) return false;
23
24 format_changed_ = false;
25
26 ImGui::BeginGroup();
27 ImGui::Text("BPP Format Selection");
28 ImGui::Separator();
29
30 // Current format detection
32 bitmap->vector(), bitmap->width(), bitmap->height());
33
34 ImGui::Text("Current Format: %s",
35 gfx::BppFormatManager::Get().GetFormatInfo(current_format).name.c_str());
36
37 // Format selection
38 ImGui::Text("Target Format:");
39 ImGui::SameLine();
40
41 const char* format_names[] = {"2BPP", "3BPP", "4BPP", "8BPP"};
42 int current_selection = static_cast<int>(selected_format_) - 2; // Convert to 0-based index
43
44 if (ImGui::Combo("##BppFormat", &current_selection, format_names, 4)) {
45 selected_format_ = static_cast<gfx::BppFormat>(current_selection + 2);
46 format_changed_ = true;
47 }
48
49 // Format information
51 ImGui::Text("Max Colors: %d", format_info.max_colors);
52 ImGui::Text("Bytes per Tile: %d", format_info.bytes_per_tile);
53 ImGui::Text("Description: %s", format_info.description.c_str());
54
55 // Conversion efficiency
56 if (current_format != selected_format_) {
57 int efficiency = GetConversionEfficiency(current_format, selected_format_);
58 ImGui::Text("Conversion Efficiency: %d%%", efficiency);
59
60 ImVec4 efficiency_color;
61 if (efficiency >= 80) {
62 efficiency_color = GetSuccessColor(); // Green
63 } else if (efficiency >= 60) {
64 efficiency_color = GetWarningColor(); // Yellow
65 } else {
66 efficiency_color = GetErrorColor(); // Red
67 }
68 ImGui::TextColored(efficiency_color, "Quality: %s",
69 efficiency >= 80 ? "Excellent" :
70 efficiency >= 60 ? "Good" : "Poor");
71 }
72
73 // Action buttons
74 ImGui::Separator();
75
76 if (ImGui::Button("Convert Format")) {
77 if (on_format_changed) {
78 on_format_changed(selected_format_);
79 }
80 format_changed_ = true;
81 }
82
83 ImGui::SameLine();
84 if (ImGui::Button("Show Analysis")) {
86 }
87
88 ImGui::SameLine();
89 if (ImGui::Button("Preview Conversion")) {
92 }
93
94 ImGui::EndGroup();
95
96 // Analysis panel
97 if (show_analysis_) {
98 RenderAnalysisPanel(*bitmap, palette);
99 }
100
101 // Preview panel
102 if (show_preview_) {
103 RenderConversionPreview(*bitmap, preview_format_, palette);
104 }
105
106 return format_changed_;
107}
108
110 ImGui::Begin("BPP Format Analysis", &show_analysis_);
111
112 // Basic analysis
114 bitmap.vector(), bitmap.width(), bitmap.height());
115
116 ImGui::Text("Detected Format: %s",
117 gfx::BppFormatManager::Get().GetFormatInfo(detected_format).name.c_str());
118
119 // Color usage analysis
120 std::vector<int> color_usage(256, 0);
121 for (uint8_t pixel : bitmap.vector()) {
122 color_usage[pixel]++;
123 }
124
125 int used_colors = 0;
126 for (int count : color_usage) {
127 if (count > 0) used_colors++;
128 }
129
130 ImGui::Text("Colors Used: %d / %d", used_colors, static_cast<int>(palette.size()));
131 ImGui::Text("Color Efficiency: %.1f%%",
132 (static_cast<float>(used_colors) / palette.size()) * 100.0f);
133
134 // Color usage chart
135 if (ImGui::CollapsingHeader("Color Usage Chart")) {
136 RenderColorUsageChart(color_usage);
137 }
138
139 // Format recommendations
140 ImGui::Separator();
141 ImGui::Text("Format Recommendations:");
142
143 if (used_colors <= 4) {
144 ImGui::TextColored(GetSuccessColor(), "✓ 2BPP format would be optimal");
145 } else if (used_colors <= 8) {
146 ImGui::TextColored(GetSuccessColor(), "✓ 3BPP format would be optimal");
147 } else if (used_colors <= 16) {
148 ImGui::TextColored(GetSuccessColor(), "✓ 4BPP format would be optimal");
149 } else {
150 ImGui::TextColored(GetWarningColor(), "⚠ 8BPP format is necessary");
151 }
152
153 // Memory usage comparison
154 if (ImGui::CollapsingHeader("Memory Usage Comparison")) {
155 const auto& current_info = gfx::BppFormatManager::Get().GetFormatInfo(detected_format);
156 int current_bytes = (bitmap.width() * bitmap.height() * current_info.bits_per_pixel) / 8;
157
158 ImGui::Text("Current Format (%s): %d bytes", current_info.name.c_str(), current_bytes);
159
160 for (auto format : gfx::BppFormatManager::Get().GetAvailableFormats()) {
161 if (format == detected_format) continue;
162
163 const auto& info = gfx::BppFormatManager::Get().GetFormatInfo(format);
164 int format_bytes = (bitmap.width() * bitmap.height() * info.bits_per_pixel) / 8;
165 float ratio = static_cast<float>(format_bytes) / current_bytes;
166
167 ImGui::Text("%s: %d bytes (%.1fx)", info.name.c_str(), format_bytes, ratio);
168 }
169 }
170
171 ImGui::End();
172}
173
175 const gfx::SnesPalette& palette) {
176 ImGui::Begin("BPP Conversion Preview", &show_preview_);
177
179 bitmap.vector(), bitmap.width(), bitmap.height());
180
181 if (current_format == target_format) {
182 ImGui::Text("No conversion needed - formats are identical");
183 ImGui::End();
184 return;
185 }
186
187 // Convert the bitmap
188 auto converted_data = gfx::BppFormatManager::Get().ConvertFormat(
189 bitmap.vector(), current_format, target_format, bitmap.width(), bitmap.height());
190
191 // Create preview bitmap
192 gfx::Bitmap preview_bitmap(bitmap.width(), bitmap.height(), bitmap.depth(),
193 converted_data, palette);
194
195 // Render side-by-side comparison
196 ImGui::Text("Original (%s) vs Converted (%s)",
197 gfx::BppFormatManager::Get().GetFormatInfo(current_format).name.c_str(),
198 gfx::BppFormatManager::Get().GetFormatInfo(target_format).name.c_str());
199
200 ImGui::Columns(2, "PreviewColumns");
201
202 // Original
203 ImGui::Text("Original");
204 if (bitmap.texture()) {
205 ImGui::Image((ImTextureID)(intptr_t)bitmap.texture(),
206 ImVec2(256, 256 * bitmap.height() / bitmap.width()));
207 }
208
209 ImGui::NextColumn();
210
211 // Converted
212 ImGui::Text("Converted");
213 if (preview_bitmap.texture()) {
214 ImGui::Image((ImTextureID)(intptr_t)preview_bitmap.texture(),
215 ImVec2(256, 256 * preview_bitmap.height() / preview_bitmap.width()));
216 }
217
218 ImGui::Columns(1);
219
220 // Conversion statistics
221 ImGui::Separator();
222 ImGui::Text("Conversion Statistics:");
223
224 const auto& from_info = gfx::BppFormatManager::Get().GetFormatInfo(current_format);
225 const auto& to_info = gfx::BppFormatManager::Get().GetFormatInfo(target_format);
226
227 int from_bytes = (bitmap.width() * bitmap.height() * from_info.bits_per_pixel) / 8;
228 int to_bytes = (bitmap.width() * bitmap.height() * to_info.bits_per_pixel) / 8;
229
230 ImGui::Text("Size: %d bytes -> %d bytes", from_bytes, to_bytes);
231 ImGui::Text("Compression Ratio: %.2fx", static_cast<float>(from_bytes) / to_bytes);
232
233 ImGui::End();
234}
235
236void BppFormatUI::RenderSheetAnalysis(const std::vector<uint8_t>& sheet_data, int sheet_id,
237 const gfx::SnesPalette& palette) {
238 std::string analysis_key = "sheet_" + std::to_string(sheet_id);
239
240 // Check if we need to update analysis
241 if (last_analysis_sheet_ != analysis_key) {
242 auto analysis = gfx::BppFormatManager::Get().AnalyzeGraphicsSheet(sheet_data, sheet_id, palette);
243 UpdateAnalysisCache(sheet_id, analysis);
244 last_analysis_sheet_ = analysis_key;
245 }
246
247 auto it = cached_analysis_.find(sheet_id);
248 if (it == cached_analysis_.end()) return;
249
250 const auto& analysis = it->second;
251
252 ImGui::Begin("Graphics Sheet Analysis", &show_sheet_analysis_);
253
254 ImGui::Text("Sheet ID: %d", analysis.sheet_id);
255 ImGui::Text("Original Format: %s",
256 gfx::BppFormatManager::Get().GetFormatInfo(analysis.original_format).name.c_str());
257 ImGui::Text("Current Format: %s",
258 gfx::BppFormatManager::Get().GetFormatInfo(analysis.current_format).name.c_str());
259
260 if (analysis.was_converted) {
261 ImGui::TextColored(GetWarningColor(), "⚠ This sheet was converted");
262 ImGui::Text("Conversion History: %s", analysis.conversion_history.c_str());
263 } else {
264 ImGui::TextColored(GetSuccessColor(), "✓ Original format preserved");
265 }
266
267 ImGui::Separator();
268 ImGui::Text("Color Usage: %d / %d colors used",
269 analysis.palette_entries_used, static_cast<int>(palette.size()));
270 ImGui::Text("Compression Ratio: %.2fx", analysis.compression_ratio);
271 ImGui::Text("Size: %zu -> %zu bytes", analysis.original_size, analysis.current_size);
272
273 // Tile usage pattern
274 if (ImGui::CollapsingHeader("Tile Usage Pattern")) {
275 int total_tiles = analysis.tile_usage_pattern.size();
276 int used_tiles = 0;
277 int empty_tiles = 0;
278
279 for (int usage : analysis.tile_usage_pattern) {
280 if (usage > 0) {
281 used_tiles++;
282 } else {
283 empty_tiles++;
284 }
285 }
286
287 ImGui::Text("Total Tiles: %d", total_tiles);
288 ImGui::Text("Used Tiles: %d (%.1f%%)", used_tiles,
289 (static_cast<float>(used_tiles) / total_tiles) * 100.0f);
290 ImGui::Text("Empty Tiles: %d (%.1f%%)", empty_tiles,
291 (static_cast<float>(empty_tiles) / total_tiles) * 100.0f);
292 }
293
294 // Recommendations
295 ImGui::Separator();
296 ImGui::Text("Recommendations:");
297
298 if (analysis.was_converted && analysis.palette_entries_used <= 16) {
299 ImGui::TextColored(GetSuccessColor(),
300 "✓ Consider reverting to %s format for better compression",
301 gfx::BppFormatManager::Get().GetFormatInfo(analysis.original_format).name.c_str());
302 }
303
304 if (analysis.palette_entries_used < static_cast<int>(palette.size()) / 2) {
305 ImGui::TextColored(GetWarningColor(),
306 "⚠ Palette is underutilized - consider optimization");
307 }
308
309 ImGui::End();
310}
311
313 // All conversions are available in our implementation
314 return from_format != to_format;
315}
316
318 // Calculate efficiency based on format compatibility
319 if (from_format == to_format) return 100;
320
321 // Higher BPP to lower BPP conversions may lose quality
322 if (static_cast<int>(from_format) > static_cast<int>(to_format)) {
323 int bpp_diff = static_cast<int>(from_format) - static_cast<int>(to_format);
324 return std::max(20, 100 - (bpp_diff * 20)); // Reduce efficiency by 20% per BPP level
325 }
326
327 // Lower BPP to higher BPP conversions are lossless
328 return 100;
329}
330
332 ImGui::Text("Format: %s", info.name.c_str());
333 ImGui::Text("Bits per Pixel: %d", info.bits_per_pixel);
334 ImGui::Text("Max Colors: %d", info.max_colors);
335 ImGui::Text("Bytes per Tile: %d", info.bytes_per_tile);
336 ImGui::Text("Compressed: %s", info.is_compressed ? "Yes" : "No");
337 ImGui::Text("Description: %s", info.description.c_str());
338}
339
340void BppFormatUI::RenderColorUsageChart(const std::vector<int>& color_usage) {
341 // Find maximum usage for scaling
342 int max_usage = *std::max_element(color_usage.begin(), color_usage.end());
343 if (max_usage == 0) return;
344
345 // Render simple bar chart
346 ImGui::Text("Color Usage Distribution:");
347
348 for (size_t i = 0; i < std::min(color_usage.size(), size_t(16)); ++i) {
349 if (color_usage[i] > 0) {
350 float usage_ratio = static_cast<float>(color_usage[i]) / max_usage;
351 ImGui::Text("Color %zu: %d pixels (%.1f%%)", i, color_usage[i],
352 (static_cast<float>(color_usage[i]) / (16 * 16)) * 100.0f);
353 ImGui::SameLine();
354 ImGui::ProgressBar(usage_ratio, ImVec2(100, 0));
355 }
356 }
357}
358
359void BppFormatUI::RenderConversionHistory(const std::string& history) {
360 ImGui::Text("Conversion History:");
361 ImGui::TextWrapped("%s", history.c_str());
362}
363
367
369 switch (format) {
370 case gfx::BppFormat::kBpp2: return ImVec4(1, 0, 0, 1); // Red
371 case gfx::BppFormat::kBpp3: return ImVec4(1, 1, 0, 1); // Yellow
372 case gfx::BppFormat::kBpp4: return ImVec4(0, 1, 0, 1); // Green
373 case gfx::BppFormat::kBpp8: return ImVec4(0, 0, 1, 1); // Blue
374 default: return ImVec4(1, 1, 1, 1); // White
375 }
376}
377
379 cached_analysis_[sheet_id] = analysis;
380}
381
382// BppConversionDialog implementation
383
385 : id_(id), is_open_(false), target_format_(gfx::BppFormat::kBpp8),
386 preserve_palette_(true), preview_valid_(false), show_preview_(true), preview_scale_(1.0f) {
387}
388
389void BppConversionDialog::Show(const gfx::Bitmap& bitmap, const gfx::SnesPalette& palette,
390 std::function<void(gfx::BppFormat, bool)> on_convert) {
391 source_bitmap_ = bitmap;
392 source_palette_ = palette;
393 convert_callback_ = on_convert;
394 is_open_ = true;
395 preview_valid_ = false;
396}
397
399 if (!is_open_) return false;
400
401 ImGui::OpenPopup("BPP Format Conversion");
402
403 if (ImGui::BeginPopupModal("BPP Format Conversion", &is_open_,
404 ImGuiWindowFlags_AlwaysAutoResize)) {
405
407 ImGui::Separator();
409 ImGui::Separator();
410
411 if (show_preview_) {
413 ImGui::Separator();
414 }
415
417
418 ImGui::EndPopup();
419 }
420
421 return is_open_;
422}
423
425 if (preview_valid_) return;
426
429
430 if (current_format == target_format_) {
432 preview_valid_ = true;
433 return;
434 }
435
436 auto converted_data = gfx::BppFormatManager::Get().ConvertFormat(
437 source_bitmap_.vector(), current_format, target_format_,
439
441 source_bitmap_.depth(), converted_data, source_palette_);
442 preview_valid_ = true;
443}
444
446 ImGui::Text("Convert to BPP Format:");
447
448 const char* format_names[] = {"2BPP", "3BPP", "4BPP", "8BPP"};
449 int current_selection = static_cast<int>(target_format_) - 2;
450
451 if (ImGui::Combo("##TargetFormat", &current_selection, format_names, 4)) {
452 target_format_ = static_cast<gfx::BppFormat>(current_selection + 2);
453 preview_valid_ = false; // Invalidate preview
454 }
455
456 const auto& format_info = gfx::BppFormatManager::Get().GetFormatInfo(target_format_);
457 ImGui::Text("Max Colors: %d", format_info.max_colors);
458 ImGui::Text("Description: %s", format_info.description.c_str());
459}
460
462 if (ImGui::Button("Update Preview")) {
463 preview_valid_ = false;
464 }
465
467
469 ImGui::Text("Preview:");
470 ImGui::Image((ImTextureID)(intptr_t)preview_bitmap_.texture(),
471 ImVec2(128 * preview_scale_, 128 * preview_scale_));
472
473 ImGui::SliderFloat("Scale", &preview_scale_, 0.5f, 3.0f);
474 }
475}
476
478 ImGui::Checkbox("Preserve Palette", &preserve_palette_);
479 ImGui::SameLine();
480 ImGui::Checkbox("Show Preview", &show_preview_);
481}
482
484 if (ImGui::Button("Convert")) {
485 if (convert_callback_) {
487 }
488 is_open_ = false;
489 }
490
491 ImGui::SameLine();
492 if (ImGui::Button("Cancel")) {
493 is_open_ = false;
494 }
495}
496
497// BppComparisonTool implementation
498
500 : id_(id), is_open_(false), has_source_(false), comparison_scale_(1.0f),
501 show_metrics_(true), selected_comparison_(gfx::BppFormat::kBpp8) {
502}
503
504void BppComparisonTool::SetSource(const gfx::Bitmap& bitmap, const gfx::SnesPalette& palette) {
505 source_bitmap_ = bitmap;
506 source_palette_ = palette;
507 has_source_ = true;
509}
510
512 if (!is_open_ || !has_source_) return;
513
514 ImGui::Begin("BPP Format Comparison", &is_open_);
515
517 ImGui::Separator();
519
520 if (show_metrics_) {
521 ImGui::Separator();
523 }
524
525 ImGui::End();
526}
527
531
532 for (auto format : gfx::BppFormatManager::Get().GetAvailableFormats()) {
533 if (format == source_format) {
536 comparison_valid_[format] = true;
537 continue;
538 }
539
540 try {
541 auto converted_data = gfx::BppFormatManager::Get().ConvertFormat(
542 source_bitmap_.vector(), source_format, format,
544
546 source_bitmap_.depth(), converted_data, source_palette_);
548 comparison_valid_[format] = true;
549 } catch (...) {
550 comparison_valid_[format] = false;
551 }
552 }
553}
554
556 ImGui::Text("Format Comparison (Scale: %.1fx)", comparison_scale_);
557 ImGui::SliderFloat("##Scale", &comparison_scale_, 0.5f, 3.0f);
558
559 ImGui::Columns(2, "ComparisonColumns");
560
561 for (auto format : gfx::BppFormatManager::Get().GetAvailableFormats()) {
562 auto it = comparison_bitmaps_.find(format);
563 if (it == comparison_bitmaps_.end() || !comparison_valid_[format]) continue;
564
565 const auto& bitmap = it->second;
566 const auto& format_info = gfx::BppFormatManager::Get().GetFormatInfo(format);
567
568 ImGui::Text("%s", format_info.name.c_str());
569
570 if (bitmap.texture()) {
571 ImGui::Image((ImTextureID)(intptr_t)bitmap.texture(),
572 ImVec2(128 * comparison_scale_, 128 * comparison_scale_));
573 }
574
575 ImGui::NextColumn();
576 }
577
578 ImGui::Columns(1);
579}
580
582 ImGui::Text("Format Metrics:");
583
584 for (auto format : gfx::BppFormatManager::Get().GetAvailableFormats()) {
585 if (!comparison_valid_[format]) continue;
586
587 const auto& format_info = gfx::BppFormatManager::Get().GetFormatInfo(format);
588 std::string metrics = CalculateMetrics(format);
589
590 ImGui::Text("%s: %s", format_info.name.c_str(), metrics.c_str());
591 }
592}
593
595 ImGui::Text("Selected for Analysis: ");
596 ImGui::SameLine();
597
598 const char* format_names[] = {"2BPP", "3BPP", "4BPP", "8BPP"};
599 int selection = static_cast<int>(selected_comparison_) - 2;
600
601 if (ImGui::Combo("##SelectedFormat", &selection, format_names, 4)) {
602 selected_comparison_ = static_cast<gfx::BppFormat>(selection + 2);
603 }
604
605 ImGui::SameLine();
606 ImGui::Checkbox("Show Metrics", &show_metrics_);
607}
608
610 const auto& format_info = gfx::BppFormatManager::Get().GetFormatInfo(format);
611 int bytes = (source_bitmap_.width() * source_bitmap_.height() * format_info.bits_per_pixel) / 8;
612
613 std::ostringstream metrics;
614 metrics << bytes << " bytes, " << format_info.max_colors << " colors";
615
616 return metrics.str();
617}
618
619} // namespace gui
620} // namespace yaze
Represents a bitmap image optimized for SNES ROM hacking.
Definition bitmap.h:66
TextureHandle texture() const
Definition bitmap.h:260
const std::vector< uint8_t > & vector() const
Definition bitmap.h:261
int height() const
Definition bitmap.h:254
int width() const
Definition bitmap.h:253
int depth() const
Definition bitmap.h:255
BppFormat DetectFormat(const std::vector< uint8_t > &data, int width, int height)
Detect BPP format from bitmap data.
std::vector< BppFormat > GetAvailableFormats() const
Get all available BPP formats.
GraphicsSheetAnalysis AnalyzeGraphicsSheet(const std::vector< uint8_t > &sheet_data, int sheet_id, const SnesPalette &palette)
Analyze graphics sheet to determine original and current BPP formats.
std::vector< uint8_t > ConvertFormat(const std::vector< uint8_t > &data, BppFormat from_format, BppFormat to_format, int width, int height)
Convert bitmap data between BPP formats.
static BppFormatManager & Get()
const BppFormatInfo & GetFormatInfo(BppFormat format) const
Get BPP format information.
Represents a palette of colors for the Super Nintendo Entertainment System (SNES).
gfx::BppFormat selected_comparison_
std::string CalculateMetrics(gfx::BppFormat format) const
std::unordered_map< gfx::BppFormat, gfx::Bitmap > comparison_bitmaps_
gfx::SnesPalette source_palette_
void Render()
Render the comparison tool.
void SetSource(const gfx::Bitmap &bitmap, const gfx::SnesPalette &palette)
Set source bitmap for comparison.
std::unordered_map< gfx::BppFormat, gfx::SnesPalette > comparison_palettes_
std::unordered_map< gfx::BppFormat, bool > comparison_valid_
BppComparisonTool(const std::string &id)
Constructor.
std::function< void(gfx::BppFormat, bool)> convert_callback_
BppConversionDialog(const std::string &id)
Constructor.
bool Render()
Render the dialog.
void Show(const gfx::Bitmap &bitmap, const gfx::SnesPalette &palette, std::function< void(gfx::BppFormat, bool)> on_convert)
Show the conversion dialog.
bool RenderFormatSelector(gfx::Bitmap *bitmap, const gfx::SnesPalette &palette, std::function< void(gfx::BppFormat)> on_format_changed)
Render the BPP format selection UI.
void RenderAnalysisPanel(const gfx::Bitmap &bitmap, const gfx::SnesPalette &palette)
Render format analysis panel.
int GetConversionEfficiency(gfx::BppFormat from_format, gfx::BppFormat to_format) const
Get conversion efficiency score.
void RenderSheetAnalysis(const std::vector< uint8_t > &sheet_data, int sheet_id, const gfx::SnesPalette &palette)
Render graphics sheet analysis.
BppFormatUI(const std::string &id)
Constructor.
ImVec4 GetFormatColor(gfx::BppFormat format) const
std::string GetFormatDescription(gfx::BppFormat format) const
std::string last_analysis_sheet_
bool IsConversionAvailable(gfx::BppFormat from_format, gfx::BppFormat to_format) const
Check if format conversion is available.
void RenderConversionHistory(const std::string &history)
void RenderFormatInfo(const gfx::BppFormatInfo &info)
void UpdateAnalysisCache(int sheet_id, const gfx::GraphicsSheetAnalysis &analysis)
std::unordered_map< int, gfx::GraphicsSheetAnalysis > cached_analysis_
void RenderConversionPreview(const gfx::Bitmap &bitmap, gfx::BppFormat target_format, const gfx::SnesPalette &palette)
Render conversion preview.
gfx::BppFormat preview_format_
gfx::BppFormat selected_format_
void RenderColorUsageChart(const std::vector< int > &color_usage)
BppFormat
BPP format enumeration for SNES graphics.
@ kBpp4
4 bits per pixel (16 colors)
@ kBpp3
3 bits per pixel (8 colors)
@ kBpp2
2 bits per pixel (4 colors)
@ kBpp8
8 bits per pixel (256 colors)
ImVec4 GetSuccessColor()
Definition ui_helpers.cc:20
ImVec4 GetErrorColor()
Definition ui_helpers.cc:30
ImVec4 GetWarningColor()
Definition ui_helpers.cc:25
Main namespace for the application.
BPP format metadata and conversion information.
Graphics sheet analysis result.