My next thing I’m working on for Bisquixe is to add image support.
The Quixe interpreter actually already has image support, it just requires a manual setup phase where you have to use a tool or type in a list of javascript objects for each object.
I’d like to automate that. I have some ideas on what to do on the quixe end (I’m going to model some of the pre-existing code that uses arrays, and just use jquery to manually set the game_options info when play begins.)
However, I need to send everything to quixe through inform 6.
So my current plan is to do something like:
To image-upload (currentList - a list of names of figures):
(- convert {currentList} to array somehow;
glk_add_images(thatarray)
-)
I imagine I’d actually need to split it up, since 4 things have to be passed (the glulx id number, the url, the height and the width). So something like:
- Create a list of the id numbers, and pass it to a global inform 6 array.
- Create a list of urls, and pass it to a global inform 6 array.
- Likewise create global inform arrays for height and width.
- Shove them all into my new glk_add_images() function which will have 4 arrays as input.
The part where I’m stuck is how to get the inform 7 list and make it an inform 6 array. So far I haven’t used any code that mixes Inform 6 and Inform 7, and I haven’t created any global inform 6 variables to be used in one function and passed to another.
If this works, I won’t have to add any image code to Bisquixe, as Quixe already has a lot.