Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.