mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-09 17:52:08 -10:00
Locale Sensitive Controls and Textfield Input + Add Keyboard Layout sensitive InputBoxes + Remove obsolete helper function * Fig [] usage and remove old keybinding names + Fix Compile Warnings + Fix Compile Warnings 2 + Fix Clang Warnings + Fix faulty style + remove lambda + Change reverse-lookup map to iterating function + Added controlconfigdefault.tbl generator + Fixed gcc warning + Fixed msvc warning + make debug console keyboard layout independent + Expand DCF Functionality for saving control presets + Address Issues * Controls/update tbl (#5) Updates controlconfigdefaults.tbl to write Primary and Secondary bindings. * Added Scripting Hooks for controlsconfigdefault.tbl (#6) * Handle Asserted Switch cases * Controls is a library and should be in the libs folder * Add Lock & EnableScripting Functionality and expose it to scripting API * Added scripting isLocked * Move Key Hooks to register-able callback * Add option to remove hook * Repurpose CCI.used for Axes * Morph bitfield into a singleton class * Add encoding conversion helpers + Add keyname conversion if needed + Merge refactored encoding functions + Change keycode encoding call + remove bad type modifier + Move Conversion functions to util/unicode + Change Encoding Enum to Enum Class + Adapt KeyName call for encoding enum class + Fix Warning due to enum class + Change validation to own function * Make mActionToVal Assertion more helpful * Fix typo * Fix style * Use constant, not magic number * Document Ignored_keys[] * Doxy class controls_lua_override_cache a bit better * Put NameToVal safeties back in * Reorder the +Disable and $Disable: options, and be exclusive * Reorder the +Locked and $Loacked options, and be exclusive * Revert changes in ValToJoy * Revert errant duplicates * Refactor printJoyJSON() to use getJsonArray for consistency * Remove unused FS2toSDL map * Remove ADE_FUNC(AxisActionInverted) * Address gcc-5 issues * Remove unused param for textify_scancode * Declare textify_scancode_universal() in controlsconfig.h for use * Clean up textify_scancode() and *_universal() a smidge for clarity * Address most clang-9 issues * Modernize NULL to nullptr * Expand logic and document in controlsconfig::check_control() for clarity. * Fix typo * Remove unecassary static_cast * Use Assertion instead of Assert within control_config_common_read_section() * mprintf()'s need new lines! Co-authored-by: Birk Magnussen <[email protected]> Co-authored-by: Birk Magnussen <[email protected]>
42 lines
1.2 KiB
C
42 lines
1.2 KiB
C
/*
|
|
* Copyright (C) Volition, Inc. 1999. All rights reserved.
|
|
*
|
|
* All source code herein is the property of Volition, Inc. You may not sell
|
|
* or otherwise commercially exploit the source or things you created based on the
|
|
* source.
|
|
*
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __FREESPACE_KEYCONTROL_H__
|
|
#define __FREESPACE_KEYCONTROL_H__
|
|
|
|
#include "controlconfig/controlsconfig.h"
|
|
|
|
// Holds the bit arrays that indicate which action is to be executed.
|
|
#define NUM_BUTTON_FIELDS ((CCFG_MAX + 31) / 32)
|
|
|
|
extern int Dead_key_set[];
|
|
extern int Dead_key_set_size;
|
|
extern bool Perspective_locked;
|
|
|
|
extern int Ignored_keys[]; //!< Ignored_keys[CCFG_MAX]; Set by sexp. If >0; value is number of times the key will be temporarily. If <0, key is permamently ignored.
|
|
|
|
typedef struct button_info
|
|
{
|
|
int status[NUM_BUTTON_FIELDS];
|
|
} button_info;
|
|
|
|
void button_info_set(button_info *bi, int n);
|
|
void button_info_unset(button_info *bi, int n);
|
|
int button_info_query(button_info *bi, int n);
|
|
void button_info_do(button_info *bi);
|
|
void button_info_clear(button_info *bi);
|
|
void process_set_of_keys(int key, int count, int *list);
|
|
void game_process_pause_key();
|
|
void button_strip_noncritical_keys(button_info *bi);
|
|
|
|
|
|
#endif
|