Last change
on this file since 714 was
708,
checked in by alain, 9 years ago
|
Adapt the following application to the POSIX threads API
- convol
- classif
- raycast
- coproc
- display
- gameoflife
- transpose
- shell
|
File size:
670 bytes
|
Line | |
---|
1 | #ifndef __GAME_H |
---|
2 | #define __GAME_H |
---|
3 | |
---|
4 | |
---|
5 | #define M_PI (3.14159f) |
---|
6 | #define COLLIDE_GAP (0.2f) |
---|
7 | #define PLAYER_MOVE (0.13f) |
---|
8 | #define PLAYER_ROT (0.1f) |
---|
9 | #define TIME_TOTAL (30) |
---|
10 | |
---|
11 | typedef struct |
---|
12 | { |
---|
13 | float x; |
---|
14 | float y; |
---|
15 | float dir; |
---|
16 | } Player; |
---|
17 | |
---|
18 | typedef struct |
---|
19 | { |
---|
20 | char tile[10][10]; |
---|
21 | char w; |
---|
22 | char h; |
---|
23 | float startX; |
---|
24 | float startY; |
---|
25 | float startDir; |
---|
26 | } Map; |
---|
27 | |
---|
28 | typedef struct |
---|
29 | { |
---|
30 | Player player; |
---|
31 | Map *map; |
---|
32 | int mapId; |
---|
33 | int timeLeft; |
---|
34 | int exit; // exit requested |
---|
35 | } Game; |
---|
36 | |
---|
37 | |
---|
38 | void gameInit(); |
---|
39 | int gameLocate(int x, int y); |
---|
40 | void gameControl(); |
---|
41 | void gameTick(); |
---|
42 | |
---|
43 | #endif // __GAME_H |
---|
Note: See
TracBrowser
for help on using the repository browser.