Mercurial > hg > beaglert
annotate examples/10-Instruments/tank_wars/game.h @ 481:def3b8cf9749 prerelease
build_pd_heavy: Parametrized hvresources path, looking for changes in hvresources as well
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 21 Jun 2016 14:26:33 +0100 |
parents | 8fcfbfb32aa0 |
children |
rev | line source |
---|---|
robert@464 | 1 /* |
robert@464 | 2 * game.h |
robert@464 | 3 * |
robert@464 | 4 * Created on: Nov 10, 2014 |
robert@464 | 5 * Author: parallels |
robert@464 | 6 */ |
robert@464 | 7 |
robert@464 | 8 #ifndef GAME_H_ |
robert@464 | 9 #define GAME_H_ |
robert@464 | 10 |
robert@464 | 11 // Initialisation |
robert@464 | 12 void setupGame(int width, int height); |
robert@464 | 13 void restartGame(); |
robert@464 | 14 |
robert@464 | 15 // Update physics |
robert@464 | 16 void nextGameFrame(); |
robert@464 | 17 |
robert@464 | 18 // State updaters |
robert@464 | 19 void setTank1CannonAngle(float angle); |
robert@464 | 20 void setTank2CannonAngle(float angle); |
robert@464 | 21 void setTank1CannonStrength(float strength); |
robert@464 | 22 void setTank2CannonStrength(float strength); |
robert@464 | 23 void fireProjectile(); |
robert@464 | 24 |
robert@464 | 25 // State queries |
robert@464 | 26 bool gameStatusPlayer1Turn(); |
robert@464 | 27 bool gameStatusProjectileInMotion(); |
robert@464 | 28 int gameStatusWinner(); |
robert@464 | 29 bool gameStatusCollisionOccurred(); |
robert@464 | 30 bool gameStatusTankHitOccurred(); |
robert@464 | 31 float gameStatusProjectileHeight(); |
robert@464 | 32 |
robert@464 | 33 // Render screen; returns length of buffer used |
robert@464 | 34 int drawGame(float *buffer, int bufferSize); |
robert@464 | 35 |
robert@464 | 36 // Cleanup and memory release |
robert@464 | 37 void cleanupGame(); |
robert@464 | 38 |
robert@464 | 39 #endif /* GAME_H_ */ |