#pragma once

#define KEK_SUCCESS 0
#define KEK_ERROR 1

#define KEK_MESH_VERTEX_SHADER_IN_POSITION 0
#define KEK_MESH_VERTEX_SHADER_IN_NORMAL 1
#define KEK_MESH_VERTEX_SHADER_IN_TEXCOORD 2
#define KEK_MESH_VERTEX_BUFFER_BINDING 0

#define KEK_UI_RECT_VERTEX_SHADER_IN_POSITION 0
#define KEK_UI_VERTEX_BUFFER_BINDING 0

#define KEK_UNIFORM_LIGHTS_BINDING 0

#define KEK_LIGHT_LIMIT 64 // Also in shader/include/constants.glsl

#define KEK_LIGHT_MAX_DISTANCE 50
#define KEK_LIGHT_MAX_DISTANCE_SQUARED (KEK_LIGHT_MAX_DISTANCE * KEK_LIGHT_MAX_DISTANCE)

#define KEK_NOCLIP_SPEED 10.0f

#define KEK_CAMERA_NEAR 0.1f
#define KEK_CAMERA_FAR 100.0f

#define KEK_LIGHT_DEFAULT_AMBIENT_STRENGTH 0.05f
#define KEK_LIGHT_DEFAULT_SPECULAR_STRENGTH 0.1f

#define KEK_INVALID_KEY_BINDING_NAME "INVALID"
#define KEK_INVALID_ID -1u

#define KEK_FONT_RESOLUTION 64
#define KEK_FONT_BITMAP_WIDTH_BLOCKS 16
#define KEK_FONT_BITMAP_HEIGHT_BLOCKS 16
#define KEK_FONT_BITMAP_WIDTH (KEK_FONT_BITMAP_WIDTH_BLOCKS * KEK_FONT_RESOLUTION)
#define KEK_FONT_BITMAP_HEIGHT (KEK_FONT_BITMAP_HEIGHT_BLOCKS * KEK_FONT_RESOLUTION)
#define KEK_FONT_BITMAP_CHAR_BITS 8 // = ceil(log2(KEK_FONT_BITMAP_WIDTH_BLOCKS * KEK_FONT_BITMAP_HEIGHT_BLOCKS))
#define KEK_FONT_BITMAP_CHAR_MASK 0xFF // = KEK_FONT_BITMAP_CHAR_BITS 1s in binary
#define KEK_TEXT_BLOCK_SIZE 8

#define KEK_DEFAULT_FONT "font/MaredivRegular-yeg3.ttf"
#define KEK_DEFAULT_FONT_SIZE_PIXELS 24

#define KEK_INPUT_DELETE -1u

#define KEK_PLAYER_HEIGHT 2
#define KEK_PLAYER_RADIUS 0.5f
#define KEK_PLAYER_EYE_OFFSET (KEK_PLAYER_HEIGHT / 2 - KEK_PLAYER_RADIUS)
#define KEK_PLAYER_MASS 50
