From af265fb300ce5b5768cf38c69b83d4d251cb88c7 Mon Sep 17 00:00:00 2001 From: iWas-Coder Date: Sat, 29 Jun 2024 15:29:27 +0200 Subject: [PATCH] Started engine abstraction layer (`sk_engine`) --- include/sk_engine.h | 26 ++++++++++++++++++++++++++ src/sk_engine_raylib.c | 27 +++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 include/sk_engine.h create mode 100644 src/sk_engine_raylib.c diff --git a/include/sk_engine.h b/include/sk_engine.h new file mode 100644 index 0000000..f7f9865 --- /dev/null +++ b/include/sk_engine.h @@ -0,0 +1,26 @@ +/* + * GNU Sparky --- A 5v5 character-based libre tactical shooter + * Copyright (C) 2024 Wasym A. Alonso + * + * This file is part of Sparky. + * + * Sparky is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Sparky is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Sparky. If not, see . + */ + + +#pragma once + +#include + +void sk_engine_init_window(u32 width, u32 height, const char *title); diff --git a/src/sk_engine_raylib.c b/src/sk_engine_raylib.c new file mode 100644 index 0000000..3d102f4 --- /dev/null +++ b/src/sk_engine_raylib.c @@ -0,0 +1,27 @@ +/* + * GNU Sparky --- A 5v5 character-based libre tactical shooter + * Copyright (C) 2024 Wasym A. Alonso + * + * This file is part of Sparky. + * + * Sparky is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Sparky is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Sparky. If not, see . + */ + + +#include +#include + +void sk_engine_init_window(u32 width, u32 height, const char *title) { + InitWindow(width, height, title); +}