Skip to content
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

AGI: support new WinAGI *.wag file format #2766

Merged
merged 1 commit into from Feb 15, 2021
Merged

Conversation

@ZvikaZ
Copy link
Contributor

@ZvikaZ ZvikaZ commented Feb 10, 2021

No description provided.

@bluegr
Copy link
Member

@bluegr bluegr commented Feb 11, 2021

Which games use this newer format? Is there any documentation on it, which was used to deduce the newer syntax?

@ZvikaZ
Copy link
Contributor Author

@ZvikaZ ZvikaZ commented Feb 11, 2021

I'm not aware of any games that are using the new format; but I'm also not aware of games using the old format.
I've stumbled upon this while working on translation of PQ1. I noticed that it's trying to parse the .wag file (because the game wasn't detected due to my changes), but failed.

Any of the games that used the old .wag file might use the newer file, if they will have some revision, using newer WinAGI.
I assumed that there are considerations that led to adding support for .wag file in the first place, and they might hold for future games. Therefore, I wanted this feature to work.

Regarding the format - well, I haven't seen official documentation of the file. But looking at it, it's seems to be just a simple text INI file.

Here's the beginning of the file:

#
# WinAGI Game Property File
#

[General]
   WinAGIVersion = 2.1.1
   GameID = pq1
   Interpreter = 2.917
@AGKorson
Copy link

@AGKorson AGKorson commented Feb 12, 2021

I am the author of WinAGI (which uses *.wag files). The format was updated in version 1.2.3 (current version is 2.1.5). The new format is text based as ZvikaZ describes. The format specifications enforced by WinAGI are:

'elements of a settings file:
'
' #comments begin with hashtag; all characters on line after hashtag are ignored
' 'comments can be added to end of valid section or key/value line
' blank lines are ignored
' [::BEGIN group::] marker to indicate a group of sections
' [::END group::] marker to indicate end of a group
' [section] sections indicated by square brackets; anything else on the line gets ignored
' key=value key/value pairs separated by an equal sign; no quotes around values means only
' single word; use quotes for multiword strings
' if string is multline, use '\n' control code to represent line breaks (and use multiword option)
(The group markers are used to keep resource sections (i.e. Logic1, Logic2, etc) together, and can safely be ignored when reading a wag file.)

If you need a detailed list of recognized properties with descriptions or any other information, let me know. You can reach me on the http://sciprogramming.com forums.

@bluegr
Copy link
Member

@bluegr bluegr commented Feb 15, 2021

Good to have feedback by the WinAGI author :) Thanks for the information!
Nice work, and a good addition to the AGI detector. Merging

@bluegr bluegr merged commit 03fb100 into scummvm:master Feb 15, 2021
3 checks passed
3 checks passed
Codacy Static Code Analysis Codacy Static Code Analysis
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deepcode-ci-bot Well done, no issues found!
Details
@ZvikaZ ZvikaZ deleted the ZvikaZ:z_agi_wag branch Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants