<commit_before>#ifndef __core_h__
#define __core_h__

#define CT_MAX_TARGET_STACK_SIZE  32
#define CT_MAX_BLEND_STACK_SIZE   32
#define CT_MAX_COLOUR_STACK_SIZE  32
#define CT_MAX_INPUT_STACK_SIZE   8

#include <stdio.h>

typedef struct _DV_Vector DV_Vector;
typedef enum _CT_Key CT_Key;
typedef struct SDL_Surface SDL_Surface;
typedef struct SDL_Window SDL_Window;
typedef struct SDL_RWops SDL_RWops;
typedef struct _TTF_Font TTF_Font;

typedef struct _CT_Image
{
	SDL_Surface* sdl_surface;
} CT_Image;

typedef struct _CT_Texture
{
	unsigned w, h;
	unsigned gl_texture_id;
	unsigned gl_buffer_id;
} CT_Texture;

typedef struct
{
	SDL_Window* sdl_window;
	const char* title;
	int fullscreen;
	int is_size_changed;
} CT_Window;

typedef struct _CT_Batch
{
	DV_Vector* vector;
	unsigned short* indices;
	CT_Texture* atlas;
} CT_Batch;

typedef struct _CT_Transformation
{
	float src_rect[4];
	float dst_rect[4];
	float origin[2];
	float rotation;
	float flip_h, flip_v; /* positive = true, negative = false */
} CT_Transformation;

typedef struct _CT_Font
{
	FILE* file;
	SDL_RWops* rw;

	struct CT_FontMapLink
	{
		unsigned size;
		TTF_Font* value;
		struct CT_FontMapLink* next;
	} font_map;

	struct CT_FontMapLink* first;
	
} CT_Font;

/* Error */

extern const char* ct_get_error();

extern void ct_set_error(const char* str);

/* Window */

extern int ct_window_init();

extern void ct_window_quit();

extern void ct_window_res_set(int x, int y);

extern void ct_window_fullscreen_set(int fullscreen);

extern void ct_window_update();

extern void ct_window_clear();

/* Image */

extern CT_Image* ct_image_load(const char* filename);

extern CT_Image* ct_image_create(unsigned w, unsigned h);

extern void ct_image_free(CT_Image* image);

extern void ct_image_size(CT_Image* image, float* vect);

/* Colour */

extern void ct_colour_push(float* colour);

extern void ct_colour_pop();

/* Blending */

typedef enum _CT_BlendMode
{<commit_msg>added colour to window clear function<commit_after>#ifndef __core_h__
#define __core_h__

#define CT_MAX_TARGET_STACK_SIZE  32
#define CT_MAX_BLEND_STACK_SIZE   32
#define CT_MAX_COLOUR_STACK_SIZE  32
#define CT_MAX_INPUT_STACK_SIZE   8

#include <stdio.h>

typedef struct _DV_Vector DV_Vector;
typedef enum _CT_Key CT_Key;
typedef struct SDL_Surface SDL_Surface;
typedef struct SDL_Window SDL_Window;
typedef struct SDL_RWops SDL_RWops;
typedef struct _TTF_Font TTF_Font;

typedef struct _CT_Image
{
	SDL_Surface* sdl_surface;
} CT_Image;

typedef struct _CT_Texture
{
	unsigned w, h;
	unsigned gl_texture_id;
	unsigned gl_buffer_id;
} CT_Texture;

typedef struct
{
	SDL_Window* sdl_window;
	const char* title;
	int fullscreen;
	int is_size_changed;
} CT_Window;

typedef struct _CT_Batch
{
	DV_Vector* vector;
	unsigned short* indices;
	CT_Texture* atlas;
} CT_Batch;

typedef struct _CT_Transformation
{
	float src_rect[4];
	float dst_rect[4];
	float origin[2];
	float rotation;
	float flip_h, flip_v; /* positive = true, negative = false */
} CT_Transformation;

typedef struct _CT_Font
{
	FILE* file;
	SDL_RWops* rw;

	struct CT_FontMapLink
	{
		unsigned size;
		TTF_Font* value;
		struct CT_FontMapLink* next;
	} font_map;

	struct CT_FontMapLink* first;
	
} CT_Font;

/* Error */

extern const char* ct_get_error();

extern void ct_set_error(const char* str);

/* Window */

extern int ct_window_init();

extern void ct_window_quit();

extern void ct_window_res_set(int x, int y);

extern void ct_window_fullscreen_set(int fullscreen);

extern void ct_window_update();

extern void ct_window_clear(float* colour);

/* Image */

extern CT_Image* ct_image_load(const char* filename);

extern CT_Image* ct_image_create(unsigned w, unsigned h);

extern void ct_image_free(CT_Image* image);

extern void ct_image_size(CT_Image* image, float* vect);

/* Colour */

extern void ct_colour_push(float* colour);

extern void ct_colour_pop();

/* Blending */

typedef enum _CT_BlendMode
{
{'fraction_non_alphanumeric': 0.08318494021877385, 'fraction_numerical': 0.005087763927753753, 'mean_word_length': 5.542429284525791, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1602728', 'n_tokens_mistral': 1590, 'n_tokens_neox': 1429, 'n_words': 384}