forked from devpack/mayhem
-
Notifications
You must be signed in to change notification settings - Fork 2
/
option.h
executable file
·48 lines (41 loc) · 1.23 KB
/
option.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef __OPTION_H__
#define __OPTION_H__
#include "platform_data.h"
#include "player_view.h"
#include "vaisseau_data.h"
#include <allegro5/allegro.h>
// types of option
#define NB_OPT_TYPE 5
#define OPT_NOOPTION 0
#define OPT_MAXFUEL 1
#define OPT_SLOWSHIELD 2
#define OPT_BACKSHOT 3
#define OPT_TRIPLESHOT 4
#define OPT_THRUST 5
// option values
#define OPT_SLOWSHIELD_SPEED 1
#define OPT_THRUST_MAX 0.47
struct option_sprite {
const char *sprite_name;
ALLEGRO_BITMAP *sprite;
// PALETTE sprite_colors;
};
struct option_data {
int x, y;
int type;
double time_in;
bool active;
double active_time;
double explode_appear_time;
double player_expire_time;
struct option_sprite *option_sprites;
};
void unload_option(struct option_data *opt);
int init_option_data(struct option_data *opt,
struct option_sprite *option_sprites,
double explode_appear_time, double active_time,
double player_expire_time);
void gestion_option(struct option_data *opt, struct level_data *currentlevel,
struct vaisseau_data *allv, struct player_view *views,
int nbplayers, int nbviews, double dt);
#endif