Lephisto/src/spfx.h

34 lines
776 B
C

#pragma once
#include "physics.h"
#include "opengl.h"
#define SPFX_LAYER_FRONT 0
#define SPFX_LAYER_BACK 1
#define SHAKE_DECAY 50. /* Decay parameter. */
#define SHAKE_MAX 50.*SCREEN_W*SCREEN_H/1024./768. /* 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(double dt);
void spfx_shake(double mod);
/* Other effects. */
void spfx_cinematic(void);
/* Load/free. */
int spfx_load(void);
void spfx_free(void);