angstsmurf / spatterlight

Updated fork of Spatterlight
GNU General Public License v3.0
105 stars 5 forks source link

Animate scrolling locks up under certain condition #75

Closed Nephar closed 3 months ago

Nephar commented 3 months ago

After a /replay of a long command log in Bocfel (for a z5 file compiled by Dialog), if I press Cmd+ (Cmd+down arrow) before typing anything else, scrollback buffer starts scrolling down slowly(about one page per second and it gets slower as it gets closer to the end of the buffer) and the animation can't be escaped until it run its course to EOF or by shutting down the program.

Clearing Animate scrolling checkbox resolves the issue.

angstsmurf commented 3 months ago

Heh. The "slow scrolling" is meant to be clipped at a maximum of 0.3 seconds to scroll to the bottom, but apparently I used a MAX() macro where I should have used MIN(). This will be fixed in the next release.

angstsmurf commented 3 months ago

By the way, do you happen to have a good test case of this which you are willing to share?

Nephar commented 3 months ago

Sure, this is my WIP port of advent430 from ESR's Open Adventure (which is itself a port of adv430) and a 328 turns max score walkthrough log (from the issues board of Open Adventure) to replay. Obviously, this spoils the game completely. Just /replay 328.txt as soon as the game starts, wait for the game over and hit Cmd+. advent430.zip

angstsmurf commented 3 months ago

Thanks!

angstsmurf commented 3 months ago

By the way, until the next release, you can work around this problem by just simply pasting or opening the command script directly at the command prompt instead of using the /replay command.

Nephar commented 3 months ago

Aha, I had no idea that File->Open... could be used for command scripts. (Now if I could only use Bocfel from the terminal, all my problems would go away. But that's nothing to do with this issue, I just have to bite the bullet and try to link Bocfel to the CheapGlk.)

angstsmurf commented 3 months ago

I wrote some instructions to on how to build and link Glulxe with CheapGlk in Terminal on a Mac here. No idea if they are helpful, or how to adapt them to Bocfel.

Nephar commented 3 months ago

Thanks, every bit of information helps. Zarf said to look at the build notes in https://github.com/erkyrath/cheapglk. Between this

When you compile a Glk program and link it with GlkTerm, you must supply one more file: you must define a function called glkunix_startup_code(), and an array glkunix_arguments[]. These set up various Unix-specific options used by the Glk library. There is a sample "glkstart.c" file included in this package; you should modify it to your needs.

and your instructions, I might have a chance at managing this.

Edit: Wait, Bocfel is glk enabled software anyway, so that function and array are already in place right? That is even better prospects, in theory. Edit 2: I have built Bocfel with CheapGlk, thanks for the help. Now I will leave this thread alone and won't clutter it anymore with irrelevant comments. (I can delete this entire comment if you want me to.)