this replicates the behavior of nes tetris.
---
when used together with https://xha.li/hacky_tetris.patch, this makes the tas
go a little further (not that much until it hits another desync xd). make sure
to revert the "input delay disable commit" for this to work ;-)
although i am pretty sure that this is correct, i wanted to ask if you could do
some testing to make sure i didn't forget anything?
also, do you know why it is that when i export .fm3 files from fceux, they are
played in the wrong level by generic-tetromino-game? do you need to do
something special?
So currently the qual_mode mod doesn't actually implement a level select
screen, it just jumps to the generic tetromino game one, which works
differently. It sets game.startlevel to 19 as a hack, so the inputs that
go to level 18 in NES Tetris also go to level 18 in generic tetromino
game. Again, this is a hack solely to get the TAS working. qual_mode
should implement its own version of the level select screen that works
the same way NES Tetris does (with the grid of levels 0-9, and holding A
when starting makes it add 10 to the starting level). I'm not sure what
the best way to do this is, the API for this isn't super great
currently. There used to be game.events.INPUT to listen for game input,
but that was removed in favor of input_handler, but that's not
sufficient here since there can be only one input handler. Maybe
game.prompt should be made more powerful? Like allowing it to prompt for
more than two options and giving more freedom on where on the screen
those options are placed? That still doesn't help with the holding A
situation. idk
I think this would be better if it went within the `((held &
INPUT_MASK_DOWN) != 0 && ...` branch. In that branch could be the `if
(pressed & (INPUT_MASK_RIGHT | INPUT_MASK_LEFT))` and then an `else`
branch with the code already there. If that makes sense.
+ /* cancel softdrop when left or right is pressed */+ g->softdrop = 0;+ } else if (pressed & INPUT_MASK_DOWN) { /* need nested check since if down is pressed
* alongside other directional buttons, they
* cancel out (i.e. else branch isn't taken) */
--
2.41.0