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