robert@493: /* robert@493: * game.h robert@493: * robert@493: * Created on: Nov 10, 2014 robert@493: * Author: parallels robert@493: */ robert@493: robert@493: #ifndef GAME_H_ robert@493: #define GAME_H_ robert@493: robert@493: // Initialisation robert@493: void setupGame(int width, int height); robert@493: void restartGame(); robert@493: robert@493: // Update physics robert@493: void nextGameFrame(); robert@493: robert@493: // State updaters robert@493: void setTank1CannonAngle(float angle); robert@493: void setTank2CannonAngle(float angle); robert@493: void setTank1CannonStrength(float strength); robert@493: void setTank2CannonStrength(float strength); robert@493: void fireProjectile(); robert@493: robert@493: // State queries robert@493: bool gameStatusPlayer1Turn(); robert@493: bool gameStatusProjectileInMotion(); robert@493: int gameStatusWinner(); robert@493: bool gameStatusCollisionOccurred(); robert@493: bool gameStatusTankHitOccurred(); robert@493: float gameStatusProjectileHeight(); robert@493: robert@493: // Render screen; returns length of buffer used robert@493: int drawGame(float *buffer, int bufferSize); robert@493: robert@493: // Cleanup and memory release robert@493: void cleanupGame(); robert@493: robert@493: #endif /* GAME_H_ */