Remove unused methods
This commit is contained in:
@@ -281,102 +281,6 @@ char *ROM::CreateAllGfxDataRaw() {
|
|||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ROM::CreateAllGraphicsData(uchar *allGfx16Ptr) {
|
|
||||||
int sheetPosition = 0;
|
|
||||||
char const *data = CreateAllGfxDataRaw();
|
|
||||||
auto *newData = new char[0x6F800];
|
|
||||||
uchar const *mask =
|
|
||||||
new uchar[]{0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
|
|
||||||
|
|
||||||
// 8x8 tile
|
|
||||||
// Per Sheet
|
|
||||||
for (int s = 0; s < core::constants::NumberOfSheets; s++) {
|
|
||||||
for (int j = 0; j < 4; j++) { // Per Tile Line Y
|
|
||||||
for (int i = 0; i < 16; i++) { // Per Tile Line X
|
|
||||||
for (int y = 0; y < 8; y++) { // Per Pixel Line
|
|
||||||
if (isbpp3[s]) {
|
|
||||||
uchar lineBits0 =
|
|
||||||
data[(y * 2) + (i * 24) + (j * 384) + sheetPosition];
|
|
||||||
uchar lineBits1 =
|
|
||||||
data[(y * 2) + (i * 24) + (j * 384) + 1 + sheetPosition];
|
|
||||||
uchar lineBits2 =
|
|
||||||
data[(y) + (i * 24) + (j * 384) + 16 + sheetPosition];
|
|
||||||
|
|
||||||
// Per Pixel X
|
|
||||||
for (int x = 0; x < 4; x++) {
|
|
||||||
uchar pixdata = 0;
|
|
||||||
uchar pixdata2 = 0;
|
|
||||||
|
|
||||||
if ((lineBits0 & mask[(x * 2)]) == mask[(x * 2)]) {
|
|
||||||
pixdata += 1;
|
|
||||||
}
|
|
||||||
if ((lineBits1 & mask[(x * 2)]) == mask[(x * 2)]) {
|
|
||||||
pixdata += 2;
|
|
||||||
}
|
|
||||||
if ((lineBits2 & mask[(x * 2)]) == mask[(x * 2)]) {
|
|
||||||
pixdata += 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((lineBits0 & mask[(x * 2) + 1]) == mask[(x * 2) + 1]) {
|
|
||||||
pixdata2 += 1;
|
|
||||||
}
|
|
||||||
if ((lineBits1 & mask[(x * 2) + 1]) == mask[(x * 2) + 1]) {
|
|
||||||
pixdata2 += 2;
|
|
||||||
}
|
|
||||||
if ((lineBits2 & mask[(x * 2) + 1]) == mask[(x * 2) + 1]) {
|
|
||||||
pixdata2 += 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
newData[(y * 64) + (x) + (i * 4) + (j * 512) + (s * 2048)] =
|
|
||||||
(char)((pixdata << 4) | pixdata2);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
uchar lineBits0 =
|
|
||||||
data[(y * 2) + (i * 16) + (j * 256) + sheetPosition];
|
|
||||||
uchar lineBits1 =
|
|
||||||
data[(y * 2) + (i * 16) + (j * 256) + 1 + sheetPosition];
|
|
||||||
|
|
||||||
// Per Pixel X
|
|
||||||
for (int x = 0; x < 4; x++) {
|
|
||||||
uchar pixdata = 0;
|
|
||||||
uchar pixdata2 = 0;
|
|
||||||
|
|
||||||
if ((lineBits0 & mask[(x * 2)]) == mask[(x * 2)]) {
|
|
||||||
pixdata += 1;
|
|
||||||
}
|
|
||||||
if ((lineBits1 & mask[(x * 2)]) == mask[(x * 2)]) {
|
|
||||||
pixdata += 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((lineBits0 & mask[(x * 2) + 1]) == mask[(x * 2) + 1]) {
|
|
||||||
pixdata2 += 1;
|
|
||||||
}
|
|
||||||
if ((lineBits1 & mask[(x * 2) + 1]) == mask[(x * 2) + 1]) {
|
|
||||||
pixdata2 += 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
newData[(y * 64) + (x) + (i * 4) + (j * 512) + (s * 2048)] =
|
|
||||||
(uchar)((pixdata << 4) | pixdata2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isbpp3[s]) {
|
|
||||||
sheetPosition += core::constants::Uncompressed3BPPSize;
|
|
||||||
} else {
|
|
||||||
sheetPosition += core::constants::UncompressedSheetSize;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
auto *allgfx16Data = allGfx16Ptr;
|
|
||||||
for (int i = 0; i < 0x6F800; i++) {
|
|
||||||
allgfx16Data[i] = newData[i];
|
|
||||||
}
|
|
||||||
allgfx16Data = SNES3bppTo8bppSheet(allgfx16Data);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace rom
|
} // namespace rom
|
||||||
} // namespace app
|
} // namespace app
|
||||||
} // namespace yaze
|
} // namespace yaze
|
||||||
@@ -34,13 +34,11 @@ class ROM {
|
|||||||
|
|
||||||
int GetPCGfxAddress(uint8_t id);
|
int GetPCGfxAddress(uint8_t id);
|
||||||
char* CreateAllGfxDataRaw();
|
char* CreateAllGfxDataRaw();
|
||||||
void CreateAllGraphicsData(uchar* allGfx16Ptr);
|
|
||||||
|
|
||||||
uchar* data() { return current_rom_; }
|
uchar* data() { return current_rom_; }
|
||||||
auto Renderer() { return sdl_renderer_; }
|
auto Renderer() { return sdl_renderer_; }
|
||||||
const uchar* getTitle() const { return title; }
|
const uchar* getTitle() const { return title; }
|
||||||
long getSize() const { return size_; }
|
long getSize() const { return size_; }
|
||||||
char getVersion() const { return version_; }
|
|
||||||
bool isLoaded() const { return is_loaded_; }
|
bool isLoaded() const { return is_loaded_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user