From 87ba6dc28191b195faea1f1ea06e8c18c7772731 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Fri, 29 Apr 2022 13:45:12 -0700 Subject: [PATCH] 351 --- scripts/351.js | 5 +++++ src/conversation/questionbox.c | 18 ++++++++++++++++++ src/conversation/questionbox.h | 24 ++++++++++++++++++++++++ test.sh | 8 ++++++++ 4 files changed, 55 insertions(+) create mode 100644 scripts/351.js create mode 100644 src/conversation/questionbox.c create mode 100644 src/conversation/questionbox.h create mode 100644 test.sh diff --git a/scripts/351.js b/scripts/351.js new file mode 100644 index 0000000..1f5f84a --- /dev/null +++ b/scripts/351.js @@ -0,0 +1,5 @@ +const process = require('process'); +const { spawnSync, execSync } = require('child_process'); + +execSync(`scp ./build/Penny.gb root@ywbud3:/storage/roms/gb/Penny.gb`); +execSync(`echo "systemctl stop emustation.service; killall emulationstation; retroarch -L /lib/libretro/gambatte_libretro.so '/storage/roms/gb/Penny.gb';" | ssh root@ywbud3 /bin/bash`); \ No newline at end of file diff --git a/src/conversation/questionbox.c b/src/conversation/questionbox.c new file mode 100644 index 0000000..ca95c45 --- /dev/null +++ b/src/conversation/questionbox.c @@ -0,0 +1,18 @@ +/** + * Copyright (c) 2022 Dominic Masters + * + * This software is released under the MIT License. + * https://opensource.org/licenses/MIT + */ + +#include "questionbox.h" + +void questionBoxSetOptions(char *title, char *options[QUESTION_BOX_OPTIONS_MAX]) { + char buffer[TEXTBOX_CHARS_MAX + 1]; + sprintf(buffer, "Hello World"); + conversationTextboxSetText(buffer); +} + +inline void questionBoxUpdate() { + +} \ No newline at end of file diff --git a/src/conversation/questionbox.h b/src/conversation/questionbox.h new file mode 100644 index 0000000..e91376d --- /dev/null +++ b/src/conversation/questionbox.h @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2022 Dominic Masters + * + * This software is released under the MIT License. + * https://opensource.org/licenses/MIT + */ + +#pragma once +#include "../libs.h" +#include "../util.h" +#include "../input.h" +#include "../display/common.h" +#include "../display/tilemap.h" +#include "frame.h" +#include "textbox.h" + +#define QUESTION_BOX_OPTIONS_MAX ((TEXTBOX_CHAR_ROWS-1)*2) + +extern uint8_t QUESTION_BOX_OPTION_COUNT; +extern uint8_t QUESTION_BOX_OPTION_CURRENT; + +void questionBoxSetOptions(char *title, char *options[QUESTION_BOX_OPTIONS_MAX]); + +inline void questionBoxUpdate(); \ No newline at end of file diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..94352a0 --- /dev/null +++ b/test.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Send over latest build +scp ./build/Penny.gb root@ywbud3:/storage/roms/gb/Penny.gb + +systemctl stop emustation.service +killall emulationstation +retroarch -L /lib/libretro/gambatte_libretro.so "/storage/roms/gb/Penny.gb" +systemctl start emustation.service \ No newline at end of file