mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Take care of miscellaneous commented TODOs (#1676)
This commit is contained in:
@@ -719,8 +719,7 @@ static bool hasRAM(MbcType type) {
|
||||
case MBC3_TIMER_BATTERY:
|
||||
case MBC5:
|
||||
case MBC5_RUMBLE:
|
||||
case MBC6: // TODO: not sure
|
||||
case BANDAI_TAMA5: // TODO: not sure
|
||||
case BANDAI_TAMA5: // "Game de Hakken!! Tamagotchi - Osutchi to Mesutchi" has RAM size 0
|
||||
case MBC_NONE:
|
||||
case MBC_BAD:
|
||||
case MBC_WRONG_FEATURES:
|
||||
@@ -741,6 +740,7 @@ static bool hasRAM(MbcType type) {
|
||||
case MBC5_RAM_BATTERY:
|
||||
case MBC5_RUMBLE_RAM:
|
||||
case MBC5_RUMBLE_RAM_BATTERY:
|
||||
case MBC6: // "Net de Get - Minigame @ 100" has RAM size 3 (32 KiB)
|
||||
case MBC7_SENSOR_RUMBLE_RAM_BATTERY:
|
||||
case POCKET_CAMERA:
|
||||
case HUC3:
|
||||
@@ -1276,7 +1276,7 @@ static bool processFilename(char const *name, char const *outputName) {
|
||||
// LCOV_EXCL_START
|
||||
report("FATAL: Failed to stat \"%s\": %s\n", name, strerror(errno));
|
||||
// LCOV_EXCL_STOP
|
||||
} else if (!S_ISREG(stat.st_mode)) { // TODO: Do we want to support FIFOs or symlinks?
|
||||
} else if (!S_ISREG(stat.st_mode)) { // We do not support FIFOs or symlinks
|
||||
// LCOV_EXCL_START
|
||||
report(
|
||||
"FATAL: \"%s\" is not a regular file, and thus cannot be modified in-place\n",
|
||||
@@ -1531,7 +1531,7 @@ int main(int argc, char *argv[]) {
|
||||
"warning: RAM size 1 (2 KiB) was specified for MBC \"%s\"\n",
|
||||
mbcName(cartridgeType)
|
||||
);
|
||||
} // TODO: check possible values?
|
||||
}
|
||||
} else if (ramSize) {
|
||||
fprintf(
|
||||
stderr,
|
||||
|
||||
@@ -451,9 +451,9 @@ static char *parseArgv(int argc, char *argv[]) {
|
||||
} else {
|
||||
options.palSpecType = Options::EXPLICIT;
|
||||
// Can't parse the file yet, as "flat" color collections need to know the palette
|
||||
// size to be split; thus, we defer that
|
||||
// TODO: this does not validate the `fmt` part of any external spec but the last
|
||||
// one, but I guess that's okay
|
||||
// size to be split; thus, we defer that.
|
||||
// If a following `-c` overrides a previous one, the `fmt` part of an overridden
|
||||
// external palette spec will not be validated, but I guess that's okay.
|
||||
localOptions.externalPalSpec = musl_optarg;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -211,11 +211,6 @@ public:
|
||||
png_set_read_fn(png, this, readData);
|
||||
png_set_sig_bytes(png, pngHeader.size());
|
||||
|
||||
// TODO: png_set_crc_action(png, PNG_CRC_ERROR_QUIT, PNG_CRC_WARN_DISCARD);
|
||||
|
||||
// Skipping chunks we don't use should improve performance
|
||||
// TODO: png_set_keep_unknown_chunks(png, ...);
|
||||
|
||||
// Process all chunks up to but not including the image data
|
||||
png_read_info(png, info);
|
||||
|
||||
@@ -294,9 +289,7 @@ public:
|
||||
options.verbosePrint(Options::VERB_INTERM, "No embedded palette\n");
|
||||
}
|
||||
|
||||
// Set up transformations; to turn everything into RGBA888
|
||||
// TODO: it's not necessary to uniformize the pixel data (in theory), and not doing
|
||||
// so *might* improve performance, and should reduce memory usage.
|
||||
// Set up transformations to turn everything into RGBA888 for simplicity of handling
|
||||
|
||||
// Convert grayscale to RGB
|
||||
switch (colorType & ~PNG_COLOR_MASK_ALPHA) {
|
||||
@@ -559,7 +552,6 @@ static void generatePalSpec(Png const &png) {
|
||||
static std::tuple<DefaultInitVec<size_t>, std::vector<Palette>>
|
||||
generatePalettes(std::vector<ProtoPalette> const &protoPalettes, Png const &png) {
|
||||
// Run a "pagination" problem solver
|
||||
// TODO: allow picking one of several solvers?
|
||||
auto [mappings, nbPalettes] = overloadAndRemove(protoPalettes);
|
||||
assume(mappings.size() == protoPalettes.size());
|
||||
|
||||
|
||||
@@ -195,8 +195,6 @@ void reverse() {
|
||||
Options::VERB_INTERM, "Reversed image dimensions: %zux%zu tiles\n", width, height
|
||||
);
|
||||
|
||||
// TODO: `-U` to configure tile size beyond 8x8px ("deduplication units")
|
||||
|
||||
std::vector<std::array<std::optional<Rgba>, 4>> palettes{
|
||||
{Rgba(0xFFFFFFFF), Rgba(0xAAAAAAFF), Rgba(0x555555FF), Rgba(0x000000FF)}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user