Now the log() function writes to a file, as
the AGI engine did.
It appears that ScummVM doesn't have any "append" functionality.
As a result, I made this implementation create a new file each time
a message is logged. Note that the file is only created if the
log() function is called. The file name includes the game name
and the current time, ensuring that logs won't be overwritten.
The format is: agi.<gameid>.<currentime>.log and will be logged to
the working directory.
Last week I first implemented the log() function. In that commit
I just had it log to the console. In this commit we start
writing to a file.
This log() function was previously unimplemented in ScummVM. Its
purpose is to write log messages and some metadata about the game state
to a file.
This functionality does not affect game play. Presumably Sierra used
this to beta test their games. They would log the words that their
testers used but the game did not understand. The testers would
then submit the log file back to Sierra. Sierra would add the missing
words or descriptions to their games before release.
This is the first diff of a couple which will incrementally add this
functionality. In this diff, we just collect the information we need to
generate a log message close to what AGI actually did.
There are two notable differences which will be fixed in future diffs:
(See the comments in the code for more details.)
1. No message formatting.
2. We log to the console only.
For context, I'm currently writing an AGI game and would like to
collect this output from my friends and family, which is why I'm
implementing this functionality today.
Depending on other game option checkboxes. This is used to
enable/disable the semi-smooth scrolling checkboxes for FM Towns Loom,
since it's only used when smooth scrolling is enabled.
Macintosh versions of GR and MH1-2 use the same combined directory
filename convention as DOS, Atari ST and Apple IIgs (but not Amiga or
CoCo3). However, the filename convention for volumes uses the common
AGI v2 format, without a game id prefix.
Example:
DOS: GRDIR, GRVOL.x
Mac: GRDIR, VOL.x
To account for this, we'll use the following:
1. Rather than take the directory filename prefix from volume files,
we now get this from the directory files themselves (which makes
more sense anyway).
2. Later, when loading individual volumes, check for Mac platform and
exclude the prefix from the path.
This improves the previous single game check for Mac Gold Rush, which
formed directory and volume paths for that game only. This check is
now obsolete and has been removed. The detection flag that was used to
invoke the workaround has also been removed.
Add both Manhunters to detection tables. They don't start yet (because
the AGI V3 games store their directory files differently). I'll attempt
to fix this by adapting the method used for Mac Gold Rush.
Also add a new PC version of MH2 in order to resolve an md5 conflict
with the Mac version.
* Remove redundant language text
* Fix entries with duplicate md5 hashes
* UTF-8 titles since they're now supported
* Correct titles to match game & AGI Wiki
* New CoCo 3 ports of fanmade titles
* Fix alphabetical sorting
Gourd of the Beans is now listed as a Windows game. This was
released in 2015 and was always distributed with a modern interpreter,
specifically NAGI. It was never meant to be played in MS-DOS.
Adds detection for CoCo 1/2 early / pre-AGI games. CoCo 1 and 2 were
not generally forward compatible with CoCo 3, which was officially
supported by Sierra for KQ3 and LSL1 only.
These games either won't start or crash on the title screen, so I've
flagged them as unsupported for now.
Also adds some additional fanmade CoCo 3 ports. I'm in contact with
the porter and may be updating and further cleaning up these entries
as I learn more.
Alternate version of Troll's Tale works without issue.
PCjr, Tandy 1000, and IBM PC booters for KQ1-2 do not work because
the earliest AGI versions are not yet supported.
Later MS-DOS releases of Troll's Tale also do not work yet.
The autosave refactoring that was done in
7adad5aaf5831dc5adcee140f38aacc4a5db2518 used g_engine for identifying the
autosave slot. This worked for in-game save/load, but doesn't fit when
called from the launcher.
Fix by passing MetaEngine to SaveStateDescriptor ctor and using it for this
query.
Amends 7adad5aaf5831dc5adcee140f38aacc4a5db2518.
Some engines call setAutosave and some don't. isAutosave is used to
determine if a saved game is an autosave, but in fact, on most cases it
just falls back to comparing the name to "Autosave".
This is wrong for several reasons:
* Older versions of ScummVM used Autosave 0.
* The name "Autosave" is translated, so if you change the language, it
won't be detected.
Instead of relying on the name, use the well-known getAutosaveSlot() from
Engine/MetaEngine.
Fixes#12735.
This employs a "lazy" approach: the "format" for the credits stays
exactly as it was, i.e., perl code. Of course one may want to change
this to another format (e.g. YAML, JSON, XML; or also shell script or
AWK, like `configure.engine` uses). But I deliberately kept it simple,
to get a minimal change that is easy to verify. Any further changes to
e.g. the format can be layered atop this.
These worked, but caused the entries in the launcher to be named wrongly
so have switched to using GAME_FO macro to set the GF_FANMADE feature
flag without other flags causing side effects for the launcher entry
naming.