I'm thinking it's basically this line:
'put the tile to check over the test copy with XOR
PUT (320, 200), temp(), XOR
'zoom in on that area
The XOR here fails to behave as you'd expect and turns the screen segment black.
******************
Question:
'get the test copy to see if it was erased
GET (320, 200)-(335, 215), temp(257)
In the above, shouldn't you GET temp()? Why get temp(257)? What am I missing here?
The 257 is where the data storage begins, I don't want to over write the original tile which is stored from 0-256
I'm actually surprised you wouldn't have known that Steve.
That way I can check to see if there are any colors left meaning that pixels weren't erased, and a new tile was found. then I can PUT TEMP(0) onto the found layer and don't have to waste cycles getting the original test tile again.
XOR is used to erase a previous sprite using PUT, so if you put 2 copies of a sprite in the same place and use XOR it is supposed to basically erase the image. thats why I'm using it to find all the tiles that make up WarCrafts human campain maps.
I test each one by puting the tile XORed over a putimage copy and GET the area and count the RGB values, if the sprite is erased by XOR the result is 0 and I ignore that tile cause I already found it.
OH yeah thats right, GET copies the image correctly after the PUT (),,XOR. but I can't enlarge the image with it that is why I'm using PUTIMAGE to move it to the top left corner.