Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a "prev map" key binding #2046

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

add a "prev map" key binding #2046

wants to merge 5 commits into from

Conversation

fabiangreffrath
Copy link
Owner

Fixes #2007

@@ -2608,6 +2608,18 @@ boolean M_ShortcutResponder(const event_t *ev)
}
}

if (M_InputActivated(input_menu_prevlevel))
{
if (demoplayback && singledemo && !PLAYBACK_SKIP)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this part.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Next Level" works during demoplayback. "Prev Level" would not be so practical - we would have to restart the demo from the beginning. I think we need demo compatible save/rewind to implement the "Prev Level" feature well.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need demo compatible save/rewind to implement the "Prev Level" feature well.

For demos, yes. But for regular play?

What if you start the game with -warp 1 2 and hit the "prev level" button? I would expect it to go back to E1M1, although this map has not been visited in the current run.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For demos, yes. But for regular play?

Yes, I was talking about demos. Sure, we can implement "prev map" without demo playback support.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Demo support for "prev level" would be very useful.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Demo support for "prev level" would be very useful.

Then it will take a while until we have demo-compatible saves. DSDA-Doom has an implementation of it, but I want to try to extend zone memory with "relative pointers" idea: https://nullprogram.com/blog/2023/09/30/

instead of pointers I use signed integers whose value indicates an offset relative to itself

This would allow us to save/restore the entire playsim with a single memcpy. Not sure if this will work though.

@@ -702,6 +702,7 @@ void M_BindInputVariables(void)

BIND_INPUT(input_menu_reloadlevel, "Restart current level/demo");
BIND_INPUT(input_menu_nextlevel, "Go to next level");
BIND_INPUT(input_menu_prevlevel, "Go to previous level");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's config only? We don't have room for it in the "Key Bindings" menu. Maybe we should move player 1-4 to config:
image

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's a good solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a "prev map" key binding
3 participants