Author Topic: VGA Parser Template - Save / Restore  (Read 458 times)

0 Members and 1 Guest are viewing this topic.

Offline Andre999

VGA Parser Template - Save / Restore
« on: July 20, 2020, 05:55:23 PM »
Hi Everybody.

Long time lurker, first time poster here.

I was just wondering if anybody have tried to make anything out of the VGA Parser Template by OmerMor:http://sciprogramming.com/community/index.php?topic=1798.msg12010#msg12010

or perhaps this one from Troflip:
http://sciprogramming.com/community/index.php?topic=1553.msg8336#msg8336

I have done some attempts out of making something out of these, but I always run into problems with saving and restoring.

Saving: Seems to be fine until the Dialog should close, but it just stays displayed on the screen, still you can move the ego around, but any attempt to use the parser or access the menu bar freezes the game.

Restore: The dialog opens, then the game freeze without listing any saved games.   

The two mentioned templates over are quite old and still have some ASM the Save/SrDialog source. I have merged this with the latest SCI01 template by EricOakford, where save.sc seems to be original Sierra code, of course with no ASM. Every version has the same problem.

Does anybody have any idea what causes this problem and perhaps even how to fix it? I have tried to search this forum, but have not found any information.

Personally, I think there is something wrong with this Interpreter SCIV.exe, making it extremely hard to fix, but maybe there exists an easier solution by fixing the template source?

I have attached the merge of OmerMors Template and the latest SCI01 Template, in case this is useful for anyone.

Thanks in advance for any help.



Offline EricOakford

Re: VGA Parser Template - Save / Restore
« Reply #1 on: July 20, 2020, 06:51:15 PM »
I think the problem is that the graphics are still in EGA, not VGA. Further, this is largely unexplored territory here, as no Sierra games ever had VGA graphics and a parser at the same time. I'll need to look into this further.
My SCI templates
SCI0 SCI0.1 SCI1.0 SCI1.1
SCI2.1 planned

Offline Andre999

Re: VGA Parser Template - Save / Restore
« Reply #2 on: July 20, 2020, 08:31:41 PM »
Thanks, hope you find something. All efforts are much appreciated. I just did a quick conversion of the pics and views to VGA, maybe it is a better starting point for investigating this. For the views I just used "Use imported images palette", so no VGA colors there, but I needed to change to VGA in Version Detection in Companion to show them properly there. For a Pic however, I did get a non EGA pink color in.

So at least this version is more VGA then the previous one. It is attached in case it might be of use.

Unfortuneatly it did not help with Save / Restore ..

I am aware that this is unexplored territory.

Offline lskovlun

Re: VGA Parser Template - Save / Restore
« Reply #3 on: July 20, 2020, 10:32:45 PM »
It could easily be the case that if you feed an interpreter resource data in a different format than it expects, the whole thing blows up in unexpected ways.

Offline Andre999

Re: VGA Parser Template - Save / Restore
« Reply #4 on: July 21, 2020, 06:26:57 AM »
Thanks. Then I guess one way forward is to get the "Version detection" to match that in 1990XMasVGA. To make sure the resources have the proper format.

I've made an attempt at this by replacing pics and views with ones from 1990XMasVGA. The Version Detection does not seem to work properly when managing resources as patch files, so I disabled it.

Now, doing this, Version Detection almost match 1990XMasVGA, but Compression format is still detected to SCI 0, while the demo has SCI 1.

Does anyone know how the compression format is detected? Which kind of resource(s) that determines that one?

An interesting side effect is that background in dialoges change from pink to green.     

Offline EricOakford

Re: VGA Parser Template - Save / Restore
« Reply #5 on: July 21, 2020, 11:33:16 AM »
Okay, I tested the save script in both EGA and VGA versions of Seasoned Professional. The save/restore dialog works as intended in the EGA version, while its graphics stay on screen in the VGA version. My guess is it's the difference in how the EGA and VGA and interpreters do things graphically. Perhaps I should slightly update that script for VGA compatibility, using bits of the SCI1.0 Save script.
My SCI templates
SCI0 SCI0.1 SCI1.0 SCI1.1
SCI2.1 planned

Offline Andre999

Re: VGA Parser Template - Save / Restore
« Reply #6 on: July 21, 2020, 04:29:46 PM »
Thank you for looking a look into this.

Offline EricOakford

Re: VGA Parser Template - Save / Restore
« Reply #7 on: July 21, 2020, 06:20:38 PM »
Here's a change I made to Save, in the end of SRDialog:init. Note the "self open: wTitled 15". For some reason, the VGA interpreter (but not the EGA one) doesn't dispose the dialog fully when the window priority is set to 15. It was changed to -1 for SCI1.0 to prevent saving the priority map.

However, this creates another problem - any views that were under the dialog get redrawn if a Print message is displayed in their area.

This change is coded to only affect the VGA interpreter; if it's EGA, it works the same as before.

Code: [Select]
;Add the text to the dialog, and resize.
(self
add: textI,
setSize:,
center:
;open: wTitled 15
)
;EO: This prevents the VGA interpreter from crashing when
; bringing up the save/restore dialog. However, this creates
; the side-effect of actors popping into the dialog box if
; a Print message is displayed.
(if (Btst fIsVGA)
(self open: wTitled -1)
else
(self open: wTitled 15)
)

(return TRUE)
)
My SCI templates
SCI0 SCI0.1 SCI1.0 SCI1.1
SCI2.1 planned

Offline Andre999

Re: VGA Parser Template - Save / Restore
« Reply #8 on: July 21, 2020, 06:58:18 PM »
I just tested it, and it works perfectly. You Sir, certainly know your stuff. Many, many thanks.  Open wTitled -1 instead of 15, eh. Pretty amazing. Again, many thanks you made my day. 


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.125 seconds with 24 queries.