CS4850 Final Project
Loading...
Searching...
No Matches
Application.hpp
1// Application.hpp
2#pragma once
3
4#include <SDL2/SDL.h>
5#include <cstdlib>
6#include <vector>
7#include <memory>
8#include <string>
9
10#include "GameEntity.hpp"
11#include "ComponentType.hpp"
12#include "Component.hpp"
13#include "Scene.hpp"
14
20 Application(); // Screen width and height should not be changed after the screen is set
22
27 void StartUp();
28
33 void Shutdown();
34
40 void Input(float deltaTime);
41
47 void Update(float deltaTime);
48
53 void Render();
54
60 void Loop(float targetFPS);
61
67 void StartScene(std::shared_ptr<Scene> scene);
68
69 private:
70 std::string mTitle;
71 // Width and height are now scene dependent
72 std::shared_ptr<Scene> mScene;
73 SDL_Window* mWindow;
74 SDL_Renderer* mRenderer;
75};
Application class that manages the game loop.
Definition Application.hpp:19
void Render()
Render the game.
void Shutdown()
Shutdown the application.
void StartScene(std::shared_ptr< Scene > scene)
Set the title of the window.
void Update(float deltaTime)
Update the game state.
void StartUp()
Start the application.
void Loop(float targetFPS)
Main game loop.
void Input(float deltaTime)
Handle input.