taisei/src/player.h
laochailan bdc0db9957 merged Slave and Fairy to Enemy
To create a slave, pass ENEMY_IMMUNE for hp in create_enemy(). tip: create_enemyg(...) is an abbreviation for create_enemy(&global.enemies, ...).
There is something like a super fancy event system for Enemies' logic rules now: logic_rule will be called with t = negative special values like EVENT_BIRTH or EVENT_DEATH on corresponding events. cool, isn't it? well those values have to be filtered out (like if(t < 0) return;) if you don't use them so they don't do strange things with your locus.
2011-04-26 12:04:45 +02:00

58 lines
No EOL
803 B
C

/*
* This software is licensed under the terms of the MIT-License
* See COPYING for further information.
* ---
* Copyright (C) 2011, Lukas Weber <laochailan@web.de>
*/
#ifndef PLAYER_H
#define PLAYER_H
#include <complex.h>
#include "texture.h"
#include "animation.h"
#include "enemy.h"
enum {
False = 0,
True = 1
};
typedef enum {
Youmu,
Marisa
} Character;
typedef enum {
YoumuOpposite
} ShotMode;
typedef struct {
complex pos;
short focus;
short fire;
short moving;
short dir;
float power;
int lifes;
int bombs;
float recovery;
Character cha;
ShotMode shot;
Enemy *slaves;
Animation *ani;
} Player;
void init_player(Player*, Character cha);
void player_draw(Player*);
void player_logic(Player*);
void plr_bomb(Player*);
void plr_death(Player*);
#endif