-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
VCRUISE: Add V-Cruise engine #4710
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
Conversation
|
@elasota : One warning of missing gameID in the detection table entries: |
|
@elasota : A few more warnings (The first one is the need to avoid "??" and "???" as they have syntatic meaning in C/C++): |
|
@elasota : That gets rid of a fair amount of warnings. Only a few remain: |
|
Before going further into the engine review, I'd like to ask you to split the cursor changes into a separate PR so that it can be reviewed and merged before the engine. |
|
@elasota : Now clean of warnings for me. Thanks for working on this. If you need playtesting, I have Reah and Schizm from CD. |
|
@elasota : Further note on my 6 CD version of Reah. Missing detection entry: For reference, full file md5sum is: |
Moved this to pull #4713 but also fixed a bunch of issues, so will have to redo this PR after that's merged.
One thing I would be interested with the 6CD version is what format the music is in. The DVD version uses MP3-in-WAV music but based on some things I've been reading the CD-ROM version may used uncompressed, so it would be nice to get an MD5 + file size of Music-00.wav too. I am also not sure if there exist versions with other language VO. The DVD version only has English VO. |
|
@elasota : Here are the required detection entries for my copies of Reah (6 CD) and Schizm (5 CD): |
|
@elasota : My copy of Reah has Music-00.wav in pcm_s16le 2ch 22050Hz format i.e. uncompressed. |
|
@elasota : I can provide full file listing with MD5sum if required of both. Just a further note that currently when I try to start either, it immediately exits with a SDL_BlitSurface failed error: |
|
It looks like the problem there is the graphics mode selection in SurfaceSDL can select a 24-bit mode and fillScreen with a 24-bit mode crashes SurfaceSDL. |
… stream names in Reah
|
Removed the cursor changes, fixed the crash in SurfaceSDL. |
|
@elasota : That has fixed the crash for me. I get the Reah intro now up to the journalist outside of the walled city gate. I note that you didn't include the detection entries I provided yet :) Apart from that, the Schizm.exe is identical between the GOG release and the original 5 CD release so that may need another file in detection to distinguish if needed. You probably already know, but Schizm fails to start with "Couldn't figure out what screen to start on". Anyway, good luck on getting this working. |
|
@elasota : Just a quick note against commit e7b0634, this warning turned up: I would just change the type of one of those variables to match i.e. both signed or both unsigned instead and avoid the cast... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finished my first review round
|
I think all issues should be cleaned up now except for the pixel format and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa! You're fast. I have only one small issue/remark which could be resolved in-tree.
| if (stream->read(interactionData, 12) != 12) | ||
| error("Error reading interaction data"); | ||
|
|
||
| idef.rect = Common::Rect(READ_LE_INT16(interactionData + 0), READ_LE_INT16(interactionData + 2), READ_LE_INT16(interactionData + 4), READ_LE_INT16(interactionData + 6)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use here a more intuitive stream->readUint16LE() for every variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C++ order of parameter evaluation is undefined (which I have been burned by before - VS optimizer can reorder execution of parameter expressions even if the expressions have side effects) so it would need to be separate read lines, plus I think this way makes it easier to detect a read failure.
| } | ||
|
|
||
| bool TextParser::readOneChar(char &outC, TextParserState &outState) { | ||
| if (_returnedBufferPos == kReturnedBufferSize) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend using wrapBufferedReadStream() to achieve the same result. See common/bufferedstream.h
|
Time to merge... |
This adds initial support for the V-Cruise engine used by Reah: Face the Unknown and Schizm: Mysterious Journey and initial detection for Reah. (I actually need to figure out the detection some more because the GOG version and DVD version only ship English VO.)
This is very preliminary right now, right now it boots Reah to the intro cinematic and then gets stuck at the opening screen, I'm working on getting navigation implemented.
Documentation of its formats (and a decoder/encoder for the scripts) currently resides at https://github.com/elasota/vcr, everything is documented except for yet-to-be-understood script ops and the "morph" format which was added in Schizm.
The biggest change to core is the addition of cursor masks. Reah uses a magnifying glass cursor where the lens part is inverted, unfortunately ScummVM only supports color key cursors. This tries to add the groundwork (i.e. mode values and feature flags) for fully supporting the Windows and classic MacOS cursor formats, although only total inversion is supported in OpenGL right now.