~sebsite/generic-tetromino-game

when pressing right or left during the soft drop, cancel it. v1 SUPERSEDED

Lorenz (xha): 1
 when pressing right or left during the soft drop, cancel it.

 1 files changed, 5 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sebsite/generic-tetromino-game/patches/41713/mbox | git am -3
Learn more about email & git

[PATCH] when pressing right or left during the soft drop, cancel it. Export this patch

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?
 main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/main.c b/main.c
index 039f77b..7d3e370 100644
--- a/main.c
+++ b/main.c
@@ -7500,7 +7500,11 @@ gameinput(const uint8_t inputs[static 4][2], uint8_t i)
		return 0;
	} else if (!state.game.pause) {
		if (g->dropdelay == 0) {
			if (pressed & INPUT_MASK_DOWN) {
			if (held & INPUT_MASK_DOWN &&
				 pressed & (INPUT_MASK_RIGHT | INPUT_MASK_LEFT)) {
				/* 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