text: #pragma once
  
  #include <SDL.h>
  #include <SDL_ttf.h>  //Uncomment when you get to Task 2
  #include <SDL2_gfxPrimitives.h>
  #include <SDL_image.h>
  
  class Sprite
  {
  	SDL_Renderer * renderer;
  	SDL_Texture * texture;
  
  public:
  
  	Sprite(SDL_Renderer * renderer, SDL_Texture * texture);
  
  	// Destroys the sprite instance
  	void destroy();
  
  	// Draw the sprite at the given position.
  	// Valid coordinates are between (0,0) (upper left) and (width-32, height-32) (lower right).
  	// (All sprites are 32*32 pixels, clipping is not supported)
  	void draw(int x, int y);
  };
  
  
  class AvancezLib
  {
  public:
  	// Destroys the avancez library instance
  	void destroy();
  
  	// Destroys the avancez library instance and exits
  	void quit();
  
  	// Creates the main window. Returns true on success.
  	bool init(int width, int height);
  
  	// Clears the screen and draws all sprites and texts which have been drawn
  	// since the last update call.
  	// If update returns false, the application should terminate.
  	bool update();
  
  	void processInput();
  
  	void swapBuffers();
  
  	void clearWindow();
  
  	// Create a sprite given a string.
  	// All sprites are 32*32 pixels.
  	Sprite* createSprite(const char* name);
  
  	// Draws the given text.
  	void drawText(int x, int y, const char* msg);
  
  	// Return the total time spent in the game, in seconds.
  	float getElapsedTime();
  
  	void setColor(int r, int g, int b, int a);
  
  	void drawLine(int sX, int sY, int eX, int eY);
  
  	void drawCircle(int x, int y, int r);
  
  	void drawPixel(int x, int y);
  
  	struct KeyStatus
  	{
  		bool fire1; // fire left silo
  		bool fire2; // fire middle silo
  		bool fire3; // fire right silo
  		bool esc;	// quit game
  	};
  
  	// Returns the keyboard status. If a flag is set, the corresponding key is being held down.
  	void getKeyStatus(KeyStatus& keys);
  
  private:
  	SDL_Window * window;
  	SDL_Renderer * renderer;
  
  	TTF_Font* font;
  
  	KeyStatus key;
  };