Restructure things for yaml config management

This commit is contained in:
Joseph Ferano 2023-10-16 18:22:31 +07:00
parent 286eca58d6
commit 3d6df47541
15 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,8 @@
animations:
- name: run_cycle
x_pos: 0
y_pos: 0
rows: 1
cols: 8
width: 384
height: 48

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1021 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

12
main.c
View File

@ -6,6 +6,7 @@
#include "cglm/cglm.h"
#include "lib.h"
#include "stb_image.h"
#include "libcyaml/include/cyaml/cyaml.h"
#define PI 3.14159f
@ -19,6 +20,17 @@ typedef struct State {
float py;
} State;
typedef struct Animation {
char* name;
u16 x_pos;
u16 y_pos;
u16 rows;
u16 cols;
u16 width;
u16 height;
} SpriteSheet;
void framebuffer_size_callback(GLFWwindow* window, int width, int height) {
(void)window;
glViewport(0, 0, width, height);