Update executable source file and improve keybinding naming conventions for clarity

This commit is contained in:
scawful
2024-11-18 16:57:10 -05:00
parent 36e5f7a150
commit d45917fcab
3 changed files with 34 additions and 10 deletions

View File

@@ -1,14 +1,13 @@
#ifndef YAZE_APP_CORE_EMULATOR_H
#define YAZE_APP_CORE_EMULATOR_H
#include "imgui/imgui.h"
#include <cstdint>
#include <vector>
#include "app/emu/snes.h"
#include "app/gui/zeml.h"
#include "app/rom.h"
#include "imgui/imgui.h"
namespace yaze {
namespace app {
@@ -19,6 +18,31 @@ namespace app {
*/
namespace emu {
// case SDLK_z:
// editor.emulator().snes().SetButtonState(1, 0, false);
// case SDLK_a:
// editor.emulator().snes().SetButtonState(1, 1, false);
// case SDLK_RSHIFT:
// editor.emulator().snes().SetButtonState(1, 2, false);
// case SDLK_RETURN:
// editor.emulator().snes().SetButtonState(1, 3, false);
// case SDLK_UP:
// editor.emulator().snes().SetButtonState(1, 4, false);
// case SDLK_DOWN:
// editor.emulator().snes().SetButtonState(1, 5, false);
// case SDLK_LEFT:
// editor.emulator().snes().SetButtonState(1, 6, false);
// case SDLK_RIGHT:
// editor.emulator().snes().SetButtonState(1, 7, false);
// case SDLK_x:
// editor.emulator().snes().SetButtonState(1, 8, false);
// case SDLK_s:
// editor.emulator().snes().SetButtonState(1, 9, false);
// case SDLK_d:
// editor.emulator().snes().SetButtonState(1, 10, false);
// case SDLK_c:
// editor.emulator().snes().SetButtonState(1, 11, false);
struct EmulatorKeybindings {
ImGuiKey a_button = ImGuiKey_Z;
ImGuiKey b_button = ImGuiKey_A;
@@ -26,12 +50,12 @@ struct EmulatorKeybindings {
ImGuiKey y_button = ImGuiKey_X;
ImGuiKey l_button = ImGuiKey_Q;
ImGuiKey r_button = ImGuiKey_W;
ImGuiKey start_button = ImGuiKey_RETURN;
ImGuiKey select_button = ImGuiKey_BACKSPACE;
ImGuiKey up_button = ImGuiKey_UP;
ImGuiKey down_button = ImGuiKey_DOWN;
ImGuiKey left_button = ImGuiKey_LEFT;
ImGuiKey right_button = ImGuiKey_RIGHT;
ImGuiKey start_button = ImGuiKey_Enter;
ImGuiKey select_button = ImGuiKey_Backspace;
ImGuiKey up_button = ImGuiKey_UpArrow;
ImGuiKey down_button = ImGuiKey_DownArrow;
ImGuiKey left_button = ImGuiKey_LeftArrow;
ImGuiKey right_button = ImGuiKey_RightArrow;
};
/**