Mercurial > hg > beaglert
comparison examples/tank_wars/game.h @ 300:dbeed520b014 prerelease
Renamed projects to examples
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Fri, 27 May 2016 13:58:20 +0100 |
parents | projects/tank_wars/game.h@8d80eda512cd |
children |
comparison
equal
deleted
inserted
replaced
297:a3d83ebdf49b | 300:dbeed520b014 |
---|---|
1 /* | |
2 * game.h | |
3 * | |
4 * Created on: Nov 10, 2014 | |
5 * Author: parallels | |
6 */ | |
7 | |
8 #ifndef GAME_H_ | |
9 #define GAME_H_ | |
10 | |
11 // Initialisation | |
12 void setupGame(int width, int height); | |
13 void restartGame(); | |
14 | |
15 // Update physics | |
16 void nextGameFrame(); | |
17 | |
18 // State updaters | |
19 void setTank1CannonAngle(float angle); | |
20 void setTank2CannonAngle(float angle); | |
21 void setTank1CannonStrength(float strength); | |
22 void setTank2CannonStrength(float strength); | |
23 void fireProjectile(); | |
24 | |
25 // State queries | |
26 bool gameStatusPlayer1Turn(); | |
27 bool gameStatusProjectileInMotion(); | |
28 int gameStatusWinner(); | |
29 bool gameStatusCollisionOccurred(); | |
30 bool gameStatusTankHitOccurred(); | |
31 float gameStatusProjectileHeight(); | |
32 | |
33 // Render screen; returns length of buffer used | |
34 int drawGame(float *buffer, int bufferSize); | |
35 | |
36 // Cleanup and memory release | |
37 void cleanupGame(); | |
38 | |
39 #endif /* GAME_H_ */ |