Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inplast_tmp = inpwork_last
- inpcur_tmp = inpwork
- inpwork_last = inpcur_tmp
- inpwork_down = inpcur_tmp & ~inplast_tmp
- inpwork_no_rept_up = (~inpcur_tmp & inplast_tmp) & inpwork_repeat
- for i in 0...30-1
- inpwork_history[i] = inpwork_history[i+1] # Move the history along
- inpwork_history_inv[29] = inpwork_last # Put current input at end of the history
- historical_held = $FFFF
- for i in 0...30
- historical_held &= inpwork_history[i]
- # historical_held now has bits for all keys held 30 frames or longer
- # inpwork_repeat has all keys held 30 frames or longer IN ADDITION TO all buttons just pressed
- inpwork_repeat = historical_held | inpwork_down
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement