few final tweaks

This commit is contained in:
Noel Berry 2021-01-03 22:01:22 -08:00
parent 0b48a16c55
commit ff31d139da
3 changed files with 14 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 291 B

View File

@ -33,6 +33,7 @@ void Game::startup()
// load first room
load_room(Point(0, 0));
camera = Vec2(room.x * width, room.y * height);
fullscreen = false;
}
void Game::load_room(Point cell, bool is_reload)
@ -169,6 +170,18 @@ void Game::update()
load_room(room);
}
// Reload First Room
if (Input::pressed(Key::F9))
{
m_transition = false;
world.clear();
load_room(Point(0, 0));
}
// Toggle Fullscreen
if (Input::pressed(Key::F4))
App::fullscreen(fullscreen = !fullscreen);
// Normal Update
if (!m_transition)
{

View File

@ -25,6 +25,7 @@ namespace TL
Batch batch;
Point room;
Vec2 camera;
bool fullscreen = false;
void load_room(Point cell, bool is_reload = false);
void startup();