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.
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.
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.
I looked into this a bit and I suspect the issue is that the
nextLineIsAfterKaigyou
flag is not reset inmsg_setMessageLocation
. I don't think it makes sense to callmsg_nextPage
after the message location has been changed. That's probably why the wrong text shows up.