From ff31d139da8c886d9ec49536362fbf81c8819f14 Mon Sep 17 00:00:00 2001 From: Noel Berry Date: Sun, 3 Jan 2021 22:01:22 -0800 Subject: [PATCH] few final tweaks --- content/map/1x0.png | Bin 280 -> 291 bytes src/game.cpp | 13 +++++++++++++ src/game.h | 1 + 3 files changed, 14 insertions(+) diff --git a/content/map/1x0.png b/content/map/1x0.png index 5e9ed8085b351a06d5ff62b331ebe727f0e79829..7ed2923a546826c0793e261981850a432079bad3 100644 GIT binary patch delta 183 zcmbQiw3umvA>-YNM(*|e+apSEiMQR3w22TE+$1pF`Qyv*ZqM(*|fiH2qlC!BJo30*qB>GiL~HC=a2ayvH(Ojm7L)bY{2FXZvE z%+m*+{g~MZ1Pk3)%m&epo3HjNX3u9leE2GdZuIi_ln>{wr2p7De>zZ(aozLlb#ZMa z>+*Sw_ZJ>Kn(#_e0tkLDuU;4tGhw6XQAXjk3gJ&GZE`sbcjqWDo<1&Nw@h53(p8N? X^@RI7CRz8{3_#%N>gTe~DWM4fp6*Vg diff --git a/src/game.cpp b/src/game.cpp index 0399df0..aed9679 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -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) { diff --git a/src/game.h b/src/game.h index a5c444b..fd8f89d 100644 --- a/src/game.h +++ b/src/game.h @@ -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();