Add love.filesystem.mountFullPath.

This commit is contained in:
Alex Szpakowski
2020-10-03 19:28:57 -03:00
parent dcf0968f05
commit 0706b6243c
13 changed files with 494 additions and 208 deletions
+15
View File
@@ -197,6 +197,21 @@ bool getConstant(const char *in, type &out) { return name##s.find(in, out); } \
bool getConstant(type in, const char *&out) { return name##s.find(in, out); } \
std::vector<std::string> getConstants(type) { return name##s.getNames(); }
#define STRINGMAP_CLASS_DECLARE(type) \
static bool getConstant(const char *in, type &out); \
static bool getConstant(type in, const char *&out); \
static std::vector<std::string> getConstants(type); \
#define STRINGMAP_CLASS_BEGIN(classname, type, count, name) \
static StringMap<type, count>::Entry name##Entries[] =
#define STRINGMAP_CLASS_END(classname, type, count, name) \
; \
static StringMap<type, count> name##s(name##Entries, sizeof(name##Entries)); \
bool classname::getConstant(const char *in, type &out) { return name##s.find(in, out); } \
bool classname::getConstant(type in, const char *&out) { return name##s.find(in, out); } \
std::vector<std::string> classname::getConstants(type) { return name##s.getNames(); }
} // love
#endif // LOVE_STRING_MAP_H