Re: [stella] Fire button routines

Subject: Re: [stella] Fire button routines
From: Glenn Saunders <cybpunks@xxxxxxxxxxxxx>
Date: Wed, 21 Jun 2000 21:17:13 -0700
At 10:33 PM 6/21/2000 -0500, you wrote:
I does need to clear it if it want's to recognize another press later.(I
don't know why you wouldn't)  You don't really have to test the current
state.  I guess you could read the latch, and only if it has latched in a
press clear it, otherwise not, but that would probably take more code and
time than simply clearing it each time.

A game like Enduro needs to know when the fire button has been released after it's been held for a while. The latched mode will be stuck until you clear it. If you just clear it when it's set every frame, and you still have your thumb on the button, then the latch won't be set again, will it? So it "forgets" that you are still holding the button down. Hence the need to manually poll the current state. The latch is only set when the button goes from an unpressed to a pressed state, right?


If you simply poll the actual current state once a frame I guess that would be accurate enough for most games. Odds are you won't be able to hold the fire button down (or momentarily release it) so briefly that it doesn't cross at least one read in time to register it.


Glenn Saunders - Producer - Cyberpunks Entertainment Personal homepage: http://www.geocities.com/Hollywood/1698 Cyberpunks Entertainment: http://cyberpunks.uni.cc


-- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/

Current Thread