-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMaelstrom.h
86 lines (68 loc) · 1.82 KB
/
Maelstrom.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
/* Definitions useful for our sprite world */
/* Definitions that are particular to a particular logic module are
in "logicdir/logicdir.h", i.e. netlogic/netlogic.h
Note especially that this includes timing constants, etc.
*/
#include "rect.h"
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 480
#define SOUND_DELAY 6
#define FADE_STEPS 40
/* Time in 60'th of second between frames */
#define FRAME_DELAY 2
#define MAX_SPRITES 100
#define MAX_SPRITE_FRAMES 60
#define MAX_STARS 30
#define SHIP_FRAMES 48
#define SPRITES_WIDTH 32
#define SPRITE_PRECISION 4 /* internal <--> screen precision */
#define VEL_FACTOR 4
#define VEL_MAX (8<<SPRITE_PRECISION)
#define SCALE_FACTOR 16
#define SHAKE_FACTOR 256
#define MIN_BAD_DISTANCE 64
#define NO_PHASE_CHANGE -1 /* Sprite doesn't change phase */
#define MAX_SHOTS 18
#define SHOT_SIZE 4
#define SHOT_SCALE_FACTOR 4
#define STATUS_HEIGHT 14
#define SHIELD_WIDTH 55
#define INITIAL_BONUS 2000
#define ENEMY_HITS 3
#define HOMING_HITS 9
#define STEEL_SPECIAL 10
#define DEFAULT_HITS 1
#define NEW_LIFE 50000
#define SMALL_ROID_PTS 300
#define MEDIUM_ROID_PTS 100
#define BIG_ROID_PTS 50
#define GRAVITY_PTS 500
#define HOMING_PTS 700
#define NOVA_PTS 1000
#define STEEL_PTS 100
#define ENEMY_PTS 1000
#define HOMING_MOVE 6
#define GRAVITY_MOVE 3
#define BLUE_MOON 50
#define MOON_FACTOR 4
#define NUM_PRIZES 8
#define LUCK_ODDS 3
/* ----------------------------------------------------------------- */
/* -- Structures and typedefs */
typedef struct {
int h;
int v;
} MPoint;
typedef struct {
int xCoord;
int yCoord;
unsigned long color;
} Star, *StarPtr;
/* Sprite blitting information structure */
typedef struct {
int numFrames;
int isSmall;
Rect hitRect;
SDL_Surface *sprite[MAX_SPRITE_FRAMES];
Uint8 *mask[MAX_SPRITE_FRAMES];
} Blit, *BlitPtr;