Editor namespace housekeeping, Canvas expansion

This commit is contained in:
Justin Scofield
2022-07-19 20:21:32 -04:00
parent 86150f82bd
commit 7a795fd75d
7 changed files with 44 additions and 230 deletions

View File

@@ -77,9 +77,8 @@ void ROM::LoadAllGraphicsData() {
data = Decompress(gfx_addr, core::UncompressedSheetSize);
}
gfx::Bitmap tilesheet_bmp(
core::kTilesheetWidth, core::kTilesheetHeight,
core::kTilesheetDepth, SNES3bppTo8bppSheet(data));
gfx::Bitmap tilesheet_bmp(core::kTilesheetWidth, core::kTilesheetHeight,
core::kTilesheetDepth, SNES3bppTo8bppSheet(data));
tilesheet_bmp.CreateTexture(sdl_renderer_);
graphics_bin_[i] = tilesheet_bmp;
@@ -157,10 +156,6 @@ uchar *ROM::Decompress(int pos, int size, bool reversed) {
// Reversed byte order for overworld maps
if (reversed) {
auto addr = (current_rom_[pos + 2]) | ((current_rom_[pos + 1]) << 8);
if (addr > buffer_pos) {
std::cout << "size error" << std::endl;
}
if (buffer_pos + length >= size) {
size *= 2;
buffer = new uchar[size];