ScummVM Internal's questions

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
User avatar
Windows TV
Posts: 62
Joined: Mon Dec 26, 2011 7:07 pm
Contact:

ScummVM Internal's questions

Post by Windows TV »

Hi, I am looking to find some information regarding a few things relating to the Humongous games. But first I like to apologize if I am posting in the wrong topic or even if questions regarding the code is allowed or not.

I would like to know how a WIZ images are drawn. I am able to create WIZ images for HE games and I have been replacing them internally in the game files when I need a solid BG to cut out costumes. I'd like to be able to have ScummVM load in the custom WIZ image for each cut scene so I don't have to manually add it to the game.

How are Room Backgrounds drawn? I have a single-colored background that I use for cutting out room animations as well.

How are Verbs(click points/objects) drawn? I'd like to hide the visibility of these so when a costume's animation overlaps the Verbs the verb just won't be visible.

And Finally, can you point me to where screenshots are made? I am going to set up a timer to save each frame of animation for the costumes.

I may honestly delete this(if posts can be deleted by ourselves), I feel like what I am asking may come off as very weird xD

Thanks!!
User avatar
sev
ScummVM Lead
Posts: 2306
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Re: ScummVM Internal's questions

Post by sev »

WIZ is a pretty complex format. Basically, it is yet another Virtual Machine with its own opcodes.

You may find all the relevant code in this file: https://github.com/scummvm/scummvm/blob ... wiz_he.cpp

For hiding backgrounds/verbs etc, you would need to hack the source directly, there are no direct means of disabling drawing those. Most probably, it will be per-game thing because HE games control everything via scripts.

Screenshots could be made by calling Graphics::createScreenShot(Graphics::Surface &surf) which you then can dump to BMP or PNG. You may find a sample code in gui/EventRecorder.cpp


Eugene
User avatar
Windows TV
Posts: 62
Joined: Mon Dec 26, 2011 7:07 pm
Contact:

Re: ScummVM Internal's questions

Post by Windows TV »

sev wrote: Mon Oct 26, 2020 9:17 pm WIZ is a pretty complex format. Basically, it is yet another Virtual Machine with its own opcodes.

You may find all the relevant code in this file: https://github.com/scummvm/scummvm/blob ... wiz_he.cpp
Indeed they are! So I'm trying to override the entire AWIZ block SVM reads with an external custom AWIZ file. I am looking at line 1439(uint8 *Wiz::drawWizImage) inside wiz_he.cpp. This is where I assume I should override the file being drawn the only issue is I am having a bit of trouble with what I am looking at. When debugging I can't log the raw file. Though it seems like I should be able to access it there.
sev wrote: Mon Oct 26, 2020 9:17 pm For hiding backgrounds/verbs etc, you would need to hack the source directly, there are no direct means of disabling drawing those. Most probably, it will be per-game thing because HE games control everything via scripts.
So for the backgrounds I am looking to override the BMAP block of data in SVM. If possible the entire RMIM block. The only reason I hesitate with the entire block is I can't recall (SCUMM wise) if replacing the entire RMIM block would break room functionality. I don't think it should but when I hack the game and put in the image I've just replaced the BMAP block only.

And the Verbs, inside SVM would I be able to move their "y" value to off the screen?
sev wrote: Mon Oct 26, 2020 9:17 pm Screenshots could be made by calling Graphics::createScreenShot(Graphics::Surface &surf) which you then can dump to BMP or PNG. You may find a sample code in gui/EventRecorder.cpp

Eugene
Thank you, the screenshotting will be the easiest part based on this!!

Thank you!!!!
User avatar
Windows TV
Posts: 62
Joined: Mon Dec 26, 2011 7:07 pm
Contact:

Re: ScummVM Internal's questions

Post by Windows TV »

We were able to get it, thank you for all the help!!
Image
User avatar
Windows TV
Posts: 62
Joined: Mon Dec 26, 2011 7:07 pm
Contact:

Re: ScummVM Internal's questions

Post by Windows TV »

sev wrote: Mon Oct 26, 2020 9:17 pm Screenshots could be made by calling Graphics::createScreenShot(Graphics::Surface &surf) which you then can dump to BMP or PNG. You may find a sample code in gui/EventRecorder.cpp

Eugene
Hey,

Hope you don't mind me asking another question regarding screenshots. I think I got the Graphics::createScreenShot where I need it to be but it doesn't seem to be taking a screenshot.

I am trying to create a method that takes a screenshot (and saves it to the local disk) with every screen/frame update (FPS) of a SCUMM game when activated by a key pressed on the keyboard (and then disabled when pressed again). Is there anyway you can help me out with this? Pseudo code may be asked for so please forgive me in advance, C++ is not my strongest.

Thank you!!
Post Reply