Last change
on this file since 778 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
|
Rev | Line | |
---|
[673] | 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 | |
---|
[708] | 11 | typedef struct |
---|
[673] | 12 | { |
---|
| 13 | float x; |
---|
| 14 | float y; |
---|
| 15 | float dir; |
---|
| 16 | } Player; |
---|
| 17 | |
---|
| 18 | typedef struct |
---|
| 19 | { |
---|
[708] | 20 | char tile[10][10]; |
---|
| 21 | char w; |
---|
| 22 | char h; |
---|
| 23 | float startX; |
---|
| 24 | float startY; |
---|
| 25 | float startDir; |
---|
[673] | 26 | } Map; |
---|
| 27 | |
---|
| 28 | typedef struct |
---|
[708] | 29 | { |
---|
| 30 | Player player; |
---|
| 31 | Map *map; |
---|
| 32 | int mapId; |
---|
| 33 | int timeLeft; |
---|
| 34 | int exit; // exit requested |
---|
[673] | 35 | } Game; |
---|
| 36 | |
---|
[708] | 37 | |
---|
| 38 | void gameInit(); |
---|
| 39 | int gameLocate(int x, int y); |
---|
| 40 | void gameControl(); |
---|
[673] | 41 | void gameTick(); |
---|
| 42 | |
---|
| 43 | #endif // __GAME_H |
---|
Note: See
TracBrowser
for help on using the repository browser.