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