Editor and Gui improvements

This commit is contained in:
scawful
2023-11-30 02:12:34 -05:00
parent 446734321c
commit 53873614ae
9 changed files with 209 additions and 27 deletions

View File

@@ -107,6 +107,8 @@ class Bitmap {
auto data() const { return data_.data(); }
auto mutable_data() { return data_; }
auto mutable_pixel_data() { return pixel_data_; }
auto surface() const { return surface_.get(); }
auto mutable_surface() { return surface_.get(); }
auto vector() const { return data_; }
auto at(int i) const { return data_[i]; }

View File

@@ -214,6 +214,9 @@ SNESPalette ReadPaletteFromROM(int offset, int num_colors, const uchar* rom) {
new_color.green = ((color >> 5) & 0x1F) * 8;
new_color.blue = ((color >> 10) & 0x1F) * 8;
colors[color_offset].SetSNES(ConvertRGBtoSNES(new_color));
if (color_offset == 0) {
colors[color_offset].SetTransparent(true);
}
color_offset++;
offset += 2;
}