Opened 4 months ago

Closed 4 months ago

#12018 closed defect (fixed)

Counterfeit Monkey won't start

Reported by: angstsmurf Owned by: dreammaster
Priority: normal Component: Engine: GLK: Glulxe
Version: Keywords:
Cc: angstsmurf Game:

Description

Counterfeit Monkey crashes on startup with:
Glulx fatal error: Unknown destination type in store operand.!

Game can be downloaded here:
https://ifdb.tads.org/viewgame?id=aearuuxv83plclpl

Change History (5)

comment:1 by dreammaster, 4 months ago

Thanks for the report. I was able to fix a few startup issues, but now I'm getting an error trying to show the title screen image.. the PNG image seems to be a form of PNG we've not previously encountered.. a 17 color paletted image with a separate table of transparency/alpha amounts for each color. It'll require some further experimentation, so I'm not sure if they'll any quick solution for it.

comment:2 by angstsmurf, 4 months ago

It was a long time ago I messed with it, but I think it is saved in Photoshop as standard PNG-24, and then shrunk (non-destructively) with ImageOptim (https://imageoptim.com/mac). If it has transparency it is probably a mistake, and can be ignored.

comment:3 by dreammaster, 4 months ago

Thanks for letting me know. That correlates with what I saw when I hacked the code to ignore the assert. But of course since the PNG decoder is a core ScummVM class, I can't just disable the check. But I think I've got a handle on it. The transparency data does indeed seem to be alpha values for each of the palette entries, and the transparency color always has to start at palette index 0. So previously, we only had PNGs that had the single transparent color that was fully transparent.

So in cases such as this PNG, I should be able to do a proper implementation that creates the decoded image as a full RGBA rather than an 8-bit image with a seperate RGB palette being specified. In theory :)

comment:4 by angstsmurf, 4 months ago

Great! Looking closer at all the images included in the .gblorb, there are several that have unnecessary transparency. I'll remove it in the next Counterfeit Monkey release and hopefully save a couple of bytes.

comment:5 by dreammaster, 4 months ago

Resolution: fixed
Status: newclosed

Okay, I was able to fix the PNG decoder successfully, and the PNG looks good. Let us know if you do another release in the future, and we'll add a new detection entry for it if necessary :)

Note: See TracTickets for help on using tickets.