| 1 | /* |
| 2 | * Descent 3 |
| 3 | * Copyright (C) 2024 Parallax Software |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | |
| 18 | --- HISTORICAL COMMENTS FOLLOW --- |
| 19 | |
| 20 | * $Logfile: /DescentIII/main/ctlconfig.h $ |
| 21 | * $Revision: 7 $ |
| 22 | * $Date: 4/30/99 12:12p $ |
| 23 | * $Author: Samir $ |
| 24 | * |
| 25 | * <insert description of file here> |
| 26 | * |
| 27 | * $Log: /DescentIII/main/ctlconfig.h $ |
| 28 | * |
| 29 | * 7 4/30/99 12:12p Samir |
| 30 | * added strings for key ramping, other buttons in general config menu. |
| 31 | * |
| 32 | * 6 4/22/99 3:43p Kevin |
| 33 | * Training missions show controls on screen |
| 34 | * |
| 35 | * 5 2/16/99 12:07p Samir |
| 36 | * redid controller config with new ui. |
| 37 | * |
| 38 | * 4 10/18/98 7:24p Samir |
| 39 | * added a reset to defaults options for key and joystick config. |
| 40 | * |
| 41 | * 3 2/15/98 7:06p Samir |
| 42 | * Keyboard configuration system done. Not joystick. |
| 43 | * |
| 44 | * 2 2/10/98 3:45p Samir |
| 45 | * Added list of configuration items. |
| 46 | * |
| 47 | * 1 2/10/98 11:49a Samir |
| 48 | * Initial revision. |
| 49 | * |
| 50 | * $NoKeywords: $ |
| 51 | */ |
| 52 | |
| 53 | #ifndef CTLCONFIG_H |
| 54 | #define CTLCONFIG_H |
| 55 | |
| 56 | #include <cstdint> |
| 57 | |
| 58 | #define CTLCONFIG_KEYBOARD 0 |
| 59 | #define CTLCONFIG_CONTROLLER 1 |
| 60 | #define CTLCONFIG_WPNSEL 2 |
| 61 | |
| 62 | struct t_cfg_element { |
| 63 | int16_t fn_id; // -1 = group start |
| 64 | int16_t text; // text string id. |
| 65 | int16_t x; |
| 66 | int16_t y; // location (for groups only) |
| 67 | }; |
| 68 | |
| 69 | extern t_cfg_element Cfg_key_elements[]; |
| 70 | extern t_cfg_element Cfg_joy_elements[]; |
| 71 | |
| 72 | int CtlFindBinding(int controlid, bool keyboard); |
| 73 | // configures controllers. |
| 74 | void CtlConfig(int mode); |
| 75 | |
| 76 | // opens the settings dialogs. |
| 77 | void joystick_settings_dialog(); |
| 78 | void key_settings_dialog(); |
| 79 | |
| 80 | #endif |