char *arg = _argv[i];
while (*arg == '-')
arg++;
- if (strcasecmp(arg, cmd) == 0)
+ if (stricmp(arg, cmd) == 0)
return true;
}
char *arg = _argv[i];
while (*arg == '-')
arg++;
- if (stricmp(arg, cmd) == 0)
+ if (strcasecmp(arg, cmd) == 0)
return true;
}
#if !USE_DEVIL
+#ifdef _WIN32
static bool load_image(const char *file_name, TGAImageRec &tex)
{
char *ptr = strrchr((char *)file_name, '.');
STUBBED("Unsupported image type");
return false;
}
+#else
+static bool load_image(const char *file_name, TGAImageRec &tex)
+{
+ char *ptr = strrchr((char *)file_name, '.');
+ if (ptr)
+ {
+ if (strcasecmp(ptr+1, "png") == 0)
+ return load_png(file_name, tex);
+ else if (strcasecmp(ptr+1, "jpg") == 0)
+ return load_jpg(file_name, tex);
+ }
+
+ STUBBED("Unsupported image type");
+ return false;
+}
+#endif
struct my_error_mgr {
}
+#ifdef _WIN32
static bool save_image(const char *file_name)
{
char *ptr = strrchr((char *)file_name, '.');
STUBBED("Unsupported image type");
return false;
}
+#else
+static bool save_image(const char *file_name)
+{
+ char *ptr = strrchr((char *)file_name, '.');
+ if (ptr)
+ {
+ if (strcasecmp(ptr+1, "png") == 0)
+ return save_png(file_name);
+ }
+
+ STUBBED("Unsupported image type");
+ return false;
+}
+#endif
static bool save_png(const char *file_name)