summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordavidovski <david@sendula.com>2021-07-18 00:48:40 +0100
committerdavidovski <david@sendula.com>2021-07-18 00:48:40 +0100
commit0a9f2cc7555cf991945c5c28b71f6004d3fba42f (patch)
tree3b2c1b4dd268f305302f4b60b535ba96fbb3b41e /src
parent8264a0eb115215a4d4962d6ba90ee3adcdf7a31e (diff)
reset on menu
Diffstat (limited to 'src')
-rw-r--r--src/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index d1e7ede..91ec117 100644
--- a/src/main.c
+++ b/src/main.c
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
+#include <gint/gint.h>
#include <gint/display.h>
#include <gint/keyboard.h>
#include <gint/keycodes.h>
@@ -39,6 +40,8 @@ int h = 16;
int w = 2;
int main(void)
{
+ gint_setrestart(1);
+
int tick = 1;
bool game = true;
while (game) {
@@ -55,7 +58,7 @@ int main(void)
pollevent();
if (keydown(KEY_EXIT))
- game = false;
+ gint_osmenu();
if (keydown(KEY_1) && p1 + h < 64)
p1 += 1;
@@ -113,6 +116,7 @@ int main(void)
tick++;
sleep_us(20*1000);
}
- game = true;
+
+
return 0;
}