FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

Why do games call system(32) for "more" prompts?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
RealNC



Joined: 07 Mar 2012
Posts: 914

PostPosted: Mon Mar 16, 2015 8:43 pm    Post subject: Why do games call system(32) for "more" prompts? Reply with quote

I recently noticed that almost every game seems to eat up CPU cycles when just waiting for a key press after showing a "more" prompt. They seem to do the following:

Code:

while not key
{
    system(32)
    key = system(11)
}


I'm wondering what the reasoning is. I would have expected a "pause" statement instead of generating CPU load on something that should be a simple wait operation?
Back to top
View user's profile Send private message
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Mon Mar 16, 2015 10:13 pm    Post subject: Reply with quote

It's used as a fancy cursor-hider during "press a key" type things. Honestly, I was unsure how much processing power such a trick would use up. If it's really drastic, I could change it so the cursor goes to the status window (which should be hidden in Hugor, right? even though it'd still show in the old official 'terp).
Back to top
View user's profile Send private message AIM Address
RealNC



Joined: 07 Mar 2012
Posts: 914

PostPosted: Tue Mar 17, 2015 4:35 pm    Post subject: Reply with quote

Roody_Yogurt wrote:
It's used as a fancy cursor-hider during "press a key" type things.

OK, that makes sense. I forgot about the blinking cursor hack in Hugor.


Quote:
Honestly, I was unsure how much processing power such a trick would use up. If it's really drastic, I could change it so the cursor goes to the status window (which should be hidden in Hugor, right? even though it'd still show in the old official 'terp).

I assume you mean RoodyLib. No, I think keeping it as-is is a good idea. The CPU load can be reduced in Hugor itself, as right now it does some unnecessary screen repaints that I can cut down on. Since there's no output from the game during the delay/getkey loop, getting rid of the repaints should reduce the CPU load.
Back to top
View user's profile Send private message
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Tue Mar 17, 2015 5:15 pm    Post subject: Reply with quote

Yeah, I meant in Roodylib, since it has a HiddenPause routine for "press a key" type stuff (although it's based on some Future Boy! code so it shows up in spots there, too).
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended