49 lines
1.1 KiB
C
49 lines
1.1 KiB
C
//---
|
|
// enemies: List of enemies and their properties
|
|
//---
|
|
|
|
#pragma once
|
|
|
|
#include "comp/entity.h"
|
|
#include "comp/mechanical.h"
|
|
#include "comp/fighter.h"
|
|
#include "geometry.h"
|
|
#include "anim.h"
|
|
|
|
/* enemy_t: Static enemy information */
|
|
typedef struct enemy
|
|
{
|
|
/* Enemy name (shown in wave information) */
|
|
char const *name;
|
|
/* Map hitbox (represents ground size, collides with walls) */
|
|
rect hitbox;
|
|
/* Idle animation, death animation, damage animation */
|
|
anim_t *anim_idle, *anim_walking, *anim_attack, *anim_hit, *anim_death;
|
|
/* Movement parameters */
|
|
mechanical_limits_t limits;
|
|
/* Statistics model */
|
|
fighter_stat_model_t stats;
|
|
/* Level */
|
|
uint8_t level;
|
|
/* Shadow size */
|
|
uint8_t shadow_size;
|
|
/* Rendering elevation */
|
|
fixed_t z;
|
|
|
|
} enemy_t;
|
|
|
|
/* List of enemies */
|
|
enum {
|
|
/* ID 0 is used for the player! */
|
|
ENEMY_SLIME_1 = 1,
|
|
ENEMY_BAT_2 = 2,
|
|
ENEMY_FIRE_SLIME_4 = 3,
|
|
ENEMY_GUNSLINGER_8 = 4,
|
|
};
|
|
|
|
/* Get enemy data by ID. */
|
|
enemy_t const *enemy_data(int enemy_id);
|
|
|
|
/* Create a new enemy of the given type. */
|
|
entity_t *enemy_make(int enemy_id);
|