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

Auto Mode gets stuck on blank line #121

Open
drojf opened this issue Feb 13, 2024 · 0 comments
Open

Auto Mode gets stuck on blank line #121

drojf opened this issue Feb 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@drojf
Copy link
Contributor

drojf commented Feb 13, 2024

Problem

It was reported on discord

When the second line from this screenshot plays, voice and text are not in sync: first the voice plays over an empty textbox, and then the text appears when she already stops talking.

I had a look, and this is the offending code.

// だから一連の事件も、犯人は誰かってことよりも、事件の存在自体が、古い因習がまだ根深く残ってることの証拠だって思って面白がってるくらい...。@
	ModPlayVoiceLS(4, 9, "ps3/s19/09/500900070", 256, TRUE);
	if (GetGlobalFlag(GADVMode)) { OutputLine("<color=#f6d9a8>鷹野</color>", NULL, "<color=#f6d9a8>Takano</color>", NULL, Line_ContinueAfterTyping); }
	if (GetGlobalFlag(GADVMode)) { OutputLine(NULL, "", NULL, "<size=-2>", Line_Continue); }
	OutputLine(NULL, " だから一連の事件も、犯人は誰かってことよりも、事件の存在自体が、古い因習がまだ根深く残ってることの証拠だって思って面白がってるくらい…。」",
		   NULL, "So even for this string of incidents, it's not so much finding out who the culprit is, but enjoying thinking about how the old traditions displayed by the incidents themselves still seems to have some pretty deep roots around here...\"", GetGlobalFlag(GLinemodeSp));
	if (GetGlobalFlag(GADVMode)) { ClearMessage(); } else { OutputLineAll(NULL, "\n\n", Line_ContinueAfterTyping); }

The line causing the issue is if (GetGlobalFlag(GADVMode)) { OutputLine(NULL, "", NULL, "<size=-2>", Line_Continue); } immediately following the ModPlayVoiceLS(...) command.

I guess auto mode assumes that the voice is associated with the immediate next line. This line is blank (ignoring the size tag), so it holds the blank line on screen until the voice ends. Once the voice ends, it shows the "correct" line, but at that point the voice has already stopped playing.

More instances: 07th-mod/watanagashi@d66fa0b

Fix

While I could try to move the <size=-2> command back in the script, fixing it in the engine would fix all instances of this bug across all chapters.

I think skipping "empty" lines in auto mode will fix it. However I need to figure out how the engine parses tags, so that it can ignore the tags on the line (maybe it's easy, I've just never looked at that part of the code before).

@drojf drojf added the bug Something isn't working label Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant