Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to clear a buffer quickly?
#1
I'm trying to implement tinyptc to speed up my screen saver. Problem is, it works faster using pset and screencopy at the moment.

One thing that would help the speed of the tinyptc code would be clearing the buffer in one fell swoop (setting it to all zeros) instead of using a for next loop to set all 480,000 entries one at a time.

I know this is probably a stupid newb type question but I couldn't find the answer using the forum search.


Also, I'm using a screensaver example that I found posted on this board I think. It uses the following function:

Code:
FUNCTION keypressed()
    DIM AS INTEGER temp,tx,ty
    FOR temp = 0 TO 127
        IF MULTIKEY(1) THEN RETURN 10
    NEXT
    GETMOUSE tx,ty,,temp
    IF tx <> 320 OR ty <> 240 OR temp <> 0 THEN RETURN -1
    RETURN 0
END FUNCTION

That no longer works when I am using tinyptc. The program will exit as soon as it starts even though no key has been pressed and no mouse movement has occured. Any ideas why?
Reply


Messages In This Thread
how to clear a buffer quickly? - by Dick_Burns - 03-03-2006, 10:39 AM
how to clear a buffer quickly? - by Anonymous - 03-03-2006, 10:59 AM
how to clear a buffer quickly? - by Dick_Burns - 03-03-2006, 11:28 AM
how to clear a buffer quickly? - by Dick_Burns - 03-03-2006, 11:47 AM
how to clear a buffer quickly? - by NecrosIhsan - 03-03-2006, 05:04 PM
how to clear a buffer quickly? - by wallace - 03-05-2006, 01:57 AM
how to clear a buffer quickly? - by Anonymous - 03-05-2006, 02:22 AM
how to clear a buffer quickly? - by Antoni Gual - 03-05-2006, 03:58 AM
how to clear a buffer quickly? - by Dick_Burns - 03-05-2006, 09:41 AM
how to clear a buffer quickly? - by DrV - 03-05-2006, 10:19 AM
how to clear a buffer quickly? - by Anonymous - 03-06-2006, 09:35 AM
how to clear a buffer quickly? - by Dick_Burns - 03-07-2006, 10:08 AM
how to clear a buffer quickly? - by Anonymous - 03-08-2006, 02:44 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)