Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#pragma once
#include "SDL.h"
#include"SDL_image.h"
#include <iostream>
#include "AudioH.h"
#include "ObjectH.h"
/////////Class that handles the game loop and is function////////////
class Game {
public:
Game();
~Game();
///// Initializes everything /////
void init(const char* title, int xpos, int ypos, int width, int height, bool fullscreen);
///// Handle the Events /////
void handleEvents();
///// Handle the every frame action /////
void update();
///// Handle the renderization /////
void render();
///// Close the Game /////
void clean();
//// Draw the Object /////
void draw(Object o);
///// Checks returns true if the game is running/////
bool running()
{
return isRunning;
}
private:
bool isRunning;
///// Game Window /////
SDL_Window *window;
///// Game Renderer /////
SDL_Renderer* renderer;
///// mouse position /////
int mousex, mousey;
///// Music object /////
Audio effect;
///// Game Object /////
Object peppa;
};