Cleanup, copyright notice, GPL headers
This commit is contained in:
parent
49bf4b4cff
commit
aeeaab0ad7
7 changed files with 127 additions and 15 deletions
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright Luka Jankovic 2025
|
||||||
|
*
|
||||||
|
* This file is part of Kubo.
|
||||||
|
*
|
||||||
|
* Kubo 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.
|
||||||
|
*
|
||||||
|
* Kubo 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
|
||||||
|
* Kubo. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "kubo_context.h"
|
#include "kubo_context.h"
|
||||||
|
|
||||||
struct kubo_context *kubo_context_init() {
|
struct kubo_context *kubo_context_init() {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright Luka Jankovic 2025
|
||||||
|
*
|
||||||
|
* This file is part of Kubo.
|
||||||
|
*
|
||||||
|
* Kubo 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.
|
||||||
|
*
|
||||||
|
* Kubo 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
|
||||||
|
* Kubo. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef KUBO_CONTEXT_H
|
#ifndef KUBO_CONTEXT_H
|
||||||
#define KUBO_CONTEXT_H
|
#define KUBO_CONTEXT_H
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright Luka Jankovic 2025
|
||||||
|
*
|
||||||
|
* This file is part of Kubo.
|
||||||
|
*
|
||||||
|
* Kubo 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.
|
||||||
|
*
|
||||||
|
* Kubo 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
|
||||||
|
* Kubo. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef KUBO_DYNARRAY_H
|
#ifndef KUBO_DYNARRAY_H
|
||||||
#define KUBO_DYNARRAY_H
|
#define KUBO_DYNARRAY_H
|
||||||
|
|
||||||
|
|
|
||||||
18
kubo_wall.c
18
kubo_wall.c
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright Luka Jankovic 2025
|
||||||
|
*
|
||||||
|
* This file is part of Kubo.
|
||||||
|
*
|
||||||
|
* Kubo 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.
|
||||||
|
*
|
||||||
|
* Kubo 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
|
||||||
|
* Kubo. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "kubo_wall.h"
|
#include "kubo_wall.h"
|
||||||
|
|
||||||
struct kubo_wall *kubo_wall_init() {
|
struct kubo_wall *kubo_wall_init() {
|
||||||
|
|
|
||||||
18
kubo_wall.h
18
kubo_wall.h
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright Luka Jankovic 2025
|
||||||
|
*
|
||||||
|
* This file is part of Kubo.
|
||||||
|
*
|
||||||
|
* Kubo 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.
|
||||||
|
*
|
||||||
|
* Kubo 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
|
||||||
|
* Kubo. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef KUBO_WALL_H
|
#ifndef KUBO_WALL_H
|
||||||
#define KUBO_WALL_H
|
#define KUBO_WALL_H
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright Luka Jankovic 2025
|
||||||
|
*
|
||||||
|
* This file is part of Kubo.
|
||||||
|
*
|
||||||
|
* Kubo 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.
|
||||||
|
*
|
||||||
|
* Kubo 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
|
||||||
|
* Kubo. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "kubo_window.h"
|
#include "kubo_window.h"
|
||||||
|
|
||||||
void kubo_window_init(struct kubo_context *context) {
|
void kubo_window_init(struct kubo_context *context) {
|
||||||
|
|
@ -16,24 +34,10 @@ void kubo_window_tick(struct kubo_context *context) {
|
||||||
kubo_window_input(context);
|
kubo_window_input(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector2 start;
|
|
||||||
Vector2 end;
|
|
||||||
int state;
|
|
||||||
|
|
||||||
void kubo_window_render(struct kubo_context *context) {
|
void kubo_window_render(struct kubo_context *context) {
|
||||||
BeginDrawing();
|
BeginDrawing();
|
||||||
ClearBackground(WHITE);
|
ClearBackground(WHITE);
|
||||||
|
|
||||||
if (state == 1) {
|
|
||||||
Vector2 mouse_pos = GetMousePosition();
|
|
||||||
Vector2 points[] = {start, mouse_pos};
|
|
||||||
DrawSplineLinear(points, 2, 10.f, BLACK);
|
|
||||||
} else if (state == 2) {
|
|
||||||
Vector2 mouse_pos = GetMousePosition();
|
|
||||||
Vector2 points[] = {start, end};
|
|
||||||
DrawSplineLinear(points, 2, 10.f, BLACK);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < context->walls.count; i++) {
|
for (int i = 0; i < context->walls.count; i++) {
|
||||||
struct kubo_wall *wall = kubo_wall_arr_get(&context->walls, i);
|
struct kubo_wall *wall = kubo_wall_arr_get(&context->walls, i);
|
||||||
assert(wall != NULL);
|
assert(wall != NULL);
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,26 @@
|
||||||
|
/*
|
||||||
|
* Copyright Luka Jankovic 2025
|
||||||
|
*
|
||||||
|
* This file is part of Kubo.
|
||||||
|
*
|
||||||
|
* Kubo 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.
|
||||||
|
*
|
||||||
|
* Kubo 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
|
||||||
|
* Kubo. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef KUBO_WINDOW_H
|
#ifndef KUBO_WINDOW_H
|
||||||
#define KUBO_WINDOW_H
|
#define KUBO_WINDOW_H
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <raylib.h>
|
#include <raylib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "kubo_context.h"
|
#include "kubo_context.h"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue