<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hey Scummers,<br><br>I noticed we still have a big TODO regarding the Maniac Mansion in Day of the Tentacle support.<br>Ive been speaking with Tobias and Eugene about this and thought it best to <br>post to -devel to get some more opinions. I'll openly admit right now that I will probably make a few mistakes<br>in this mail, Im not a ScummVM wiz, and Im not a great programmer, I also dont know exactly how this will work.<br><br>I did a brief test earlier, this did not get me very far as RTL support is curently unreachable in the SCUMM engine code without<br>using the GUI(yet)<br>I simply added "requestSave(0, "MMDOTT");" under the "startManiac();" function.<br>I chose the save slot 0 because it is currently used for Autosave, since we are saving and exiting I didnt <br>see a need to keep this for autosave(perhaps somebody could tell me otherwise)<br>and as a quick test I used "restart();" It became clear that I would need to silence the <br>"Successfully saved game state in file:\n\n%s" dialog.<br>This was as far as I got today.<br><br>It is important to mention that in these past couple of months have been quite productive for the SCUMM engine<br>not only did we see Loom TG16/PCE support arrive, but a quick look at the patch tracker <br>shows me that we are also heading towards C64 SID sound support(Maniac Mansion and ZAK), PCE/TG16 HES sound support(LOOM TG16)<br>Also, please dont think I am trying to impress you or show off, but I added patches to support MI1 SEGA CD passcodes,<br>and I created a patch to support save/load with the original Maniac Mansion NES save/load dialog.<br>Admittedly these patches were only a few lines of code but I feel that they bring the SCUMM engine that much closer to <br>completion.<br>Wouldnt it be nice to get most of the large SCUMM TODO's out of the way before the next release?<br><br>Since GSOC 2007/2008?? we now have a nice clean way to exit from games<br>(SCUMM at least)(PS. Is anybody actively maintaining this for newer engines?)<br><br>I spoke with Eugene and Tobias, both agreed that a nice start would be to <br>create a temporary save game, which could be restored later to return to Day of the Tentacle on Maniac Mansion's exit.<br><br>Eugene stated that we should not use the same method that the original implementation used,<br>they kept Day of the Tentacle interpreter and vars in memory and simply instantiated the Maniac Mansion interpreter and vars<br>in memory too. <br>In the modern day, where ScummVM supports both versions in one interpreter natively there is no<br>need for this.<br>This ends my input from Eugene.<br><br>The actual switch between Day of the Tentacle and Maniac Mansion occurs in Day of the Tentacle room 42. One of the object scripts <br>calls a function to load Maniac Mansion(If you open the Day of the Tentacle data in SCUMMEX, and visit room 42, it is the last OBCD script)<br>(Without the disassembly I dont know anymore about what this function actually does)<br>All I know is that this script is groped by SCUMMVM and further processing 'should' be done<br>by the SCUMM engines function startManiac()<br><br>Speaking with Tobias today I was discussing the best method for saving/loading in both Day of the Tentacle/Maniac Mansion when startManiac is called.<br>It is important to keep the functionality of the Day of the Tentacle saves and the Maniac Mansion saves standalone. since both games can be run by SCUMMVM<br>we need to ensure that we do not create a saved game that is incompatible with the current standard.<br>A consideration is that to run Maniac Mansion through Day of the Tentacle we may need to either add it manually to the games list or implement some <br>function which will detect Maniac Mansion data files under the MANIAC directory, underneath the Day of the Tentacle directory.<br><br>In conversation with Tobias we discussed various methods in which we could achieve the save game problem.<br>Im going to quote Tobias directly because I could not put it any better. I hope he has no objections.<br><br>Method 1)<br>Create saved games individually for each version(Day of the Tentacle and Maniac Mansion)<br>This would mean we allow each version to save their own game, and this would mean that we could restore a Maniac Mansion save we created while<br>running the game through room 42's method of loading.<br><br>Benefits: We can continue on in Maniac Mansion, without having to return to Weird Ed's room each time to play. <br><br>Negatives: We have saves if we wish to play Maniac Mansion as a standalone game<br> <br>Method 2) Implement a parentSave variable in the SCUMM engine for Day of the Tentacle, which would allow the included Maniac Mansion game to save<br>its current position in a save game appended to the Day of the Tentacle save. Upon exit of Maniac Mansion the var parentSave would be checked and Day of the Tentacle <br>could be restarted (we could pass this to a "stopManiac();" function which would set the required vars and load the correct <br>script to have Day of the Tentacle respond with "Jeepers" after Bernard finishes playing.<br>In this method we would save the parentSave var to the Maniac Mansion savedgame too, which would allow us to locate the correct save to restore.<br><br>Benefits: We can keep Maniac Mansion in Day of the Tentacle saves specifically for when we run Maniac Mansion in Day of the Tentacle.<br>Negatives: We cannot access Maniac Mansion in Day of the Tentacle saves when we run Maniac Mansion standalone.<br><br>Tobias also introduced the possibility of keeping the Day of the Tentacle save in memory after closing the Day of the Tentacle engine<br>and restoring this when Maniac Mansion quit happened, Instead of saving directly to the disc.<br>My understanding of this reasoning was that after restoring we would no longer require the temp<br>Day of the Tentacle save to be stored on disc, this could cause some confusion to the user.<br>I have a questions about this. <br>What would happen if SCUMMVM crashed with a temp save in memory, would we expect the user to play through again?<br><br>I hope this mail attracts some discussion from the recipients.<br>Thanks for reading this far.<br><br>Robert Megone<br>                                        <br /><hr />View your other email accounts from your Hotmail inbox. <a href='http://clk.atdmt.com/UKM/go/186394592/direct/01/' target='_new'>Add them now.</a></body>
</html>