This commit is contained in:
nastys
2019-07-30 13:48:28 +02:00
parent 17b6c02aee
commit d1349cfebe
157 changed files with 0 additions and 0 deletions
@@ -0,0 +1,40 @@
#include "framework.h"
#include <filesystem>
namespace TLAC
{
typedef std::filesystem::path fspath;
std::string *framework::moduleDirectory;
const wchar_t* framework::DivaWindowName = L"Hatsune Miku Project DIVA Arcade Future Tone";
const wchar_t* framework::GlutDefaultName = L"GLUT";
const wchar_t* framework::freeGlutDefaultName = L"FREEGLUT";
HWND framework::DivaWindowHandle;
HMODULE framework::Module;
bool framework::inputDisable = false;
std::string framework::GetModuleDirectory()
{
if (moduleDirectory == nullptr)
{
WCHAR modulePathBuffer[MAX_PATH];
GetModuleFileNameW(framework::Module, modulePathBuffer, MAX_PATH);
fspath configPath = fspath(modulePathBuffer).parent_path();
moduleDirectory = new std::string(configPath.u8string());
}
return *moduleDirectory;
}
RECT framework::GetWindowBounds()
{
RECT windowRect;
GetWindowRect(DivaWindowHandle, &windowRect);
return windowRect;
}
}