Author Topic: Wait kernel call  (Read 5402 times)

0 Members and 2 Guests are viewing this topic.

Offline gumby

Wait kernel call
« 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.
« Last Edit: October 15, 2012, 04:16:44 PM by gumby »


In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Collector

Re: Wait kernel call
« Reply #1 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.
KQII Remake Pic

Offline gumby

Re: Wait kernel call
« Reply #2 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.
« Last Edit: October 15, 2012, 10:21:38 PM by gumby »
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.056 seconds with 21 queries.