Skip to content

Commit

Permalink
update to input handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyomoto committed Nov 23, 2021
1 parent f222d3d commit bda3522
Show file tree
Hide file tree
Showing 19 changed files with 240 additions and 125 deletions.
14 changes: 8 additions & 6 deletions FAST.yyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion objects/oATSobj/Create_0.gml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__run = function() {
a__run = function() {
if ( running == undefined ) {
var _list;

Expand Down
3 changes: 2 additions & 1 deletion objects/oATSobj/Step_0.gml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
x += 1;
y += 0.5;

if ( gamepad_button_check_pressed( 0, gp_face1 ))
syslog( "BEEP" );
var _scroll = mouse_wheel_up() - mouse_wheel_down();

if ( _scroll != 0 ) {
Expand Down
1 change: 1 addition & 0 deletions objects/oTestO/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ var _v = keyboard_check( vk_down ) - keyboard_check( vk_up );

x += _h * 4;
y += _v * 4;

13 changes: 13 additions & 0 deletions options/operagx/options_operagx.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion options/windows/options_windows.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions scripts/GamepadAxis/GamepadAxis.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/// @func GamepadAxis
/// @param {int/string} constant Must be a gamepad axis input
/// @desc Converts Gamepad Axis' into a format used by (#InputDevice).
/// @wiki Input-Handling-Index Gamepad
function GamepadAxis( _constant ) : __InputSource__() constructor {
static down = function() {
return __Constant();

}
__Constant = _constant;

}
12 changes: 12 additions & 0 deletions scripts/GamepadAxis/GamepadAxis.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions scripts/Logger/Logger.gml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function Logger( _name ) constructor {
var _event = new FrameEvent( FAST_EVENT_GAME_END, 0, function( _list ) {
syslog( "Logger :: Closing all opened loggers..." );

var _i = 0; repeat( ds_list_size( _list ) ) {
repeat( ds_list_size( _list ) ) {
var _target = ds_list_find_value( _list, 0 );

try {
Expand All @@ -132,20 +132,20 @@ function Logger( _name ) constructor {
})();
/// @var {array} An array of the outputs this Logger writes to.
/// @output Outputs...
__Outputs = array_create( argument_count - 1 );
__Outputs = [];

var _i = 0; repeat( argument_count - 1 ) {
var _output = argument[ _i + 1 ];
var _i = 1; repeat( argument_count - 1 ) {
var _output = argument[ _i++ ];

if ( is_array( _output )) {
if ( struct_type( _output[ 1 ], __OutputStream__ ) == false )
throw new InvalidArgumentType( "__init__", _i + 1, _output[ 1 ], "__OutputStream__" );
__Outputs[ _i ] = new __buffer__( _output[ 0 ], _output[ 1 ] );
array_push( __Outputs, new __buffer__( _output[ 0 ], _output[ 1 ] ));

} else {
if ( struct_type( _output[ 1 ], __OutputStream__ ) == false )
if ( struct_type( _output, __OutputStream__ ) == false )
throw new InvalidArgumentType( "__init__", _i + 1, _output[ 1 ], "__OutputStream__" );
__Outputs[ _i ] = _output;
array_push( __Outputs, _output );

}
++_i;
Expand Down
2 changes: 1 addition & 1 deletion scripts/Publisher/Publisher.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/PublisherChannel/PublisherChannel.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions scripts/ScriptEngine/ScriptEngine.gml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ function ScriptEngine() : __Struct__() constructor {
__Variables__[$ _name ] = method( undefined, _value );

}

static push_restriction = function() {
var _arr = array_length( argument_count );
var _i = 0; repeat( argument_count ) {
Expand Down
5 changes: 2 additions & 3 deletions scripts/Sort/Sort.gml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/// @func Sort
/// @desc Creates a new Sort which can be used by sorting functions. Normal use would be to sort
/// an array containing structs or instances and sorting them by key. However, this behavior
/// can be overriden by setting __Seek to a function that returns the variable you wish to use
/// for comparison.
/// an array containing structs or instances and by key. However, this behavior can be overridden
/// by setting __Seek to a function that returns the variable you wish to use for comparison.
function Sort() : __Struct__() constructor {
static func = function() {
return method( self, compare );
Expand Down
4 changes: 2 additions & 2 deletions scripts/__FAST_config__/__FAST_config__.gml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// # End of User Defines
// # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#macro FAST ( __FAST_config__() )
#macro syslog ( __output_to_stream__() ).write
#macro SystemOutput ( __output_to_stream__() )
#macro syslog __output_to_stream__().write
#macro SystemOutput __output_to_stream__()

#macro __FAST_version__ "3.5.2"
#macro __FAST_date__ "06/29/2021"
Expand Down
Loading

0 comments on commit bda3522

Please sign in to comment.