Mercurial > hg > beaglert
annotate examples/10-Instruments/tank-wars/game.h @ 493:a23d74e2f6cb prerelease
Minor changes to doxygen
author | Robert Jack <robert.h.jack@gmail.com> |
---|---|
date | Tue, 21 Jun 2016 18:50:03 +0100 |
parents | |
children |
rev | line source |
---|---|
robert@493 | 1 /* |
robert@493 | 2 * game.h |
robert@493 | 3 * |
robert@493 | 4 * Created on: Nov 10, 2014 |
robert@493 | 5 * Author: parallels |
robert@493 | 6 */ |
robert@493 | 7 |
robert@493 | 8 #ifndef GAME_H_ |
robert@493 | 9 #define GAME_H_ |
robert@493 | 10 |
robert@493 | 11 // Initialisation |
robert@493 | 12 void setupGame(int width, int height); |
robert@493 | 13 void restartGame(); |
robert@493 | 14 |
robert@493 | 15 // Update physics |
robert@493 | 16 void nextGameFrame(); |
robert@493 | 17 |
robert@493 | 18 // State updaters |
robert@493 | 19 void setTank1CannonAngle(float angle); |
robert@493 | 20 void setTank2CannonAngle(float angle); |
robert@493 | 21 void setTank1CannonStrength(float strength); |
robert@493 | 22 void setTank2CannonStrength(float strength); |
robert@493 | 23 void fireProjectile(); |
robert@493 | 24 |
robert@493 | 25 // State queries |
robert@493 | 26 bool gameStatusPlayer1Turn(); |
robert@493 | 27 bool gameStatusProjectileInMotion(); |
robert@493 | 28 int gameStatusWinner(); |
robert@493 | 29 bool gameStatusCollisionOccurred(); |
robert@493 | 30 bool gameStatusTankHitOccurred(); |
robert@493 | 31 float gameStatusProjectileHeight(); |
robert@493 | 32 |
robert@493 | 33 // Render screen; returns length of buffer used |
robert@493 | 34 int drawGame(float *buffer, int bufferSize); |
robert@493 | 35 |
robert@493 | 36 // Cleanup and memory release |
robert@493 | 37 void cleanupGame(); |
robert@493 | 38 |
robert@493 | 39 #endif /* GAME_H_ */ |