kichikuou / xsystem35-sdl2

Multi-platform implementation of AliceSoft's System3.x game engine.
https://kichikuou.github.io/web/
GNU General Public License v2.0
61 stars 8 forks source link

Unexpected pauses and wrong text in Rance IV #4

Closed nunuhara closed 5 years ago

nunuhara commented 5 years ago

This code seems to be executed too often:

https://github.com/kichikuou/xsystem35-sdl2/blob/fa790cdcbd9bfea4395215496602efca7c0874b3/src/message.c#L114-L117

The problem is especially noticeable in the English translation of Rance IV, but it also happens in the Japanese version. To reproduce the issue, simply open Rance IV. Normally this should take you immediately to the menu (assuming you've already watched the opening), but what actually happens is the game pauses and you have to click to make the menu show up. After clicking, the text in the message box at the bottom is replaced by 「オープニング」 i.e. the text of the first item in the menu.

1 2

I looked into this a bit and I suspect the issue is that the nextLineIsAfterKaigyou flag is not reset in msg_setMessageLocation. I don't think it makes sense to call msg_nextPage after the message location has been changed. That's probably why the wrong text shows up.

kichikuou commented 5 years ago

Great find, resetting nextLineIsAfterKaigyou in msg_setMessageLocation seems to be the right fix.