69 lines
1.6 KiB
C
69 lines
1.6 KiB
C
#pragma once
|
|
|
|
#define ANIM_KNIGHT_IDLE 0
|
|
#define ANIM_KNIGHT_RUN 1
|
|
#define ANIM_KNIGHT_ATTACK_SIDE1 2
|
|
#define ANIM_KNIGHT_ATTACK_SIDE2 3
|
|
#define ANIM_KNIGHT_ATTACK_TOP1 4
|
|
#define ANIM_KNIGHT_ATTACK_TOP2 5
|
|
#define ANIM_KNIGHT_ATTACK_BACK1 6
|
|
#define ANIM_KNIGHT_ATTACK_BACK2 7
|
|
|
|
SpriteSheet knight = {
|
|
.name = "blue_knight",
|
|
.texture = {0},
|
|
// .anim_count = 8,
|
|
.size = { 1152, 1536 },
|
|
};
|
|
|
|
const u16 cell_size = 192;
|
|
SpriteAnimation knight_idle = {
|
|
.name = "idle",
|
|
.total_frames = 6,
|
|
.src_rect = { 0, cell_size * 0, 192, 192 },
|
|
};
|
|
|
|
SpriteAnimation knight_run = {
|
|
.name = "run",
|
|
.total_frames = 6,
|
|
.src_rect = { 0, cell_size * 1, 192, 192 },
|
|
};
|
|
|
|
SpriteAnimation knight_attack_side1 = {
|
|
.name = "attack_side1",
|
|
.total_frames = 6,
|
|
.src_rect = { 0, cell_size * 2, 192, 192 },
|
|
};
|
|
|
|
SpriteAnimation knight_attack_side2 = {
|
|
.name = "attack_side2",
|
|
.total_frames = 6,
|
|
.src_rect = { 0, cell_size * 3, 192, 192 },
|
|
};
|
|
|
|
SpriteAnimation knight_attack_front1 = {
|
|
.name = "attack_front1",
|
|
.total_frames = 6,
|
|
.src_rect = { 0, cell_size * 4, 192, 192 },
|
|
};
|
|
|
|
SpriteAnimation knight_attack_front2 = {
|
|
.name = "attack_front2",
|
|
.total_frames = 6,
|
|
.src_rect = { 0, cell_size * 5, 192, 192 },
|
|
};
|
|
|
|
Spriteanimation knight_attack_back1 = {
|
|
.name = "attack_back1",
|
|
.total_frames = 6,
|
|
.src_rect = { 0, cell_size * 6, 192, 192 },
|
|
};
|
|
|
|
SpriteAnimation knight_attack_back2 = {
|
|
.name = "attack_back2",
|
|
.total_frames = 6,
|
|
.src_rect = { 0, cell_size * 7, 192, 192 },
|
|
};
|
|
|
|
SpriteAnimation knight_anims[8];
|