Community

SCI Programming => SCI Syntax Help => Topic started by: gumby on October 15, 2012, 04:14:51 PM

Title: Wait kernel call
Post by: gumby on October 15, 2012, 04:14:51 PM
This isn't working for me.  It waits, but not nearly as long as it should.  I'm thinking this is hopeless, because we need to use DosBox for running these games (at least in 64 bit environments).  I know there is a way to set the cycles in DosBox, but I don't want to be dependent on it being set properly.  I'm guessing this probably works just fine if you use SCIV.exe to launch a game.

Has anyone successfully implemented a wait in their games in some other way?

EDIT:  Never mind, just remembered this post http://sciprogramming.com/community/index.php/topic,525.0.html (Adding a real-time game clock to the status line).  I should be able to use something similar.
Title: Re: Wait kernel call
Post by: Collector on October 15, 2012, 06:26:42 PM
Of course you are getting to the heart of the cause of the timer bugs that have plagued many of the SCI games, though they were far more common in the SCI1 games. Perhaps if you work out the code for this implementation you can post it here and on the Wiki.
Title: Re: Wait kernel call
Post by: gumby on October 15, 2012, 08:36:06 PM
Heh, I misread the documentation.  The Wait() call accepts the number of cycles to wait, not seconds.  I got confused by the example.  A call of

Code: [Select]
  Wait(120)


Will wait for 2 seconds.  I read '2 minutes', lol.  Seems to work just fine.