summary refs log tree commit diff
path: root/src/Support.cpp
blob: 850d0bbccc47d0b5eb14e27d07b80a8471838664 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdbool.h>
#include <stdlib.h>

#include <GLFW/glfw3.h>

#include "Support.h"

int Random()
{
	return (rand() % 65535) - 32767;
}

bool IsKeyDown(int key)
{
	const auto window = glfwGetCurrentContext();
	return glfwGetKey(window, key) == GLFW_PRESS;
}