![]() | Chapter 22: Figures, Sounds and Files | ![]() ![]() |
22.9. Some technicalities about figures and sounds |
(i) Names for figures, such as "Figure of Woodlands", are values for a special kind of value called "figure name". This can in turn be used to define variables, properties and phrases:
The turn card image is a figure name that varies.
An Old Master is a kind of thing. An Old Master has a figure name called appearance. Figure 1 is the file "Giaconda.jpg". The Mona Lisa is an Old Master. The appearance of the Mona Lisa is Figure 1.
To place (F - a figure name) in the gallery: ...
(ii) Similarly, names for sound effects, such as "Sound of rustling leaves", are values for the kind of value "sound name".
(iii) In the released, blorbed-up Glulx file, figures and sound effects are internally given resource ID numbers which count upwards from 2 in order of their declaration. (Figure and sound numbers can thus be intermingled, if their declarations are.) Resource ID number 1 is reserved for the image of the cover art, if there is any. (See the chapter on Publishing.) To obtain these numbers, if we need them, we can use:
Glulx resource ID of (figure name) ... number
This phrase produces the ID number used in the eventual Glulx file for the given figure.
|
Glulx resource ID of (sound name) ... number
This phrase produces the ID number used in the eventual Glulx file for the given sound effect.
|
(iv) Glulx hackers may also like to know that whenever Inform 7 builds a project for Glulx, the Inform 6 code it generates always contains a full copy of John Cater's definitive header file "infglk.h".
Previous | Contents | Next |