mirror of
https://github.com/KarolS/millfork.git
synced 2024-10-01 07:59:30 +00:00
CHange semantics of reset_joy to make more sense
This commit is contained in:
parent
8ebeb2eeeb
commit
bf6f0609a1
@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
* Added `vectrex`, `msx_br`, `koi7n2`, `iso15`, `zx80` and `zx81` text encodings.
|
* Added `vectrex`, `msx_br`, `koi7n2`, `iso15`, `zx80` and `zx81` text encodings.
|
||||||
|
|
||||||
|
* `reset_joy` is now defined to always reset all joypad state variables.
|
||||||
|
|
||||||
* Fixed arithmetic promotion bugs for signed values.
|
* Fixed arithmetic promotion bugs for signed values.
|
||||||
|
|
||||||
* Fixed parsing of `zp_bytes` in platform definitions.
|
* Fixed parsing of `zp_bytes` in platform definitions.
|
||||||
|
@ -22,8 +22,8 @@ Vertical joystick movement. 1 if down, -1 if up, 0 if neither.
|
|||||||
#### `void reset_joy()`
|
#### `void reset_joy()`
|
||||||
|
|
||||||
Resets the state variables.
|
Resets the state variables.
|
||||||
For platforms with more than one button, this resets only the main button state.
|
The default implementation resets only the main button.
|
||||||
On those platforms use the platform-specific functions instead.
|
May be overridden by a strong alias on some platforms that have more buttons.
|
||||||
|
|
||||||
## null_joy_default
|
## null_joy_default
|
||||||
|
|
||||||
@ -31,6 +31,8 @@ This module set the default joystick to no joystick.
|
|||||||
|
|
||||||
#### `alias read_joy`
|
#### `alias read_joy`
|
||||||
|
|
||||||
|
A reserved name for reading the default joystick.
|
||||||
|
|
||||||
## mouse
|
## mouse
|
||||||
|
|
||||||
The `mouse` module automatically imports the `x_coord` module.
|
The `mouse` module automatically imports the `x_coord` module.
|
||||||
|
@ -76,9 +76,9 @@ Reads the joypad from the port 1 and adds its readouts to the current readouts.
|
|||||||
Reads the joypad from the port 2 and adds its readouts to the current readouts.
|
Reads the joypad from the port 2 and adds its readouts to the current readouts.
|
||||||
|
|
||||||
#### `void nes_reset_joy()`
|
#### `void nes_reset_joy()`
|
||||||
|
#### `alias reset_joy = nes_reset_joy!`
|
||||||
|
|
||||||
Resets the state variables.
|
Resets the state variables.
|
||||||
Unlike `reset_joy`, this resets all the NES button states.
|
|
||||||
|
|
||||||
## nes_joy1_default
|
## nes_joy1_default
|
||||||
|
|
||||||
|
@ -19,12 +19,16 @@ macro void read_joy2() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void nes_reset_joy() {
|
void nes_reset_joy() {
|
||||||
|
input_dx = 0
|
||||||
|
input_dy = 0
|
||||||
|
input_a = 0
|
||||||
input_b = 0
|
input_b = 0
|
||||||
input_select = 0
|
input_select = 0
|
||||||
input_start = 0
|
input_start = 0
|
||||||
reset_joy()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alias reset_joy = nes_reset_joy!
|
||||||
|
|
||||||
inline void read_also_joy1() {
|
inline void read_also_joy1() {
|
||||||
strobe_joypad()
|
strobe_joypad()
|
||||||
__parse_nes_joypad1()
|
__parse_nes_joypad1()
|
||||||
|
Loading…
Reference in New Issue
Block a user