ifvms.js icon indicating copy to clipboard operation
ifvms.js copied to clipboard

Update API to match Quixe

Open erkyrath opened this issue 3 years ago • 3 comments

These follow the changes in https://github.com/erkyrath/glkote/issues/46 , https://github.com/erkyrath/quixe/issues/48 .

In zvm.js, the lines:

	// The Quixe API expects the start function to be named init
	this.init = this.start;

...must be changed to

	// The Quixe API expects the prepare function to be named init
	this.init = this.prepare;

ZVM.prepare() is now an obsolete name; you call ZVM.init(image, opts) first. ZVM.start() is now correctly named and doesn't have to be changed.

(I have made this change in the lectrote repo; see https://github.com/erkyrath/lectrote/commit/ad7f87a3abbffc6eccce950a65091a421c17e864 .)

Also, in dispatch.js:

set_vm( vm )
{
	this.vm = vm
}

...should now look like

init( opts )
{
	this.vm = opts.vm
}

(In the Lectrote repo, I handled this with a patch line in zplay.html.)

erkyrath avatar Dec 28 '20 21:12 erkyrath

Once these changes are in the lectrote repo, we can pull the TODO lines out of zplay.html and formats.js. See https://github.com/erkyrath/lectrote/issues/128 .

erkyrath avatar Dec 28 '20 21:12 erkyrath

Hmm. Such a change is technically semver major. I'm in the middle of major changes for 2.0, so I can definitely make this change in 2.0, but that won't be ready for a long time. For now it might be better to just patch in Lectrote's formats.js?

Lectrote is also a couple versions behind. I'll make a PR sometime soon.

curiousdannii avatar Dec 28 '20 23:12 curiousdannii

I've done enough patches in the Lectrote repo that everything runs. You can schedule the rest as suits.

I figure when your 2.0 lands, I can call it Lectrote 1.4.0.

erkyrath avatar Dec 29 '20 04:12 erkyrath