GOB: Adibou 2 / Sciences support#6563
Conversation
Non ASCII characters such as "éèàù" are often found in them.
Same as base version, except it writes "openItk" success status in a game variable.
uint16 is not enough as the negative range is already used for some special values.
Some "library" TOT files used in Adibou2 have no embed resources, nor external ones.
Needed for Adibou2/Sciences, which uses both paletted and high-color sources.
Needed for the "Sciences" extension, which mixes paletted and high-color sources Paletted surfaces now also keeps up to date a high-color map, mapping palette index to high color uint32 values according to current pixel format.
…= DrawPlaytoons) Was previously only implemented in Draw_v2. Fixes the transparency effect in the "choose a level" screen of Adibou2/Sciences.
Some later games VMDs use 44100 Hz frequency, which does not fit in an int16.
Those variables are very often used as a stop condition by the scripts.
- Fix break key conditions - Implement key and mouse button forwarding after interrupting a video
…yback Some Adibou2/Sciences scripts rely on this, by waiting for the "current frame" variable to take the value "last frame + 2"
I recently did a full playthrough of Bamboo, plus a few tests with Urban Runner and Woodruff, without finding any regression so far. |
The cursor can be directly passed to CursorMan.replaceCursor() after being loaded from file. No intermediate copy and pixel format conversion to the ancillary "_scummvmCursor" surface is needed.
…bou2/Sciences) Instead of the original engine one, RGB555.
…dibou2/Sciences) Instead of doing the conversion inside the decoder.
…stinations" Obsolete since the conversion is now done in the Gob engine.
This fixes some incorrect underline colors in Adibou2/Sciences activity sheets.
…perty("TotalPhys")
This unlocks the icon bar animations in Adibou2/Sciences
Fix the icon bar animations not being stopped when they are not hovered anymore.
Blits a surface onto another with alpha merging, using a global transparency strength passed as a parameter by the opcode. This fixes a missing transparency in the help mode of the "sea animals" activity in Adibou2/Sciences.
|
@sdelamarre can this be merged? It looks to be in a good state, and any further changes can be done in-tree |
|
|
||
| void Inter_v7::o7_getFreeDiskSpace(OpGobParams ¶ms) { | ||
| uint16 varIndex = _vm->_game->_script->readUint16(); | ||
| WRITE_VAR(varIndex, 1000000000); // HACK |
There was a problem hiding this comment.
Out of interest, what is this used for?
There was a problem hiding this comment.
Its made for skipping the Installation process in Sciences
There was a problem hiding this comment.
It's an engine opcode originally used by the game scripts to check the amount of available hard disk space. When starting Adibou2/Sciences the very first time, the script performed an "installation" step, where it copied some data from the CD to the hard disk, and called this opcode beforehand to check if there was enough disk space for that. If not, an error message was displayed and the game was stopped.
Here in ScummVM we just announce a fake fixed amount of free disk space, high enough to make the game scripts happy (and this is safe, as there is no actual copy taking place here from any "CD", all the data is already in the game directory).
There was a problem hiding this comment.
Thanks for the explanation. Could you add a comment with the explanation for reference?
There was a problem hiding this comment.
Added in master.
…ibou2/Sciences) The trick to ensure that the pixel value 0 from the image will remain mapped to 0 after conversion is not needed in such a case.
Yes, it should be ok now. I just have pushed two more commits to address @ccawley2011's last remarks. Many thanks to you all for your reviews, that really helped improving both the code and my understanding of some technical details! |
|
Thank you for your awesome work! And thanks for addressing all the comments in this PR. Since this has been tested thoroughly, and, after testing, there are no known regressions to the existing games, it is good to be merged. Please update the engines page in the wiki: Thanks for your work, once again :) |
I have updated the Gob engine page to support Nature/Sciences |
This adds support for the "Nature & Sciences" Adibou 2 extension to the GOB engine.
I am doing this as a PR in case someone passes by and wants to take a look. It took me two years to reverse this one, and some things, like the high color stuff, were new to me. So remarks and reviews are more than welcome as always. :)
The game should now be completable without noticeable glitches. Here is a video of the gameplay : https://www.youtube.com/watch?v=w6PE38phovM
I still need to do a final playthrough and complete all 90 exercises once, but it should be fine, I think I’ve already done them all.
The PC version of the original also included a 3D minigame, where you could drive a car to reach the different modules of the game, that I did not attempt to reverse. It is not based on GOB, so probably out of the scope of ScummVM.
I also did a complete playthrough of Bamboo, and some tests on Urban Runner, which could have been affected by some of the changes in the common parts, although I tried to be as conservative as possible to avoid breaking things for them.