26 lines
528 B
C
26 lines
528 B
C
![]() |
|
||
|
#include <stdio.h>
|
||
|
#include <glad/glad.h>
|
||
|
#include <GLFW/glfw3.h>
|
||
|
#include <math.h>
|
||
|
|
||
|
#include "game.h"
|
||
|
|
||
|
void character_callback(GLFWwindow* window, unsigned int codepoint) {
|
||
|
printf("%c\n", codepoint);
|
||
|
}
|
||
|
|
||
|
void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) {
|
||
|
if (action != GLFW_PRESS) return;
|
||
|
switch (key) {
|
||
|
case GLFW_KEY_ENTER:
|
||
|
break;
|
||
|
case GLFW_KEY_BACKSPACE:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void draw_image(decoded_image img) {
|
||
|
for (int i = 0; i < img.buf_size; i++) img.buf[i] = i;
|
||
|
}
|