Browse Source

RG350 and RetroFW improvements

1. Use SDL1 for RG350 for performance
2. Document controls for both
pull/481/head
Gleb Mazovetskiy 7 years ago committed by Anders Jenbo
parent
commit
5c32814820
  1. 2
      CMakeLists.txt
  2. 31
      Packaging/OpenDingux/build.sh
  3. 8
      Packaging/OpenDingux/buildroot_rg350_defconfig
  4. 16
      Packaging/OpenDingux/devilutionx-retrofw.man.txt
  5. 1
      Packaging/OpenDingux/package-opk.sh
  6. 17
      Packaging/OpenDingux/readme.gcw0.txt
  7. 8
      SourceX/controls/devices/joystick.cpp

2
CMakeLists.txt

@ -349,6 +349,8 @@ foreach(
JOY_BUTTON_RIGHTSTICK
JOY_BUTTON_RIGHTSHOULDER
JOY_BUTTON_LEFTSHOULDER
JOY_BUTTON_TRIGGERLEFT
JOY_BUTTON_TRIGGERRIGHT
JOY_BUTTON_START
JOY_BUTTON_BACK
)

31
Packaging/OpenDingux/build.sh

@ -62,7 +62,7 @@ prepare_buildroot() {
make_buildroot() {
cd "$BUILDROOT"
if [[ "$TARGET" != "rg350" ]]; then
if ! grep '--enable-static' package/libsodium/libsodium.mk; then
if ! grep 'enable-static' package/libsodium/libsodium.mk > /dev/null; then
echo 'LIBSODIUM_CONF_OPTS += --enable-static' >> package/libsodium/libsodium.mk
fi
fi
@ -82,7 +82,34 @@ build() {
local -a defs=(-DDINGUX=ON -DBINARY_RELEASE=ON)
if [[ "$TARGET" == "rg350" ]]; then
defs+=(-DNONET=ON)
defs+=(
-DNONET=ON
-DUSE_SDL1=1
-DJOY_AXIS_LEFTX=0
-DJOY_AXIS_LEFTY=1
-DJOY_AXIS_RIGHTX=2
-DJOY_AXIS_RIGHTY=3
-DJOY_HAT_DPAD_UP_HAT=0
-DJOY_HAT_DPAD_UP=1
-DJOY_HAT_DPAD_DOWN_HAT=0
-DJOY_HAT_DPAD_DOWN=4
-DJOY_HAT_DPAD_LEFT_HAT=0
-DJOY_HAT_DPAD_LEFT=8
-DJOY_HAT_DPAD_RIGHT_HAT=0
-DJOY_HAT_DPAD_RIGHT=2
-DJOY_BUTTON_A=0
-DJOY_BUTTON_B=1
-DJOY_BUTTON_Y=2
-DJOY_BUTTON_X=3
-DJOY_BUTTON_LEFTSTICK=10
-DJOY_BUTTON_RIGHTSTICK=11
-DJOY_BUTTON_RIGHTSHOULDER=5
-DJOY_BUTTON_LEFTSHOULDER=4
-DJOY_BUTTON_TRIGGERLEFT=6
-DJOY_BUTTON_TRIGGERRIGHT=7
-DJOY_BUTTON_START=9
-DJOY_BUTTON_BACK=8
)
elif [[ "$TARGET" == "rs90" ]]; then
defs+=(-DUSE_SDL1=ON)
else

8
Packaging/OpenDingux/buildroot_rg350_defconfig

@ -10,11 +10,9 @@ BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-lto"
BR2_GCC_VERSION_4_9_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-lto"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_SDL2=y
BR2_PACKAGE_SDL2_IMAGE=y
BR2_PACKAGE_SDL2_IMAGE_PNG=y
BR2_PACKAGE_SDL2_MIXER=y
BR2_PACKAGE_SDL2_TTF=y
BR2_PACKAGE_SDL=y
BR2_PACKAGE_SDL_MIXER=y
BR2_PACKAGE_SDL_TTF=y
BR2_PACKAGE_ETNA_VIV=y
BR2_PACKAGE_ETNA_VIV_ABIV4=y
BR2_PACKAGE_MESA3D_ETNA_VIV=y

16
Packaging/OpenDingux/devilutionx-retrofw.man.txt

@ -1,5 +1,19 @@
Copy diabdat.mpq from your CD, or GoG install folder to:
/home/retrofw/games/devilutionx/diabdat.mpq
/home/retrofw/.local/share/diasurgical/diabdat.mpq
Game saves and diablo.ini are located at:
/home/retrofw/.local/share/diasurgical/devilution
Controls:
- D-pad: move hero
- A: attack nearby enemies, talk to towns people and merchants, pickup & drop items in inventory, OK while in main menu
- B: Select spell, cancel while in main menu
- X: pickup gold, potions & equipment from ground, open chests and doors that are nearby, use item when in inventory (useful to read books etc.)
- Y: cast spell, go to previous screen when talking to people and in shops, delete character while in main menu
- R1: inventory
- L1: character
- Suspend + R1: Drink health potion
- Suspend + R2: Drink mana potion
- Suspend + Y: Quest log
- Select: automap
- Start: game Menu, skip intro

1
Packaging/OpenDingux/package-opk.sh

@ -24,6 +24,7 @@ Icon=Diablo_32
Categories=games;
X-OD-Manual=readme.gcw0.txt
X-OD-NeedsDownscaling=true
X-OD-NeedsJoystick=true
EOF
mksquashfs \

17
Packaging/OpenDingux/readme.gcw0.txt

@ -6,4 +6,21 @@ diabdat.mpq filename must be lowercase.
Game saves and diablo.ini are located at:
/media/home/.local/share/diasurgical/devilution/
Controls:
- Left analog: move hero
- Right analog: simulate mouse
- A: attack nearby enemies, talk to towns people and merchants, pickup & drop items in inventory, OK while in main menu
- B: Select spell, cancel while in main menu
- X: pickup gold, potions & equipment from ground, open chests and doors that are nearby, use item when in inventory (useful to read books etc.)
- Y: cast spell, go to previous screen when talking to people and in shops, delete character while in main menu
- R1: inventory
- L1: character
- R2: drink mana potion
- L2: drink health potion
- Left analog click: quest log
- Right analog click: left mouse click
- Select: automap
- Start: game Menu, skip intro
Source: https://github.com/diasurgical/devilutionX/

8
SourceX/controls/devices/joystick.cpp

@ -51,6 +51,14 @@ ControllerButton JoyButtonToControllerButton(const SDL_Event &event)
case JOY_BUTTON_RIGHTSHOULDER:
return ControllerButton::BUTTON_RIGHTSHOULDER;
#endif
#ifdef JOY_BUTTON_TRIGGERLEFT
case JOY_BUTTON_TRIGGERLEFT:
return ControllerButton::AXIS_TRIGGERLEFT;
#endif
#ifdef JOY_BUTTON_TRIGGERRIGHT
case JOY_BUTTON_TRIGGERRIGHT:
return ControllerButton::AXIS_TRIGGERRIGHT;
#endif
#ifdef JOY_BUTTON_START
case JOY_BUTTON_START:
return ControllerButton::BUTTON_START;

Loading…
Cancel
Save