[Scummvm-devel] Contributing to ScummVM with an interpreter for Magnetic Scrolls?

Paul Gilbert paulfgilbert at gmail.com
Sun May 5 00:15:10 CEST 2019


HI Thomas,

Not directly for libxglk, I'm afraid. What I did for the ScummVM
implementation was to utilize a nifty feature of the ScummVM framework that
allows the creation of virtual file systems that expose files as if they're
standard files you can open with a Common::File just like files in the game
directory. Using this, in the engines\glk\frotz\pics.cpp I create a virtual
archive of all the pictures that the original Infocom games had, and expose
them as a really simple "raw" format, like pic1.raw, pic2.raw, and so on.
The Glk core has then been enhanced so that when you request to, for
example, draw picture #1, in addition to looking for pic1.jpg, pic1.png, it
also looks for pic1.raw, and if it finds it, loads it up and displays it
just like it would JPG & PNG.

This way, I didn't have to put Frotz specific rendering code in the core
Glk layer. So I'll do something similar when I implement the existing
Magnetic Glk engine. Maybe you could do something similar for libxglk if
you keep using it.

Paul.





On Sat, May 4, 2019 at 8:40 PM dettus <dettus at dettus.net> wrote:

> Hello.
>
>
> So, I looked into GLK. As you can see from the screenshot at
> http://www.dettus.net/dMagnetic/xglk_pawn.png , I made some progress.
> However, pictures seem to be handled quite archaic by this.
> Or at least with the libxglk frontend. Apparently, there are two ways:
>
> 1. Draw the rectangles yourself (Which is what I did. Which is
> slooooooooow.)
> 2. Store the image as an .png or .jpeg file, load it, display it.
>
> Personally, I would have preferred an interface where I could hand over
> a memory pointer, and let the GUI figure out the best way to render it
> on screen.
>
>
> On top of that: The libxglk library itself is outdated.
>
>
> Any hints?
>
>
> Thomas
>
>
>
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.scummvm.org
> https://lists.scummvm.org/listinfo/scummvm-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20190505/e645fee3/attachment.html>


More information about the Scummvm-devel mailing list