source: soft/giet_vm/applications/raycast/game.h @ 780

Last change on this file since 780 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
11typedef struct 
12{
13    float x;
14    float y;
15    float dir;
16} Player;
17
18typedef 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
28typedef struct
29{   
30    Player   player;
31    Map      *map;
32    int      mapId;
33    int      timeLeft;
34    int      exit;        // exit requested
35} Game;
36
37
38void gameInit();
39int  gameLocate(int x, int y);
40void gameControl();
41void gameTick();
42
43#endif // __GAME_H
Note: See TracBrowser for help on using the repository browser.