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

SCUMM: [RFC] Make clicking the Maniac Mansion sentence line work like the manual says #3836

Merged
merged 3 commits into from Jun 18, 2022

Conversation

eriktorbjorn
Copy link
Member

@eriktorbjorn eriktorbjorn commented Apr 25, 2022

According to the manual, you can execute commands by clicking on the sentence line.

To tell a kid to carry out the directions you've put on the Sentence Line, either double-click on the final word selected, or click once on the Sentence Line itself. If nothing happens, double check the way you constructed the sentence.

But this doesn't work with the v1 or v2 DOS versions, even though it works with the C64 demo. This is because the verb script doesn't for this, so we have to do that ourselves. It does work in later games, and this pull request is loosely based on how Zak McKracken does it. I'm attaching the verb script from Maniac Mansion v1 and v2, and from Zak McKracken v2 for comparison, but the main difference seems to be that Zak does this:

[0049] (48) if (VAR_CLICK_AREA == 5) {
[004F] (9A)   Var[34] = Var[235];
[0052] (**) }

maniac-v1-script-4.txt
maniac-v2-script-4.txt
zak-v2-script-4.txt

Outstanding questions:

  • Should this be an enhancement, or always enabled? At the moment, it's an enhancement that's enabled for the v1 and v2 versions.
  • I've already checked that it's not a problem in the C64 demo. (At least not when running it in ScummVM.) I assume that means clicking on the sentence line works in the full C64, and probably also Apple II, versions. Can anyone confirm this?
  • I don't have the NES version. At the moment it's probably covered by the workaround since it's SCUMM v1, though there isn't yet any checkbox for it.
  • Is this the best way of doing it, or is there a better way? At the moment, I'm injecting the "did you click on the sentence line" check when script 4 initializes variable 34

According to the manual, you can execute commands by clicking on the
sentence line. But this doesn't work with the v1 or v2 DOS versions,
even though it works with the C64 demo. This is because the verb script
doesn't for this, so we have to do that ourselves. This is loosely based
on how Zak McKracken does it.
According to eintei, there is no need to use the sentence line like this
in the NES version.
@eriktorbjorn eriktorbjorn changed the title SCUMM: [RFC] Make clicking the sentence line work like the manual says SCUMM: [RFC] Make clicking the Maniac Mansion sentence line work like the manual says Apr 25, 2022
@AndywinXp
Copy link
Contributor

@AndywinXp AndywinXp commented Apr 25, 2022

With all the great fixes and enhancements SCUMM has received in the last year I'd be surprised not to find any mention of that in the website news article for the next version: great job, and please keep producing these!

@athrxx
Copy link
Member

@athrxx athrxx commented May 19, 2022

I think you could leave this on without using the enhancements check.
But that's subjective, of course.

@bluegr
Copy link
Member

@bluegr bluegr commented May 23, 2022

Looks good to me! Nice work

@bluegr
Copy link
Member

@bluegr bluegr commented Jun 17, 2022

I also believe that this can be enabled unconditionally, like we do with the mouse functionality in AGI.

There are conflicts now, can you please fix them?

@eriktorbjorn
Copy link
Member Author

@eriktorbjorn eriktorbjorn commented Jun 17, 2022

I've never had to resolve conflicts before. I hope I did it right.

By the way, mouse support in AGI isn't unconditional:

image

@eriktorbjorn
Copy link
Member Author

@eriktorbjorn eriktorbjorn commented Jun 18, 2022

No, apparently I can't resolve the conflicts because when I try to rebase it says there are conflicts, and when I resolve the conflicts and try again it says there are conflicts, and when I resolve the conflicts and try again it says there are conflicts, and...

Sometimes I really, really hate Git.

@bluegr
Copy link
Member

@bluegr bluegr commented Jun 18, 2022

No worries, we can just squash all the commits in this case. Let's keep this under the enhancements flag, like we do for the other features.

@bluegr bluegr merged commit 4c06e04 into scummvm:master Jun 18, 2022
8 checks passed
@eriktorbjorn
Copy link
Member Author

@eriktorbjorn eriktorbjorn commented Jun 18, 2022

Thanks. I was about to make a new branch and reapply the changes there, because it seemed easier to me.

@digitall
Copy link
Member

@digitall digitall commented Jun 18, 2022

@eriktorbjorn : Dang, a bit too slow. I had a fixed up branch ready to push here :)
Seriously, if you need help sorting out git tangles in future, poke me.

For reference, the solution was:

  1. git checkout 9189755
  2. git checkout -b scumm-mm-sentence-line-fixup
  3. git branch -D scumm-mm-sentence-line
  4. git checkout -b scumm-mm-sentence-line
  5. git branch -D scumm-mm-sentence-line-fixup
    (branch scumm-mm-sentence-line is now at 9189755)
  6. git rebase master
    (rebase stops due to conflict in engines/scumm/detection_tables.h)
    (Use an external editor to remove the conflict and markers)
  7. git add engines/scumm/detection_tables.h
  8. git rebase --continue
    (This finishes with no issues)
  9. git push -f (to overwrite the branch)...

@digitall
Copy link
Member

@digitall digitall commented Jun 18, 2022

And before anyone says, I had to do similar things with SVN branch conflicts ... but copying things off manually so git still wins :)

@eriktorbjorn
Copy link
Member Author

@eriktorbjorn eriktorbjorn commented Jun 18, 2022

Maybe it was the force push that was missing. I did get the conflict which I tried to edit as well as I could. But I'm disappointed the GitHub web interface didn't handle it better, since that was what it suggested I use to fix the problems.

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