large spatial / numerics refactor to allow double/integer vector types

This commit is contained in:
Noel Berry
2021-12-12 20:41:23 -08:00
parent 8f9c6aa9ff
commit d91658aa46
53 changed files with 1842 additions and 2056 deletions

View File

@ -261,8 +261,8 @@ void Platform::update(InputState& state)
SDL_GetGlobalMouseState(&x, &y);
state.mouse.on_move(
Vec2((float)(x - win_x), (float)(y - win_y)),
Vec2((float)x, (float)y));
Vec2f((float)(x - win_x), (float)(y - win_y)),
Vec2f((float)x, (float)y));
}
// poll normal events
@ -722,6 +722,17 @@ void Platform::dir_explore(const char* path)
#endif
// clipboard
void Platform::set_clipboard(const char* text)
{
SDL_SetClipboardText(text);
}
const char* Platform::get_clipboard()
{
return SDL_GetClipboardText();
}
void* Platform::gl_get_func(const char* name)
{
return SDL_GL_GetProcAddress(name);