[Scummvm-devel] I Have No Mouth - Character disappears on loading a save
Willem Jan Palenstijn
wjp at usecode.org
Thu Sep 4 10:44:00 CEST 2014
Hi Filippos,
Thanks for taking a look. Unless someone else wants to volunteer, I'll take a
shot at fixing this. I think I'm going to go with the hypothesis that the wrong
protagonist loading from 7 years ago was caused by this same uninitialized
_currentProtag.
-Willem Jan
On Wed, Sep 03, 2014 at 10:16:15PM +0300, Filippos Karapetis wrote:
> Hello :)
>
> I had a good holiday, thanks! I hope you had a good holiday as well.
>
> I did check that bit out. I put that _currentProtag variable in while I was
> implementing the differences for IHNM in commit
> 6dc0a1b234e4395d42dc3d73da098fe0ca355a27....sfSwapActors() does something
> funky with the actors, which is where I put that protagonist saving.
> sfSwapActors() swaps the protagonist with a temporary actor for in-game
> scripted animations (e.g. Gorrister walking around, Gorrister showing his
> chest in the mirror etc).
>
> It's been around 7 years since that change, so I really don't remember the
> details. The IHNM engine was in a much more early stage back then, but I
> kind of remember that sometimes while loading, the protagonist was wrong. I
> have removed all the protagonist swapping locally, and loading works, but
> we need to check the extra functionality that sfSwapActors() does in IHNM
> and do it properly, in case I've missed something. As I said though, I
> really don't remember specifics. It's all related to sfSwapActors(), and
> the timing that it is called by game scripts.
>
> Unfortunately, this is one of these changes that will require a full
> playthrough with regular saving and loading.
>
> Regards
> Filippos
>
>
> On Wed, Sep 3, 2014 at 3:26 PM, Willem Jan Palenstijn <wjp at usecode.org>
> wrote:
>
> > Hi,
> >
> > I hope you've had a good holiday. Have you had a chance to take a look?
> >
> > -Willem Jan
> >
> > On Wed, Aug 20, 2014 at 02:34:24AM +0300, Filippos Karapetis wrote:
> > > I'm currently on vacations, so I'll check the issue out next week
> > >
> > > Filippos
> > >
> > >
> > > On Tuesday, August 19, 2014, Willem Jan Palenstijn <wjp at usecode.org>
> > wrote:
> > >
> > > > On Sun, Aug 17, 2014 at 11:06:48AM +0000, Willem Jan Palenstijn wrote:
> > > > > Hi all,
> > > > >
> > > > > A possible cause for this issue is _scene->_currentProtag not being
> > > > initialized when starting a new game.
> > > > >
> > > > > Back in 2007 we apparently worked around that by fixing up invalid
> > > > protagonist IDs in the loading code. I'm not sure if this is what
> > happened
> > > > here, but if this uninitialized protagonist ID happened to be valid but
> > > > incorrect, this fixup would change the location of the protagonist.
> > > > >
> > > > > Could any SAGA devs offer any insights or a good suggestion on
> > how/where
> > > > to initialize _currentProtag?
> > > >
> > > > Less feedback than I had hoped, so let me offer two suggestions myself.
> > > >
> > > >
> > > > There seem to be at least 3 ways in which the protagonist is tracked. A
> > > > kProtagonist flag, the Actor::_protagist pointer stored in the (very
> > > > confusingly named) Actor object, and the Scene::_currentProtag storing
> > an
> > > > object ID.
> > > >
> > > > I'm not at all sure why Scene::_currentProtag exists, as it seems to be
> > > > entirely unused except for swapping (and breaking!) the current
> > protagonist
> > > > when loading a game, and on top of that it is uninitialized.
> > > >
> > > > The least invasive approach would probably be initializing
> > > > Scene::_currentProtag to Actor::_protagonist->_id after loading the
> > scene.
> > > >
> > > > It may be better to remove _currentProtag entirely, and just save
> > > > Actor::_protagonist->_id directly.
> > > >
> > > >
> > > > Opinions? I'm not at all familiar with SAGA, so I may very well be
> > missing
> > > > a reason for these things. (Possibly related to ITE rather than IHNM;
> > no
> > > > idea.)
> > > >
> > > >
> > > > -Willem Jan
> > > >
> > > >
> > > >
> > ------------------------------------------------------------------------------
> > > > _______________________________________________
> > > > Scummvm-devel mailing list
> > > > Scummvm-devel at lists.sourceforge.net <javascript:;>
> > > > https://lists.sourceforge.net/lists/listinfo/scummvm-devel
> > > >
> > >
> > >
> > > --
> > > "Experience is the name every one gives to their mistakes" - Oscar Wilde
> >
> > >
> > ------------------------------------------------------------------------------
> > > Slashdot TV.
> > > Video for Nerds. Stuff that matters.
> > > http://tv.slashdot.org/
> >
> > > _______________________________________________
> > > Scummvm-devel mailing list
> > > Scummvm-devel at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/scummvm-devel
> >
> >
>
>
> --
> "Experience is the name every one gives to their mistakes" - Oscar Wilde
More information about the Scummvm-devel
mailing list