-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathship.h
49 lines (41 loc) · 968 Bytes
/
ship.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
/*
* $Id: ship.h,v 1.2 2003/03/21 02:59:49 kenta Exp $
*
* Copyright 2003 Kenta Cho. All rights reserved.
*/
/**
* Players ship.
*
* @version $Revision: 1.2 $
*/
#ifndef SHIP_H
#define SHIP_H
#include "vector.h"
//senquack - for GLfixed type
#include "GLES/gl.h"
#define FIELD_WIDTH 320
#define FIELD_HEIGHT 480
#define FIELD_WIDTH_8 (FIELD_WIDTH<<8)
#define FIELD_HEIGHT_8 (FIELD_HEIGHT<<8)
#define FIELD_SCREEN_RATIO 10000.0f
#define FIELD_SCREEN_RATIO_X 655360000 // fixed point version of above
typedef struct
{
Vector pos, bombPos;
int cnt, laserCnt;
int speed;
int invCnt;
int bombCnt, bombWdt;
int grzCnt, grzInvCnt, rollingCnt, grzWdt, grzf;
float d;
int color, colorChgCnt, fldWdt, absEng;
int rfCnt, rfMtr, rfMtrDec, rfWdt, reflects;
} Ship;
extern Ship ship;
extern int bonusScore, bomb;
void initShip ();
void moveShip ();
void drawShip ();
void destroyShip ();
int getPlayerDeg (int x, int y);
#endif // SHIP_H