Difference between revisions of "Myst VIEW resources"
m (changed section name) |
(forgot that) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 50: | Line 50: | ||
==Sound section== | ==Sound section== | ||
− | This section specifies ambient sounds for the card. | + | This section specifies ambient sounds for the card. It uses a basic "command" mechanism to continue with the already playing sound, alter it or start a different one. |
+ | |||
{| class="structure" | {| class="structure" | ||
|short||sound | |short||sound | ||
Line 56: | Line 57: | ||
If ''sound'' is -1 or -3, the section stops here. | If ''sound'' is -1 or -3, the section stops here. | ||
+ | *-1 seems to continue with the current sound. | ||
+ | *-3 seems to stop the current sound at all (mute). | ||
If ''sound'' is not negative or -2, the section includes a second field: | If ''sound'' is not negative or -2, the section includes a second field: | ||
Line 61: | Line 64: | ||
|short||sound | |short||sound | ||
|- | |- | ||
− | |unsigned short|| | + | |unsigned short||volume |
|} | |} | ||
+ | A positive ''sound'' stops the currently running sound and starts the given one, while -2 seems to continue with the currently running sound, but different ''volume''. | ||
Finally, if ''sound'' is -4, there is a conditional block similar to those in the picture section: | Finally, if ''sound'' is -4, there is a conditional block similar to those in the picture section: | ||
Line 74: | Line 78: | ||
|variable||sound specifications | |variable||sound specifications | ||
|} | |} | ||
− | Each sound specification is a single short, followed by a second one if it's not negative or -2, similarly to what happens for the first field of the section. | + | Each sound specification is a single short, followed by a second one if it's not negative or -2, similarly to what happens for the first field of the section. This probably chooses the sound/volume combination based on the given variable. |
==Element list== | ==Element list== | ||
Line 83: | Line 87: | ||
|variable||element specifications | |variable||element specifications | ||
|} | |} | ||
− | Each specification | + | Each specification begins with an unsigned short ''type'' describing what the element is. |
+ | *Type 1 is a picture (WDIB or PICT). Resource ID follows. | ||
+ | *Type 2 is a sound (MSND). Resource ID follows. | ||
+ | *Type 3 is a conditional block associating a variable with an ID array. This structure follows: | ||
{| class="structure" | {| class="structure" | ||
|unsigned short||variable | |unsigned short||variable | ||
Line 91: | Line 98: | ||
|unsigned short||u0 | |unsigned short||u0 | ||
|- | |- | ||
− | | | + | |short||ids[id_count] |
|} | |} | ||
+ | The variable value is used to index the ID array. IDs can be -1, probably meaning that nothing should be done in that case. | ||
+ | *Type 4 seems to refer to pictures, since a WDIB ID follows. | ||
+ | *Type 5 seems to refer to sounds, since a MSND ID follows. | ||
==Other resources== | ==Other resources== | ||
Line 106: | Line 116: | ||
|} | |} | ||
These values can be zero, indicating that the corresponding resource does not exist (i.e. a card might not have an associated HINT). It happens that all the IDs match the VIEW ID when they are not zero. Furthermore, ''rlst_id'' is always set: no cards exist without hotspot descriptions. | These values can be zero, indicating that the corresponding resource does not exist (i.e. a card might not have an associated HINT). It happens that all the IDs match the VIEW ID when they are not zero. Furthermore, ''rlst_id'' is always set: no cards exist without hotspot descriptions. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 14:10, 3 November 2008
Myst | |||
Mohawk | Overview | ||
CLRC | EXIT | HINT | INIT |
MJMP | MSND | PICT | RLST |
VIEW | WDIB | HELP | RSFL |
Scripts | Variables |
VIEW resources are the candidate Myst card representations, as they glue other resources together. In particular they seem to describe what to show on screen, what sound to play and where to find additional data about the card.
Original hints by Petroff Heroj.
Contents
Basic Format
The data is split into five sections with variable size and different meanings:
- card flags
- pictures
- sounds
- element list
- other resources
Card flags
This is just
unsigned short | card_flags |
card_flags seems either 0 or 1. It's 0 for regular cards, while 1 is suspected to disable game saving in that card.
Picture section
This section defines the card background picture, which may be static or dependent on the values of variables. The section starts with
unsigned short | count |
If count = 0 then there is a single, static background picture and the whole section reduces to
unsigned short | count = 0 |
unsigned short | picture_id |
where picture_id is the WDIB (or PICT) resource ID.
Otherwise, if count > 0, the section contains count conditional blocks:
unsigned short | count |
variable | conditional blocks |
Each conditional block associates a variable with an array of picture IDs:
unsigned short | variable |
unsigned short | id_count |
short | picture_ids[id_count] |
The card will use the value of the specified variable to index the ID array and display that picture.
Sound section
This section specifies ambient sounds for the card. It uses a basic "command" mechanism to continue with the already playing sound, alter it or start a different one.
short | sound |
If sound is -1 or -3, the section stops here.
- -1 seems to continue with the current sound.
- -3 seems to stop the current sound at all (mute).
If sound is not negative or -2, the section includes a second field:
short | sound |
unsigned short | volume |
A positive sound stops the currently running sound and starts the given one, while -2 seems to continue with the currently running sound, but different volume.
Finally, if sound is -4, there is a conditional block similar to those in the picture section:
short | sound = -4 |
unsigned short | variable |
unsigned short | count |
variable | sound specifications |
Each sound specification is a single short, followed by a second one if it's not negative or -2, similarly to what happens for the first field of the section. This probably chooses the sound/volume combination based on the given variable.
Element list
This section seems to list elements (pictures, sounds) available to the card. It is suspected that those elements can then be activated by scripts.
unsigned short | count |
variable | element specifications |
Each specification begins with an unsigned short type describing what the element is.
- Type 1 is a picture (WDIB or PICT). Resource ID follows.
- Type 2 is a sound (MSND). Resource ID follows.
- Type 3 is a conditional block associating a variable with an ID array. This structure follows:
unsigned short | variable |
unsigned short | id_count |
unsigned short | u0 |
short | ids[id_count] |
The variable value is used to index the ID array. IDs can be -1, probably meaning that nothing should be done in that case.
- Type 4 seems to refer to pictures, since a WDIB ID follows.
- Type 5 seems to refer to sounds, since a MSND ID follows.
Other resources
The final section points to associated resources that further describe the card, namely RLST, HINT, INIT and EXIT:
unsigned short | rlst_id |
unsigned short | hint_id |
unsigned short | init_id |
unsigned short | exit_id |
These values can be zero, indicating that the corresponding resource does not exist (i.e. a card might not have an associated HINT). It happens that all the IDs match the VIEW ID when they are not zero. Furthermore, rlst_id is always set: no cards exist without hotspot descriptions.