-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfoe.h
121 lines (106 loc) · 3.05 KB
/
foe.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*
* $Id: foe.h,v 1.5 2003/08/15 07:06:52 kenta Exp $
*
* Copyright 2003 Kenta Cho. All rights reserved.
*/
/**
* Battery/Bullet data.
*
* @version $Revision: 1.5 $
*/
#ifndef FOE_H_
#define FOE_H_
extern "C"
{
#include "vector.h"
#include "foe_mtd.h"
}
#include "bulletml/bulletmlparser.h"
#include "bulletml/bulletmlparser-tinyxml.h"
#include "bulletml/bulletmlrunner.h"
#include "foecommand.h"
#include "barragemanager.h"
#include "boss.h"
//senquack - for GLfixed type
typedef int GLfixed;
#define BATTERY 0
#define ACTIVE_BULLET 1
#define BULLET 2
#define NOT_EXIST_TMP (NOT_EXIST-1)
//senquack TODO: make sure conversion to floats from doubles here didn't mess up the bullet patterns, etc:
struct foe
{
Vector pos, vel, ppos, spos, mv;
int d, spd;
FoeCommand *cmd;
// double rank;
#ifdef FIXEDMATH
GLfixed frank;
#else
float rank;
#endif //FIXEDMATH
int spc;
int cnt, cntTotal;
int xReverse;
int fireCnt;
int slowMvCnt;
BulletMLParser *parser;
BulletMLParser *morphParser[MORPH_PATTERN_MAX];
int morphCnt;
int morphHalf;
//senquack - complete conversion to floats:
// double morphRank;
// double speedRank;
#ifdef FIXEDMATH
GLfixed fmorphRank;
GLfixed fspeedRank;
#else
float morphRank;
float speedRank;
#endif //FIXEDMATH
int color;
int shapeType;
int bulletShape[3];
#ifdef FIXEDMATH
GLfixed fbulletSize[3];
#else
float bulletSize[3];
#endif //FIXEDMATH
struct limiter *limiter;
int ikaType;
int grzRng;
};
typedef struct foe Foe;
//senquack TODO: make sure conversion to floats from doubles here didn't mess up the bullet patterns, etc:
//senquack - complete conversion to floats/fixeds
//Foe* addFoeBattery(int x, int y, double rank, int d, int spd, int xReverse,
// BulletMLParser *morphParser[], int morphCnt, int morphHalf, double morphRank,
// double speedRank,
// int color, int bulletShape[], float bulletSize[],
// struct limiter *limiter,
// int ikaType,
// BulletMLParser *parser);
#ifdef FIXEDMATH
Foe* addFoeBattery (int x, int y, GLfixed frank, int d, int spd, int xReverse,
BulletMLParser * morphParser[], int morphCnt,
int morphHalf, GLfixed fmorphRank, GLfixed fspeedRank,
int color, int bulletShape[], GLfixed fbulletSize[],
struct limiter *limiter, int ikaType,
BulletMLParser * parser);
#else
Foe* addFoeBattery(int x, int y, float rank, int d, int spd, int xReverse,
BulletMLParser *morphParser[], int morphCnt, int morphHalf, float morphRank,
float speedRank,
int color, int bulletShape[], float bulletSize[],
struct limiter *limiter,
int ikaType,
BulletMLParser *parser);
#endif //FIXEDMATH
void addFoeActiveBullet (Foe * foe, int d, int spd, int color,
BulletMLState * state);
void addFoeNormalBullet (Foe * foe, int d, int spd, int color);
void removeFoeCommand (Foe * fe);
void removeFoe (Foe * fe);
void removeFoeForced (Foe * fe);
void wipeBullets (Vector * pos, int width);
#endif