diff --git a/config.h b/game_data.h similarity index 96% rename from config.h rename to game_data.h index 22ffa1e..856be63 100644 --- a/config.h +++ b/game_data.h @@ -1,3 +1,5 @@ +#pragma once + #define ANIM_KNIGHT_IDLE 0 #define ANIM_KNIGHT_RUN 1 #define ANIM_KNIGHT_ATTACK_SIDE1 2 @@ -51,7 +53,7 @@ SpriteAnimation knight_attack_front2 = { .src_rect = { 0, cell_size * 5, 192, 192 }, }; -SpriteAnimation knight_attack_back1 = { +Spriteanimation knight_attack_back1 = { .name = "attack_back1", .total_frames = 6, .src_rect = { 0, cell_size * 6, 192, 192 }, diff --git a/main.c b/main.c index 9ea50a2..d759c31 100644 --- a/main.c +++ b/main.c @@ -4,13 +4,13 @@ #include #define TEXTURES_BUF_SIZE 16 -#define TARGET_FPS 120 +#define TARGET_FPS 60 #define ANIM_SPEED 8 #define MAX_ANIMATION_PLAYBACKS 64 #include "sprites.h" #include "lib.h" -#include "config.h" +#include "game_data.h" typedef struct { int frame_count;