扩展
路径 paths
查看 Markdown游戏目录与 ASI 目录路径
Paths.h · plugin::paths
多数接口返回 静态缓冲,下一次调用会覆盖。需要长期保存时拷到 std::string。
窄字符:游戏根目录与本 ASI 所在目录。
static void GetGameDirPathA(char* out);
static const char* GetGameDirPathA();
static void GetPluginDirPathA(char* out);
static const char* GetPluginDirPathA();static void GetGameDirPathW(wchar_t* out);
static const wchar_t* GetGameDirPathW();
static void GetPluginDirPathW(wchar_t* out);
static const wchar_t* GetPluginDirPathW();根目录 + 相对子路径。也有写入外部缓冲的重载。
static const char* GetGameDirRelativePathA(const char* substring);
static const char* GetPluginDirRelativePathA(const char* substring);static const wchar_t* GetGameDirRelativePathW(const wchar_t* subpath);
static const wchar_t* GetPluginDirRelativePathW(const wchar_t* subpath);static const char* GetDirPath(const char* substring, ePathDir dir);
enum ePathDir { DirAbsolute, DirGame, DirPlugin };static const char* GetPluginFileNameA();
static const wchar_t* GetPluginFileNameW();日常写 ini / 资源路径最省事:
GAME_PATH("data\\x.ini")
PLUGIN_PATH("config.ini")
PLUGIN_FILENAME
评论