mirror of https://git.sr.ht/~kikoodx/momento
24 lines
449 B
C
24 lines
449 B
C
/* SPDX-License-Identifier: GPL-3.0-or-later */
|
|
/* Copyright (C) 2021 KikooDX */
|
|
#pragma once
|
|
|
|
#include "player.h"
|
|
#include <libimg.h>
|
|
|
|
#define TRAIL_LIFE 9
|
|
#define TRAIL_FRAMES 3
|
|
#define TRAIL_SIZE 10
|
|
#define TRAIL_FRAME_DURATION (TRAIL_LIFE / TRAIL_FRAMES)
|
|
|
|
struct Trail {
|
|
int x;
|
|
int y;
|
|
int life;
|
|
int frame;
|
|
color_t color;
|
|
};
|
|
|
|
void trail_init(void);
|
|
void trail_update(struct Player player);
|
|
void trail_draw(void);
|