Mail Archives: djgpp/1998/11/14/21:20:20
On Sun, 15 Nov 1998 00:02:30 -0000, "Arthur" <arfa AT clara DOT net> wrote:
>You can't use readkey, but if the keyboard handler's installed, an external
>array is used to keep track of key presses. Try this:
>
>if(key[KEY_UP]) move_up();
>if(key[KEY_DOWN]) move_down();
>..
>and so on.
Okay, so how would I define the array? (I told you I'm a newbie. :)
>> 2. (a general coding question) How can I return back to a specific
>> point in a function? (without using GOTO of course. :))
>
>The only stylistically acceptable way of doing this is within a
>for(...;...;...){} loop, a do{}while(); loop, or a while(){}; loop. Anything
>else is generally put down to bad structure.
Sorry, misworded question on my part. It should have read: How can I
return back to a specific point in a function AFTER calling another
function? I.e. main() processes some stuff, calls temp(), then temp()
processes some more stuff, then returns to a point where it left off
in main().
>That's a perfectly valid method of doing it. The "dirty rectangles" method
>is sometimes quicker, although it really does depend on what your game does.
Allright. Now can you point me in the direction of some sample dirty
rectangles code?
- Steve
- Raw text -