-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
26 lines (19 loc) · 687 Bytes
/
main.cpp
File metadata and controls
26 lines (19 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "scenes/game.h"
#include <wase/core/engine.h>
#include <wase/core/managers/scene_manager.h>
#include <wase/core/managers/resource_manager.h>
#include <memory>
using namespace wase;
int main(int argc, char* argv[])
{
// Initialize engine
Engine::getInstance()->init("Simon", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 600, 600, NULL);
// Load resources
ResourceManager::loadFont("opensans", "fonts/OpenSans-Regular.ttf", 42);
ResourceManager::loadAudio("keysound", "sounds/pianokey.wav");
// Load scenes
SceneManager::addScene("simon", std::make_shared<Game>());
// Run the game
Engine::getInstance()->run("simon");
return 0;
}