File: defs.h

package info (click to toggle)
nighthawk 1.0-9
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,420 kB
  • ctags: 18,064
  • sloc: fortran: 17,597; cpp: 4,948; makefile: 87; sh: 13
file content (115 lines) | stat: -rw-r--r-- 2,535 bytes parent folder | download | duplicates (6)
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
/***************************************************************************
****************************************************************************
****************************************************************************
*
* NightHawk - By Jason Nunn - Oct 96 (jsno@dayworld.net.au)
* FREEWARE.
*
****************************************************************************
****************************************************************************
***************************************************************************/
#define DATED    __DATE__
#define WELCOME \
"Nighthawk version " VERSION " (" DATED "), Copyright (C) 1997 Jason Nunn.\n\n"

#define SCORES_FILE SCORES

#define UPDATE_DELAY 100000
#define REALTIME_DELAY 50000

#define STR_LABEL_LEN 40
#define STR_LEN       256

#define SCREEN_SIZE_X  320
#define SCREEN_SIZE_Y  200
#define SCREEN_HSIZE_X (SCREEN_SIZE_X >> 1)
#define SCREEN_HSIZE_Y (SCREEN_SIZE_Y >> 1)
#define SPRITE_SIZE_X  32
#define SPRITE_SIZE_Y  32
#define SPRITE_HSIZE_X (SPRITE_SIZE_X >> 1)
#define SPRITE_HSIZE_Y (SPRITE_SIZE_Y >> 1)

#define MOVE_DRADIUS   (MOVE_RADIUS << 1)

#define MAX_LASERS     24
#define MAX_DOORS      24
#define MAX_TRANSPORTS 8
#define MAX_DROIDS     65

#define POWER_BAY_SPD  8
#define DOOR_SPD       16
#define GENERAL_SPD    8

#define MAX_SCORE_TABLE 9
//#define GOD_MODE 1

typedef struct
{
  Pixmap pixmap;
  Pixmap mask;
  int    width;
  int    height;
} tbm;

typedef struct
{
  char bound;
  tbm  bm_ptr;
} tsprite;

typedef struct
{
  char name[9];
  char highest_ship[16];
  char time[12];
  int  score;
} tscore_table;

typedef struct
{
  char  *type;
  char  *name;
  int   entry;
  float height;
  float weight;
  char  *brain;
  int   armament;
  int   shielding;
  int   max_shielding;
  int   speed;
  int   attack_rate;
} tdroid_stats;

#define DROID_002 0   
#define DROID_108 1 
#define DROID_176 2 
#define DROID_261 3 
#define DROID_275 4 
#define DROID_355 5 
#define DROID_368 6 
#define DROID_423 7 
#define DROID_467 8 
#define DROID_489 9 
#define DROID_513 10
#define DROID_520 11
#define DROID_599 12
#define DROID_606 13
#define DROID_691 14
#define DROID_693 15 
#define DROID_719 16
#define DROID_720 17
#define DROID_766 18
#define DROID_799 19
#define DROID_805 20
#define DROID_810 21
#define DROID_820 22
#define DROID_899 23
#define DROID_933 24
#define DROID_949 25 
#define DROID_999 26

#define LASER_NONE      0
#define LASER_LINARITE  1
#define LASER_CROC_BENZ 2
#define LASER_UVAROVITE 3
#define LASER_TIGER_EYE 4