Skip to content

Commit

Permalink
pce control scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
n-at committed Aug 30, 2023
1 parent 9739175 commit f764b2e
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 2 deletions.
1 change: 1 addition & 0 deletions assets/img/controller/credits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ https://commons.wikimedia.org/wiki/File:Atari-2600-Joystick.jpg
https://commons.wikimedia.org/wiki/File:Atari-Jaguar-Controller.jpg
https://commons.wikimedia.org/wiki/File:Atari-Lynx-Flat-Front.jpg
https://commons.wikimedia.org/wiki/File:Xbox-360-S-Controller.jpg
https://commons.wikimedia.org/wiki/File:NEC-TurboGrafx-16-Controller-FL.jpg
Binary file added assets/img/controller/original/pce.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/controller/pce.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions storage/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,8 @@ var (
}

DefaultControlsPCEngine = EmulatorControlsMapping{
A: "z", //I
B: "x", //II
A: "x", //I
B: "z", //II
Select: "v", //Select
Start: "enter", //Run
Up: "arrowup",
Expand Down
2 changes: 2 additions & 0 deletions templates/includes/control_scheme/controls_by_platform.twig
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
{% include "../platform_settings/controls/lynx.twig" with control_template="../control_scheme/control.twig" %}
{% elif platform_id == "jaguar" %}
{% include "../platform_settings/controls/jaguar.twig" with control_template="../control_scheme/control.twig" %}
{% elif platform_id == "pce" %}
{% include "../platform_settings/controls/pce.twig" with control_template="../control_scheme/control.twig" %}
{% else %}
{# a5200, mame2003, arcade #}
{% include "../platform_settings/controls/default.twig" with control_template="../control_scheme/control.twig" %}
Expand Down
33 changes: 33 additions & 0 deletions templates/includes/platform_settings/controls/pce.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{% extends "../controls_tab.twig" %}

{% block controls_definitions %}
{% set platform_id = platform_id %}
{% set player = player %}
{% set controller_img = "pce.png" %}
{% set controller_img_alt = "TurboGrafx-16 Controller" %}
{% set control_template = control_template %}
{% endblock %}

{% block controls_keyboard %}
{% include control_template with input="keyboard" btn_id="i" btn_title="I" btn_value=controls.Keyboard.A %}
{% include control_template with input="keyboard" btn_id="ii" btn_title="II" btn_value=controls.Keyboard.B %}
{% include control_template with input="keyboard" btn_id="select" btn_title="Select" btn_value=controls.Keyboard.Select %}
{% include control_template with input="keyboard" btn_id="run" btn_title="Run" btn_value=controls.Keyboard.Start %}
{% include control_template with input="keyboard" btn_id="up" btn_title="Up" btn_value=controls.Keyboard.Up %}
{% include control_template with input="keyboard" btn_id="down" btn_title="Down" btn_value=controls.Keyboard.Down %}
{% include control_template with input="keyboard" btn_id="left" btn_title="Left" btn_value=controls.Keyboard.Left %}
{% include control_template with input="keyboard" btn_id="right" btn_title="Right" btn_value=controls.Keyboard.Right %}
{% include "common_keyboard_controls.twig" %}
{% endblock %}

{% block controls_gamepad %}
{% include control_template with input="gamepad" btn_id="i" btn_title="I" btn_value=controls.Gamepad.A %}
{% include control_template with input="gamepad" btn_id="ii" btn_title="II" btn_value=controls.Gamepad.B %}
{% include control_template with input="gamepad" btn_id="select" btn_title="Select" btn_value=controls.Gamepad.Select %}
{% include control_template with input="gamepad" btn_id="run" btn_title="Run" btn_value=controls.Gamepad.Start %}
{% include control_template with input="gamepad" btn_id="up" btn_title="Up" btn_value=controls.Gamepad.Up %}
{% include control_template with input="gamepad" btn_id="down" btn_title="Down" btn_value=controls.Gamepad.Down %}
{% include control_template with input="gamepad" btn_id="left" btn_title="Left" btn_value=controls.Gamepad.Left %}
{% include control_template with input="gamepad" btn_id="right" btn_title="Right" btn_value=controls.Gamepad.Right %}
{% include "common_gamepad_controls.twig" %}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
{% include "controls/lynx.twig" with control_template="controls/control.twig" %}
{% elif platform_id == "jaguar" %}
{% include "controls/jaguar.twig" with control_template="controls/control.twig" %}
{% elif platform_id == "pce" %}
{% include "controls/pce.twig" with control_template="controls/control.twig" %}
{% else %}
{# a5200, mame2003, arcade #}
{% include "controls/default.twig" with control_template="controls/control.twig" %}
Expand Down

0 comments on commit f764b2e

Please sign in to comment.