2010-10-12 10:55:23 +02:00
|
|
|
/*
|
2011-03-05 13:44:21 +01:00
|
|
|
* This software is licensed under the terms of the MIT-License
|
|
|
|
* See COPYING for further information.
|
|
|
|
* ---
|
|
|
|
* Copyright (C) 2011, Lukas Weber <laochailan@web.de>
|
2010-10-12 10:55:23 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PLAYER_H
|
|
|
|
#define PLAYER_H
|
|
|
|
|
2011-04-10 11:19:44 +02:00
|
|
|
#include <complex.h>
|
2010-10-12 10:55:23 +02:00
|
|
|
#include "texture.h"
|
|
|
|
#include "animation.h"
|
2011-04-26 12:04:45 +02:00
|
|
|
#include "enemy.h"
|
2010-10-12 10:55:23 +02:00
|
|
|
|
|
|
|
enum {
|
|
|
|
False = 0,
|
|
|
|
True = 1
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef enum {
|
2011-04-10 11:19:44 +02:00
|
|
|
Youmu,
|
|
|
|
Marisa
|
2010-10-12 10:55:23 +02:00
|
|
|
} Character;
|
|
|
|
|
2011-04-10 11:19:44 +02:00
|
|
|
typedef enum {
|
2011-04-29 10:26:37 +02:00
|
|
|
YoumuOpposite,
|
|
|
|
YoumuHoming
|
2011-04-10 11:19:44 +02:00
|
|
|
} ShotMode;
|
|
|
|
|
2010-10-12 10:55:23 +02:00
|
|
|
typedef struct {
|
2011-03-18 19:03:06 +01:00
|
|
|
complex pos;
|
2010-10-12 10:55:23 +02:00
|
|
|
short focus;
|
|
|
|
short fire;
|
|
|
|
short moving;
|
|
|
|
|
|
|
|
short dir;
|
2011-03-23 12:26:30 +01:00
|
|
|
float power;
|
|
|
|
|
2011-04-10 10:23:24 +02:00
|
|
|
int lifes;
|
2011-03-23 12:26:30 +01:00
|
|
|
int bombs;
|
|
|
|
|
|
|
|
float recovery;
|
2010-11-14 13:24:56 +01:00
|
|
|
|
2010-10-12 10:55:23 +02:00
|
|
|
Character cha;
|
2011-04-10 11:19:44 +02:00
|
|
|
ShotMode shot;
|
2011-04-26 12:04:45 +02:00
|
|
|
Enemy *slaves;
|
2010-10-12 10:55:23 +02:00
|
|
|
|
2011-03-19 16:21:48 +01:00
|
|
|
Animation *ani;
|
2010-10-12 10:55:23 +02:00
|
|
|
} Player;
|
|
|
|
|
2011-04-29 10:26:37 +02:00
|
|
|
void init_player(Player*, Character cha, ShotMode shot);
|
2010-10-12 10:55:23 +02:00
|
|
|
|
|
|
|
void player_draw(Player*);
|
|
|
|
void player_logic(Player*);
|
2011-03-23 12:26:30 +01:00
|
|
|
|
2011-04-24 15:39:17 +02:00
|
|
|
void plr_bomb(Player*);
|
|
|
|
void plr_death(Player*);
|
2010-10-12 10:55:23 +02:00
|
|
|
#endif
|