38 lines
994 B
C
38 lines
994 B
C
#pragma once
|
|
#include "outfit.h"
|
|
#include "physics.h"
|
|
|
|
/**
|
|
* @enum WeaponLayer
|
|
*
|
|
* @brief Designates the layer the weapon is on.
|
|
*
|
|
* Automatically set up on creation (player is front, rest is back).
|
|
*/
|
|
typedef enum { WEAPON_LAYER_BG, WEAPON_LAYER_FG } WeaponLayer;
|
|
|
|
/* Addition */
|
|
void weapon_add(const Outfit* outfit, const double dir, const Vec2* pos,
|
|
const Vec2* vel, unsigned int parent,
|
|
const unsigned int target);
|
|
|
|
int beam_start(const Outfit* outfit,
|
|
const double dir, const Vec2* pos, const Vec2* vel,
|
|
const unsigned int parent, const unsigned int target,
|
|
const int mount);
|
|
|
|
void beam_end(const unsigned int parent, int beam);
|
|
|
|
void weapon_explode(double x, double y, double radius,
|
|
DamageType dtype, double damage,
|
|
unsigned int parent, int mode);
|
|
|
|
/* Update. */
|
|
void weapons_update(const double dt);
|
|
void weapons_render(const WeaponLayer layer, const double dt);
|
|
|
|
/* Clean. */
|
|
void weapon_clear(void);
|
|
void weapon_exit(void);
|
|
|