[Scummvm-devel] SCI midiparser

Filippos Karapetis bluegr at gmail.com
Fri Sep 20 14:44:39 CEST 2013


The SCI music code has been based on Greg's SCI implementation (plus a lot
of parts from FreeSCI itself).

Greg implemented the initial custom MidiParser (MidiParser_SCI), so the
reason why everything is processed in parseNextEvent() is because Greg did
it that way...

In retrospect, the best place for processing the signals should have been
placed in sendToDriver() indeed, so IMHO, that's what should be done....

As mentioned, this is a rather invasive change, especially because a lot of
animations in SCI are synchronized with custom signals in the game music
itself, so we would need to check known places that were problematic with
that signal synchronization.

Do not that there are a couple of cases related to music that are
inherently broken, because the associated game scripts have timer issues. A
notable example is the synchronization of the song and the little ball in
the intro of Freddy Pharkas (Floppy version).

Regards
Filippos


On Fri, Sep 20, 2013 at 12:34 PM, Willem Jan Palenstijn <wjp at usecode.org>wrote:

> Hi all,
>
> This is a bit of an historical/design question:
>
> Is there any reason the SCI midiparser does processing of signals, cues,
> loops
> and such in the parseNextEvent() function instead of in the sendToDriver()
> function?
>
> Putting that processing in the parseNextEvent means it gets done _before_
> the
> delay associated to the event, which means we now have all these hacks to
> delay
> things at the top of parseNextEvent.
>
> I was thinking of changing this, but it's a rather invasive change, so any
> insights or historical perspective would be welcome.
>
> It may require putting the "META Event" processing from
> MidiParser::onTimer in
> a new virtual function to allow us to override it for SCI's looping
> behaviour,
> but that shouldn't be a problem.
>
>
> -Willem Jan
>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
> SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20130920/ab5f5166/attachment.html>


More information about the Scummvm-devel mailing list