comparison projects/tank_wars/game.h @ 10:49f22e1246b2

Tank wars!
author andrewm
date Thu, 13 Nov 2014 15:58:08 +0100
parents
children fbfeb5895efd
comparison
equal deleted inserted replaced
5:09f03ac40fcc 10:49f22e1246b2
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
30 // Render screen; returns length of buffer used
31 int drawGame(float *buffer, int bufferSize);
32
33 // Cleanup and memory release
34 void cleanupGame();
35
36 #endif /* GAME_H_ */