+// rrrr rggg gggb bbbb
+static unsigned short fname2color(const char *fname)
+{
+ const char *ext = fname + strlen(fname) - 3;
+ static const char *rom_exts[] = { "zip", "bin", "smd", "gen", "iso", "cso", "cue" };
+ static const char *other_exts[] = { "gmv", "pat" };
+ int i;
+
+ if (ext < fname) ext = fname;
+ for (i = 0; i < array_size(rom_exts); i++)
+ if (strcasecmp(ext, rom_exts[i]) == 0) return 0xbdff; // FIXME: mk defines
+ for (i = 0; i < array_size(other_exts); i++)
+ if (strcasecmp(ext, other_exts[i]) == 0) return 0xaff5;
+ return 0xffff;
+}
+
+static const char *filter_exts[] = {
+ ".mp3", ".MP3", ".srm", ".brm", "s.gz", ".mds", "bcfg", ".txt", ".htm", "html",
+ ".jpg", ".gpe"
+};
+