[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Assembly routine to tell if a hires pixel is currently set?
Rich J. (aiiadict@hotmail.com) wrote:
: mjmahon@aol.com (Michael J. Mahon) wrote in message news:<20040112174003.21847.00001619@mb-m19.aol.com>...
: > >From Applesoft, you can code a 1-move shape table and XPLOT to the
: > >location, then check the collision detect flag.
Where did that come from? My Applesoft is rusty! The command is XDRAW.
: > I have often used this method, and it is fast and simple.
: >
: > There are many interesting uses for the one-move shape!
: >
: Can someone describe this method in more detail, and perhaps
: include source code?
A sample one-move shape table is something like:
*300:01 00 06 00 04 00 00 <- One shape
6 bytes to start of first shape
Move up once plotting
End shape table
*E8:00 03 <- Shape table located at $0300
]POKE 234,0
]ROT=0:SCALE=1:XDRAW 1 AT X,Y
]PRINT PEEK(234)
If I remember correctly, PEEK(234) will be non-zero if any point affected
by the XDRAW is ON. Since the XDRAW only affects the point at X,Y, it
will tell you the status of the point at X,Y when the shape was drawn.
Note also that this will invert that pixel. Don't want to invert the
pixel? Read the counter, then XDRAW again.
--Dave Althoff, ][.
--
/X\ _ _ *** Closed for the season. ***
/XXX\ /X\ /X\_ _ /X\__ _ _ _____
/XXXXX\ /XXX\ _/XXXX\_ /X\ /XXXXX\ /X\ /X\ /XXXXX
_/XXXXXXX\__/XXXXX\/XXXXXXXX\_/XXX\_/XXXXXXX\__/XXX\_/XXX\_/\_/XXXXXX