Rename config.h to game_data.h

This commit is contained in:
Joseph Ferano 2023-12-31 23:02:19 +07:00
parent b3cd3e65f7
commit a0126529de
2 changed files with 5 additions and 3 deletions

View File

@ -1,3 +1,5 @@
#pragma once
#define ANIM_KNIGHT_IDLE 0 #define ANIM_KNIGHT_IDLE 0
#define ANIM_KNIGHT_RUN 1 #define ANIM_KNIGHT_RUN 1
#define ANIM_KNIGHT_ATTACK_SIDE1 2 #define ANIM_KNIGHT_ATTACK_SIDE1 2
@ -51,7 +53,7 @@ SpriteAnimation knight_attack_front2 = {
.src_rect = { 0, cell_size * 5, 192, 192 }, .src_rect = { 0, cell_size * 5, 192, 192 },
}; };
SpriteAnimation knight_attack_back1 = { Spriteanimation knight_attack_back1 = {
.name = "attack_back1", .name = "attack_back1",
.total_frames = 6, .total_frames = 6,
.src_rect = { 0, cell_size * 6, 192, 192 }, .src_rect = { 0, cell_size * 6, 192, 192 },

4
main.c
View File

@ -4,13 +4,13 @@
#include <stdbool.h> #include <stdbool.h>
#define TEXTURES_BUF_SIZE 16 #define TEXTURES_BUF_SIZE 16
#define TARGET_FPS 120 #define TARGET_FPS 60
#define ANIM_SPEED 8 #define ANIM_SPEED 8
#define MAX_ANIMATION_PLAYBACKS 64 #define MAX_ANIMATION_PLAYBACKS 64
#include "sprites.h" #include "sprites.h"
#include "lib.h" #include "lib.h"
#include "config.h" #include "game_data.h"
typedef struct { typedef struct {
int frame_count; int frame_count;