mirror of https://git.sr.ht/~kikoodx/momento
32 lines
786 B
C
32 lines
786 B
C
/* SPDX-License-Identifier: GPL-3.0-or-later */
|
|
/* Copyright (C) 2021 KikooDX */
|
|
#pragma once
|
|
|
|
#include <libimg.h>
|
|
|
|
#define MAX_PARTICLES 64
|
|
|
|
struct Particle {
|
|
img_t *texture;
|
|
int x;
|
|
int y;
|
|
int frame_width;
|
|
int frame_height;
|
|
int frame_duration;
|
|
int frame;
|
|
int life_ini;
|
|
int life;
|
|
int looping;
|
|
int flip_h;
|
|
};
|
|
|
|
void particles_init(void);
|
|
void particles_update(void);
|
|
void particle_update(struct Particle *particle);
|
|
void particles_draw(void);
|
|
void particle_draw(struct Particle particle);
|
|
void particle_create(img_t *texture, int x, int y, int frame_width,
|
|
int frame_duration, int looping, int flip_h);
|
|
struct Particle particle_init(img_t *texture, int x, int y, int frame_width,
|
|
int frame_duration, int looping, int flip_h);
|