#pragma once
#include "physics.h"
#include "opengl.h"

#define SPFX_LAYER_FRONT  0 /* Front spfx layer. */
#define SPFX_LAYER_BACK   1 /* Back spfx layer. */

#define SHAKE_DECAY 300. /**< Rumble decay parameter. */
#define SHAKE_MAX   75.*SCREEN_W*SCREEN_H/1024./768. /**< Rubmle max parameter. */

/* Stack manipulation. */
int spfx_get(char* name);
void spfx_add(const int effect,
              const double px, const double py,
              const double vx, const double vy,
              const int layer);

/* Stack mass manipulation functions. */
void spfx_update(const double dt);
void spfx_render(const int layer);
void spfx_clear(void);

/* Get ready to rumble! */
void spfx_start(const double dt);
void spfx_shake(double mod);

/* Other effects. */
void spfx_cinematic(void);

/* Load/free. */
int spfx_load(void);
void spfx_free(void);

