Skip to content
Keyboard and Controller support for Diablo 1.
Branch: master
Clone or download
Pull request Compare This branch is 66 commits ahead, 1150 commits behind diasurgical:master.
erfg12 Update README.md
Added authors note and how to compile.
Latest commit 9c0a86f Jul 2, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis Move builds to master Jan 14, 2019
3rdParty Correct signature of SFileGetFileArchive (diasurgical#599) Mar 10, 2019
DiabloUI Resolve argument nam for UiSelHeroMultDialog Jan 27, 2019
Source fixed X key casting and exiting talk, instead of doing either Mar 31, 2019
docs Fix debug build as C (diasurgical#566) Jan 14, 2019
.clang-format Update style to use tabs Oct 25, 2018
.editorconfig Update style to use tabs Oct 25, 2018
.gitignore Converted workspace, projects, makefile to VC++6 Aug 21, 2018
.travis.yml Update .travis.yml Mar 9, 2019
Diablo.dsp Add TC to the VS projects (diasurgical#667) Mar 17, 2019
Diablo.dsw Merge remote-tracking branch 'devilution/master' Sep 17, 2018
Diablo.ico Add files via upload Jun 7, 2018
Diablo.rc + do not use MFC header in .rc Oct 23, 2018
Diablo.sln Created VS 2017 solution file and project files. (diasurgical#93) Jun 28, 2018
Diablo.vcxproj
Diablo.vcxproj.filters started work on XInput Mar 25, 2019
LICENSE Create LICENSE Jun 6, 2018
Makefile The big cheap fix (diasurgical#446) Nov 6, 2018
MakefileVC MI_Firemove bin exact Mar 16, 2019
README.md Update README.md Jul 2, 2019
appveyor.yml Fix appveyor.yml (diasurgical#98) Jun 28, 2018
defs.h Only expose SEG_ALLOCATE to MSVC Mar 7, 2019
enums.h Add player_weapon_type Dec 7, 2018
format.sh Use .clang-format config instead of -style command line settings. Oct 6, 2018
resource.h Fix function signatures and others (diasurgical#158) Aug 12, 2018
structs.h Update structs.h Mar 16, 2019
types.h started work on XInput Mar 25, 2019

README.md

Adding keyboard movements and controller support.

Video

https://www.youtube.com/watch?v=Ti4LgdTQ6cE

Layout

Roadmap

  • Part 1 : Impliment functions and map them to keyboard controls.
  • Part 2 : Integrate XInput for controller support, and impliment our functions.
  • Part 3 (OPTIONAL) : Local co-op for controllers. Up to 4 players.

New Keyboard Setup

  • Spacebar - Attack nearby enemies, talk to towns people and merchants. Pickup & Drop items in inventory.
  • Enter - Pickup gold, potions & equipment from ground, open chests and doors that are nearby.
  • Arrow Keys and WASD Keys - Move character in that direction. Move cursor in inventory & speedbook.
  • X Key - Cast spell or use skill. Back out of menus.
  • Q Key - Use first health potion in belt.
  • E Key - Use first mana potion in belt.
  • Moved Speedbook key to H.

New Functions

  • Automap only moves when you hold down shift.
  • Towns people, items and objects show information when nearby.
  • Inventory snaps to grid system, use arrow/WASD keys to move around. Spacebar to pickup/drop items.
  • Speedbook spells have snap grid system, use arrow/WASD keys to move around. Spacebar to select spell.
  • Character info window level up attribute increase buttons now make cursor snap to them.
  • Xbox One & 360 controller support added.

Xbox Controller Button Layout

  • A Button: Attack nearby enemies, talk to towns people and merchants, confirm menu clicks.
  • B Button: Open inventory
  • X Button: Pickup gold, potions & equipment from ground, open chests and doors that are nearby.
  • Y Button: Cast spell or use skill. Back out of menus.
  • Back Button: Open automap.
  • Start Button: Open game menu.
  • Left Shoulder Button: Open the speed spell book.
  • Right Shoulder Button: Open character info window.
  • Direction Pad & Left Joystick: Move character.
  • Right Joystick: Move Cursor. Click for mouse left click.
  • Left Trigger: Use first health potion in belt.
  • Right Trigger: Use first mana potion in belt.

How To Port To Your Mod

  • 4 new files have been added that have the new code in them, plrctrls.cpp/.h and joystick.cpp/.h
  • Any code that was altered in the other files were commented with // JAKE

How To Compile

  • Open Diablo.sln with Visual Studio. On the top bar select "Build" > "Build Solution". You now have the Diablo.exe file in your "Bin/Debug" folder.
  • Replace your old game executable file with this file in your Diablo game folder (GOG or CD).

Support

If you find any bugs, please open an issue here on GitHub.

Author's Note

This took me a few weeks to make and it would mean a lot to me if you would give credit for any borrowed code. Thank you!

You can’t perform that action at this time.