Skip to content

Instantly share code, notes, and snippets.

@Ancurio
Created May 19, 2014 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ancurio/b1897c8650469acb34f4 to your computer and use it in GitHub Desktop.
Save Ancurio/b1897c8650469acb34f4 to your computer and use it in GitHub Desktop.
Print available asset decoders in mkxp
diff --git a/src/debugwriter.h b/src/debugwriter.h
index 27244d1..c7b10ed 100644
--- a/src/debugwriter.h
+++ b/src/debugwriter.h
@@ -24,6 +24,7 @@
#include <iostream>
#include <sstream>
+#include <vector>
/* A cheap replacement for qDebug() */
@@ -44,6 +45,15 @@ public:
return *this;
}
+ template<typename T>
+ Debug &operator<<(const std::vector<T> &v)
+ {
+ for (size_t i = 0; i < v.size(); ++i)
+ buf << v[i] << " ";
+
+ return *this;
+ }
+
~Debug()
{
std::clog << buf.str() << std::endl;
diff --git a/src/filesystem.cpp b/src/filesystem.cpp
index 6a731ce..6b5e57f 100644
--- a/src/filesystem.cpp
+++ b/src/filesystem.cpp
@@ -801,6 +801,11 @@ FileSystem::FileSystem(const char *argv0,
p->extensions[Font].push_back("ttf");
p->extensions[Font].push_back("otf");
+ Debug() << "Available decoders:";
+ Debug() << "Image:" << p->extensions[Image];
+ Debug() << "Audio:" << p->extensions[Audio];
+ Debug() << "Font: " << p->extensions[Font];
+
PHYSFS_init(argv0);
PHYSFS_registerArchiver(&RGSS_Archiver);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment